Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

----------------------------------------

10 April 2015. Summary of changes for version 20150410:

Reverted a change introduced in version 20150408 that caused
a regression in the disassembler where incorrect operator
symbols could be emitted.

----------------------------------------
08 April 2015. Summary of changes for version 20150408:


1) ACPICA kernel-resident subsystem:

Permanently set the return value for the _REV predefined name. It now
returns 2 (was 5). This matches other ACPI implementations. _REV will be
deprecated in the future, and is now defined to be 1 for ACPI 1.0, and 2
for ACPI 2.0 and later. It should never be used to differentiate or
identify operating systems.

Added the "Windows 2015" string to the _OSI support. ACPICA will now
return TRUE to a query with this string.

Fixed several issues with the local version of the printf function.

Added the C99 compiler option (-std=c99) to the Unix makefiles.

  Current Release:
    Non-Debug Version:  99.9K Code, 27.4K Data, 127.3K Total
    Debug Version:     195.2K Code, 80.7K Data, 275.9K Total
  Previous Release:
    Non-Debug Version:  98.8K Code, 27.3K Data, 126.1K Total
    Debug Version:     192.1K Code, 79.8K Data, 271.9K Total


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented an enhancement to the constant folding feature to
transform the parse tree to a simple Store operation whenever possible:
    Add (2, 3, X) ==> is converted to: Store (5, X)
    X = 2 + 3     ==> is converted to: Store (5, X)

Updated support for the SLIC table (Software Licensing Description Table)
in both the Data Table compiler and the disassembler. The SLIC table
support now conforms to "Microsoft Software Licensing Tables (SLIC and
MSDM). November 29, 2011. Copyright 2011 Microsoft". Note: Any SLIC data
following the ACPI header is now defined to be "Proprietary Data", and as
such, can only be entered or displayed as a hex data block.

Implemented full support for the MSDM table as described in the document
above. Note: The format of MSDM is similar to SLIC. Any MSDM data
following the ACPI header is defined to be "Proprietary Data", and can
only be entered or displayed as a hex data block.

Implemented the -Pn option for the iASL Table Compiler (was only
implemented for the ASL compiler). This option disables the iASL
preprocessor.

Disassembler: For disassembly of Data Tables, added a comment field
around the Ascii equivalent data that is emitted as part of the "Raw
Table Data" block. This prevents the iASL Preprocessor from possible
confusion if/when the table is compiled.

Disassembler: Added an option (-df) to force the disassembler to assume
that the table being disassembled contains valid AML. This feature is
useful for disassembling AML files that contain ACPI signatures other
than DSDT or SSDT (such as OEMx or other signatures).

Changes for the EFI version of the tools:
1) Fixed a build error/issue
2) Fixed a cast warning

iASL: Fixed a path issue with the __FILE__ operator by making the
directory prefix optional within the internal SplitInputFilename
function.

Debugger: Removed some unused global variables.

Tests: Updated the makefile for proper generation of the AAPITS suite.

----------------------------------------
04 February 2015. Summary of changes for version 20150204:

ACPICA kernel-resident subsystem:

Updated all ACPICA copyrights and signons to 2014. Added the 2014
copyright to all module headers and signons, including the standard Linux
header. This affects virtually every file in the ACPICA core subsystem,
iASL compiler, all ACPICA utilities, and the test suites.

Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix GPE storm issues.
A raw gpe handling mechanism was created to allow better handling of GPE
storms that aren't easily managed by the normal handler. The raw handler
allows disabling/renabling of the the GPE so that interrupt storms can be
avoided in cases where events cannot be timely serviced. In this
scenario, handlers should use the AcpiSetGpe() API to disable/enable the
GPE. This API will leave the reference counts undisturbed, thereby
preventing unintentional clearing of the GPE when the intent in only to
temporarily disable it. Raw handlers allow enabling and disabling of a
GPE by removing GPE register locking. As such, raw handlers much provide
their own locks while using GPE API's to protect access to GPE data
structures.
Lv Zheng

Events: Always modify GPE registers under the GPE lock.
Applies GPE lock around AcpiFinishGpe() to protect access to GPE register
values. Reported as bug by joe.liu@apple.com.

Unix makefiles: Separate option to disable optimizations and
_FORTIFY_SOURCE. This change removes the _FORTIFY_SOURCE flag from the
NOOPT disable option and creates a separate flag (NOFORTIFY) for this
purpose. Some toolchains may define _FORTIFY_SOURCE which leads redefined
errors when building ACPICA. This allows disabling the option without
also having to disable optimazations.
David Box

  Current Release:
    Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total
    Debug Version:     199.2K Code, 82.4K Data, 281.6K Total

----------------------------------------
07 November 2014. Summary of changes for version 20141107:

This release is available at https://acpica.org/downloads

This release introduces and implements language extensions to ASL that
provide support for symbolic ("C-style") operators and expressions. These
language extensions are known collectively as ASL+.


1) iASL Compiler/Disassembler and Tools:

Disassembler: Fixed a problem with disassembly of the UartSerialBus
macro. Changed "StopBitsNone" to the correct "StopBitsZero". David E.
Box.

Disassembler: Fixed the Unicode macro support to add escape sequences.
All non-printable ASCII values are emitted as escape sequences, as well
as the standard escapes for quote and backslash. Ensures that the
disassembled macro can be correctly recompiled.

iASL: Added Printf/Fprintf macros for formatted output. These macros are
translated to existing AML Concatenate and Store operations. Printf
writes to the ASL Debug object. Fprintf allows the specification of an
ASL name as the target. Only a single format specifier is required, %o,
since the AML interpreter dynamically converts objects to the required
type. David E. Box.

    (old)    Store (Concatenate (Concatenate (Concatenate (Concatenate
                 (Concatenate (Concatenate (Concatenate ("", Arg0),
                 ": Unexpected value for "), Arg1), ", "), Arg2),
                 " at line "), Arg3), Debug)

    (new)    Printf ("%o: Unexpected value for %o, %o at line %o",
                 Arg0, Arg1, Arg2, Arg3)

    (old)    Store (Concatenate (Concatenate (Concatenate (Concatenate
                 ("", Arg1), ": "), Arg0), " Successful"), STR1)

    (new)    Fprintf (STR1, "%o: %o Successful", Arg1, Arg0)

iASL: Added debug options (-bp, -bt) to dynamically prune levels of the
ASL parse tree before the AML code is generated. This allows blocks of
ASL code to be removed in order to help locate and identify problem
devices and/or code. David E. Box.

AcpiExec: Added support (-fi) for an optional namespace object
initialization file. This file specifies initial values for namespace
objects as necessary for debugging and testing different ASL code paths
that may be taken as a result of BIOS options.


2) Overview of symbolic operator support for ASL (ASL+)
-------------------------------------------------------

As an extension to the ASL language, iASL implements support for symbolic
(C-style) operators for math and logical expressions. This can greatly
simplify ASL code as well as improve both readability and
maintainability. These language extensions can exist concurrently with
all legacy ASL code and expressions.

The symbolic extensions are 100% compatible with existing AML
interpreters, since no new AML opcodes are created. To implement the
extensions, the iASL compiler transforms the symbolic expressions into
the legacy ASL/AML equivalents at compile time.

Full symbolic expressions are supported, along with the standard C
precedence and associativity rules.

