Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acpica stub #31

Closed
wants to merge 4 commits into from
Closed

Acpica stub #31

wants to merge 4 commits into from

Commits on May 29, 2014

  1. acpiexamples: Enable notify/region examples.

    The patch is generated in the purposes of:
    1. AcpiOsPrintf()/AcpiOsVprintf() need to be linked by applications;
    2. utglobal.o linkage is prefered than defining DEFINE_ACPI_GLOBALS for
       applications, then applications that have already linked to utinit.o
       need to be updated, especially, their stubs need to be updated.
    
    The acpiexamples loads tables and invokes control methods, waiting for
    notifications, possibly in the future we can add region demonstrations.
    Thus it makes senses to link acpiexamples to all of the following
    components:
      tables
      namespace
      dispatcher
      executer
      parser
      events (notify/region part)
    
    This patch updates acpiexamples in the way of:
    1. Linking all namespace/utilities objects and deleting stubs of
       AcpiUt/AcpiNs functions from exstubs.c;
    2. Linking all region/notify objects and deleting relevent stubs of AcpiEv
       functions from exstubs.c;
    3. Adding region/notify examples in the DSDT.
    4. Converting AcpiOsExecute() into a direct callback invocation.
    5. Linking hwpci.c, the file has nothing to do with hardware, it is more
       suitable to be utpci.c;
    6. Since no hardware samples are demonstrated in acpiexamples, defining
       ACPI_REDUCED_HARDWARE to 1 and deleting relevent stubs of AcpiHw
       functions from exstubs.c.
    
    This patch thus updates exstubs.c with such minimal efforts. Lv Zheng.
    
    Signed-off-by: Lv Zheng <lv.zheng@intel.com>
    Lv Zheng committed May 29, 2014
    Configuration menu
    Copy the full SHA
    d50edaa View commit details
    Browse the repository at this point in the history
  2. acpinames: Cleanup stubs by linking some utilities objects.

    This patch tries to reduce stubs for acpinames by adding some utilities
    objects to link.
    
    By doing so, we have to create stubs for AcpiEvTerminate(). While
    definining ACPI_REDUCED_HARDWARED can eliminate such requirements
    permanently. Then we are able to delete some AcpiHwXXX() AcpiEvXXX() stubs
    from anstubs.c
    
    It also makes senses to link exsystem.o and exmutex.o because they've
    already been made no-op by underlying OSL. By doing so, we can reduce some
    AcpiExXXX() stubs.
    
    Linking utids.o and uteval.o can help to reduce lots of stubs. It's safe to
    do so as such functions are not invoked by acpinames.
    
    This is the minimal effort to removing stubs from acpinames. Lv Zheng.
    
    Signed-off-by: Lv Zheng <lv.zheng@intel.com>
    Lv Zheng committed May 29, 2014
    Configuration menu
    Copy the full SHA
    4b8292b View commit details
    Browse the repository at this point in the history
  3. Utilities: Cleanup DEFINE_ACPI_GLOBALS by moving AcpiUtInitGlobal() f…

    …rom utglobal.c to utinit.c.
    
    The utglobal.c is used to define and initialize global variables.  It makes
    sense if just adding utglobal.o to applications that are using such
    variables. But AcpiUtInitGlobals() is preventing us from doing so as this
    initialization function references other components' initializations code,
    which leads to the requirement that many files should also get linked if
    one wants to link utglobal.o.
    
    By eliminating the stubs for acpiexamples, acpinames, iasl, now it is
    possible to just move AcpiUtInitGlobal() to utinit.c for applications that
    require this function to link.
    
    By linking utglobal.o, we can stop defining DEFINE_ACPI_GLOBALS for
    applications (currently only acpidump is affected). Lv Zheng.
    
    Signed-off-by: Lv Zheng <lv.zheng@intel.com>
    Lv Zheng committed May 29, 2014
    Configuration menu
    Copy the full SHA
    b6f05cf View commit details
    Browse the repository at this point in the history
  4. OSL: Cleanup AcpiOsPrintf()/AcpiOsVprintf() stubs.

    This patch is mainly for acpidump where there are redundant
    AcpiOsPrintf()/AcpiOsVprintf() stubs implemented. This patch cleans up such
    specific implementation by linking acpidump to osunixxf.c/oswinxf.c.
    
    To make AcpiOsPrintf() exported by osunixxf.c/oswinxf.c to behave as the
    old acpidump specific ones, applications need to:
    1. Initialize AcpiGbl_DbOutputFlags to ACPI_DB_CONSOLE_OUTPUT.
       This is automatically done by ACPI_INIT_GLOBAL(), applications need to
       link utglobal.o to utilize this mechanism.
    2. Initialize AcpiGbl_OutputFile to stdout.
       For GCC, assigning stdout to AcpiGbl_OutputFile using ACPI_INIT_GLOBAL()
       is not possible as stdout is not a constant in GCC environment. As an
       alternative solution, stdout assignment is put into AcpiOsInitialize().
       Thus AcpiOsInitialize() need to be invoked very early by the
       applications to initialize the default output of AcpiOsPrintf().
    
    Note that acpidump has been released to Linux kernel, after adding
    osunixxf.c to generate/unix/acpidump/Makefile, libacpica.sh also need to be
    updated to release osunixxf.c to Linux kernel. Lv Zheng.
    
    Signed-off-by: Lv Zheng <lv.zheng@intel.com>
    Lv Zheng committed May 29, 2014
    Configuration menu
    Copy the full SHA
    2b4314d View commit details
    Browse the repository at this point in the history