Full disassembler support for the symbolic expressions is provided, and
creates an automatic migration path for existing ASL code to ASL+ code
via the disassembly process. By default, the disassembler now emits ASL+
code with symbolic expressions. An option (-dl) is provided to force the
disassembler to emit legacy ASL code if desired.

Below is the complete list of the currently supported symbolic operators
with examples. See the iASL User Guide for additional information.


ASL+ Syntax      Legacy ASL Equivalent
-----------      ---------------------

    // Math operators

Z = X + Y        Add (X, Y, Z)
Z = X - Y        Subtract (X, Y, Z)
Z = X * Y        Multiply (X, Y, Z)
Z = X / Y        Divide (X, Y, , Z)
Z = X % Y        Mod (X, Y, Z)
Z = X << Y       ShiftLeft (X, Y, Z)
Z = X >> Y       ShiftRight (X, Y, Z)
Z = X & Y        And (X, Y, Z)
Z = X | Y        Or (X, Y, Z)
Z = X ^ Y        Xor (X, Y, Z)
Z = ~X           Not (X, Z)
X++              Increment (X)
X--              Decrement (X)

    // Logical operators

(X == Y)         LEqual (X, Y)
(X != Y)         LNotEqual (X, Y)
(X < Y)          LLess (X, Y)
(X > Y)          LGreater (X, Y)
(X <= Y)         LLessEqual (X, Y)
(X >= Y)         LGreaterEqual (X, Y)
(X && Y)         LAnd (X, Y)
(X || Y)         LOr (X, Y)
(!X)             LNot (X)

    // Assignment and compound assignment operations

X = Y           Store (Y, X)
X += Y          Add (X, Y, X)
X -= Y          Subtract (X, Y, X)
X *= Y          Multiply (X, Y, X)
X /= Y          Divide (X, Y, , X)
X %= Y          Mod (X, Y, X)
X <<= Y         ShiftLeft (X, Y, X)
X >>= Y         ShiftRight (X, Y, X)
X &= Y          And (X, Y, X)
X |= Y          Or (X, Y, X)
X ^= Y          Xor (X, Y, X)


3) ASL+ Examples:
-----------------

Legacy ASL:
        If (LOr (LOr (LEqual (And (R510, 0x03FB), 0x02E0), LEqual (
            And (R520, 0x03FB), 0x02E0)), LOr (LEqual (And (R530,
0x03FB),
            0x02E0), LEqual (And (R540, 0x03FB), 0x02E0))))
        {
            And (MEMB, 0xFFFFFFF0, SRMB)
            Store (MEMB, Local2)
            Store (PDBM, Local1)
            And (PDBM, 0xFFFFFFFFFFFFFFF9, PDBM)
            Store (SRMB, MEMB)
            Or (PDBM, 0x02, PDBM)
        }

ASL+ version:
        If (((R510 & 0x03FB) == 0x02E0) ||
            ((R520 & 0x03FB) == 0x02E0) ||
            ((R530 & 0x03FB) == 0x02E0) ||
            ((R540 & 0x03FB) == 0x02E0))
        {
            SRMB = (MEMB & 0xFFFFFFF0)
            Local2 = MEMB
            Local1 = PDBM
            PDBM &= 0xFFFFFFFFFFFFFFF9
            MEMB = SRMB
            PDBM |= 0x02
        }

Legacy ASL:
        Store (0x1234, Local1)
        Multiply (Add (Add (Local1, TEST), 0x20), Local2, Local3)
        Multiply (Local2, Add (Add (Local1, TEST), 0x20), Local3)
        Add (Local1, Add (TEST, Multiply (0x20, Local2)), Local3)
        Store (Index (PKG1, 0x03), Local6)
        Store (Add (Local3, Local2), Debug)
        Add (Local1, 0x0F, Local2)
        Add (Local1, Multiply (Local2, Local3), Local2)
        Multiply (Add (Add (Local1, TEST), 0x20), ToBCD (Local1), Local3)

ASL+ version:
        Local1 = 0x1234
        Local3 = (((Local1 + TEST) + 0x20) * Local2)
        Local3 = (Local2 * ((Local1 + TEST) + 0x20))
        Local3 = (Local1 + (TEST + (0x20 * Local2)))
        Local6 = Index (PKG1, 0x03)
        Debug = (Local3 + Local2)
        Local2 = (Local1 + 0x0F)
        Local2 = (Local1 + (Local2 * Local3))
        Local3 = (((Local1 + TEST) + 0x20) * ToBCD (Local1))
  • Loading branch information...
commit 6dab2673b9c5a610e0134ce053ac2e99570e9cb0 1 parent b4b519e
christos authored
Showing with 914 additions and 982 deletions.
  1. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmdeferred.c
  2. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmnames.c
  3. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmobject.c
  4. +19 −33 sys/external/bsd/acpica/dist/disassembler/dmopcode.c
  5. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmresrc.c
  6. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmresrcl.c
  7. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c
  8. +1 −1  sys/external/bsd/acpica/dist/disassembler/dmresrcs.c
  9. +15 −2 sys/external/bsd/acpica/dist/disassembler/dmutils.c
  10. +39 −15 sys/external/bsd/acpica/dist/disassembler/dmwalk.c
  11. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dsargs.c
  12. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dscontrol.c
  13. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dsfield.c
  14. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dsinit.c
  15. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dsmethod.c
  16. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c
  17. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dsobject.c
  18. +4 −6 sys/external/bsd/acpica/dist/dispatcher/dsopcode.c
  19. +10 −3 sys/external/bsd/acpica/dist/dispatcher/dsutils.c
  20. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dswexec.c
  21. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dswload.c
  22. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dswload2.c
  23. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dswscope.c
  24. +1 −3 sys/external/bsd/acpica/dist/dispatcher/dswstate.c
  25. +1 −1  sys/external/bsd/acpica/dist/events/evevent.c
  26. +1 −1  sys/external/bsd/acpica/dist/events/evglock.c
  27. +73 −85 sys/external/bsd/acpica/dist/events/evgpe.c
  28. +4 −3 sys/external/bsd/acpica/dist/events/evgpeblk.c
  29. +6 −4 sys/external/bsd/acpica/dist/events/evgpeinit.c
  30. +6 −58 sys/external/bsd/acpica/dist/events/evgpeutil.c
  31. +1 −3 sys/external/bsd/acpica/dist/events/evhandler.c
  32. +1 −1  sys/external/bsd/acpica/dist/events/evmisc.c
  33. +2 −4 sys/external/bsd/acpica/dist/events/evregion.c
  34. +1 −3 sys/external/bsd/acpica/dist/events/evrgnini.c
  35. +1 −1  sys/external/bsd/acpica/dist/events/evsci.c
  36. +124 −16 sys/external/bsd/acpica/dist/events/evxface.c
  37. +4 −4 sys/external/bsd/acpica/dist/events/evxfevnt.c
  38. +58 −12 sys/external/bsd/acpica/dist/events/evxfgpe.c
  39. +1 −2  sys/external/bsd/acpica/dist/events/evxfregn.c
  40. +1 −3 sys/external/bsd/acpica/dist/executer/exconfig.c
  41. +1 −3 sys/external/bsd/acpica/dist/executer/exconvrt.c
  42. +1 −3 sys/external/bsd/acpica/dist/executer/excreate.c
  43. +1 −3 sys/external/bsd/acpica/dist/executer/exdebug.c
  44. +2 −4 sys/external/bsd/acpica/dist/executer/exdump.c
  45. +1 −3 sys/external/bsd/acpica/dist/executer/exfield.c
  46. +3 −5 sys/external/bsd/acpica/dist/executer/exfldio.c
  47. +1 −3 sys/external/bsd/acpica/dist/executer/exmisc.c
  48. +1 −3 sys/external/bsd/acpica/dist/executer/exmutex.c
  49. +1 −3 sys/external/bsd/acpica/dist/executer/exnames.c
  50. +1 −3 sys/external/bsd/acpica/dist/executer/exoparg1.c
  51. +1 −3 sys/external/bsd/acpica/dist/executer/exoparg2.c
  52. +13 −4 sys/external/bsd/acpica/dist/executer/exoparg3.c
  53. +1 −3 sys/external/bsd/acpica/dist/executer/exoparg6.c
  54. +1 −3 sys/external/bsd/acpica/dist/executer/exprep.c
  55. +7 −10 sys/external/bsd/acpica/dist/executer/exregion.c
  56. +1 −3 sys/external/bsd/acpica/dist/executer/exresnte.c
  57. +1 −3 sys/external/bsd/acpica/dist/executer/exresolv.c
  58. +1 −3 sys/external/bsd/acpica/dist/executer/exresop.c
  59. +1 −3 sys/external/bsd/acpica/dist/executer/exstore.c
  60. +1 −3 sys/external/bsd/acpica/dist/executer/exstoren.c
  61. +1 −3 sys/external/bsd/acpica/dist/executer/exstorob.c
  62. +1 −3 sys/external/bsd/acpica/dist/executer/exsystem.c
  63. +1 −3 sys/external/bsd/acpica/dist/executer/exutils.c
  64. +1 −3 sys/external/bsd/acpica/dist/hardware/hwacpi.c
  65. +1 −1  sys/external/bsd/acpica/dist/hardware/hwesleep.c
  66. +74 −19 sys/external/bsd/acpica/dist/hardware/hwgpe.c
  67. +1 −3 sys/external/bsd/acpica/dist/hardware/hwpci.c
  68. +1 −3 sys/external/bsd/acpica/dist/hardware/hwregs.c
  69. +1 −1  sys/external/bsd/acpica/dist/hardware/hwsleep.c
  70. +1 −1  sys/external/bsd/acpica/dist/hardware/hwtimer.c
  71. +7 −9 sys/external/bsd/acpica/dist/hardware/hwvalid.c
  72. +1 −1  sys/external/bsd/acpica/dist/hardware/hwxface.c
  73. +1 −1  sys/external/bsd/acpica/dist/hardware/hwxfsleep.c
  74. +1 −3 sys/external/bsd/acpica/dist/namespace/nsaccess.c
  75. +1 −3 sys/external/bsd/acpica/dist/namespace/nsalloc.c
  76. +1 −1  sys/external/bsd/acpica/dist/namespace/nsarguments.c
  77. +1 −3 sys/external/bsd/acpica/dist/namespace/nsconvert.c
  78. +4 −6 sys/external/bsd/acpica/dist/namespace/nsdump.c
  79. +1 −3 sys/external/bsd/acpica/dist/namespace/nsdumpdv.c
  80. +1 −3 sys/external/bsd/acpica/dist/namespace/nseval.c
  81. +1 −3 sys/external/bsd/acpica/dist/namespace/nsinit.c
  82. +1 −3 sys/external/bsd/acpica/dist/namespace/nsload.c
  83. +1 −3 sys/external/bsd/acpica/dist/namespace/nsnames.c
  84. +1 −3 sys/external/bsd/acpica/dist/namespace/nsobject.c
  85. +1 −3 sys/external/bsd/acpica/dist/namespace/nsparse.c
  86. +1 −1  sys/external/bsd/acpica/dist/namespace/nspredef.c
  87. +1 −1  sys/external/bsd/acpica/dist/namespace/nsprepkg.c
  88. +1 −3 sys/external/bsd/acpica/dist/namespace/nsrepair.c
  89. +1 −3 sys/external/bsd/acpica/dist/namespace/nsrepair2.c
  90. +1 −3 sys/external/bsd/acpica/dist/namespace/nssearch.c
  91. +1 −3 sys/external/bsd/acpica/dist/namespace/nsutils.c
  92. +1 −3 sys/external/bsd/acpica/dist/namespace/nswalk.c
  93. +1 −2  sys/external/bsd/acpica/dist/namespace/nsxfeval.c
  94. +1 −2  sys/external/bsd/acpica/dist/namespace/nsxfname.c
  95. +1 −2  sys/external/bsd/acpica/dist/namespace/nsxfobj.c
  96. +1 −3 sys/external/bsd/acpica/dist/parser/psargs.c
  97. +1 −1  sys/external/bsd/acpica/dist/parser/psloop.c
  98. +1 −1  sys/external/bsd/acpica/dist/parser/psobject.c
  99. +6 −2 sys/external/bsd/acpica/dist/parser/psopcode.c
  100. +2 −2 sys/external/bsd/acpica/dist/parser/psopinfo.c
  101. +1 −1  sys/external/bsd/acpica/dist/parser/psparse.c
  102. +1 −1  sys/external/bsd/acpica/dist/parser/psscope.c
  103. +1 −3 sys/external/bsd/acpica/dist/parser/pstree.c
  104. +1 −1  sys/external/bsd/acpica/dist/parser/psutils.c
  105. +1 −1  sys/external/bsd/acpica/dist/parser/pswalk.c
  106. +1 −3 sys/external/bsd/acpica/dist/parser/psxface.c
  107. +5 −7 sys/external/bsd/acpica/dist/resources/rsaddr.c
  108. +1 −3 sys/external/bsd/acpica/dist/resources/rscalc.c
  109. +1 −3 sys/external/bsd/acpica/dist/resources/rscreate.c
  110. +143 −140 sys/external/bsd/acpica/dist/resources/rsdump.c
  111. +26 −23 sys/external/bsd/acpica/dist/resources/rsdumpinfo.c
  112. +1 −3 sys/external/bsd/acpica/dist/resources/rsinfo.c
  113. +1 −3 sys/external/bsd/acpica/dist/resources/rsio.c
  114. +1 −3 sys/external/bsd/acpica/dist/resources/rsirq.c
  115. +1 −3 sys/external/bsd/acpica/dist/resources/rslist.c
  116. +1 −3 sys/external/bsd/acpica/dist/resources/rsmemory.c
  117. +1 −3 sys/external/bsd/acpica/dist/resources/rsmisc.c
  118. +1 −3 sys/external/bsd/acpica/dist/resources/rsserial.c
  119. +1 −3 sys/external/bsd/acpica/dist/resources/rsutils.c
  120. +6 −7 sys/external/bsd/acpica/dist/resources/rsxface.c
  121. +25 −12 sys/external/bsd/acpica/dist/tables/tbdata.c
  122. +1 −3 sys/external/bsd/acpica/dist/tables/tbfadt.c
  123. +1 −3 sys/external/bsd/acpica/dist/tables/tbfind.c
  124. +13 −59 sys/external/bsd/acpica/dist/tables/tbinstal.c
  125. +7 −15 sys/external/bsd/acpica/dist/tables/tbprint.c
  126. +1 −3 sys/external/bsd/acpica/dist/tables/tbutils.c
  127. +1 −2  sys/external/bsd/acpica/dist/tables/tbxface.c
  128. +1 −2  sys/external/bsd/acpica/dist/tables/tbxfload.c
  129. +4 −6 sys/external/bsd/acpica/dist/tables/tbxfroot.c
  130. +12 −14 sys/external/bsd/acpica/dist/utilities/utaddress.c
  131. +1 −3 sys/external/bsd/acpica/dist/utilities/utalloc.c
  132. +10 −3 sys/external/bsd/acpica/dist/utilities/utbuffer.c
  133. +1 −3 sys/external/bsd/acpica/dist/utilities/utcache.c
  134. +10 −15 sys/external/bsd/acpica/dist/utilities/utclib.c
  135. +1 −3 sys/external/bsd/acpica/dist/utilities/utcopy.c
  136. +1 −2  sys/external/bsd/acpica/dist/utilities/utdebug.c
  137. +1 −3 sys/external/bsd/acpica/dist/utilities/utdecode.c
  138. +1 −3 sys/external/bsd/acpica/dist/utilities/utdelete.c
  139. +1 −3 sys/external/bsd/acpica/dist/utilities/uterror.c
  140. +1 −3 sys/external/bsd/acpica/dist/utilities/uteval.c
  141. +1 −2  sys/external/bsd/acpica/dist/utilities/utexcep.c
  142. +1 −1  sys/external/bsd/acpica/dist/utilities/utfileio.c
  143. +11 −5 sys/external/bsd/acpica/dist/utilities/utglobal.c
  144. +1 −3 sys/external/bsd/acpica/dist/utilities/uthex.c
  145. +1 −3 sys/external/bsd/acpica/dist/utilities/utids.c
  146. +1 −3 sys/external/bsd/acpica/dist/utilities/utinit.c
  147. +1 −3 sys/external/bsd/acpica/dist/utilities/utlock.c
  148. +1 −3 sys/external/bsd/acpica/dist/utilities/utmath.c
  149. +3 −3 sys/external/bsd/acpica/dist/utilities/utmisc.c
  150. +1 −3 sys/external/bsd/acpica/dist/utilities/utmutex.c
  151. +1 −3 sys/external/bsd/acpica/dist/utilities/utobject.c
  152. +2 −3 sys/external/bsd/acpica/dist/utilities/utosi.c
  153. +1 −3 sys/external/bsd/acpica/dist/utilities/utownerid.c
  154. +1 −3 sys/external/bsd/acpica/dist/utilities/utpredef.c
  155. +9 −6 sys/external/bsd/acpica/dist/utilities/utprint.c
  156. +2 −4 sys/external/bsd/acpica/dist/utilities/utresrc.c
  157. +1 −41 sys/external/bsd/acpica/dist/utilities/utstate.c
  158. +1 −3 sys/external/bsd/acpica/dist/utilities/utstring.c
  159. +1 −3 sys/external/bsd/acpica/dist/utilities/uttrack.c
  160. +3 −3 sys/external/bsd/acpica/dist/utilities/utuuid.c
  161. +4 −3 sys/external/bsd/acpica/dist/utilities/utxface.c
  162. +1 −2  sys/external/bsd/acpica/dist/utilities/utxferror.c
  163. +14 −2 sys/external/bsd/acpica/dist/utilities/utxfinit.c
  164. +1 −3 sys/external/bsd/acpica/dist/utilities/utxfmutex.c
View
2  sys/external/bsd/acpica/dist/disassembler/dmdeferred.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
2  sys/external/bsd/acpica/dist/disassembler/dmnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
2  sys/external/bsd/acpica/dist/disassembler/dmobject.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
52 sys/external/bsd/acpica/dist/disassembler/dmopcode.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmopcode")
+
/* Local prototypes */
static void
@@ -567,7 +568,6 @@ AcpiDmRegionFlags (
ACPI_PARSE_OBJECT *Op)
{
-
/* The next Op contains the SpaceId */
Op = AcpiPsGetDepthNext (NULL, Op);
@@ -637,7 +637,6 @@ AcpiDmMatchKeyword (
ACPI_PARSE_OBJECT *Op)
{
-
if (((UINT32) Op->Common.Value.Integer) > ACPI_MAX_MATCH_OPCODE)
{
AcpiOsPrintf ("/* Unknown Match Keyword encoding */");
@@ -694,27 +693,27 @@ AcpiDmDisassembleOneOp (
case ACPI_DASM_LNOT_SUFFIX:
- switch (Op->Common.AmlOpcode)
+ if (!AcpiGbl_CstyleDisassembly)
{
- case AML_LEQUAL_OP:
-
- AcpiOsPrintf ("LNotEqual");
- break;
-
- case AML_LGREATER_OP:
-
- AcpiOsPrintf ("LLessEqual");
- break;
-
- case AML_LLESS_OP:
+ switch (Op->Common.AmlOpcode)
+ {
+ case AML_LEQUAL_OP:
+ AcpiOsPrintf ("LNotEqual");
+ break;
- AcpiOsPrintf ("LGreaterEqual");
- break;
+ case AML_LGREATER_OP:
+ AcpiOsPrintf ("LLessEqual");
+ break;
- default:
+ case AML_LLESS_OP:
+ AcpiOsPrintf ("LGreaterEqual");
+ break;
- break;
+ default:
+ break;
+ }
}
+
Op->Common.DisasmOpcode = 0;
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
return;
@@ -723,7 +722,6 @@ AcpiDmDisassembleOneOp (
break;
}
-
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
/* The op and arguments */
@@ -845,7 +843,7 @@ AcpiDmDisassembleOneOp (
else if (AcpiDmIsPldBuffer (Op))
{
Op->Common.DisasmOpcode = ACPI_DASM_PLD_METHOD;
- AcpiOsPrintf ("Buffer");
+ AcpiOsPrintf ("ToPLD (");
}
else
{
@@ -854,18 +852,6 @@ AcpiDmDisassembleOneOp (
}
break;
- case AML_INT_STATICSTRING_OP:
-
- if (Op->Common.Value.String)
- {
- AcpiOsPrintf ("%s", Op->Common.Value.String);
- }
- else
- {
- AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\"");
- }
- break;
-
case AML_INT_NAMEPATH_OP:
AcpiDmNamestring (Op->Common.Value.Name);
View
2  sys/external/bsd/acpica/dist/disassembler/dmresrc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
2  sys/external/bsd/acpica/dist/disassembler/dmresrcl.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
2  sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
2  sys/external/bsd/acpica/dist/disassembler/dmresrcs.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
17 sys/external/bsd/acpica/dist/disassembler/dmutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -256,6 +256,13 @@ AcpiDmCommaIfListMember (
if (AcpiDmListType (Op->Common.Parent) & BLOCK_COMMA_LIST)
{
+ /* Exit if Target has been marked IGNORE */
+
+ if (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
+ {
+ return (FALSE);
+ }
+
/* Check for a NULL target operand */
if ((Op->Common.Next->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
@@ -279,7 +286,13 @@ AcpiDmCommaIfListMember (
return (FALSE);
}
- AcpiOsPrintf (", ");
+ /* Emit comma only if this is not a C-style operator */
+
+ if (!Op->Common.OperatorSymbol)
+ {
+ AcpiOsPrintf (", ");
+ }
+
return (TRUE);
}
View
54 sys/external/bsd/acpica/dist/disassembler/dmwalk.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -285,7 +285,8 @@ AcpiDmBlockType (
case AML_BUFFER_OP:
if ((Op->Common.DisasmOpcode == ACPI_DASM_UNICODE) ||
- (Op->Common.DisasmOpcode == ACPI_DASM_UUID))
+ (Op->Common.DisasmOpcode == ACPI_DASM_UUID) ||
+ (Op->Common.DisasmOpcode == ACPI_DASM_PLD_METHOD))
{
return (BLOCK_NONE);
}
@@ -301,6 +302,17 @@ AcpiDmBlockType (
return (BLOCK_PAREN);
+ case AML_INT_METHODCALL_OP:
+
+ if (Op->Common.Parent &&
+ ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP)))
+ {
+ /* This is a reference to a method, not an invocation */
+
+ return (BLOCK_NONE);
+ }
+
default:
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
@@ -477,13 +489,20 @@ AcpiDmDescendingOp (
* keep track of the current column.
*/
Info->Count++;
- if (Info->Count /* +Info->LastLevel */ > 10)
+ if (Info->Count /* +Info->LastLevel */ > 12)
{
Info->Count = 0;
AcpiOsPrintf ("\n");
AcpiDmIndent (Info->LastLevel + 1);
}
+ /* If ASL+ is enabled, check for a C-style operator */
+
+ if (AcpiDmCheckForSymbolicOpcode (Op, Info))
+ {
+ return (AE_OK);
+ }
+
/* Print the opcode name */
AcpiDmDisassembleOneOp (NULL, Info, Op);
@@ -543,7 +562,7 @@ AcpiDmDescendingOp (
if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP)
{
- if (AcpiGbl_DbOpt_verbose)
+ if (AcpiGbl_DbOpt_Verbose)
{
(void) AcpiPsDisplayObjectPathname (NULL, Op);
}
@@ -563,7 +582,6 @@ AcpiDmDescendingOp (
AcpiDmPredefinedDescription (Op);
break;
-
case AML_NAME_OP:
/* Check for _HID and related EISAID() */
@@ -572,13 +590,11 @@ AcpiDmDescendingOp (
AcpiOsPrintf (", ");
break;
-
case AML_REGION_OP:
AcpiDmRegionFlags (Op);
break;
-
case AML_POWER_RES_OP:
/* Mark the next two Ops as part of the parameter list */
@@ -591,7 +607,6 @@ AcpiDmDescendingOp (
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
return (AE_OK);
-
case AML_PROCESSOR_OP:
/* Mark the next three Ops as part of the parameter list */
@@ -607,20 +622,17 @@ AcpiDmDescendingOp (
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
return (AE_OK);
-
case AML_MUTEX_OP:
case AML_DATA_REGION_OP:
AcpiOsPrintf (", ");
return (AE_OK);
-
case AML_EVENT_OP:
case AML_ALIAS_OP:
return (AE_OK);
-
case AML_SCOPE_OP:
case AML_DEVICE_OP:
case AML_THERMAL_ZONE_OP:
@@ -628,7 +640,6 @@ AcpiDmDescendingOp (
AcpiOsPrintf (")");
break;
-
default:
AcpiOsPrintf ("*** Unhandled named opcode %X\n",
@@ -825,9 +836,9 @@ AcpiDmAscendingOp (
{
case BLOCK_PAREN:
- /* Completed an op that has arguments, add closing paren */
+ /* Completed an op that has arguments, add closing paren if needed */
- AcpiOsPrintf (")");
+ AcpiDmCloseOperator (Op);
if (Op->Common.AmlOpcode == AML_NAME_OP)
{
@@ -999,8 +1010,21 @@ AcpiDmAscendingOp (
{
Info->Level++;
}
+
+ /*
+ * For ASL+, check for and emit a C-style symbol. If valid, the
+ * symbol string has been deferred until after the first operand
+ */
+ if (AcpiGbl_CstyleDisassembly)
+ {
+ if (Op->Asl.OperatorSymbol)
+ {
+ AcpiOsPrintf ("%s", Op->Asl.OperatorSymbol);
+ Op->Asl.OperatorSymbol = NULL;
+ }
+ }
+
return (AE_OK);
}
-
#endif /* ACPI_DISASSEMBLER */
View
4 sys/external/bsd/acpica/dist/dispatcher/dsargs.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSARGS_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dscontrol.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSCONTROL_C__
-
#include "acpi.h"
#include "accommon.h"
#include "amlcode.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dsfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSFIELD_C__
-
#include "acpi.h"
#include "accommon.h"
#include "amlcode.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSINIT_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acdispat.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dsmethod.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSMETHOD_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acdispat.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSMTHDAT_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acdispat.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dsobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSOBJECT_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
View
10 sys/external/bsd/acpica/dist/dispatcher/dsopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSOPCODE_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
@@ -479,7 +477,7 @@ AcpiDsEvalRegionOperands (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
ObjDesc,
- ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+ ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length));
/* Now the address and length are valid for this opregion */
@@ -581,12 +579,12 @@ AcpiDsEvalTableRegionOperands (
return_ACPI_STATUS (AE_NOT_EXIST);
}
- ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
+ ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
ObjDesc->Region.Length = Table->Length;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
ObjDesc,
- ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+ ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length));
/* Now the address and length are valid for this opregion */
View
13 sys/external/bsd/acpica/dist/dispatcher/dsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSUTILS_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
@@ -601,6 +599,15 @@ AcpiDsCreateOperand (
ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
Status = AE_OK;
}
+ else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
+ {
+ /* TBD: May only be temporary */
+
+ ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
+
+ ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength);
+ Status = AE_OK;
+ }
else
{
/*
View
4 sys/external/bsd/acpica/dist/dispatcher/dswexec.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWEXEC_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dswload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWLOAD_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dswload2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWLOAD2_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dswscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWSCOPE_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acdispat.h"
View
4 sys/external/bsd/acpica/dist/dispatcher/dswstate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWSTATE_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
View
2  sys/external/bsd/acpica/dist/events/evevent.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
2  sys/external/bsd/acpica/dist/events/evglock.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
158 sys/external/bsd/acpica/dist/events/evgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -131,18 +131,6 @@ AcpiEvEnableGpe (
ACPI_FUNCTION_TRACE (EvEnableGpe);
- /*
- * We will only allow a GPE to be enabled if it has either an associated
- * method (_Lxx/_Exx) or a handler, or is using the implicit notify
- * feature. Otherwise, the GPE will be immediately disabled by
- * AcpiEvGpeDispatch the first time it fires.
- */
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
- ACPI_GPE_DISPATCH_NONE)
- {
- return_ACPI_STATUS (AE_NO_HANDLER);
- }
-
/* Clear the GPE (of stale events) */
Status = AcpiHwClearGpe (GpeEventInfo);
@@ -153,7 +141,7 @@ AcpiEvEnableGpe (
/* Enable the requested GPE */
- Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE_SAVE);
return_ACPI_STATUS (Status);
}
@@ -243,7 +231,7 @@ AcpiEvRemoveGpeReference (
Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
if (ACPI_SUCCESS (Status))
{
- Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE_SAVE);
}
if (ACPI_FAILURE (Status))
@@ -383,7 +371,11 @@ AcpiEvGpeDetect (
{
ACPI_STATUS Status;
ACPI_GPE_BLOCK_INFO *GpeBlock;
+ ACPI_NAMESPACE_NODE *GpeDevice;
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
+ UINT32 GpeNumber;
+ ACPI_GPE_HANDLER_INFO *GpeHandlerInfo;
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
UINT8 EnabledStatusByte;
UINT32 StatusReg;
@@ -414,6 +406,8 @@ AcpiEvGpeDetect (
GpeBlock = GpeXruptList->GpeBlockListHead;
while (GpeBlock)
{
+ GpeDevice = GpeBlock->Node;
+
/*
* Read all of the 8-bit GPE status and enable registers in this GPE
* block, saving all of them. Find all currently active GP events.
@@ -482,16 +476,55 @@ AcpiEvGpeDetect (
{
/* Examine one GPE bit */
+ GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
+ ACPI_GPE_REGISTER_WIDTH) + j];
+ GpeNumber = j + GpeRegisterInfo->BaseGpeNumber;
+
if (EnabledStatusByte & (1 << j))
{
- /*
- * Found an active GPE. Dispatch the event to a handler
- * or method.
- */
- IntStatus |= AcpiEvGpeDispatch (GpeBlock->Node,
- &GpeBlock->EventInfo[((ACPI_SIZE) i *
- ACPI_GPE_REGISTER_WIDTH) + j],
- j + GpeRegisterInfo->BaseGpeNumber);
+ /* Invoke global event handler if present */
+
+ AcpiGpeCount++;
+ if (AcpiGbl_GlobalEventHandler)
+ {
+ AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE,
+ GpeDevice, GpeNumber,
+ AcpiGbl_GlobalEventHandlerContext);
+ }
+
+ /* Found an active GPE */
+
+ if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_RAW_HANDLER)
+ {
+ /* Dispatch the event to a raw handler */
+
+ GpeHandlerInfo = GpeEventInfo->Dispatch.Handler;
+
+ /*
+ * There is no protection around the namespace node
+ * and the GPE handler to ensure a safe destruction
+ * because:
+ * 1. The namespace node is expected to always
+ * exist after loading a table.
+ * 2. The GPE handler is expected to be flushed by
+ * AcpiOsWaitEventsComplete() before the
+ * destruction.
+ */
+ AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+ IntStatus |= GpeHandlerInfo->Address (
+ GpeDevice, GpeNumber, GpeHandlerInfo->Context);
+ Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
+ }
+ else
+ {
+ /*
+ * Dispatch the event to a standard handler or
+ * method.
+ */
+ IntStatus |= AcpiEvGpeDispatch (GpeDevice,
+ GpeEventInfo, GpeNumber);
+ }
}
}
}
@@ -527,8 +560,7 @@ AcpiEvAsynchExecuteGpeMethod (
void *Context)
{
ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
- ACPI_STATUS Status;
- ACPI_GPE_EVENT_INFO *LocalGpeEventInfo;
+ ACPI_STATUS Status = AE_OK;
ACPI_EVALUATE_INFO *Info;
ACPI_GPE_NOTIFY_INFO *Notify;
@@ -536,49 +568,9 @@ AcpiEvAsynchExecuteGpeMethod (
ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
- /* Allocate a local GPE block */
-
- LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO));
- if (!LocalGpeEventInfo)
- {
- ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
- "while handling a GPE"));
- return_VOID;
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- ACPI_FREE (LocalGpeEventInfo);
- return_VOID;
- }
-
- /* Must revalidate the GpeNumber/GpeBlock */
-
- if (!AcpiEvValidGpeEvent (GpeEventInfo))
- {
- Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- ACPI_FREE (LocalGpeEventInfo);
- return_VOID;
- }
-
- /*
- * Take a snapshot of the GPE info for this level - we copy the info to
- * prevent a race condition with RemoveHandler/RemoveBlock.
- */
- ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo,
- sizeof (ACPI_GPE_EVENT_INFO));
-
- Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- ACPI_FREE (LocalGpeEventInfo);
- return_VOID;
- }
-
/* Do the correct dispatch - normal method or implicit notify */
- switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
+ switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
{
case ACPI_GPE_DISPATCH_NOTIFY:
/*
@@ -592,7 +584,7 @@ AcpiEvAsynchExecuteGpeMethod (
* June 2012: Expand implicit notify mechanism to support
* notifies on multiple device objects.
*/
- Notify = LocalGpeEventInfo->Dispatch.NotifyList;
+ Notify = GpeEventInfo->Dispatch.NotifyList;
while (ACPI_SUCCESS (Status) && Notify)
{
Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
@@ -617,7 +609,7 @@ AcpiEvAsynchExecuteGpeMethod (
* Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the
* _Lxx/_Exx control method that corresponds to this GPE
*/
- Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode;
+ Info->PrefixNode = GpeEventInfo->Dispatch.MethodNode;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
Status = AcpiNsEvaluate (Info);
@@ -628,23 +620,26 @@ AcpiEvAsynchExecuteGpeMethod (
{
ACPI_EXCEPTION ((AE_INFO, Status,
"while evaluating GPE method [%4.4s]",
- AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode)));
+ AcpiUtGetNodeName (GpeEventInfo->Dispatch.MethodNode)));
}
break;
default:
- return_VOID; /* Should never happen */
+ goto ErrorExit; /* Should never happen */
}
/* Defer enabling of GPE until all notify handlers are done */
Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
- AcpiEvAsynchEnableGpe, LocalGpeEventInfo);
- if (ACPI_FAILURE (Status))
+ AcpiEvAsynchEnableGpe, GpeEventInfo);
+ if (ACPI_SUCCESS (Status))
{
- ACPI_FREE (LocalGpeEventInfo);
+ return_VOID;
}
+
+ErrorExit:
+ AcpiEvAsynchEnableGpe (GpeEventInfo);
return_VOID;
}
@@ -668,11 +663,13 @@ AcpiEvAsynchEnableGpe (
void *Context)
{
ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
+ ACPI_CPU_FLAGS Flags;
+ Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
(void) AcpiEvFinishGpe (GpeEventInfo);
+ AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
- ACPI_FREE (GpeEventInfo);
return;
}
@@ -713,7 +710,7 @@ AcpiEvFinishGpe (
/*
* Enable this GPE, conditionally. This means that the GPE will
- * only be physically enabled if the EnableForRun bit is set
+ * only be physically enabled if the EnableMask bit is set
* in the EventInfo.
*/
(void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE);
@@ -751,15 +748,6 @@ AcpiEvGpeDispatch (
ACPI_FUNCTION_TRACE (EvGpeDispatch);
- /* Invoke global event handler if present */
-
- AcpiGpeCount++;
- if (AcpiGbl_GlobalEventHandler)
- {
- AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, GpeDevice,
- GpeNumber, AcpiGbl_GlobalEventHandlerContext);
- }
-
/*
* Always disable the GPE so that it does not keep firing before
* any asynchronous activity completes (either from the execution
@@ -802,7 +790,7 @@ AcpiEvGpeDispatch (
* If there is neither a handler nor a method, leave the GPE
* disabled.
*/
- switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
+ switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
{
case ACPI_GPE_DISPATCH_HANDLER:
View
7 sys/external/bsd/acpica/dist/events/evgpeblk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -518,8 +518,9 @@ AcpiEvInitializeGpeBlock (
* Ignore GPEs that have no corresponding _Lxx/_Exx method
* and GPEs that are used to wake the system
*/
- if (((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_NONE) ||
- ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) ||
+ if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) ||
+ (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_HANDLER) ||
+ (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_RAW_HANDLER) ||
(GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE))
{
continue;
View
10 sys/external/bsd/acpica/dist/events/evgpeinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -419,15 +419,17 @@ AcpiEvMatchGpeMethod (
return_ACPI_STATUS (AE_OK);
}
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
- ACPI_GPE_DISPATCH_HANDLER)
+ if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_HANDLER) ||
+ (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_RAW_HANDLER))
{
/* If there is already a handler, ignore this GPE method */
return_ACPI_STATUS (AE_OK);
}
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+ if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
ACPI_GPE_DISPATCH_METHOD)
{
/*
View
64 sys/external/bsd/acpica/dist/events/evgpeutil.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -115,60 +115,6 @@ AcpiEvWalkGpeList (
/*******************************************************************************
*
- * FUNCTION: AcpiEvValidGpeEvent
- *
- * PARAMETERS: GpeEventInfo - Info for this GPE
- *
- * RETURN: TRUE if the GpeEvent is valid
- *
- * DESCRIPTION: Validate a GPE event. DO NOT CALL FROM INTERRUPT LEVEL.
- * Should be called only when the GPE lists are semaphore locked
- * and not subject to change.
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiEvValidGpeEvent (
- ACPI_GPE_EVENT_INFO *GpeEventInfo)
-{
- ACPI_GPE_XRUPT_INFO *GpeXruptBlock;
- ACPI_GPE_BLOCK_INFO *GpeBlock;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- /* No need for spin lock since we are not changing any list elements */
-
- /* Walk the GPE interrupt levels */
-
- GpeXruptBlock = AcpiGbl_GpeXruptListHead;
- while (GpeXruptBlock)
- {
- GpeBlock = GpeXruptBlock->GpeBlockListHead;
-
- /* Walk the GPE blocks on this interrupt level */
-
- while (GpeBlock)
- {
- if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) &&
- (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo))
- {
- return (TRUE);
- }
-
- GpeBlock = GpeBlock->Next;
- }
-
- GpeXruptBlock = GpeXruptBlock->Next;
- }
-
- return (FALSE);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiEvGetGpeDevice
*
* PARAMETERS: GPE_WALK_CALLBACK
@@ -416,8 +362,10 @@ AcpiEvDeleteGpeHandlers (
GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
ACPI_GPE_REGISTER_WIDTH) + j];
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
- ACPI_GPE_DISPATCH_HANDLER)
+ if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_HANDLER) ||
+ (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_RAW_HANDLER))
{
/* Delete an installed handler block */
@@ -425,7 +373,7 @@ AcpiEvDeleteGpeHandlers (
GpeEventInfo->Dispatch.Handler = NULL;
GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
}
- else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+ else if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
ACPI_GPE_DISPATCH_NOTIFY)
{
/* Delete the implicit notification device list */
View
4 sys/external/bsd/acpica/dist/events/evhandler.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVHANDLER_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acevents.h"
View
2  sys/external/bsd/acpica/dist/events/evmisc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
6 sys/external/bsd/acpica/dist/events/evregion.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVREGION_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acevents.h"
@@ -290,7 +288,7 @@ AcpiEvAddressSpaceDispatch (
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&RegionObj->Region.Handler->AddressSpace, Handler,
- ACPI_FORMAT_NATIVE_UINT (Address),
+ ACPI_FORMAT_UINT64 (Address),
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
if (!(HandlerDesc->AddressSpace.HandlerFlags &
View
4 sys/external/bsd/acpica/dist/events/evrgnini.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVRGNINI_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acevents.h"
View
2  sys/external/bsd/acpica/dist/events/evsci.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
View
140 sys/external/bsd/acpica/dist/events/evxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVXFACE_C__
#define EXPORT_ACPI_INTERFACES
#include "acpi.h"
@@ -53,6 +52,21 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evxface")
+#if (!ACPI_REDUCED_HARDWARE)
+
+/* Local prototypes */
+
+static ACPI_STATUS
+AcpiEvInstallGpeHandler (
+ ACPI_HANDLE GpeDevice,
+ UINT32 GpeNumber,
+ UINT32 Type,
+ BOOLEAN IsRawHandler,
+ ACPI_GPE_HANDLER Address,
+ void *Context);
+
+#endif
+
/*******************************************************************************
*
@@ -823,27 +837,31 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler)
/*******************************************************************************
*
- * FUNCTION: AcpiInstallGpeHandler
+ * FUNCTION: AcpiEvInstallGpeHandler
*
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
* defined GPEs)
* GpeNumber - The GPE number within the GPE block
* Type - Whether this GPE should be treated as an
* edge- or level-triggered interrupt.
+ * IsRawHandler - Whether this GPE should be handled using
+ * the special GPE handler mode.
* Address - Address of the handler
* Context - Value passed to the handler on each GPE
*
* RETURN: Status
*
- * DESCRIPTION: Install a handler for a General Purpose Event.
+ * DESCRIPTION: Internal function to install a handler for a General Purpose
+ * Event.
*
******************************************************************************/
-ACPI_STATUS
-AcpiInstallGpeHandler (
+static ACPI_STATUS
+AcpiEvInstallGpeHandler (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
UINT32 Type,
+ BOOLEAN IsRawHandler,
ACPI_GPE_HANDLER Address,
void *Context)
{
@@ -853,7 +871,7 @@ AcpiInstallGpeHandler (
ACPI_CPU_FLAGS Flags;
- ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
+ ACPI_FUNCTION_TRACE (EvInstallGpeHandler);
/* Parameter validation */
@@ -891,8 +909,10 @@ AcpiInstallGpeHandler (
/* Make sure that there isn't a handler there already */
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
- ACPI_GPE_DISPATCH_HANDLER)
+ if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_HANDLER) ||
+ (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+ ACPI_GPE_DISPATCH_RAW_HANDLER))
{
Status = AE_ALREADY_EXISTS;
goto FreeAndExit;
@@ -909,8 +929,10 @@ AcpiInstallGpeHandler (
* automatically during initialization, in which case it has to be
* disabled now to avoid spurious execution of the handler.
*/
- if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
- (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
+ if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+ ACPI_GPE_DISPATCH_METHOD) ||
+ (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+ ACPI_GPE_DISPATCH_NOTIFY)) &&
GpeEventInfo->RuntimeCount)
{
Handler->OriginallyEnabled = TRUE;
@@ -931,7 +953,8 @@ AcpiInstallGpeHandler (
/* Setup up dispatch flags to indicate handler (vs. method/notify) */
GpeEventInfo->Flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
- GpeEventInfo->Flags |= (UINT8) (Type | ACPI_GPE_DISPATCH_HANDLER);
+ GpeEventInfo->Flags |= (UINT8) (Type | (IsRawHandler ?
+ ACPI_GPE_DISPATCH_RAW_HANDLER : ACPI_GPE_DISPATCH_HANDLER));
AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
@@ -946,11 +969,91 @@ AcpiInstallGpeHandler (
goto UnlockAndExit;
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiInstallGpeHandler
+ *
+ * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
+ * defined GPEs)
+ * GpeNumber - The GPE number within the GPE block
+ * Type - Whether this GPE should be treated as an
+ * edge- or level-triggered interrupt.
+ * Address - Address of the handler
+ * Context - Value passed to the handler on each GPE
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Install a handler for a General Purpose Event.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallGpeHandler (
+ ACPI_HANDLE GpeDevice,
+ UINT32 GpeNumber,
+ UINT32 Type,
+ ACPI_GPE_HANDLER Address,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
+
+
+ Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, FALSE,
+ Address, Context);
+
+ return_ACPI_STATUS (Status);
+}
+
ACPI_EXPORT_SYMBOL (AcpiInstallGpeHandler)
/*******************************************************************************
*
+ * FUNCTION: AcpiInstallGpeRawHandler
+ *
+ * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
+ * defined GPEs)
+ * GpeNumber - The GPE number within the GPE block
+ * Type - Whether this GPE should be treated as an
+ * edge- or level-triggered interrupt.
+ * Address - Address of the handler
+ * Context - Value passed to the handler on each GPE
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Install a handler for a General Purpose Event.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallGpeRawHandler (
+ ACPI_HANDLE GpeDevice,
+ UINT32 GpeNumber,
+ UINT32 Type,
+ ACPI_GPE_HANDLER Address,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallGpeRawHandler);
+
+
+ Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, TRUE,
+ Address, Context);
+
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallGpeRawHandler)
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiRemoveGpeHandler
*
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
@@ -1005,8 +1108,10 @@ AcpiRemoveGpeHandler (
/* Make sure that a handler is indeed installed */
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
- ACPI_GPE_DISPATCH_HANDLER)
+ if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
+ ACPI_GPE_DISPATCH_HANDLER) &&
+ (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
+ ACPI_GPE_DISPATCH_RAW_HANDLER))
{
Status = AE_NOT_EXIST;
goto UnlockAndExit;
@@ -1023,6 +1128,7 @@ AcpiRemoveGpeHandler (
/* Remove the handler */
Handler = GpeEventInfo->Dispatch.Handler;
+ GpeEventInfo->Dispatch.Handler = NULL;
/* Restore Method node (if any), set dispatch flags */
@@ -1036,8 +1142,10 @@ AcpiRemoveGpeHandler (
* enabled, it should be enabled at this point to restore the
* post-initialization configuration.
*/
- if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
- (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
+ if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+ ACPI_GPE_DISPATCH_METHOD) ||
+ (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+ ACPI_GPE_DISPATCH_NOTIFY)) &&
Handler->OriginallyEnabled)
{
(void) AcpiEvAddGpeReference (GpeEventInfo);
View
8 sys/external/bsd/acpica/dist/events/evxfevnt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVXFEVNT_C__
#define EXPORT_ACPI_INTERFACES
#include "acpi.h"
@@ -402,7 +401,8 @@ AcpiGetEventStatus (
if (InByte)
{
- LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
+ LocalEventStatus |=
+ (ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET);
}
/* Fixed event currently active? */
@@ -416,7 +416,7 @@ AcpiGetEventStatus (
if (InByte)
{
- LocalEventStatus |= ACPI_EVENT_FLAG_SET;
+ LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
}
(*EventStatus) = LocalEventStatus;
View
70 sys/external/bsd/acpica/dist/events/evxfgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVXFGPE_C__
#define EXPORT_ACPI_INTERFACES
#include "acpi.h"
@@ -148,7 +147,7 @@ AcpiEnableGpe (
GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
if (GpeEventInfo)
{
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
+ if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
ACPI_GPE_DISPATCH_NONE)
{
Status = AcpiEvAddGpeReference (GpeEventInfo);
@@ -222,12 +221,21 @@ ACPI_EXPORT_SYMBOL (AcpiDisableGpe)
* RETURN: Status
*
* DESCRIPTION: Enable or disable an individual GPE. This function bypasses
- * the reference count mechanism used in the AcpiEnableGpe and
- * AcpiDisableGpe interfaces -- and should be used with care.
- *
- * Note: Typically used to disable a runtime GPE for short period of time,
- * then re-enable it, without disturbing the existing reference counts. This
- * is useful, for example, in the Embedded Controller (EC) driver.
+ * the reference count mechanism used in the AcpiEnableGpe(),
+ * AcpiDisableGpe() interfaces.
+ * This API is typically used by the GPE raw handler mode driver
+ * to switch between the polling mode and the interrupt mode after
+ * the driver has enabled the GPE.
+ * The APIs should be invoked in this order:
+ * AcpiEnableGpe() <- Ensure the reference count > 0
+ * AcpiSetGpe(ACPI_GPE_DISABLE) <- Enter polling mode
+ * AcpiSetGpe(ACPI_GPE_ENABLE) <- Leave polling mode
+ * AcpiDisableGpe() <- Decrease the reference count
+ *
+ * Note: If a GPE is shared by 2 silicon components, then both the drivers
+ * should support GPE polling mode or disabling the GPE for long period
+ * for one driver may break the other. So use it with care since all
+ * firmware _Lxx/_Exx handlers currently rely on the GPE interrupt mode.
*
******************************************************************************/
@@ -262,7 +270,7 @@ AcpiSetGpe (
{
case ACPI_GPE_ENABLE:
- Status = AcpiEvEnableGpe (GpeEventInfo);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
break;
case ACPI_GPE_DISABLE:
@@ -431,7 +439,7 @@ AcpiSetupGpeForWake (
* known as an "implicit notify". Note: The GPE is assumed to be
* level-triggered (for windows compatibility).
*/
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+ if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
ACPI_GPE_DISPATCH_NONE)
{
/*
@@ -446,7 +454,7 @@ AcpiSetupGpeForWake (
* If we already have an implicit notify on this GPE, add
* this device to the notify list.
*/
- if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+ if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
ACPI_GPE_DISPATCH_NOTIFY)
{
/* Ensure that the device is not already in the list */
@@ -803,6 +811,44 @@ AcpiEnableAllRuntimeGpes (
ACPI_EXPORT_SYMBOL (AcpiEnableAllRuntimeGpes)
+/******************************************************************************
+ *
+ * FUNCTION: AcpiEnableAllWakeupGpes
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enable all "wakeup" GPEs and disable all of the other GPEs, in
+ * all GPE blocks.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnableAllWakeupGpes (
+ void)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnableAllWakeupGpes);
+
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiHwEnableAllWakeupGpes ();
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnableAllWakeupGpes)
+
+
/*******************************************************************************
*
* FUNCTION: AcpiInstallGpeBlock
View
3  sys/external/bsd/acpica/dist/events/evxfregn.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EVXFREGN_C__
#define EXPORT_ACPI_INTERFACES
#include "acpi.h"
View
4 sys/external/bsd/acpica/dist/executer/exconfig.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EXCONFIG_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acinterp.h"
View
4 sys/external/bsd/acpica/dist/executer/exconvrt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EXCONVRT_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acinterp.h"
View
4 sys/external/bsd/acpica/dist/executer/excreate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EXCREATE_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acinterp.h"
View
4 sys/external/bsd/acpica/dist/executer/exdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __EXDEBUG_C__
-
#include "acpi.h"
#include "accommon.h"
#include "acinterp.h"
View
6 sys/external/bsd/acpica/dist/executer/exdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.