summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-04-29 18:39:29 +0000
committernjl <njl@FreeBSD.org>2003-04-29 18:39:29 +0000
commit0cc98332c9ff2056e2435773b6c0299c9fb3d3de (patch)
treefb9eb36e7970ad69c51748aa41ebf3d92a58269d /sys/contrib/dev/acpica
parent433a962b40cf73fe931fabdf6557ba584b603fdf (diff)
parent0f552762e45d65746b7b1ee44d8ca1b52bf83450 (diff)
downloadFreeBSD-src-0cc98332c9ff2056e2435773b6c0299c9fb3d3de.zip
FreeBSD-src-0cc98332c9ff2056e2435773b6c0299c9fb3d3de.tar.gz
This commit was generated by cvs2svn to compensate for changes in r114237,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'sys/contrib/dev/acpica')
-rw-r--r--sys/contrib/dev/acpica/CHANGES.txt3012
-rw-r--r--sys/contrib/dev/acpica/acapps.h16
-rw-r--r--sys/contrib/dev/acpica/acdebug.h135
-rw-r--r--sys/contrib/dev/acpica/acdisasm.h14
-rw-r--r--sys/contrib/dev/acpica/acdispat.h4
-rw-r--r--sys/contrib/dev/acpica/acefi.h4
-rw-r--r--sys/contrib/dev/acpica/acevents.h18
-rw-r--r--sys/contrib/dev/acpica/acexcep.h20
-rw-r--r--sys/contrib/dev/acpica/acglobal.h42
-rw-r--r--sys/contrib/dev/acpica/achware.h18
-rw-r--r--sys/contrib/dev/acpica/acinterp.h23
-rw-r--r--sys/contrib/dev/acpica/aclocal.h367
-rw-r--r--sys/contrib/dev/acpica/acmacros.h56
-rw-r--r--sys/contrib/dev/acpica/acnamesp.h53
-rw-r--r--sys/contrib/dev/acpica/acobject.h329
-rw-r--r--sys/contrib/dev/acpica/acoutput.h50
-rw-r--r--sys/contrib/dev/acpica/acparser.h14
-rw-r--r--sys/contrib/dev/acpica/acresrc.h10
-rw-r--r--sys/contrib/dev/acpica/acstruct.h98
-rw-r--r--sys/contrib/dev/acpica/actables.h12
-rw-r--r--sys/contrib/dev/acpica/actbl.h42
-rw-r--r--sys/contrib/dev/acpica/actbl1.h14
-rw-r--r--sys/contrib/dev/acpica/actbl2.h18
-rw-r--r--sys/contrib/dev/acpica/actypes.h201
-rw-r--r--sys/contrib/dev/acpica/amlcode.h72
-rw-r--r--sys/contrib/dev/acpica/amlresrc.h4
-rw-r--r--sys/contrib/dev/acpica/dbdisply.c61
-rw-r--r--sys/contrib/dev/acpica/dbexec.c97
-rw-r--r--sys/contrib/dev/acpica/dbhistry.c16
-rw-r--r--sys/contrib/dev/acpica/dbinput.c57
-rw-r--r--sys/contrib/dev/acpica/dbstats.c6
-rw-r--r--sys/contrib/dev/acpica/dbutils.c59
-rw-r--r--sys/contrib/dev/acpica/dmbuffer.c8
-rw-r--r--sys/contrib/dev/acpica/dmnames.c6
-rw-r--r--sys/contrib/dev/acpica/dmopcode.c6
-rw-r--r--sys/contrib/dev/acpica/dmresrc.c12
-rw-r--r--sys/contrib/dev/acpica/dmresrcl.c22
-rw-r--r--sys/contrib/dev/acpica/dmresrcs.c4
-rw-r--r--sys/contrib/dev/acpica/dmutils.c14
-rw-r--r--sys/contrib/dev/acpica/dmwalk.c4
-rw-r--r--sys/contrib/dev/acpica/dsfield.c8
-rw-r--r--sys/contrib/dev/acpica/dsmethod.c4
-rw-r--r--sys/contrib/dev/acpica/dsmthdat.c78
-rw-r--r--sys/contrib/dev/acpica/dsobject.c221
-rw-r--r--sys/contrib/dev/acpica/dsopcode.c8
-rw-r--r--sys/contrib/dev/acpica/dsutils.c6
-rw-r--r--sys/contrib/dev/acpica/dswexec.c12
-rw-r--r--sys/contrib/dev/acpica/dswload.c92
-rw-r--r--sys/contrib/dev/acpica/dswscope.c4
-rw-r--r--sys/contrib/dev/acpica/dswstate.c30
-rw-r--r--sys/contrib/dev/acpica/evevent.c738
-rw-r--r--sys/contrib/dev/acpica/evmisc.c108
-rw-r--r--sys/contrib/dev/acpica/evregion.c6
-rw-r--r--sys/contrib/dev/acpica/evrgnini.c11
-rw-r--r--sys/contrib/dev/acpica/evsci.c24
-rw-r--r--sys/contrib/dev/acpica/evxface.c38
-rw-r--r--sys/contrib/dev/acpica/evxfevnt.c44
-rw-r--r--sys/contrib/dev/acpica/evxfregn.c4
-rw-r--r--sys/contrib/dev/acpica/exconfig.c5
-rw-r--r--sys/contrib/dev/acpica/exconvrt.c64
-rw-r--r--sys/contrib/dev/acpica/excreate.c8
-rw-r--r--sys/contrib/dev/acpica/exdump.c12
-rw-r--r--sys/contrib/dev/acpica/exfield.c18
-rw-r--r--sys/contrib/dev/acpica/exmisc.c18
-rw-r--r--sys/contrib/dev/acpica/exmutex.c6
-rw-r--r--sys/contrib/dev/acpica/exnames.c16
-rw-r--r--sys/contrib/dev/acpica/exoparg1.c4
-rw-r--r--sys/contrib/dev/acpica/exoparg2.c6
-rw-r--r--sys/contrib/dev/acpica/exoparg3.c8
-rw-r--r--sys/contrib/dev/acpica/exoparg6.c4
-rw-r--r--sys/contrib/dev/acpica/exprep.c4
-rw-r--r--sys/contrib/dev/acpica/exregion.c8
-rw-r--r--sys/contrib/dev/acpica/exresnte.c4
-rw-r--r--sys/contrib/dev/acpica/exresolv.c8
-rw-r--r--sys/contrib/dev/acpica/exresop.c72
-rw-r--r--sys/contrib/dev/acpica/exstore.c4
-rw-r--r--sys/contrib/dev/acpica/exstoren.c8
-rw-r--r--sys/contrib/dev/acpica/exstorob.c37
-rw-r--r--sys/contrib/dev/acpica/exutils.c10
-rw-r--r--sys/contrib/dev/acpica/hwacpi.c6
-rw-r--r--sys/contrib/dev/acpica/hwgpe.c247
-rw-r--r--sys/contrib/dev/acpica/hwregs.c30
-rw-r--r--sys/contrib/dev/acpica/hwtimer.c11
-rw-r--r--sys/contrib/dev/acpica/nsaccess.c50
-rw-r--r--sys/contrib/dev/acpica/nsalloc.c12
-rw-r--r--sys/contrib/dev/acpica/nsdump.c26
-rw-r--r--sys/contrib/dev/acpica/nsdumpdv.c4
-rw-r--r--sys/contrib/dev/acpica/nseval.c12
-rw-r--r--sys/contrib/dev/acpica/nsinit.c27
-rw-r--r--sys/contrib/dev/acpica/nsload.c134
-rw-r--r--sys/contrib/dev/acpica/nsnames.c14
-rw-r--r--sys/contrib/dev/acpica/nsobject.c6
-rw-r--r--sys/contrib/dev/acpica/nssearch.c16
-rw-r--r--sys/contrib/dev/acpica/nsutils.c157
-rw-r--r--sys/contrib/dev/acpica/nswalk.c4
-rw-r--r--sys/contrib/dev/acpica/nsxfeval.c8
-rw-r--r--sys/contrib/dev/acpica/nsxfname.c8
-rw-r--r--sys/contrib/dev/acpica/nsxfobj.c6
-rw-r--r--sys/contrib/dev/acpica/psargs.c32
-rw-r--r--sys/contrib/dev/acpica/psopcode.c12
-rw-r--r--sys/contrib/dev/acpica/psscope.c4
-rw-r--r--sys/contrib/dev/acpica/pstree.c4
-rw-r--r--sys/contrib/dev/acpica/psutils.c4
-rw-r--r--sys/contrib/dev/acpica/pswalk.c4
-rw-r--r--sys/contrib/dev/acpica/psxface.c4
-rw-r--r--sys/contrib/dev/acpica/rsaddr.c37
-rw-r--r--sys/contrib/dev/acpica/rscalc.c10
-rw-r--r--sys/contrib/dev/acpica/rsdump.c91
-rw-r--r--sys/contrib/dev/acpica/rsio.c4
-rw-r--r--sys/contrib/dev/acpica/rsirq.c10
-rw-r--r--sys/contrib/dev/acpica/rslist.c4
-rw-r--r--sys/contrib/dev/acpica/rsmemory.c6
-rw-r--r--sys/contrib/dev/acpica/rsmisc.c4
-rw-r--r--sys/contrib/dev/acpica/rsutils.c131
-rw-r--r--sys/contrib/dev/acpica/rsxface.c162
-rw-r--r--sys/contrib/dev/acpica/tbconvrt.c14
-rw-r--r--sys/contrib/dev/acpica/tbgetall.c8
-rw-r--r--sys/contrib/dev/acpica/tbinstal.c16
-rw-r--r--sys/contrib/dev/acpica/tbrsdt.c8
-rw-r--r--sys/contrib/dev/acpica/tbutils.c4
-rw-r--r--sys/contrib/dev/acpica/tbxface.c6
-rw-r--r--sys/contrib/dev/acpica/tbxfroot.c44
-rw-r--r--sys/contrib/dev/acpica/utalloc.c28
-rw-r--r--sys/contrib/dev/acpica/utclib.c76
-rw-r--r--sys/contrib/dev/acpica/utcopy.c102
-rw-r--r--sys/contrib/dev/acpica/utdebug.c10
-rw-r--r--sys/contrib/dev/acpica/utdelete.c15
-rw-r--r--sys/contrib/dev/acpica/uteval.c355
-rw-r--r--sys/contrib/dev/acpica/utinit.c6
-rw-r--r--sys/contrib/dev/acpica/utmath.c4
-rw-r--r--sys/contrib/dev/acpica/utmisc.c96
-rw-r--r--sys/contrib/dev/acpica/utobject.c10
-rw-r--r--sys/contrib/dev/acpica/utxface.c4
133 files changed, 4359 insertions, 4526 deletions
diff --git a/sys/contrib/dev/acpica/CHANGES.txt b/sys/contrib/dev/acpica/CHANGES.txt
index 3b82a15..999f103 100644
--- a/sys/contrib/dev/acpica/CHANGES.txt
+++ b/sys/contrib/dev/acpica/CHANGES.txt
@@ -1,47 +1,461 @@
+28 February 2003. Summary of changes for version 20030228.
+
+
+1) ACPI CA Core Subsystem:
+
+The GPE handling and dispatch code has been completely overhauled
+in preparation for support of GPE Block Devices (ID ACPI0006).
+This affects internal data structures and code only; there should
+be no differences visible externally. One new file has been
+added, evgpeblk.c
+
+The FADT fields GPE0_BLK_LEN and GPE1_BLK_LEN are now the only
+fields that are used to determine the GPE block lengths. The
+REGISTER_BIT_WIDTH field of the X_GPEx_BLK extended address
+structures are ignored. This is per the ACPI specification but
+it isn't very clear. The full 256 Block 0/1 GPEs are now
+supported (the use of REGISTER_BIT_WIDTH limited the number of
+GPEs to 128).
+
+In the SCI interrupt handler, removed the read of the PM1_CONTROL
+register to look at the SCI_EN bit. On some machines, this read
+causes an SMI event and greatly slows down SCI events. (This may
+in fact be the cause of slow battery status response on some
+systems.)
+
+Fixed a problem where a store of a NULL string to a package
+object could cause the premature deletion of the object. This
+was seen during execution of the battery _BIF method on some
+systems, resulting in no battery data being returned.
+
+Added AcpiWalkResources interface to simplify parsing of resource
+lists.
+
+Code and Data Size: Current core subsystem library sizes are
+shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a much larger code and data size. Note that
+these values will vary depending on the efficiency of the
+compiler and the compiler options used during generation.
+
+ Previous Release
+ Non-Debug Version: 72.0K Code, 9.5K Data, 81.5K Total
+ Debug Version: 153.0K Code, 62.9K Data, 215.9K Total
+ Current Release:
+ Non-Debug Version: 72.3K Code, 9.5K Data, 81.8K Total
+ Debug Version: 154.0K Code, 63.4K Data, 217.4K Total
+
+
+2) Linux
+
+S3 fixes (Ole Rohne)
+
+Update ACPI PHP driver with to use new acpi_walk_resource API
+(Bjorn Helgaas)
+
+Add S4BIOS support (Pavel Machek)
+
+Map in entire table before performing checksum (John Stultz)
+
+Expand the mem= cmdline to allow the specification of reserved
+and ACPI DATA blocks (Pavel Machek)
+
+Never use ACPI on VISWS
+
+Fix derive_pci_id (Ducrot Bruno, Alvaro Lopez)
+
+Revert a change that allowed P_BLK lengths to be 4 or 5. This is
+causing us to think that some systems support C2 when they really
+don't.
+
+Do not count processor objects for non-present CPUs (Thanks to
+Dominik Brodowski)
+
+
+3) iASL Compiler:
+
+Fixed a problem where ASL include files could not be found and
+opened.
+
+Added support for the _PDC reserved name.
+
+
+22 January 2003. Summary of changes for version 20030122.
+
+
+1) ACPI CA Core Subsystem:
+
+Added a check for constructs of the form: Store (Local0, Local0)
+where Local0 is not initialized. Apparently, some BIOS
+programmers believe that this is a NOOP. Since this store
+doesn't do anything anyway, the new prototype behavior will
+ignore this error. This is a case where we can relax the strict
+checking in the interpreter in the name of compatibility.
+
+
+2) Linux
+
+The AcpiSrc Source Conversion Utility has been released with the
+Linux package for the first time. This is the utility that is
+used to convert the ACPI CA base source code to the Linux
+version.
+
+(Both) Handle P_BLK lengths shorter than 6 more gracefully
+
+(Both) Move more headers to include/acpi, and delete an unused
+header.
+
+(Both) Move drivers/acpi/include directory to include/acpi
+
+(Both) Boot functions don't use cmdline, so don't pass it around
+
+(Both) Remove include of unused header (Adrian Bunk)
+
+(Both) acpiphp.h includes both linux/acpi.h and acpi_bus.h. Since
+the
+former now also includes the latter, acpiphp.h only needs the
+one, now.
+
+(2.5) Make it possible to select method of bios restoring after
+S3
+resume. [=> no more ugly ifdefs] (Pavel Machek)
+
+(2.5) Make proc write interfaces work (Pavel Machek)
+
+(2.5) Properly init/clean up in cpufreq/acpi (Dominik Brodowski)
+
+(2.5) Break out ACPI Perf code into its own module, under cpufreq
+(Dominik Brodowski)
+
+(2.4) S4BIOS support (Ducrot Bruno)
+
+(2.4) Fix acpiphp_glue.c for latest ACPI struct changes (Sergio
+Visinoni)
+
+
+3) iASL Compiler:
+
+Added support to disassemble SSDT and PSDTs.
+
+Implemented support to obtain SSDTs from the Windows registry if
+available.
+
+
+----------------------------------------
+09 January 2003. Summary of changes for version 20030109.
+
+1) ACPI CA Core Subsystem:
+
+Changed the behavior of the internal Buffer-to-String conversion
+function. The current ACPI specification states that the
+contents of the buffer are "converted to a string of two-
+character hexadecimal numbers, each separated by a space".
+Unfortunately, this definition is not backwards compatible with
+existing ACPI 1.0 implementations (although the behavior was not
+defined in the ACPI 1.0 specification). The new behavior simply
+copies data from the buffer to the string until a null character
+is found or the end of the buffer is reached. The new String
+object is always null terminated. This problem was seen during
+the generation of _BIF battery data where incorrect strings were
+returned for battery type, etc. This will also require an errata
+to the ACPI specification.
+
+Renamed all instances of NATIVE_UINT and NATIVE_INT to
+ACPI_NATIVE_UINT and ACPI_NATIVE_INT, respectively.
+
+Copyright in all module headers (both Linux and non-Linux) has be
+updated to 2003.
+
+Code and Data Size: Current core subsystem library sizes are
+shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a much larger code and data size. Note that
+these values will vary depending on the efficiency of the
+compiler and the compiler options used during generation.
+
+ Previous Release
+ Non-Debug Version: 72.0K Code, 9.5K Data, 81.5K Total
+ Debug Version: 153.0K Code, 62.9K Data, 215.9K Total
+ Current Release:
+ Non-Debug Version: 72.0K Code, 9.5K Data, 81.5K Total
+ Debug Version: 153.0K Code, 62.9K Data, 215.9K Total
+
+
+2) Linux
+
+Fixed an oops on module insertion/removal (Matthew Tippett)
+
+(2.4) Fix to handle dynamic size of mp_irqs (Joerg Prante)
+
+(2.5) Replace pr_debug (Randy Dunlap)
+
+(2.5) Remove usage of CPUFREQ_ALL_CPUS (Dominik Brodowski)
+
+(Both) Eliminate spawning of thread from timer callback, in favor
+of schedule_work()
+
+(Both) Show Lid status in /proc (Zdenek OGAR Skalak)
+
+(Both) Added define for Fixed Function HW region (Matthew Wilcox)
+
+(Both) Add missing statics to button.c (Pavel Machek)
+
+Several changes have been made to the source code translation
+utility that generates the Linux Code in order to make the code
+more "Linux-like":
+
+All typedefs on structs and unions have been removed in keeping
+with the Linux coding style.
+
+Removed the non-Linux SourceSafe module revision number from each
+module header.
+
+Completed major overhaul of symbols to be lowercased for linux.
+Doubled the number of symbols that are lowercased.
+
+Fixed a problem where identifiers within procedure headers and
+within quotes were not fully lower cased (they were left with a
+starting capital.)
+
+Some C macros whose only purpose is to allow the generation of 16-
+bit code are now completely removed in the Linux code, increasing
+readability and maintainability.
+
+----------------------------------------
+
+12 December 2002. Summary of changes for version 20021212.
+
+
+1) ACPI CA Core Subsystem:
+
+Fixed a problem where the creation of a zero-length AML Buffer
+would cause a fault.
+
+Fixed a problem where a Buffer object that pointed to a static
+AML buffer (in an ACPI table) could inadvertently be deleted,
+causing memory corruption.
+
+Fixed a problem where a user buffer (passed in to the external
+ACPI CA interfaces) could be overwritten if the buffer was too
+small to complete the operation, causing memory corruption.
+
+Fixed a problem in the Buffer-to-String conversion code where a
+string of length one was always returned, regardless of the size
+of the input Buffer object.
+
+Removed the NATIVE_CHAR data type across the entire source due to
+lack of need and lack of consistent use.
+
+Code and Data Size: Current core subsystem library sizes are
+shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a much larger code and data size. Note that
+these values will vary depending on the efficiency of the
+compiler and the compiler options used during generation.
+
+ Previous Release
+ Non-Debug Version: 72.1K Code, 9.5K Data, 81.6K Total
+ Debug Version: 152.7K Code, 62.7K Data, 215.4K Total
+ Current Release:
+ Non-Debug Version: 72.0K Code, 9.5K Data, 81.5K Total
+ Debug Version: 153.0K Code, 62.9K Data, 215.9K Total
+
+
+----------------------------------------
+05 December 2002. Summary of changes for version 20021205.
+
+1) ACPI CA Core Subsystem:
+
+Fixed a problem where a store to a String or Buffer object could
+cause corruption of the DSDT if the object type being stored was
+the same as the target object type and the length of the object
+being stored was equal to or smaller than the original (existing)
+target object. This was seen to cause corruption of battery _BIF
+buffers if the _BIF method modified the buffer on the fly.
+
+Fixed a problem where an internal error was generated if a
+control method invocation was used in an OperationRegion, Buffer,
+or Package declaration. This was caused by the deferred parsing
+of the control method and thus the deferred creation of the
+internal method object. The solution to this problem was to
+create the internal method object at the moment the method is
+encountered in the first pass - so that subsequent references to
+the method will able to obtain the required parameter count and
+thus properly parse the method invocation. This problem
+presented itself as an AE_AML_INTERNAL during the pass 1 parse
+phase during table load.
+
+Fixed a problem where the internal String object copy routine did
+not always allocate sufficient memory for the target String
+object and caused memory corruption. This problem was seen to
+cause "Allocation already present in list!" errors as memory
+allocation became corrupted.
+
+Implemented a new function for the evaluation of namespace
+objects that allows the specification of the allowable return
+object types. This simplifies a lot of code that checks for a
+return object of one or more specific objects returned from the
+evaluation (such as _STA, etc.) This may become and external
+function if it would be useful to ACPI-related drivers.
+
+Completed another round of prefixing #defines with "ACPI_" for
+clarity.
+
+Completed additional code restructuring to allow more modular
+linking for iASL compiler and AcpiExec. Several files were split
+creating new files. New files: nsparse.c dsinit.c evgpe.c
+
+Implemented an abort mechanism to terminate an executing control
+method via the AML debugger. This feature is useful for
+debugging control methods that depend (wait) for specific
+hardware responses.
+
+Code and Data Size: Current core subsystem library sizes are
+shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a much larger code and data size. Note that
+these values will vary depending on the efficiency of the
+compiler and the compiler options used during generation.
+
+ Previous Release
+ Non-Debug Version: 71.4K Code, 9.0K Data, 80.4K Total
+ Debug Version: 152.9K Code, 63.3K Data, 216.2K Total
+ Current Release:
+ Non-Debug Version: 72.1K Code, 9.5K Data, 81.6K Total
+ Debug Version: 152.7K Code, 62.7K Data, 215.4K Total
+
+
+2) iASL Compiler/Disassembler
+
+Fixed a compiler code generation problem for "Interrupt" Resource
+Descriptors. If specified in the ASL, the optional "Resource
+Source Index" and "Resource Source" fields were not inserted into
+the correct location within the AML resource descriptor, creating
+an invalid descriptor.
+
+Fixed a disassembler problem for "Interrupt" resource
+descriptors. The optional "Resource Source Index" and "Resource
+Source" fields were ignored.
+
+
+----------------------------------------
+22 November 2002. Summary of changes for version 20021122.
+
+
+1) ACPI CA Core Subsystem:
+
+Fixed a reported problem where an object stored to a Method Local
+or Arg was not copied to a new object during the store - the
+object pointer was simply copied to the Local/Arg. This caused
+all subsequent operations on the Local/Arg to also affect the
+original source of the store operation.
+
+Fixed a problem where a store operation to a Method Local or Arg
+was not completed properly if the Local/Arg contained a reference
+(from RefOf) to a named field. The general-purpose store-to-
+namespace-node code is now used so that this case is handled
+automatically.
+
+Fixed a problem where the internal object copy routine would
+cause a protection fault if the object being copied was a Package
+and contained either 1) a NULL package element or 2) a nested sub-
+package.
+
+Fixed a problem with the GPE initialization that resulted from an
+ambiguity in the ACPI specification. One section of the
+specification states that both the address and length of the GPE
+block must be zero if the block is not supported. Another
+section implies that only the address need be zero if the block
+is not supported. The code has been changed so that both the
+address and the length must be non-zero to indicate a valid GPE
+block (i.e., if either the address or the length is zero, the GPE
+block is invalid.)
+
+Code and Data Size: Current core subsystem library sizes are
+shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a much larger code and data size. Note that
+these values will vary depending on the efficiency of the
+compiler and the compiler options used during generation.
+
+ Previous Release
+ Non-Debug Version: 71.3K Code, 9.0K Data, 80.3K Total
+ Debug Version: 152.7K Code, 63.2K Data, 215.5K Total
+ Current Release:
+ Non-Debug Version: 71.4K Code, 9.0K Data, 80.4K Total
+ Debug Version: 152.9K Code, 63.3K Data, 216.2K Total
+
+
+2) Linux
+
+Cleaned up EC driver. Exported an external EC read/write
+interface. By going through this, other drivers (most notably
+sonypi) will be able to serialize access to the EC.
+
+
+3) iASL Compiler/Disassembler
+
+Implemented support to optionally generate include files for both
+ASM and C (the -i switch). This simplifies BIOS development by
+automatically creating include files that contain external
+declarations for the symbols that are created within the
+(optionally generated) ASM and C AML source files.
+
+
----------------------------------------
15 November 2002. Summary of changes for version 20021115.
1) ACPI CA Core Subsystem:
-Fixed a memory leak problem where an error during resolution
-of method arguments during a method invocation from another
-method failed to cleanup properly by deleting all successfully
-resolved argument objects.
+Fixed a memory leak problem where an error during resolution of
+method arguments during a method invocation from another method
+failed to cleanup properly by deleting all successfully resolved
+argument objects.
-Fixed a problem where the target of the Index() operator was
-not correctly constructed if the source object was a package.
-This problem has not been detected because the use of a target
-operand with Index() is very rare.
+Fixed a problem where the target of the Index() operator was not
+correctly constructed if the source object was a package. This
+problem has not been detected because the use of a target operand
+with Index() is very rare.
Fixed a problem with the Index() operator where an attempt was
made to delete the operand objects twice.
Fixed a problem where an attempt was made to delete an operand
-twice during execution of the CondRefOf() operator if the
-target did not exist.
+twice during execution of the CondRefOf() operator if the target
+did not exist.
-Implemented the first of perhaps several internal create
-object functions that create and initialize a specific object
-type. This consolidates duplicated code wherever the object
-is created, thus shrinking the size of the subsystem.
+Implemented the first of perhaps several internal create object
+functions that create and initialize a specific object type.
+This consolidates duplicated code wherever the object is created,
+thus shrinking the size of the subsystem.
-Implemented improved debug/error messages for errors that
-occur during nested method invocations. All executing method
-pathnames are displayed (with the error) as the call stack is
-unwound - thus simplifying debug.
+Implemented improved debug/error messages for errors that occur
+during nested method invocations. All executing method pathnames
+are displayed (with the error) as the call stack is unwound -
+thus simplifying debug.
Fixed a problem introduced in the 10/02 release that caused
-premature deletion of a buffer object if a buffer was used as
-an ASL operand where an integer operand is required (Thus
-causing an implicit object conversion from Buffer to Integer.)
-The change in the 10/02 release was attempting to fix a memory
-leak (albeit incorrectly.)
+premature deletion of a buffer object if a buffer was used as an
+ASL operand where an integer operand is required (Thus causing an
+implicit object conversion from Buffer to Integer.) The change
+in the 10/02 release was attempting to fix a memory leak (albeit
+incorrectly.)
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
these values will vary depending on the efficiency of the
compiler and the compiler options used during generation.
@@ -56,11 +470,11 @@ compiler and the compiler options used during generation.
2) Linux
-Changed the implementation of the ACPI semaphores to use
-down() instead of down_interruptable(). It is important that
-the execution of ACPI control methods not be interrupted by
-signals. Methods must run to completion, or the system may be
-left in an unknown/unstable state.
+Changed the implementation of the ACPI semaphores to use down()
+instead of down_interruptable(). It is important that the
+execution of ACPI control methods not be interrupted by signals.
+Methods must run to completion, or the system may be left in an
+unknown/unstable state.
Fixed a compilation error when CONFIG_SOFTWARE_SUSPEND is not
set. (Shawn Starr)
@@ -68,28 +482,28 @@ set. (Shawn Starr)
3) iASL Compiler/Disassembler
-Changed the default location of output files. All output
-files are now placed in the current directory by default
-instead of in the directory of the source file. This change
-may affect some existing makefiles, but it brings the behavior
-of the compiler in line with other similar tools. The
-location of the output files can be overridden with the -p
-command line switch.
+
+Changed the default location of output files. All output files
+are now placed in the current directory by default instead of in
+the directory of the source file. This change may affect some
+existing makefiles, but it brings the behavior of the compiler in
+line with other similar tools. The location of the output files
+can be overridden with the -p command line switch.
----------------------------------------
11 November 2002. Summary of changes for version 20021111.
-0) ACPI Specification 2.0B is released and is now available
-at: http://www.acpi.info/index.html
+0) ACPI Specification 2.0B is released and is now available at:
+http://www.acpi.info/index.html
1) ACPI CA Core Subsystem:
Implemented support for the ACPI 2.0 SMBus Operation Regions.
-This includes the early detection and handoff of the request
-to the SMBus region handler (avoiding all of the complex field
+This includes the early detection and handoff of the request to
+the SMBus region handler (avoiding all of the complex field
support code), and support for the bidirectional return packet
from an SMBus write operation. This paves the way for the
development of SMBus drivers in each host operating system.
@@ -104,9 +518,9 @@ name of WAIT_FOREVER to ACPI_WAIT_FOREVER.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
these values will vary depending on the efficiency of the
compiler and the compiler options used during generation.
@@ -138,33 +552,33 @@ keywords (SMBQuick, SMBWord, etc.)
1) ACPI CA Core Subsystem:
Fixed a problem where platforms that have a GPE1 block but no
-GPE0 block were not handled correctly. This resulted in a
-"GPE overlap" error message. GPE0 is no longer required.
+GPE0 block were not handled correctly. This resulted in a "GPE
+overlap" error message. GPE0 is no longer required.
Removed code added in the previous release that inserted nodes
-into the namespace in alphabetical order. This caused some
-side-effects on various machines. The root cause of the
-problem is still under investigation since in theory, the
-internal ordering of the namespace nodes should not matter.
-
-Enhanced error reporting for the case where a named object is
-not found during control method execution. The full ACPI
-namepath (name reference) of the object that was not found is
-displayed in this case.
-
-Note: as a result of the overhaul of the namespace object
-types in the previous release, the namespace nodes for the
-predefined scopes (_TZ, _PR, etc.) are now of the type
-ACPI_TYPE_LOCAL_SCOPE instead of ACPI_TYPE_ANY. This
-simplifies the namespace management code but may affect code
-that walks the namespace tree looking for specific object
-types.
+into the namespace in alphabetical order. This caused some side-
+effects on various machines. The root cause of the problem is
+still under investigation since in theory, the internal ordering
+of the namespace nodes should not matter.
+
+
+Enhanced error reporting for the case where a named object is not
+found during control method execution. The full ACPI namepath
+(name reference) of the object that was not found is displayed in
+this case.
+
+Note: as a result of the overhaul of the namespace object types
+in the previous release, the namespace nodes for the predefined
+scopes (_TZ, _PR, etc.) are now of the type ACPI_TYPE_LOCAL_SCOPE
+instead of ACPI_TYPE_ANY. This simplifies the namespace
+management code but may affect code that walks the namespace tree
+looking for specific object types.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
these values will vary depending on the efficiency of the
compiler and the compiler options used during generation.
@@ -180,20 +594,20 @@ compiler and the compiler options used during generation.
2) Linux
Fixed a problem introduced in the previous release where the
-Processor and Thermal objects were not recognized and
-installed in /proc. This was related to the scope type change
-described above.
+Processor and Thermal objects were not recognized and installed
+in /proc. This was related to the scope type change described
+above.
3) iASL Compiler/Disassembler
-Implemented the -g option to get all of the required ACPI
-tables from the registry and save them to files (Windows
-version of the compiler only.) The required tables are the
-FADT, FACS, and DSDT.
+Implemented the -g option to get all of the required ACPI tables
+from the registry and save them to files (Windows version of the
+compiler only.) The required tables are the FADT, FACS, and
+DSDT.
-Added ACPI table checksum validation during table disassembly
-in order to catch corrupted tables.
+Added ACPI table checksum validation during table disassembly in
+order to catch corrupted tables.
----------------------------------------
@@ -201,35 +615,35 @@ in order to catch corrupted tables.
1) ACPI CA Core Subsystem:
-Implemented a restriction on the Scope operator that the
-target must already exist in the namespace at the time the
-operator is encountered (during table load or method
-execution). In other words, forward references are not
-allowed and Scope() cannot create a new object. This changes
-the previous behavior where the interpreter would create the
-name if not found. This new behavior correctly enables the
-search-to-root algorithm during namespace lookup of the target
-name. Because of this upsearch, this fixes the known Compaq
-_SB_.OKEC problem and makes both the AML interpreter and iASL
-compiler compatible with other ACPI implementations.
-
-Completed a major overhaul of the internal ACPI object types
-for the ACPI Namespace and the associated operand objects.
-Many of these types had become obsolete with the introduction
-of the two-pass namespace load. This cleanup simplifies the
-code and makes the entire namespace load mechanism much
-clearer and easier to understand.
-
-Improved debug output for tracking scope opening/closing to
-help diagnose scoping issues. The old scope name as well as
-the new scope name are displayed. Also improved error
-messages for problems with ASL Mutex objects and error
-messages for GPE problems.
+Implemented a restriction on the Scope operator that the target
+must already exist in the namespace at the time the operator is
+encountered (during table load or method execution). In other
+words, forward references are not allowed and Scope() cannot
+create a new object. This changes the previous behavior where the
+interpreter would create the name if not found. This new
+behavior correctly enables the search-to-root algorithm during
+namespace lookup of the target name. Because of this upsearch,
+this fixes the known Compaq _SB_.OKEC problem and makes both the
+AML interpreter and iASL compiler compatible with other ACPI
+implementations.
+
+Completed a major overhaul of the internal ACPI object types for
+the ACPI Namespace and the associated operand objects. Many of
+these types had become obsolete with the introduction of the two-
+pass namespace load. This cleanup simplifies the code and makes
+the entire namespace load mechanism much clearer and easier to
+understand.
+
+Improved debug output for tracking scope opening/closing to help
+diagnose scoping issues. The old scope name as well as the new
+scope name are displayed. Also improved error messages for
+problems with ASL Mutex objects and error messages for GPE
+problems.
Cleaned up the namespace dump code, removed obsolete code.
-All string output (for all namespace/object dumps) now uses
-the common ACPI string output procedure which handles escapes
+All string output (for all namespace/object dumps) now uses the
+common ACPI string output procedure which handles escapes
properly and does not emit non-printable characters.
Fixed some issues with constants in the 64-bit version of the
@@ -245,30 +659,30 @@ interrupt level.
3) iASL Compiler/Disassembler
Implemented ACPI 2.0B grammar change that disallows all Type 1
-and 2 opcodes outside of a control method. This means that
-the "executable" operators (versus the "namespace" operators)
-cannot be used at the table level; they can only be used
-within a control method.
+and 2 opcodes outside of a control method. This means that the
+"executable" operators (versus the "namespace" operators) cannot
+be used at the table level; they can only be used within a
+control method.
Implemented the restriction on the Scope() operator where the
target must already exist in the namespace at the time the
-operator is encountered (during ASL compilation). In other
-words, forward references are not allowed and Scope() cannot
-create a new object. This makes the iASL compiler compatible
-with other ACPI implementations and makes the Scope()
-implementation adhere to the ACPI specification.
+operator is encountered (during ASL compilation). In other words,
+forward references are not allowed and Scope() cannot create a
+new object. This makes the iASL compiler compatible with other
+ACPI implementations and makes the Scope() implementation adhere
+to the ACPI specification.
Fixed a problem where namepath optimization for the Alias
operator was optimizing the wrong path (of the two namepaths.)
This caused a "Missing alias link" error message.
-Fixed a problem where an "unknown reserved name" warning could
-be incorrectly generated for names like "_SB" when the
-trailing underscore is not used in the original ASL.
+Fixed a problem where an "unknown reserved name" warning could be
+incorrectly generated for names like "_SB" when the trailing
+underscore is not used in the original ASL.
Fixed a problem where the reserved name check did not handle
-NamePaths with multiple NameSegs correctly. The first nameseg
-of the NamePath was examined instead of the last NameSeg.
+NamePaths with multiple NameSegs correctly. The first nameseg of
+the NamePath was examined instead of the last NameSeg.
----------------------------------------
@@ -291,8 +705,8 @@ conversion operators were not updating the internal namespace
node type as part of the store operation.
Fixed a memory leak during implicit source operand conversion
-where the original object was not deleted if it was converted
-to a new object of a different type.
+where the original object was not deleted if it was converted to
+a new object of a different type.
Enhanced error messages for all problems associated with
namespace lookups. Common procedure generates and prints the
@@ -300,21 +714,21 @@ lookup name as well as the formatted status.
Completed implementation of a new design for the Alias support
within the namespace. The existing design did not handle the
-case where a new object was assigned to one of the two names
-due to the use of an explicit conversion operator, resulting
-in the two names pointing to two different objects. The new
-design simply points the Alias name to the original name node
-- not to the object. This results in a level of indirection
-that must be handled in the name resolution mechanism.
+case where a new object was assigned to one of the two names due
+to the use of an explicit conversion operator, resulting in the
+two names pointing to two different objects. The new design
+simply points the Alias name to the original name node - not to
+the object. This results in a level of indirection that must be
+handled in the name resolution mechanism.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 69.6K Code, 8.3K Data, 77.9K Total
@@ -331,8 +745,7 @@ Neumann)
Allow handling negative celsius values. (Kochi Takayoshi)
-Fix thermal management and make trip points. R/W (Pavel
-Machek)
+Fix thermal management and make trip points. R/W (Pavel Machek)
Fix /proc/acpi/sleep. (P. Christeas)
@@ -355,33 +768,33 @@ Clarified some warning/error messages.
1) ACPI CA Core Subsystem version 20020918:
-Fixed a reported problem with reference chaining (via the
-Index() and RefOf() operators) in the ObjectType() and
-SizeOf() operators. The definition of these operators
-includes the dereferencing of all chained references to return
-information on the base object.
+Fixed a reported problem with reference chaining (via the Index()
+and RefOf() operators) in the ObjectType() and SizeOf()
+operators. The definition of these operators includes the
+dereferencing of all chained references to return information on
+the base object.
Fixed a problem with stores to indexed package elements - the
existing code would not complete the store if an "implicit
-conversion" was not performed. In other words, if the
-existing object (package element) was to be replaced
-completely, the code didn't handle this case.
+conversion" was not performed. In other words, if the existing
+object (package element) was to be replaced completely, the code
+didn't handle this case.
Relaxed typechecking on the ASL "Scope" operator to allow the
target name to refer to an object of type Integer, String, or
Buffer, in addition to the scoping object types (Device,
predefined Scopes, Processor, PowerResource, and ThermalZone.)
-This allows existing AML code that has workarounds for a bug
-in Windows to function properly. A warning is issued,
-however. This affects both the AML interpreter and the iASL
-compiler. Below is an example of this type of ASL code:
+This allows existing AML code that has workarounds for a bug in
+Windows to function properly. A warning is issued, however.
+This affects both the AML interpreter and the iASL compiler.
+Below is an example of this type of ASL code:
Name(DEB,0x00)
Scope(DEB)
{
-Fixed some reported problems with 64-bit integer support in
-the local implementation of C library functions (clib.c)
+Fixed some reported problems with 64-bit integer support in the
+local implementation of C library functions (clib.c)
2) Linux
@@ -389,9 +802,8 @@ the local implementation of C library functions (clib.c)
Use ACPI fix map region instead of IOAPIC region, since it is
undefined in non-SMP.
-Ensure that the SCI has the proper polarity and trigger, even
-on systems that do not have an interrupt override entry in the
-MADT.
+Ensure that the SCI has the proper polarity and trigger, even on
+systems that do not have an interrupt override entry in the MADT.
2.5 big driver reorganization (Pat Mochel)
@@ -399,18 +811,18 @@ Use early table mapping code from acpitable.c (Andi Kleen)
New blacklist entries (Andi Kleen)
-Blacklist improvements. Split blacklist code out into a
-separate file. Move checking the blacklist to very early.
-Previously, we would use ACPI tables, and then halfway through
-init, check the blacklist -- too late. Now, it's early enough
-to completely fall-back to non-ACPI.
+Blacklist improvements. Split blacklist code out into a separate
+file. Move checking the blacklist to very early. Previously, we
+would use ACPI tables, and then halfway through init, check the
+blacklist -- too late. Now, it's early enough to completely fall-
+back to non-ACPI.
3) iASL Compiler/Disassembler version 20020918:
-Fixed a problem where the typechecking code didn't know that
-an alias could point to a method. In other words, aliases
-were not being dereferenced during typechecking.
+Fixed a problem where the typechecking code didn't know that an
+alias could point to a method. In other words, aliases were not
+being dereferenced during typechecking.
----------------------------------------
@@ -418,15 +830,15 @@ were not being dereferenced during typechecking.
1) ACPI CA Core Subsystem Version 20020829:
-If the target of a Scope() operator already exists, it must be
-an object type that actually opens a scope -- such as a
-Device, Method, Scope, etc. This is a fatal runtime error.
-Similar error check has been added to the iASL compiler also.
+If the target of a Scope() operator already exists, it must be an
+object type that actually opens a scope -- such as a Device,
+Method, Scope, etc. This is a fatal runtime error. Similar
+error check has been added to the iASL compiler also.
-Tightened up the namespace load to disallow multiple names in
-the same scope. This previously was allowed if both objects
-were of the same type. (i.e., a lookup was the same as
-entering a new name).
+Tightened up the namespace load to disallow multiple names in the
+same scope. This previously was allowed if both objects were of
+the same type. (i.e., a lookup was the same as entering a new
+name).
2) Linux
@@ -450,24 +862,22 @@ example, a declaration like "Method (\_SB_.ABCD)" would get
optimized to "Method (ABCD)" if the declaration is within the
\_SB_ scope. This optimization is in addition to the named
reference path optimization first released in the previous
-version. This would seem to complete all possible
-optimizations for namepaths within the ASL/AML.
+version. This would seem to complete all possible optimizations
+for namepaths within the ASL/AML.
-If the target of a Scope() operator already exists, it must be
-an object type that actually opens a scope -- such as a
-Device, Method, Scope, etc.
+If the target of a Scope() operator already exists, it must be an
+object type that actually opens a scope -- such as a Device,
+Method, Scope, etc.
-Implemented a check and warning for unreachable code in the
-same block below a Return() statement.
+Implemented a check and warning for unreachable code in the same
+block below a Return() statement.
-Fixed a problem where the listing file was not generated if
-the compiler aborted if the maximum error count was exceeded
-(200).
+Fixed a problem where the listing file was not generated if the
+compiler aborted if the maximum error count was exceeded (200).
Fixed a problem where the typechecking of method return values
-was broken. This includes the check for a return value when
-the method is invoked as a TermArg (a return value is
-expected.)
+was broken. This includes the check for a return value when the
+method is invoked as a TermArg (a return value is expected.)
Fixed a reported problem where EOF conditions during a quoted
string or comment caused a fault.
@@ -478,42 +888,41 @@ string or comment caused a fault.
1) ACPI CA Core Subsystem Version 20020815:
-Fixed a reported problem where a Store to a method argument
-that contains a reference did not perform the indirect store
-correctly. This problem was created during the conversion to
-the new reference object model - the indirect store to a
-method argument code was not updated to reflect the new model.
+Fixed a reported problem where a Store to a method argument that
+contains a reference did not perform the indirect store
+correctly. This problem was created during the conversion to the
+new reference object model - the indirect store to a method
+argument code was not updated to reflect the new model.
-Reworked the ACPI mode change code to better conform to ACPI
-2.0, handle corner cases, and improve code legibility (Kochi
+Reworked the ACPI mode change code to better conform to ACPI 2.0,
+handle corner cases, and improve code legibility (Kochi
Takayoshi)
Fixed a problem with the pathname parsing for the carat (^)
-prefix. The heavy use of the carat operator by the new
-namepath optimization in the iASL compiler uncovered a problem
-with the AML interpreter handling of this prefix. In the case
-where one or more carats precede a single nameseg, the nameseg
-was treated as standalone and the search rule (to root) was
-inadvertently applied. This could cause both the iASL
-compiler and the interpreter to find the wrong object or to
-miss the error that should occur if the object does not exist
-at that exact pathname.
-
-Found and fixed the problem where the HP Pavilion DSDT would
-not load. This was a relatively minor tweak to the table
-loading code (a problem caused by the unexpected encounter
-with a method invocation not within a control method), but it
-does not solve the overall issue of the execution of AML code
-at the table level. This investigation is still ongoing.
+prefix. The heavy use of the carat operator by the new namepath
+optimization in the iASL compiler uncovered a problem with the
+AML interpreter handling of this prefix. In the case where one
+or more carats precede a single nameseg, the nameseg was treated
+as standalone and the search rule (to root) was inadvertently
+applied. This could cause both the iASL compiler and the
+interpreter to find the wrong object or to miss the error that
+should occur if the object does not exist at that exact pathname.
+
+Found and fixed the problem where the HP Pavilion DSDT would not
+load. This was a relatively minor tweak to the table loading
+code (a problem caused by the unexpected encounter with a method
+invocation not within a control method), but it does not solve
+the overall issue of the execution of AML code at the table
+level. This investigation is still ongoing.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 69.1K Code, 8.2K Data, 77.3K Total
@@ -543,61 +952,58 @@ Fix early-boot table parsing (Bjorn Helgaas)
3) iASL Compiler/Disassembler
-Reworked the compiler options to make them more consistent and
-to use two-letter options where appropriate. We were running
-out of sensible letters. This may break some makefiles, so
-check the current options list by invoking the compiler with
-no parameters.
+Reworked the compiler options to make them more consistent and to
+use two-letter options where appropriate. We were running out of
+sensible letters. This may break some makefiles, so check the
+current options list by invoking the compiler with no parameters.
Completed the design and implementation of the ASL namepath
-optimization option for the compiler. This option optimizes
-all references to named objects to the shortest possible path.
-The first attempt tries to utilize a single nameseg (4
-characters) and the "search-to-root" algorithm used by the
-interpreter. If that cannot be used (because either the name
-is not in the search path or there is a conflict with another
-object with the same name), the pathname is optimized using
-the carat prefix (usually a shorter string than specifying the
-entire path from the root.)
-
-Implemented support to obtain the DSDT from the Windows
-registry (when the disassembly option is specified with no
-input file). Added this code as the implementation for
-AcpiOsTableOverride in the Windows OSL. Migrated the 16-bit
-code (used in the AcpiDump utility) to scan memory for the
-DSDT to the AcpiOsTableOverride function in the DOS OSL to
-make the disassembler truly OS independent.
-
-Implemented a new option to disassemble and compile in one
-step. When used without an input filename, this option will
-grab the DSDT from the local machine, disassemble it, and
-compile it in one step.
-
-Added a warning message for invalid escapes (a backslash
-followed by any character other than the allowable escapes).
-This catches the quoted string error "\_SB_" (which should be
-"\\_SB_" ). Also, there are numerous instances in the ACPI
-specification where this error occurs.
+optimization option for the compiler. This option optimizes all
+references to named objects to the shortest possible path. The
+first attempt tries to utilize a single nameseg (4 characters)
+and the "search-to-root" algorithm used by the interpreter. If
+that cannot be used (because either the name is not in the search
+path or there is a conflict with another object with the same
+name), the pathname is optimized using the carat prefix (usually
+a shorter string than specifying the entire path from the root.)
+
+Implemented support to obtain the DSDT from the Windows registry
+(when the disassembly option is specified with no input file).
+Added this code as the implementation for AcpiOsTableOverride in
+the Windows OSL. Migrated the 16-bit code (used in the AcpiDump
+utility) to scan memory for the DSDT to the AcpiOsTableOverride
+function in the DOS OSL to make the disassembler truly OS
+independent.
+
+Implemented a new option to disassemble and compile in one step.
+When used without an input filename, this option will grab the
+DSDT from the local machine, disassemble it, and compile it in
+one step.
+
+Added a warning message for invalid escapes (a backslash followed
+by any character other than the allowable escapes). This catches
+the quoted string error "\_SB_" (which should be "\\_SB_" ).
+Also, there are numerous instances in the ACPI specification
+where this error occurs.
Added a compiler option to disable all optimizations. This is
-basically the "compatibility mode" because by using this
-option, the AML code will come out exactly the same as other
-ASL compilers.
+basically the "compatibility mode" because by using this option,
+the AML code will come out exactly the same as other ASL
+compilers.
-Added error messages for incorrectly ordered dependent
-resource functions. This includes: missing EndDependentFn
-macro at end of dependent resource list, nested dependent
-function macros (both start and end), and missing
-StartDependentFn macro. These are common errors that should
-be caught at compile time.
+Added error messages for incorrectly ordered dependent resource
+functions. This includes: missing EndDependentFn macro at end of
+dependent resource list, nested dependent function macros (both
+start and end), and missing StartDependentFn macro. These are
+common errors that should be caught at compile time.
-Implemented _OSI support for the disassembler and compiler.
-_OSI must be included in the namespace for proper disassembly
-(because the disassembler must know the number of arguments.)
+Implemented _OSI support for the disassembler and compiler. _OSI
+must be included in the namespace for proper disassembly (because
+the disassembler must know the number of arguments.)
Added an "optimization" message type that is optional (off by
-default). This message is used for all optimizations -
-including constant folding, integer optimization, and namepath
+default). This message is used for all optimizations - including
+constant folding, integer optimization, and namepath
optimization.
----------------------------------------
@@ -606,32 +1012,31 @@ optimization.
1) ACPI CA Core Subsystem Version 20020725:
-The AML Disassembler has been enhanced to produce compilable
-ASL code and has been integrated into the iASL compiler (see
-below) as well as the single-step disassembly for the AML
-debugger and the disassembler for the AcpiDump utility. All
-ACPI 2.0A opcodes, resource templates and macros are fully
-supported. The disassembler has been tested on over 30
-different AML files, producing identical AML when the
-resulting disassembled ASL file is recompiled with the same
-ASL compiler.
-
-Modified the Resource Manager to allow zero interrupts and
-zero dma channels during the GetCurrentResources call. This
-was causing problems on some platforms.
-
-Added the AcpiOsRedirectOutput interface to the OSL to
-simplify output redirection for the AcpiOsPrintf and
-AcpiOsVprintf interfaces.
+The AML Disassembler has been enhanced to produce compilable ASL
+code and has been integrated into the iASL compiler (see below)
+as well as the single-step disassembly for the AML debugger and
+the disassembler for the AcpiDump utility. All ACPI 2.0A
+opcodes, resource templates and macros are fully supported. The
+disassembler has been tested on over 30 different AML files,
+producing identical AML when the resulting disassembled ASL file
+is recompiled with the same ASL compiler.
+
+Modified the Resource Manager to allow zero interrupts and zero
+dma channels during the GetCurrentResources call. This was
+causing problems on some platforms.
+
+Added the AcpiOsRedirectOutput interface to the OSL to simplify
+output redirection for the AcpiOsPrintf and AcpiOsVprintf
+interfaces.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 68.7K Code, 7.4K Data, 76.1K Total
@@ -645,26 +1050,25 @@ compiler and the compiler options used during generation.
Fixed a panic in the EC driver (Dominik Brodowski)
-Implemented checksum of the R/XSDT itself during Linux table
-scan (Richard Schaal)
+Implemented checksum of the R/XSDT itself during Linux table scan
+(Richard Schaal)
3) iASL compiler
-The AML disassembler is integrated into the compiler. The "-
-d" option invokes the disassembler to completely disassemble
-an input AML file, producing as output a text ASL file with
-the extension ".dsl" (to avoid name collisions with existing
-.asl source files.) A future enhancement will allow the
-disassembler to obtain the BIOS DSDT from the registry under
-Windows.
+The AML disassembler is integrated into the compiler. The "-d"
+option invokes the disassembler to completely disassemble an
+input AML file, producing as output a text ASL file with the
+extension ".dsl" (to avoid name collisions with existing .asl
+source files.) A future enhancement will allow the disassembler
+to obtain the BIOS DSDT from the registry under Windows.
Fixed a problem with the VendorShort and VendorLong resource
descriptors where an invalid AML sequence was created.
-Implemented a fix for BufferData term in the ASL parser. It
-was inadvertently defined twice, allowing invalid syntax to
-pass and causing reduction conflicts.
+Implemented a fix for BufferData term in the ASL parser. It was
+inadvertently defined twice, allowing invalid syntax to pass and
+causing reduction conflicts.
Fixed a problem where the Ones opcode could get converted to a
value of zero if "Ones" was used where a byte, word or dword
@@ -678,25 +1082,25 @@ correct size with the correct value.
1) ACPI CA Core Subsystem Version 20020702:
-The Table Manager code has been restructured to add several
-new features. Tables that are not required by the core
-subsystem (other than the FADT, DSDT, FACS, PSDTs, etc.) are
-no longer validated in any way and are returned from
-AcpiGetFirmwareTable if requested. The AcpiOsTableOverride
-interface is now called for each table that is loaded by the
-subsystem in order to allow the host to override any table it
-chooses. Previously, only the DSDT could be overridden.
-Added one new files, tbrsdt.c and tbgetall.c.
-
-Fixed a problem with the conversion of internal package
-objects to external objects (when a package is returned from a
-control method.) The return buffer length was set to zero
-instead of the proper length of the package object.
+The Table Manager code has been restructured to add several new
+features. Tables that are not required by the core subsystem
+(other than the FADT, DSDT, FACS, PSDTs, etc.) are no longer
+validated in any way and are returned from AcpiGetFirmwareTable
+if requested. The AcpiOsTableOverride interface is now called
+for each table that is loaded by the subsystem in order to allow
+the host to override any table it chooses. Previously, only the
+DSDT could be overridden. Added one new files, tbrsdt.c and
+tbgetall.c.
+
+Fixed a problem with the conversion of internal package objects
+to external objects (when a package is returned from a control
+method.) The return buffer length was set to zero instead of the
+proper length of the package object.
Fixed a reported problem with the use of the RefOf and DeRefOf
-operators when passing reference arguments to control methods.
-A new type of Reference object is used internally for
-references produced by the RefOf operator.
+operators when passing reference arguments to control methods. A
+new type of Reference object is used internally for references
+produced by the RefOf operator.
Added additional error messages in the Resource Manager to
explain AE_BAD_DATA errors when they occur during resource
@@ -705,15 +1109,15 @@ parsing.
Split the AcpiEnableSubsystem into two primitives to enable a
finer granularity initialization sequence. These two calls
should be called in this order: AcpiEnableSubsystem (flags),
-AcpiInitializeObjects (flags). The flags parameter remains
-the same.
+AcpiInitializeObjects (flags). The flags parameter remains the
+same.
2) Linux
-Updated the ACPI utilities module to understand the new style
-of fully resolved package objects that are now returned from
-the core subsystem. This eliminates errors of the form:
+Updated the ACPI utilities module to understand the new style of
+fully resolved package objects that are now returned from the
+core subsystem. This eliminates errors of the form:
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PPB_._PRT]
acpi_utils-0430 [145] acpi_evaluate_reference:
@@ -723,27 +1127,26 @@ The method evaluation utility uses the new buffer allocation
scheme instead of calling AcpiEvaluate Object twice.
Added support for ECDT. This allows the use of the Embedded
-Controller before the namespace has been fully initialized,
-which is necessary for ACPI 2.0 support, and for some laptops
-to initialize properly. (Laptops using ECDT are still rare, so
-only limited testing was performed of the added
-functionality.)
+Controller before the namespace has been fully initialized, which
+is necessary for ACPI 2.0 support, and for some laptops to
+initialize properly. (Laptops using ECDT are still rare, so only
+limited testing was performed of the added functionality.)
Fixed memory leaks in the EC driver.
Eliminated a brittle code structure in acpi_bus_init().
-Eliminated the acpi_evaluate() helper function in utils.c. It
-is no longer needed since acpi_evaluate_object can optionally
+Eliminated the acpi_evaluate() helper function in utils.c. It is
+no longer needed since acpi_evaluate_object can optionally
allocate memory for the return object.
-Implemented fix for keyboard hang when getting battery
-readings on some systems (Stephen White)
+Implemented fix for keyboard hang when getting battery readings
+on some systems (Stephen White)
PCI IRQ routing update (Dominik Brodowski)
-Fix an ifdef to allow compilation on UP with LAPIC but no
-IOAPIC support
+Fix an ifdef to allow compilation on UP with LAPIC but no IOAPIC
+support
----------------------------------------
11 June 2002. Summary of changes for this release.
@@ -752,23 +1155,22 @@ IOAPIC support
1) ACPI CA Core Subsystem Version 20020611:
Fixed a reported problem where constants such as Zero and One
-appearing within _PRT packages were not handled correctly
-within the resource manager code. Originally reported against
-the ASL compiler because the code generator now optimizes
-integers to their minimal AML representation (i.e. AML
-constants if possible.) The _PRT code now handles all AML
-constant opcodes correctly (Zero, One, Ones, Revision).
+appearing within _PRT packages were not handled correctly within
+the resource manager code. Originally reported against the ASL
+compiler because the code generator now optimizes integers to
+their minimal AML representation (i.e. AML constants if
+possible.) The _PRT code now handles all AML constant opcodes
+correctly (Zero, One, Ones, Revision).
Fixed a problem with the Concatenate operator in the AML
-interpreter where a buffer result object was incorrectly
-marked as not fully evaluated, causing a run-time error of
+interpreter where a buffer result object was incorrectly marked
+as not fully evaluated, causing a run-time error of
AE_AML_INTERNAL.
All package sub-objects are now fully resolved before they are
-returned from the external ACPI interfaces. This means that
-name strings are resolved to object handles, and constant
-operators (Zero, One, Ones, Revision) are resolved to
-Integers.
+returned from the external ACPI interfaces. This means that name
+strings are resolved to object handles, and constant operators
+(Zero, One, Ones, Revision) are resolved to Integers.
Implemented immediate resolution of the AML Constant opcodes
(Zero, One, Ones, Revision) to Integer objects upon detection
@@ -776,18 +1178,18 @@ within the AML stream. This has simplified and reduced the
generated code size of the subsystem by eliminating about 10
switch statements for these constants (which previously were
contained in Reference objects.) The complicating issues are
-that the Zero opcode is used as a "placeholder" for
-unspecified optional target operands and stores to constants
-are defined to be no-ops.
+that the Zero opcode is used as a "placeholder" for unspecified
+optional target operands and stores to constants are defined to
+be no-ops.
Code and Data Size: Current core subsystem library sizes are
-shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+shown below. These are the code and data sizes for the acpica.lib
+produced by the Microsoft Visual C++ 6.0 compiler, and these
+values do not include any ACPI driver or OSPM code. The debug
+version of the code includes the debug output trace mechanism and
+has a larger code and data size. Note that these values will
+vary depending on the efficiency of the compiler and the compiler
+options used during generation.
Previous Release
Non-Debug Version: 69.3K Code, 7.4K Data, 76.7K Total
@@ -805,20 +1207,20 @@ bridges (Bjorn Helgaas).
3) iASL Compiler Version X2046:
-Fixed a problem where the "_DDN" reserved name was defined to
-be a control method with one argument. There are no
-arguments, and _DDN does not have to be a control method.
+Fixed a problem where the "_DDN" reserved name was defined to be
+a control method with one argument. There are no arguments, and
+_DDN does not have to be a control method.
-Fixed a problem with the Linux version of the compiler where
-the source lines printed with error messages were the wrong
-lines. This turned out to be the "LF versus CR/LF" difference
-between Windows and Unix. This appears to be the longstanding
-issue concerning listing output and error messages.
+Fixed a problem with the Linux version of the compiler where the
+source lines printed with error messages were the wrong lines.
+This turned out to be the "LF versus CR/LF" difference between
+Windows and Unix. This appears to be the longstanding issue
+concerning listing output and error messages.
-Fixed a problem with the Linux version of compiler where
-opcode names within error messages were wrong. This was
-caused by a slight difference in the output of the Flex tool
-on Linux versus Windows.
+Fixed a problem with the Linux version of compiler where opcode
+names within error messages were wrong. This was caused by a
+slight difference in the output of the Flex tool on Linux versus
+Windows.
Fixed a problem with the Linux compiler where the hex output
files contained some garbage data caused by an internal buffer
@@ -834,36 +1236,36 @@ overrun.
Implemented a workaround to an BIOS bug discovered on the HP
OmniBook where the FADT revision number and the table size are
inconsistent (ACPI 2.0 revision vs. ACPI 1.0 table size). The
-new behavior is to fallback to using only the ACPI 1.0 fields
-of the FADT if the table is too small to be a ACPI 2.0 table
-as claimed by the revision number. Although this is a BIOS
-bug, this is a case where the workaround is simple enough and
-with no side effects, so it seemed prudent to add it. A
-warning message is issued, however.
+new behavior is to fallback to using only the ACPI 1.0 fields of
+the FADT if the table is too small to be a ACPI 2.0 table as
+claimed by the revision number. Although this is a BIOS bug,
+this is a case where the workaround is simple enough and with no
+side effects, so it seemed prudent to add it. A warning message
+is issued, however.
-Implemented minimum size checks for the fixed-length ACPI
-tables -- the FADT and FACS, as well as consistency checks
-between the revision number and the table size.
+Implemented minimum size checks for the fixed-length ACPI tables
+-- the FADT and FACS, as well as consistency checks between the
+revision number and the table size.
-Fixed a reported problem in the table override support where
-the new table pointer was incorrectly treated as a physical
-address instead of a logical address.
+Fixed a reported problem in the table override support where the
+new table pointer was incorrectly treated as a physical address
+instead of a logical address.
-Eliminated the use of the AE_AML_ERROR exception and replaced
-it with more descriptive codes.
+Eliminated the use of the AE_AML_ERROR exception and replaced it
+with more descriptive codes.
Fixed a problem where an exception would occur if an ASL Field
-was defined with no named Field Units underneath it (used by
-some index fields).
+was defined with no named Field Units underneath it (used by some
+index fields).
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 68.8K Code, 7.1K Data, 75.9K Total
@@ -876,8 +1278,8 @@ compiler and the compiler options used during generation.
2) Linux
-Much work done on ACPI init (MADT and PCI IRQ routing
-support). (Paul D. and Dominik Brodowski)
+Much work done on ACPI init (MADT and PCI IRQ routing support).
+(Paul D. and Dominik Brodowski)
Fix PCI IRQ-related panic on boot (Sam Revitch)
@@ -894,40 +1296,39 @@ Moved arch-specific code out of include/platform/aclinux.h
3) iASL Compiler Version X2044:
Implemented error checking for the string used in the EISAID
-macro (Usually used in the definition of the _HID object.)
-The code now strictly enforces the PnP format - exactly 7
-characters, 3 uppercase letters and 4 hex digits.
+macro (Usually used in the definition of the _HID object.) The
+code now strictly enforces the PnP format - exactly 7 characters,
+3 uppercase letters and 4 hex digits.
If a raw string is used in the definition of the _HID object
(instead of the EISAID macro), the string must contain all
-alphanumeric characters (e.g., "*PNP0011" is not allowed
-because of the asterisk.)
+alphanumeric characters (e.g., "*PNP0011" is not allowed because
+of the asterisk.)
-Implemented checking for invalid use of ACPI reserved names
-for most of the name creation operators (Name, Device, Event,
-Mutex, OperationRegion, PowerResource, Processor, and
-ThermalZone.) Previously, this check was only performed for
-control methods.
+Implemented checking for invalid use of ACPI reserved names for
+most of the name creation operators (Name, Device, Event, Mutex,
+OperationRegion, PowerResource, Processor, and ThermalZone.)
+Previously, this check was only performed for control methods.
-Implemented an additional check on the Name operator to emit
-an error if a reserved name that must be implemented in ASL as
-a control method is used. We know that a reserved name must
-be a method if it is defined with input arguments.
+Implemented an additional check on the Name operator to emit an
+error if a reserved name that must be implemented in ASL as a
+control method is used. We know that a reserved name must be a
+method if it is defined with input arguments.
The warning emitted when a namespace object reference is not
-found during the cross reference phase has been changed into
-an error. The "External" directive should be used for names
-defined in other modules.
+found during the cross reference phase has been changed into an
+error. The "External" directive should be used for names defined
+in other modules.
4) Tools and Utilities
-The 16-bit tools (adump16 and aexec16) have been regenerated
-and tested.
+The 16-bit tools (adump16 and aexec16) have been regenerated and
+tested.
Fixed a problem with the output of both acpidump and adump16
-where the indentation of closing parentheses and brackets was
-not aligned properly with the parent block.
+where the indentation of closing parentheses and brackets was not
+aligned properly with the parent block.
----------------------------------------
@@ -936,32 +1337,32 @@ not aligned properly with the parent block.
1) ACPI CA Core Subsystem Version 20020503:
-Added support a new OSL interface that allows the host
-operating system software to override the DSDT found in the
-firmware - AcpiOsTableOverride. With this interface, the OSL
-can examine the version of the firmware DSDT and replace it
-with a different one if desired.
+Added support a new OSL interface that allows the host operating
+system software to override the DSDT found in the firmware -
+AcpiOsTableOverride. With this interface, the OSL can examine
+the version of the firmware DSDT and replace it with a different
+one if desired.
-Added new external interfaces for accessing ACPI registers
-from device drivers and other system software -
-AcpiGetRegister and AcpiSetRegister. This was simply an
-externalization of the existing AcpiHwBitRegister interfaces.
+Added new external interfaces for accessing ACPI registers from
+device drivers and other system software - AcpiGetRegister and
+AcpiSetRegister. This was simply an externalization of the
+existing AcpiHwBitRegister interfaces.
Fixed a regression introduced in the previous build where the
ASL/AML CreateField operator always returned an error,
"destination must be a NS Node".
-Extended the maximum time (before failure) to successfully
-enable ACPI mode to 3 seconds.
+Extended the maximum time (before failure) to successfully enable
+ACPI mode to 3 seconds.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 68.5K Code, 7.0K Data, 75.5K Total
@@ -977,8 +1378,8 @@ Enhanced ACPI init code for SMP. We are now fully MPS and $PIR-
free. While 3 out of 4 of our in-house systems work fine, the
last one still hangs when testing the LAPIC timer.
-Renamed many files in 2.5 kernel release to omit "acpi_" from
-the name.
+Renamed many files in 2.5 kernel release to omit "acpi_" from the
+name.
Added warning on boot for Presario 711FR.
@@ -991,30 +1392,30 @@ IA64: Fixed memory map functions (JI Lee)
3) iASL Compiler Version X2043:
-Added support to allow the compiler to be integrated into the
-MS VC++ development environment for one-button compilation of
-single files or entire projects -- with error-to-source-line
-mapping.
+Added support to allow the compiler to be integrated into the MS
+VC++ development environment for one-button compilation of single
+files or entire projects -- with error-to-source-line mapping.
Implemented support for compile-time constant folding for the
Type3, Type4, and Type5 opcodes first defined in the ACPI 2.0
specification. This allows the ASL writer to use expressions
instead of Integer/Buffer/String constants in terms that must
-evaluate to constants at compile time and will also simplify
-the emitted AML in any such sub-expressions that can be folded
+evaluate to constants at compile time and will also simplify the
+emitted AML in any such sub-expressions that can be folded
(evaluated at compile-time.) This increases the size of the
compiler significantly because a portion of the ACPI CA AML
interpreter is included within the compiler in order to pre-
evaluate constant expressions.
+
Fixed a problem with the "Unicode" ASL macro that caused the
-compiler to fault. (This macro is used in conjunction with
-the _STR reserved name.)
+compiler to fault. (This macro is used in conjunction with the
+_STR reserved name.)
-Implemented an AML opcode optimization to use the Zero, One,
-and Ones opcodes where possible to further reduce the size of
-integer constants and thus reduce the overall size of the
-generated AML code.
+Implemented an AML opcode optimization to use the Zero, One, and
+Ones opcodes where possible to further reduce the size of integer
+constants and thus reduce the overall size of the generated AML
+code.
Implemented error checking for new reserved terms for ACPI
version 2.0A.
@@ -1033,39 +1434,39 @@ constants.
Updated the Programmer's Reference for new interfaces, data
types, and memory allocation model options.
-Updated the iASL Compiler User Reference to apply new format
-and add information about new features and options.
+Updated the iASL Compiler User Reference to apply new format and
+add information about new features and options.
----------------------------------------
19 April 2002. Summary of changes for this release.
1) ACPI CA Core Subsystem Version 20020419:
-The source code base for the Core Subsystem has been
-completely cleaned with PC-lint (FlexLint) for both 32-bit and
-64-bit versions. The Lint option files used are included in
-the /acpi/generate/lint directory.
+The source code base for the Core Subsystem has been completely
+cleaned with PC-lint (FlexLint) for both 32-bit and 64-bit
+versions. The Lint option files used are included in the
+/acpi/generate/lint directory.
Implemented enhanced status/error checking across the entire
-Hardware manager subsystem. Any hardware errors (reported
-from the OSL) are now bubbled up and will abort a running
-control method.
-
-Fixed a problem where the per-ACPI-table integer width (32 or
-64) was stored only with control method nodes, causing a fault
-when non-control method code was executed during table
-loading. The solution implemented uses a global variable to
-indicate table width across the entire ACPI subsystem.
-Therefore, ACPI CA does not support mixed integer widths
-across different ACPI tables (DSDT, SSDT).
-
-Fixed a problem where NULL extended fields (X fields) in an
-ACPI 2.0 ACPI FADT caused the table load to fail. Although
-the existing ACPI specification is a bit fuzzy on this topic,
-the new behavior is to fall back on a ACPI 1.0 field if the
-corresponding ACPI 2.0 X field is zero (even though the table
-revision indicates a full ACPI 2.0 table.) The ACPI
-specification will be updated to clarify this issue.
+Hardware manager subsystem. Any hardware errors (reported from
+the OSL) are now bubbled up and will abort a running control
+method.
+
+Fixed a problem where the per-ACPI-table integer width (32 or 64)
+was stored only with control method nodes, causing a fault when
+non-control method code was executed during table loading. The
+solution implemented uses a global variable to indicate table
+width across the entire ACPI subsystem. Therefore, ACPI CA does
+not support mixed integer widths across different ACPI tables
+(DSDT, SSDT).
+
+Fixed a problem where NULL extended fields (X fields) in an ACPI
+2.0 ACPI FADT caused the table load to fail. Although the
+existing ACPI specification is a bit fuzzy on this topic, the new
+behavior is to fall back on a ACPI 1.0 field if the corresponding
+ACPI 2.0 X field is zero (even though the table revision
+indicates a full ACPI 2.0 table.) The ACPI specification will be
+updated to clarify this issue.
Fixed a problem with the SystemMemory operation region handler
where memory was always accessed byte-wise even if the AML-
@@ -1073,23 +1474,24 @@ specified access width was larger than a byte. This caused
problems on systems with memory-mapped I/O. Memory is now
accessed with the width specified. On systems that do not
support non-aligned transfers, a check is made to guarantee
-proper address alignment before proceeding in order to avoid
-an AML-caused alignment fault within the kernel.
+proper address alignment before proceeding in order to avoid an
+AML-caused alignment fault within the kernel.
+
-Fixed a problem with the ExtendedIrq resource where only one
-byte of the 4-byte Irq field was extracted.
+Fixed a problem with the ExtendedIrq resource where only one byte
+of the 4-byte Irq field was extracted.
-Fixed the AcpiExDigitsNeeded() procedure to support _UID.
-This function was out of date and required a rewrite.
+Fixed the AcpiExDigitsNeeded() procedure to support _UID. This
+function was out of date and required a rewrite.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 66.6K Code, 6.5K Data, 73.1K Total
@@ -1108,8 +1510,8 @@ PCI IRQ routing fixes (Dominik Brodowski)
Implemented an additional compile-time error check for a field
unit whose size + minimum access width would cause a run-time
-access beyond the end-of-region. Previously, only the field
-size itself was checked.
+access beyond the end-of-region. Previously, only the field size
+itself was checked.
The Core subsystem and iASL compiler now share a common parse
object in preparation for compile-time evaluation of the type
@@ -1122,50 +1524,50 @@ Summary of changes for this release: 03_29_02
1) ACPI CA Core Subsystem Version 20020329:
Implemented support for late evaluation of TermArg operands to
-Buffer and Package objects. This allows complex expressions
-to be used in the declarations of these object types.
+Buffer and Package objects. This allows complex expressions to
+be used in the declarations of these object types.
Fixed an ACPI 1.0 compatibility issue when reading Fields. In
-ACPI 1.0, if the field was larger than 32 bits, it was
-returned as a buffer - otherwise it was returned as an
-integer. In ACPI 2.0, the field is returned as a buffer only
-if the field is larger than 64 bits. The TableRevision is now
-considered when making this conversion to avoid
-incompatibility with existing ASL code.
+ACPI 1.0, if the field was larger than 32 bits, it was returned
+as a buffer - otherwise it was returned as an integer. In ACPI
+2.0, the field is returned as a buffer only if the field is
+larger than 64 bits. The TableRevision is now considered when
+making this conversion to avoid incompatibility with existing ASL
+code.
Implemented logical addressing for AcpiOsGetRootPointer. This
-allows an RSDP with either a logical or physical address.
-With this support, the host OS can now override all ACPI
-tables with one logical RSDP. Includes implementation of
-"typed" pointer support to allow a common data type for both
-physical and logical pointers internally. This required a
-change to the AcpiOsGetRootPointer interface.
+allows an RSDP with either a logical or physical address. With
+this support, the host OS can now override all ACPI tables with
+one logical RSDP. Includes implementation of "typed" pointer
+support to allow a common data type for both physical and logical
+pointers internally. This required a change to the
+AcpiOsGetRootPointer interface.
Implemented the use of ACPI 2.0 Generic Address Structures for
-all GPE, Fixed Event, and PM Timer I/O. This allows the use
-of memory mapped I/O for these ACPI features.
+all GPE, Fixed Event, and PM Timer I/O. This allows the use of
+memory mapped I/O for these ACPI features.
Initialization now ignores not only non-required tables (All
-tables other than the FADT, FACS, DSDT, and SSDTs), but also
-does not validate the table headers of unrecognized tables.
+tables other than the FADT, FACS, DSDT, and SSDTs), but also does
+not validate the table headers of unrecognized tables.
Fixed a problem where a notify handler could only be
installed/removed on an object of type Device. All "notify"
objects are now supported -- Devices, Processor, Power, and
Thermal.
-Removed most verbosity from the ACPI_DB_INFO debug level.
-Only critical information is returned when this debug level is
+Removed most verbosity from the ACPI_DB_INFO debug level. Only
+critical information is returned when this debug level is
enabled.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release
Non-Debug Version: 65.4K Code, 6.2K Data, 71.6K Total
@@ -1177,22 +1579,22 @@ compiler and the compiler options used during generation.
2) Linux:
-The processor driver (acpi_processor.c) now fully supports
-ACPI 2.0-based processor performance control (e.g. Intel(R)
-SpeedStep(TM) technology) Note that older laptops that only
-have the Intel "applet" interface are not supported through
-this. The 'limit' and 'performance' interface (/proc) are
-fully functional. [Note that basic policy for controlling
-performance state transitions will be included in the next
-version of ospmd.] The idle handler was modified to more
-aggressively use C2, and PIIX4 errata handling underwent a
-complete overhaul (big thanks to Dominik Brodowski).
-
-Added support for ACPI-PCI device binding (acpi_pci_root.c).
-_ADR-based devices in the ACPI namespace are now dynamically
-bound (associated) with their PCI counterparts (e.g. PCI1-
->01:00.0). This allows, among other things, ACPI to resolve
-bus numbers for subordinate PCI bridges.
+The processor driver (acpi_processor.c) now fully supports ACPI
+2.0-based processor performance control (e.g. Intel(R)
+SpeedStep(TM) technology) Note that older laptops that only have
+the Intel "applet" interface are not supported through this. The
+'limit' and 'performance' interface (/proc) are fully functional.
+[Note that basic policy for controlling performance state
+transitions will be included in the next version of ospmd.] The
+idle handler was modified to more aggressively use C2, and PIIX4
+errata handling underwent a complete overhaul (big thanks to
+Dominik Brodowski).
+
+Added support for ACPI-PCI device binding (acpi_pci_root.c). _ADR-
+based devices in the ACPI namespace are now dynamically bound
+(associated) with their PCI counterparts (e.g. PCI1->01:00.0).
+This allows, among other things, ACPI to resolve bus numbers for
+subordinate PCI bridges.
Enhanced PCI IRQ routing to get the proper bus number for _PRT
entries defined underneath PCI bridges.
@@ -1200,15 +1602,15 @@ entries defined underneath PCI bridges.
Added IBM 600E to bad bios list due to invalid _ADR value for
PIIX4 PCI-ISA bridge, resulting in improper PCI IRQ routing.
-In the process of adding full MADT support (e.g. IOAPIC) for
-IA32 (acpi.c, mpparse.c) -- stay tuned.
+In the process of adding full MADT support (e.g. IOAPIC) for IA32
+(acpi.c, mpparse.c) -- stay tuned.
Added back visual differentiation between fixed-feature and
-control-method buttons in dmesg. Buttons are also subtyped
-(e.g. button/power/PWRF) to simplify button identification.
+control-method buttons in dmesg. Buttons are also subtyped (e.g.
+button/power/PWRF) to simplify button identification.
-We no longer use -Wno-unused when compiling debug. Please
-ignore any "_THIS_MODULE defined but not used" messages.
+We no longer use -Wno-unused when compiling debug. Please ignore
+any "_THIS_MODULE defined but not used" messages.
Can now shut down the system using "magic sysrq" key.
@@ -1224,8 +1626,8 @@ field. This field was 8 bits when it should be 64.
Fixed a problem where errors/warnings were no longer being
emitted within the listing output file.
-Implemented the ACPI 2.0A restriction on ACPI Table Signatures
-to exactly 4 characters, alphanumeric only.
+Implemented the ACPI 2.0A restriction on ACPI Table Signatures to
+exactly 4 characters, alphanumeric only.
@@ -1236,21 +1638,19 @@ Summary of changes for this release: 03_08_02
1) ACPI CA Core Subsystem Version 20020308:
-Fixed a problem with AML Fields where the use of the
-"AccessAny" keyword could cause an interpreter error due to
-attempting to read or write beyond the end of the parent
-Operation Region.
+Fixed a problem with AML Fields where the use of the "AccessAny"
+keyword could cause an interpreter error due to attempting to
+read or write beyond the end of the parent Operation Region.
Fixed a problem in the SystemMemory Operation Region handler
where an attempt was made to map memory beyond the end of the
region. This was the root cause of the "AE_ERROR" and
"AE_NO_MEMORY" errors on some Linux systems.
-Fixed a problem where the interpreter/namespace "search to
-root" algorithm was not functioning for some object types.
-Relaxed the internal restriction on the search to allow
-upsearches for all external object types as well as most
-internal types.
+Fixed a problem where the interpreter/namespace "search to root"
+algorithm was not functioning for some object types. Relaxed the
+internal restriction on the search to allow upsearches for all
+external object types as well as most internal types.
2) Linux:
@@ -1258,9 +1658,9 @@ internal types.
We now use safe_halt() macro versus individual calls to sti |
hlt.
-Writing to the processor limit interface should now work.
-"echo 1" will increase the limit, 2 will decrease, and 0 will
-reset to the default.
+Writing to the processor limit interface should now work. "echo
+1" will increase the limit, 2 will decrease, and 0 will reset to
+the default.
3) ASL compiler:
@@ -1278,16 +1678,16 @@ Fixed a problem where the GPE bit masks were not initialized
properly, causing erratic GPE behavior.
Implemented limited support for multiple calling conventions.
-The code can be generated with either the VPL (variable
-parameter list, or "C") convention, or the FPL (fixed
-parameter list, or "Pascal") convention. The core subsystem
-is about 3.4% smaller when generated with FPL.
+The code can be generated with either the VPL (variable parameter
+list, or "C") convention, or the FPL (fixed parameter list, or
+"Pascal") convention. The core subsystem is about 3.4% smaller
+when generated with FPL.
2) Linux
-Re-add some /proc/acpi/event functionality that was lost
-during the rewrite
+Re-add some /proc/acpi/event functionality that was lost during
+the rewrite
Resolved issue with /proc events for fixed-feature buttons
showing up as the system device.
@@ -1295,11 +1695,9 @@ showing up as the system device.
Fixed checks on C2/C3 latencies to be inclusive of maximum
values.
-Replaced AE_ERRORs in acpi_osl.c with more specific error
-codes.
+Replaced AE_ERRORs in acpi_osl.c with more specific error codes.
-Changed ACPI PRT option from "pci=noacpi-routing" to
-"pci=noacpi"
+Changed ACPI PRT option from "pci=noacpi-routing" to "pci=noacpi"
Fixed limit interface & usage to fix bugs with passive cooling
hysterisis.
@@ -1313,50 +1711,47 @@ Summary of changes for this label: 02_14_02
1) ACPI CA Core Subsystem:
-Implemented support in AcpiLoadTable to allow loading of FACS
-and FADT tables.
+Implemented support in AcpiLoadTable to allow loading of FACS and
+FADT tables.
-Suport for the now-obsolete interim 0.71 64-bit ACPI tables
-has been removed. All 64-bit platforms should be migrated to
-the ACPI 2.0 tables. The actbl71.h header has been removed
-from the source tree.
+Suport for the now-obsolete interim 0.71 64-bit ACPI tables has
+been removed. All 64-bit platforms should be migrated to the
+ACPI 2.0 tables. The actbl71.h header has been removed from the
+source tree.
-All C macros defined within the subsystem have been prefixed
-with "ACPI_" to avoid collision with other system include
-files.
+All C macros defined within the subsystem have been prefixed with
+"ACPI_" to avoid collision with other system include files.
Removed the return value for the two AcpiOsPrint interfaces,
-since it is never used and causes lint warnings for ignoring
-the return value.
+since it is never used and causes lint warnings for ignoring the
+return value.
Added error checking to all internal mutex acquire and release
calls. Although a failure from one of these interfaces is
probably a fatal system error, these checks will cause the
-immediate abort of the currently executing method or
-interface.
+immediate abort of the currently executing method or interface.
-Fixed a problem where the AcpiSetCurrentResources interface
-could fault. This was a side effect of the deployment of the
-new memory allocation model.
+Fixed a problem where the AcpiSetCurrentResources interface could
+fault. This was a side effect of the deployment of the new
+memory allocation model.
Fixed a couple of problems with the Global Lock support
introduced in the last major build. The "common" (1.0/2.0)
-internal FACS was being overwritten with the FACS signature
-and clobbering the Global Lock pointer. Also, the actual
-firmware FACS was being unmapped after construction of the
-"common" FACS, preventing access to the actual Global Lock
-field within it. The "common" internal FACS is no longer
-installed as an actual ACPI table; it is used simply as a
-global.
+internal FACS was being overwritten with the FACS signature and
+clobbering the Global Lock pointer. Also, the actual firmware
+FACS was being unmapped after construction of the "common" FACS,
+preventing access to the actual Global Lock field within it. The
+"common" internal FACS is no longer installed as an actual ACPI
+table; it is used simply as a global.
Code and Data Size: Current core subsystem library sizes are
shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code. The
+debug version of the code includes the debug output trace
+mechanism and has a larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release (02_07_01)
Non-Debug Version: 65.2K Code, 6.2K Data, 71.4K Total
@@ -1371,8 +1766,8 @@ compiler and the compiler options used during generation.
Updated Linux-specific code for core macro and OSL interface
changes described above.
-Improved /proc/acpi/event. It now can be opened only once and
-has proper poll functionality.
+Improved /proc/acpi/event. It now can be opened only once and has
+proper poll functionality.
Fixed and restructured power management (acpi_bus).
@@ -1386,9 +1781,10 @@ Improved thermal zone code.
3) ASL Compiler, version X2039:
-Implemented the new compiler restriction on ASL String
-hex/octal escapes to non-null, ASCII values. An error results
-if an invalid value is used. (This will require an ACPI 2.0
+
+Implemented the new compiler restriction on ASL String hex/octal
+escapes to non-null, ASCII values. An error results if an
+invalid value is used. (This will require an ACPI 2.0
specification change.)
AML object labels that are output to the optional C and ASM
@@ -1402,48 +1798,48 @@ Summary of changes for this label: 02_01_02
1) ACPI CA Core Subsystem:
-ACPI 2.0 support is complete in the entire Core Subsystem and
-the ASL compiler. All new ACPI 2.0 operators are implemented
-and all other changes for ACPI 2.0 support are complete. With
+ACPI 2.0 support is complete in the entire Core Subsystem and the
+ASL compiler. All new ACPI 2.0 operators are implemented and all
+other changes for ACPI 2.0 support are complete. With
simultaneous code and data optimizations throughout the
-subsystem, ACPI 2.0 support has been implemented with almost
-no additional cost in terms of code and data size.
-
-Implemented a new mechanism for allocation of return buffers.
-If the buffer length is set to ACPI_ALLOCATE_BUFFER, the
-buffer will be allocated on behalf of the caller.
-Consolidated all return buffer validation and allocation to a
-common procedure. Return buffers will be allocated via the
-primary OSL allocation interface since it appears that a
-separate pool is not needed by most users. If a separate pool
-is required for these buffers, the caller can still use the
-original mechanism and pre-allocate the buffer(s).
+subsystem, ACPI 2.0 support has been implemented with almost no
+additional cost in terms of code and data size.
+
+Implemented a new mechanism for allocation of return buffers. If
+the buffer length is set to ACPI_ALLOCATE_BUFFER, the buffer will
+be allocated on behalf of the caller. Consolidated all return
+buffer validation and allocation to a common procedure. Return
+buffers will be allocated via the primary OSL allocation
+interface since it appears that a separate pool is not needed by
+most users. If a separate pool is required for these buffers,
+the caller can still use the original mechanism and pre-allocate
+the buffer(s).
Implemented support for string operands within the DerefOf
operator.
-Restructured the Hardware and Event managers to be table
-driven, simplifying the source code and reducing the amount of
-generated code.
+Restructured the Hardware and Event managers to be table driven,
+simplifying the source code and reducing the amount of generated
+code.
Split the common read/write low-level ACPI register bitfield
procedure into a separate read and write, simplifying the code
considerably.
-Obsoleted the AcpiOsCallocate OSL interface. This interface
-was used only a handful of times and didn't have enough
-critical mass for a separate interface. Replaced with a
-common calloc procedure in the core.
+Obsoleted the AcpiOsCallocate OSL interface. This interface was
+used only a handful of times and didn't have enough critical mass
+for a separate interface. Replaced with a common calloc
+procedure in the core.
Fixed a reported problem with the GPE number mapping mechanism
that allows GPE1 numbers to be non-contiguous with GPE0.
-Reorganized the GPE information and shrunk a large array that
-was originally large enough to hold info for all possible GPEs
-(256) to simply large enough to hold all GPEs up to the
-largest GPE number on the machine.
+Reorganized the GPE information and shrunk a large array that was
+originally large enough to hold info for all possible GPEs (256)
+to simply large enough to hold all GPEs up to the largest GPE
+number on the machine.
-Fixed a reported problem with resource structure alignment on
-64-bit platforms.
+Fixed a reported problem with resource structure alignment on 64-
+bit platforms.
Changed the AcpiEnableEvent and AcpiDisableEvent external
interfaces to not require any flags for the common case of
@@ -1451,8 +1847,8 @@ enabling/disabling a GPE.
Implemented support to allow a "Notify" on a Processor object.
-Most TBDs in comments within the source code have been
-resolved and eliminated.
+Most TBDs in comments within the source code have been resolved
+and eliminated.
Fixed a problem in the interpreter where a standalone parent
prefix (^) was not handled correctly in the interpreter and
@@ -1460,15 +1856,15 @@ debugger.
Removed obsolete and unnecessary GPE save/restore code.
-Implemented Field support in the ASL Load operator. This
-allows a table to be loaded from a named field, in addition to
-loading a table directly from an Operation Region.
+Implemented Field support in the ASL Load operator. This allows
+a table to be loaded from a named field, in addition to loading a
+table directly from an Operation Region.
Implemented timeout and handle support in the external Global
Lock interfaces.
-Fixed a problem in the AcpiDump utility where pathnames were
-no longer being generated correctly during the dump of named
+Fixed a problem in the AcpiDump utility where pathnames were no
+longer being generated correctly during the dump of named
objects.
Modified the AML debugger to give a full display of if/while
@@ -1477,24 +1873,20 @@ predicate can have several nested ASL statements.) The old
method was confusing during single stepping.
Code and Data Size: Current core subsystem library sizes are
-shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+shown below. These are the code and data sizes for the acpica.lib
+produced by the Microsoft Visual C++ 6.0 compiler, and these
+values do not include any ACPI driver or OSPM code. The debug
+version of the code includes the debug output trace mechanism and
+has a larger code and data size. Note that these values will
+vary depending on the efficiency of the compiler and the compiler
+options used during generation.
Previous Release (12_18_01)
- Non-Debug Version: 66.1K Code, 5.5K Data, 71.6K
-Total
- Debug Version: 138.3K Code, 55.9K Data, 194.2K
-Total
+ Non-Debug Version: 66.1K Code, 5.5K Data, 71.6K Total
+ Debug Version: 138.3K Code, 55.9K Data, 194.2K Total
Current Release:
- Non-Debug Version: 65.2K Code, 6.2K Data, 71.4K
-Total
- Debug Version: 136.9K Code, 56.4K Data, 193.3K
-Total
+ Non-Debug Version: 65.2K Code, 6.2K Data, 71.4K Total
+ Debug Version: 136.9K Code, 56.4K Data, 193.3K Total
2) Linux
@@ -1517,23 +1909,21 @@ Menuconfig options redesigned
3) ASL Compiler, version X2037:
-Implemented several new output features to simplify
-integration of AML code into firmware: 1) Output the AML in C
-source code with labels for each named ASL object. The
-original ASL source code is interleaved as C comments. 2)
-Output the AML in ASM source code with labels and interleaved
-ASL source. 3) Output the AML in raw hex table form, in
-either C or ASM.
+Implemented several new output features to simplify integration
+of AML code into firmware: 1) Output the AML in C source code
+with labels for each named ASL object. The original ASL
+source code is interleaved as C comments. 2) Output the AML in
+ASM source code with labels and interleaved ASL source. 3)
+Output the AML in raw hex table form, in either C or ASM.
Implemented support for optional string parameters to the
LoadTable operator.
Completed support for embedded escape sequences within string
-literals. The compiler now supports all single character
-escapes as well as the Octal and Hex escapes. Note: the
-insertion of a null byte into a string literal (via the
-hex/octal escape) causes the string to be immediately
-terminated. A warning is issued.
+literals. The compiler now supports all single character escapes
+as well as the Octal and Hex escapes. Note: the insertion of a
+null byte into a string literal (via the hex/octal escape) causes
+the string to be immediately terminated. A warning is issued.
Fixed a problem where incorrect AML was generated for the case
where an ASL namepath consists of a single parent prefix (
@@ -1551,13 +1941,11 @@ Summary of changes for this label: 12_18_01
1) Linux
-Enhanced blacklist with reason and severity fields. Any
-table's signature may now be used to identify a blacklisted
-system.
+Enhanced blacklist with reason and severity fields. Any table's
+signature may now be used to identify a blacklisted system.
-Call _PIC control method to inform the firmware which
-interrupt model the OS is using. Turn on any disabled link
-devices.
+Call _PIC control method to inform the firmware which interrupt
+model the OS is using. Turn on any disabled link devices.
Cleaned up busmgr /proc error handling (Andreas Dilger)
@@ -1572,23 +1960,22 @@ operators. All new ACPI 2.0 operators are now implemented in
both the ASL compiler and the AML interpreter. The only
remaining ACPI 2.0 task is support for the String data type in
the DerefOf operator. Fixed a problem with AcquireMutex where
-the status code was lost if the caller had to actually wait
-for the mutex.
+the status code was lost if the caller had to actually wait for
+the mutex.
Increased the maximum ASL Field size from 64K bits to 4G bits.
-Completed implementation of the external Global Lock
-interfaces -- AcpiAcquireGlobalLock and AcpiReleaseGlobalLock.
-The Timeout and Handler parameters were added.
+Completed implementation of the external Global Lock interfaces -
+- AcpiAcquireGlobalLock and AcpiReleaseGlobalLock. The Timeout
+and Handler parameters were added.
Completed another pass at removing warnings and issues when
-compiling with 64-bit compilers. The code now compiles
-cleanly with the Intel 64-bit C/C++ compiler. Most notably,
-the pointer add and subtract (diff) macros have changed
-considerably.
+compiling with 64-bit compilers. The code now compiles cleanly
+with the Intel 64-bit C/C++ compiler. Most notably, the pointer
+add and subtract (diff) macros have changed considerably.
-Created and deployed a new ACPI_SIZE type that is 64-bits wide
-on 64-bit platforms, 32-bits on all others. This type is used
+Created and deployed a new ACPI_SIZE type that is 64-bits wide on
+64-bit platforms, 32-bits on all others. This type is used
wherever memory allocation and/or the C sizeof() operator is
used, and affects the OSL memory allocation interfaces
AcpiOsAllocate and AcpiOsCallocate.
@@ -1596,30 +1983,25 @@ AcpiOsAllocate and AcpiOsCallocate.
Implemented sticky user breakpoints in the AML debugger.
Code and Data Size: Current core subsystem library sizes are
-shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that these
-values will vary depending on the efficiency of the compiler
-and the compiler options used during generation.
+shown below. These are the code and data sizes for the acpica.lib
+produced by the Microsoft Visual C++ 6.0 compiler, and these
+values do not include any ACPI driver or OSPM code. The debug
+version of the code includes the debug output trace mechanism and
+has a larger code and data size. Note that these values will vary
+depending on the efficiency of the compiler and the compiler
+options used during generation.
Previous Release (12_05_01)
- Non-Debug Version: 64.7K Code, 5.3K Data, 70.0K
-Total
- Debug Version: 136.2K Code, 55.6K Data, 191.8K
-Total
+ Non-Debug Version: 64.7K Code, 5.3K Data, 70.0K Total
+ Debug Version: 136.2K Code, 55.6K Data, 191.8K Total
Current Release:
- Non-Debug Version: 66.1K Code, 5.5K Data, 71.6K
-Total
- Debug Version: 138.3K Code, 55.9K Data, 194.2K
-Total
+ Non-Debug Version: 66.1K Code, 5.5K Data, 71.6K Total
+ Debug Version: 138.3K Code, 55.9K Data, 194.2K Total
3) ASL Compiler, version X2034:
-Now checks for (and generates an error if detected) the use of
-a Break or Continue statement without an enclosing While
-statement.
+Now checks for (and generates an error if detected) the use of a
+Break or Continue statement without an enclosing While statement.
Successfully generated the compiler with the Intel 64-bit C
compiler.
@@ -1636,70 +2018,66 @@ operator.)
The ACPI 2.0 semantics for the SizeOf operator are fully
implemented. The change is that performing a SizeOf on a
-reference object causes an automatic dereference of the object
-to tha actual value before the size is evaluated. This
-behavior was undefined in ACPI 1.0.
-
-The ACPI 2.0 semantics for the Extended IRQ resource
-descriptor have been implemented. The interrupt polarity and
-mode are now independently set.
-
-Fixed a problem where ASL Constants (Zero, One, Ones,
-Revision) appearing in Package objects were not properly
-converted to integers when the internal Package was converted
-to an external object (via the AcpiEvaluateObject interface.)
-
-Fixed a problem with the namespace object deletion mechanism
-for objects created by control methods. There were two parts
-to this problem: 1) Objects created during the initialization
-phase method parse were not being deleted, and 2) The object
-owner ID mechanism to track objects was broken.
-
-Fixed a problem where the use of the ASL Scope operator within
-a control method would result in an invalid opcode exception.
-
-Fixed a problem introduced in the previous label where the
-buffer length required for the _PRT structure was not being
-returned correctly.
+reference object causes an automatic dereference of the object to
+tha actual value before the size is evaluated. This behavior was
+undefined in ACPI 1.0.
+
+The ACPI 2.0 semantics for the Extended IRQ resource descriptor
+have been implemented. The interrupt polarity and mode are now
+independently set.
+
+Fixed a problem where ASL Constants (Zero, One, Ones, Revision)
+appearing in Package objects were not properly converted to
+integers when the internal Package was converted to an external
+object (via the AcpiEvaluateObject interface.)
+
+Fixed a problem with the namespace object deletion mechanism for
+objects created by control methods. There were two parts to this
+problem: 1) Objects created during the initialization phase
+method parse were not being deleted, and 2) The object owner ID
+mechanism to track objects was broken.
+
+Fixed a problem where the use of the ASL Scope operator within a
+control method would result in an invalid opcode exception.
+
+Fixed a problem introduced in the previous label where the buffer
+length required for the _PRT structure was not being returned
+correctly.
Code and Data Size: Current core subsystem library sizes are
-shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler,
-and these values do not include any ACPI driver or OSPM code.
-The debug version of the code includes the debug output trace
-mechanism and has a larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+shown below. These are the code and data sizes for the acpica.lib
+produced by the Microsoft Visual C++ 6.0 compiler, and these
+values do not include any ACPI driver or OSPM code. The debug
+version of the code includes the debug output trace mechanism and
+has a larger code and data size. Note that these values will
+vary depending on the efficiency of the compiler and the compiler
+options used during generation.
Previous Release (11_20_01)
- Non-Debug Version: 64.1K Code, 5.3K Data, 69.4K
-Total
- Debug Version: 135.1K Code, 55.4K Data, 190.5K
-Total
+ Non-Debug Version: 64.1K Code, 5.3K Data, 69.4K Total
+ Debug Version: 135.1K Code, 55.4K Data, 190.5K Total
Current Release:
- Non-Debug Version: 64.7K Code, 5.3K Data, 70.0K
-Total
- Debug Version: 136.2K Code, 55.6K Data, 191.8K
-Total
+ Non-Debug Version: 64.7K Code, 5.3K Data, 70.0K Total
+ Debug Version: 136.2K Code, 55.6K Data, 191.8K Total
2) Linux:
Updated all files to apply cleanly against 2.4.16.
Added basic PCI Interrupt Routing Table (PRT) support for IA32
-(acpi_pci.c), and unified the PRT code for IA32 and IA64.
-This version supports both static and dyanmic PRT entries, but
-dynamic entries are treated as if they were static (not yet
-reconfigurable). Architecture- specific code to use this data
-is absent on IA32 but should be available shortly.
-
-Changed the initialization sequence to start the ACPI
-interpreter (acpi_init) prior to initialization of the PCI
-driver (pci_init) in init/main.c. This ordering is required
-to support PRT and facilitate other (future) enhancement. A
-side effect is that the ACPI bus driver and certain device
-drivers can no longer be loaded as modules.
+(acpi_pci.c), and unified the PRT code for IA32 and IA64. This
+version supports both static and dyanmic PRT entries, but dynamic
+entries are treated as if they were static (not yet
+reconfigurable). Architecture- specific code to use this data is
+absent on IA32 but should be available shortly.
+
+Changed the initialization sequence to start the ACPI interpreter
+(acpi_init) prior to initialization of the PCI driver (pci_init)
+in init/main.c. This ordering is required to support PRT and
+facilitate other (future) enhancement. A side effect is that the
+ACPI bus driver and certain device drivers can no longer be
+loaded as modules.
Modified the 'make menuconfig' options to allow PCI Interrupt
Routing support to be included without the ACPI Bus and other
@@ -1726,55 +2104,50 @@ Fixed a problem where the access type used in an AccessAs ASL
operator was not recorded correctly into the field object.
Fixed a problem where ASL Event objects were created in a
-signalled state. Events are now created in an unsignalled
-state.
+signalled state. Events are now created in an unsignalled state.
-The internal object cache is now purged after table loading
-and initialization to reduce the use of dynamic kernel memory
--- on the assumption that object use is greatest during the
-parse phase of the entire table (versus the run-time use of
-individual control methods.)
+The internal object cache is now purged after table loading and
+initialization to reduce the use of dynamic kernel memory -- on
+the assumption that object use is greatest during the parse phase
+of the entire table (versus the run-time use of individual
+control methods.)
ACPI 2.0 variable-length packages are now fully operational.
Code and Data Size: Code and Data optimizations have permitted
-new feature development with an actual reduction in the
-library size. Current core subsystem library sizes are shown
-below. These are the code and data sizes for the acpica.lib
-produced by the Microsoft Visual C++ 6.0 compiler, and these
-values do not include any ACPI driver or OSPM code. The debug
-version of the code includes the debug output trace mechanism
-and has a larger code and data size. Note that these values
-will vary depending on the efficiency of the compiler and the
-compiler options used during generation.
+new feature development with an actual reduction in the library
+size. Current core subsystem library sizes are shown below.
+These are the code and data sizes for the acpica.lib produced by
+the Microsoft Visual C++ 6.0 compiler, and these values do not
+include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a larger
+code and data size. Note that these values will vary depending
+on the efficiency of the compiler and the compiler options used
+during generation.
Previous Release (11_09_01):
- Non-Debug Version: 63.7K Code, 5.2K Data, 68.9K
-Total
- Debug Version: 134.5K Code, 55.4K Data, 189.9K
-Total
+ Non-Debug Version: 63.7K Code, 5.2K Data, 68.9K Total
+ Debug Version: 134.5K Code, 55.4K Data, 189.9K Total
Current Release:
- Non-Debug Version: 64.1K Code, 5.3K Data, 69.4K
-Total
- Debug Version: 135.1K Code, 55.4K Data, 190.5K
-Total
+ Non-Debug Version: 64.1K Code, 5.3K Data, 69.4K Total
+ Debug Version: 135.1K Code, 55.4K Data, 190.5K Total
2) Linux:
-Enhanced the ACPI boot-time initialization code to allow the
-use of Local APIC tables for processor enumeration on IA-32,
-and to pave the way for a fully MPS-free boot (on SMP systems)
-in the near future. This functionality replaces
-arch/i386/kernel/acpitables.c, which was introduced in an
-earlier 2.4.15-preX release. To enable this feature you must
-add "acpi_boot=on" to the kernel command line -- see the help
-entry for CONFIG_ACPI_BOOT for more information. An IA-64
-release is in the works...
+Enhanced the ACPI boot-time initialization code to allow the use
+of Local APIC tables for processor enumeration on IA-32, and to
+pave the way for a fully MPS-free boot (on SMP systems) in the
+near future. This functionality replaces
+arch/i386/kernel/acpitables.c, which was introduced in an earlier
+2.4.15-preX release. To enable this feature you must add
+"acpi_boot=on" to the kernel command line -- see the help entry
+for CONFIG_ACPI_BOOT for more information. An IA-64 release is
+in the works...
-Restructured the configuration options to allow boot-time
-table parsing support without inclusion of the ACPI
-Interpreter (and other) code.
+Restructured the configuration options to allow boot-time table
+parsing support without inclusion of the ACPI Interpreter (and
+other) code.
NOTE: This release does not include fixes for the reported
events, power-down, and thermal passive cooling issues (coming
@@ -1782,14 +2155,14 @@ soon).
3) ASL Compiler:
-Added additional typechecking for Fields within restricted
-access Operation Regions. All fields within EC and CMOS
-regions must be declared with ByteAcc. All fields withing
-SMBus regions must be declared with the BufferAcc access type.
+Added additional typechecking for Fields within restricted access
+Operation Regions. All fields within EC and CMOS regions must be
+declared with ByteAcc. All fields withing SMBus regions must be
+declared with the BufferAcc access type.
-Fixed a problem where the listing file output of control
-methods no longer interleaved the actual AML code with the ASL
-source code.
+Fixed a problem where the listing file output of control methods
+no longer interleaved the actual AML code with the ASL source
+code.
@@ -1798,46 +2171,44 @@ Summary of changes for this label: 11_09_01
1) ACPI CA Core Subsystem:
-Implemented ACPI 2.0-defined support for writes to fields with
-a Buffer, String, or Integer source operand that is smaller
-than the target field. In these cases, the source operand is
-zero-extended to fill the target field.
+Implemented ACPI 2.0-defined support for writes to fields with a
+Buffer, String, or Integer source operand that is smaller than
+the target field. In these cases, the source operand is zero-
+extended to fill the target field.
Fixed a problem where a Field starting bit offset (within the
parent operation region) was calculated incorrectly if the
alignment of the field differed from the access width. This
-affected CreateWordField, CreateDwordField, CreateQwordField,
-and possibly other fields that use the "AccessAny" keyword.
+affected CreateWordField, CreateDwordField, CreateQwordField, and
+possibly other fields that use the "AccessAny" keyword.
-Fixed a problem introduced in the 11_02_01 release where
-indirect stores through method arguments did not operate
-correctly.
+Fixed a problem introduced in the 11_02_01 release where indirect
+stores through method arguments did not operate correctly.
2) Linux:
Implemented boot-time ACPI table parsing support
-(CONFIG_ACPI_BOOT) for IA32 and IA64 UP/SMP systems. This
-code facilitates the use of ACPI tables (e.g. MADT, SRAT)
-rather than legacy BIOS interfaces (e.g. MPS) for the
-configuration of system processors, memory, and interrupts
-during setup_arch(). Note that this patch does not include
-the required architecture-specific changes required to apply
-this information -- subsequent patches will be posted for both
-IA32 and IA64 to achieve this.
-
-Added low-level sleep support for IA32 platforms, courtesy of
-Pat Mochel. This allows IA32 systems to transition to/from
-various sleeping states (e.g. S1, S3), although the lack of a
-centralized driver model and power-manageable drivers will
-prevent its (successful) use on most systems.
-
-Revamped the ACPI 'menuconfig' layout: created new "ACPI
-Support" submenu, unified IA32 and IA64 options, added new
-"Boot using ACPI tables" option, etc.
-
-Increased the default timeout for the EC driver from 1ms to
-10ms (1000 cycles of 10us) to try to address AE_TIME errors
-during EC transactions.
+(CONFIG_ACPI_BOOT) for IA32 and IA64 UP/SMP systems. This code
+facilitates the use of ACPI tables (e.g. MADT, SRAT) rather than
+legacy BIOS interfaces (e.g. MPS) for the configuration of system
+processors, memory, and interrupts during setup_arch(). Note
+that this patch does not include the required architecture-
+specific changes required to apply this information -- subsequent
+patches will be posted for both IA32 and IA64 to achieve this.
+
+Added low-level sleep support for IA32 platforms, courtesy of Pat
+Mochel. This allows IA32 systems to transition to/from various
+sleeping states (e.g. S1, S3), although the lack of a centralized
+driver model and power-manageable drivers will prevent its
+(successful) use on most systems.
+
+Revamped the ACPI 'menuconfig' layout: created new "ACPI Support"
+submenu, unified IA32 and IA64 options, added new "Boot using
+ACPI tables" option, etc.
+
+Increased the default timeout for the EC driver from 1ms to 10ms
+(1000 cycles of 10us) to try to address AE_TIME errors during EC
+transactions.
----------------------------------------
Summary of changes for this label: 11_02_01
@@ -1848,37 +2219,35 @@ ACPI 2.0 Support: Implemented ACPI 2.0 64-bit Field access
(QWordAcc keyword). All ACPI 2.0 64-bit support is now
implemented.
-OSL Interfaces: Several of the OSL (AcpiOs*) interfaces
-required changes to support ACPI 2.0 Qword field access.
-Read/Write PciConfiguration(), Read/Write Memory(), and
-Read/Write Port() now accept an ACPI_INTEGER (64 bits) as the
-value parameter. Also, the value parameter for the address
-space handler interface is now an ACPI_INTEGER. OSL
-implementations of these interfaces must now handle the case
-where the Width parameter is 64.
+OSL Interfaces: Several of the OSL (AcpiOs*) interfaces required
+changes to support ACPI 2.0 Qword field access. Read/Write
+PciConfiguration(), Read/Write Memory(), and Read/Write Port()
+now accept an ACPI_INTEGER (64 bits) as the value parameter.
+Also, the value parameter for the address space handler interface
+is now an ACPI_INTEGER. OSL implementations of these interfaces
+must now handle the case where the Width parameter is 64.
Index Fields: Fixed a problem where unaligned bit assembly and
disassembly for IndexFields was not supported correctly.
Index and Bank Fields: Nested Index and Bank Fields are now
supported. During field access, a check is performed to ensure
-that the value written to an Index or Bank register is not out
-of the range of the register. The Index (or Bank) register is
-written before each access to the field data. Future support
-will include allowing individual IndexFields to be wider than
-the DataRegister width.
-
-Fields: Fixed a problem where the AML interpreter was
-incorrectly attempting to write beyond the end of a
-Field/OpRegion. This was a boundary case that occurred when a
-DWORD field was written to a BYTE access OpRegion, forcing
-multiple writes and causing the interpreter to write one datum
-too many.
+that the value written to an Index or Bank register is not out of
+the range of the register. The Index (or Bank) register is
+written before each access to the field data. Future support will
+include allowing individual IndexFields to be wider than the
+DataRegister width.
+
+Fields: Fixed a problem where the AML interpreter was incorrectly
+attempting to write beyond the end of a Field/OpRegion. This was
+a boundary case that occurred when a DWORD field was written to a
+BYTE access OpRegion, forcing multiple writes and causing the
+interpreter to write one datum too many.
Fields: Fixed a problem with Field/OpRegion access where the
-starting bit address of a field was incorrectly calculated if
-the current access type was wider than a byte (WordAcc,
-DwordAcc, or QwordAcc).
+starting bit address of a field was incorrectly calculated if the
+current access type was wider than a byte (WordAcc, DwordAcc, or
+QwordAcc).
Fields: Fixed a problem where forward references to individual
FieldUnits (individual Field names within a Field definition)
@@ -1888,34 +2257,30 @@ Fields: Fixed a problem where forward references from a Field
definition to the parent Operation Region definition were not
resolved during the AML table load.
-Fields: Duplicate FieldUnit names within a scope are now
-detected during AML table load.
+Fields: Duplicate FieldUnit names within a scope are now detected
+during AML table load.
Acpi Interfaces: Fixed a problem where the AcpiGetName()
interface returned an incorrect name for the root node.
Code and Data Size: Code and Data optimizations have permitted
-new feature development with an actual reduction in the
-library size. Current core subsystem library sizes are shown
-below. These are the code and data sizes for the acpica.lib
-produced by the Microsoft Visual C++ 6.0 compiler, and these
-values do not include any ACPI driver or OSPM code. The debug
-version of the code includes the debug output trace mechanism
-and has a larger code and data size. Note that these values
-will vary depending on the efficiency of the compiler and the
-compiler options used during generation.
+new feature development with an actual reduction in the library
+size. Current core subsystem library sizes are shown below.
+These are the code and data sizes for the acpica.lib produced by
+the Microsoft Visual C++ 6.0 compiler, and these values do not
+include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a larger
+code and data size. Note that these values will vary depending
+on the efficiency of the compiler and the compiler options used
+during generation.
Previous Release (10_18_01):
- Non-Debug Version: 63.9K Code, 5.1K Data, 69.0K
-Total
- Debug Version: 136.7K Code, 57.4K Data, 194.2K
-Total
+ Non-Debug Version: 63.9K Code, 5.1K Data, 69.0K Total
+ Debug Version: 136.7K Code, 57.4K Data, 194.2K Total
Current Release:
- Non-Debug Version: 63.7K Code, 5.2K Data, 68.9K
-Total
- Debug Version: 134.5K Code, 55.4K Data, 189.9K
-Total
+ Non-Debug Version: 63.7K Code, 5.2K Data, 68.9K Total
+ Debug Version: 134.5K Code, 55.4K Data, 189.9K Total
2) Linux:
@@ -1941,14 +2306,13 @@ Fixed a problem with the internal object reference count
mechanism that occasionally caused premature object deletion.
This resolves all of the outstanding problem reports where an
object is deleted in the middle of an interpreter evaluation.
-Although this problem only showed up in rather obscure cases,
-the solution to the problem involved an adjustment of all
-reference counts involving objects attached to namespace
-nodes.
+Although this problem only showed up in rather obscure cases, the
+solution to the problem involved an adjustment of all reference
+counts involving objects attached to namespace nodes.
Fixed a problem with Field support in the interpreter where
-writing to an aligned field whose length is an exact multiple
-(2 or greater) of the field access granularity would cause an
+writing to an aligned field whose length is an exact multiple (2
+or greater) of the field access granularity would cause an
attempt to write beyond the end of the field.
The top level AML opcode execution functions within the
@@ -1957,20 +2321,18 @@ consistent naming convention. The modules exmonad.c and
exdyadic.c were eliminated. New modules are exoparg1.c,
exoparg2.c, exoparg3.c, and exoparg6.c.
-Support for the ACPI 2.0 "Mid" ASL operator has been
-implemented.
+Support for the ACPI 2.0 "Mid" ASL operator has been implemented.
-Fixed a problem where the AML debugger was causing some
-internal objects to not be deleted during subsystem
-termination.
+Fixed a problem where the AML debugger was causing some internal
+objects to not be deleted during subsystem termination.
Fixed a problem with the external AcpiEvaluateObject interface
where the subsystem would fault if the named object to be
evaluated refered to a constant such as Zero, Ones, etc.
Fixed a problem with IndexFields and BankFields where the
-subsystem would fault if the index, data, or bank registers
-were not defined in the same scope as the field itself.
+subsystem would fault if the index, data, or bank registers were
+not defined in the same scope as the field itself.
Added printf format string checking for compilers that support
this feature. Corrected more than 50 instances of issues with
@@ -1981,29 +2343,26 @@ The ASL "Revision" operator now returns the ACPI support level
implemented in the core - the value "2" since the ACPI 2.0
support is more than 50% implemented.
-Enhanced the output of the AML debugger "dump namespace"
-command to output in a more human-readable form.
+Enhanced the output of the AML debugger "dump namespace" command
+to output in a more human-readable form.
-Current core subsystem library code sizes are shown below.
-These are the code and data sizes for the acpica.lib produced
-by the Microsoft Visual C++ 6.0 compiler, and these values do
-not include any ACPI driver or OSPM code. The debug version
-of the code includes the full debug trace mechanism -- leading
-to a much larger code and data size. Note that these values
-will vary depending on the efficiency of the compiler and the
-compiler options used during generation.
+Current core subsystem library code sizes are shown below. These
+are the code and data sizes for the acpica.lib produced by the
+Microsoft Visual C++ 6.0 compiler, and these values do not
+include any ACPI driver or OSPM code. The debug version of the
+code includes the full debug trace mechanism -- leading to a much
+larger code and data size. Note that these values will vary
+depending on the efficiency of the compiler and the compiler
+options used during generation.
Previous Label (09_20_01):
- Non-Debug Version: 65K Code, 5K Data, 70K
-Total
- Debug Version: 138K Code, 58K Data, 196K
-Total
+ Non-Debug Version: 65K Code, 5K Data, 70K Total
+ Debug Version: 138K Code, 58K Data, 196K Total
This Label:
- Non-Debug Version: 63.9K Code, 5.1K Data, 69.0K
-Total
- Debug Version: 136.7K Code, 57.4K Data, 194.2K
-Total
+
+ Non-Debug Version: 63.9K Code, 5.1K Data, 69.0K Total
+ Debug Version: 136.7K Code, 57.4K Data, 194.2K Total
Linux:
@@ -2012,12 +2371,12 @@ known ASL/AML problems.
Enhanced the /proc interface for the thermal zone driver and
added support for _HOT (the critical suspend trip point). The
-'info' file now includes threshold/policy information, and
-allows setting of _SCP (cooling preference) and _TZP (polling
-frequency) values to the 'info' file. Examples: "echo tzp=5 >
-info" sets the polling frequency to 5 seconds, and "echo scp=1
-> info" sets the cooling preference to the passive/quiet mode
-(if supported by the ASL).
+'info' file now includes threshold/policy information, and allows
+setting of _SCP (cooling preference) and _TZP (polling frequency)
+values to the 'info' file. Examples: "echo tzp=5 > info" sets the
+polling frequency to 5 seconds, and "echo scp=1 > info" sets the
+cooling preference to the passive/quiet mode (if supported by the
+ASL).
Implemented a workaround for a gcc bug that resuted in an OOPs
when loading the control method battery driver.
@@ -2029,74 +2388,73 @@ Summary of changes for this label: 09_20_01
The AcpiEnableEvent and AcpiDisableEvent interfaces have been
modified to allow individual GPE levels to be flagged as wake-
-enabled (i.e., these GPEs are to remain enabled when the
-platform sleeps.)
+enabled (i.e., these GPEs are to remain enabled when the platform
+sleeps.)
The AcpiEnterSleepState and AcpiLeaveSleepState interfaces now
support wake-enabled GPEs. This means that upon entering the
sleep state, all GPEs that are not wake-enabled are disabled.
When leaving the sleep state, these GPEs are reenabled.
-A local double-precision divide/modulo module has been added
-to enhance portability to OS kernels where a 64-bit math
-library is not available. The new module is "utmath.c".
+A local double-precision divide/modulo module has been added to
+enhance portability to OS kernels where a 64-bit math library is
+not available. The new module is "utmath.c".
Several optimizations have been made to reduce the use of CPU
-stack. Originally over 2K, the maximum stack usage is now
-below 2K at 1860 bytes (1.82k)
+stack. Originally over 2K, the maximum stack usage is now below
+2K at 1860 bytes (1.82k)
-Fixed a problem with the AcpiGetFirmwareTable interface where
-the root table pointer was not mapped into a logical address
+Fixed a problem with the AcpiGetFirmwareTable interface where the
+root table pointer was not mapped into a logical address
properly.
Fixed a problem where a NULL pointer was being dereferenced in
the interpreter code for the ASL Notify operator.
Fixed a problem where the use of the ASL Revision operator
-returned an error. This operator now returns the current
-version of the ACPI CA core subsystem.
-
-Fixed a problem where objects passed as control method
-parameters to AcpiEvaluateObject were always deleted at method
-termination. However, these objects may end up being stored
-into the namespace by the called method. The object reference
-count mechanism was applied to these objects instead of a
-force delete.
-
-Fixed a problem where static strings or buffers (contained in
-the AML code) that are declared as package elements within the
-ASL code could cause a fault because the interpreter would
-attempt to delete them. These objects are now marked with the
-"static object" flag to prevent any attempt to delete them.
-
-Implemented an interpreter optimization to use operands
-directly from the state object instead of extracting the
-operands to local variables. This reduces stack use and code
-size, and improves performance.
+returned an error. This operator now returns the current version
+of the ACPI CA core subsystem.
+
+Fixed a problem where objects passed as control method parameters
+to AcpiEvaluateObject were always deleted at method termination.
+However, these objects may end up being stored into the namespace
+by the called method. The object reference count mechanism was
+applied to these objects instead of a force delete.
+
+Fixed a problem where static strings or buffers (contained in the
+AML code) that are declared as package elements within the ASL
+code could cause a fault because the interpreter would attempt to
+delete them. These objects are now marked with the "static
+object" flag to prevent any attempt to delete them.
+
+Implemented an interpreter optimization to use operands directly
+from the state object instead of extracting the operands to local
+variables. This reduces stack use and code size, and improves
+performance.
The module exxface.c was eliminated as it was an unnecessary
extra layer of code.
-Current core subsystem library code sizes are shown below.
-These are the code and data sizes for the acpica.lib produced
-by the Microsoft Visual C++ 6.0 compiler, and these values do
-not include any ACPI driver or OSPM code. The debug version
-of the code includes the full debug trace mechanism -- leading
-to a much larger code and data size. Note that these values
-will vary depending on the efficiency of the compiler and the
-compiler options used during generation.
+Current core subsystem library code sizes are shown below. These
+are the code and data sizes for the acpica.lib produced by the
+Microsoft Visual C++ 6.0 compiler, and these values do not
+include any ACPI driver or OSPM code. The debug version of the
+code includes the full debug trace mechanism -- leading to a much
+larger code and data size. Note that these values will vary
+depending on the efficiency of the compiler and the compiler
+options used during generation.
Non-Debug Version: 65K Code, 5K Data, 70K Total
-(Previously 69K) Debug Version: 138K Code, 58K Data,
-196K Total (Previously 195K)
+(Previously 69K) Debug Version: 138K Code, 58K Data, 196K
+Total (Previously 195K)
Linux:
-Support for ACPI 2.0 64-bit integers has been added. All
-ACPI Integer objects are now 64 bits wide
+Support for ACPI 2.0 64-bit integers has been added. All ACPI
+Integer objects are now 64 bits wide
-All Acpi data types and structures are now in lower case.
-Only Acpi macros are upper case for differentiation.
+All Acpi data types and structures are now in lower case. Only
+Acpi macros are upper case for differentiation.
Documentation:
@@ -2107,45 +2465,42 @@ Summary of changes for this label: 08_31_01
ACPI CA Core Subsystem:
-A bug with interpreter implementation of the ASL Divide
-operator was found and fixed. The implicit function return
-value (not the explicit store operands) was returning the
-remainder instead of the quotient. This was a longstanding
-bug and it fixes several known outstanding issues on various
-platforms.
+A bug with interpreter implementation of the ASL Divide operator
+was found and fixed. The implicit function return value (not the
+explicit store operands) was returning the remainder instead of
+the quotient. This was a longstanding bug and it fixes several
+known outstanding issues on various platforms.
The ACPI_DEBUG_PRINT and function trace entry/exit macros have
been further optimized for size. There are 700 invocations of
the DEBUG_PRINT macro alone, so each optimization reduces the
size of the debug version of the subsystem significantly.
-A stack trace mechanism has been implemented. The maximum
-stack usage is about 2K on 32-bit platforms. The debugger
-command "stat stack" will display the current maximum stack
-usage.
+A stack trace mechanism has been implemented. The maximum stack
+usage is about 2K on 32-bit platforms. The debugger command
+"stat stack" will display the current maximum stack usage.
-All public symbols and global variables within the subsystem
-are now prefixed with the string "Acpi". This keeps all of
-the symbols grouped together in a kernel map, and avoids
-conflicts with other kernel subsystems.
+All public symbols and global variables within the subsystem are
+now prefixed with the string "Acpi". This keeps all of the
+symbols grouped together in a kernel map, and avoids conflicts
+with other kernel subsystems.
-Most of the internal fixed lookup tables have been moved into
-the code segment via the const operator.
+Most of the internal fixed lookup tables have been moved into the
+code segment via the const operator.
Several enhancements have been made to the interpreter to both
reduce the code size and improve performance.
-Current core subsystem library code sizes are shown below.
-These are the code and data sizes for the acpica.lib produced
-by the Microsoft Visual C++ 6.0 compiler, and these values do
-not include any ACPI driver or OSPM code. The debug version
-of the code includes the full debug trace mechanism which
-contains over 700 invocations of the DEBUG_PRINT macro, 500
-function entry macro invocations, and over 900 function exit
-macro invocations -- leading to a much larger code and data
-size. Note that these values will vary depending on the
-efficiency of the compiler and the compiler options used
-during generation.
+Current core subsystem library code sizes are shown below. These
+are the code and data sizes for the acpica.lib produced by the
+Microsoft Visual C++ 6.0 compiler, and these values do not
+include any ACPI driver or OSPM code. The debug version of the
+code includes the full debug trace mechanism which contains over
+700 invocations of the DEBUG_PRINT macro, 500 function entry
+macro invocations, and over 900 function exit macro invocations -
+- leading to a much larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Non-Debug Version: 64K Code, 5K Data, 69K Total
Debug Version: 137K Code, 58K Data, 195K Total
@@ -2167,36 +2522,34 @@ Summary of changes for this label: 08_16_01
ACPI CA Core Subsystem:
-The following ACPI 2.0 ASL operators have been implemented in
-the AML interpreter (These are already supported by the Intel
-ASL compiler): ToDecimalString, ToHexString, ToString,
-ToInteger, and ToBuffer. Support for 64-bit AML constants is
-implemented in the AML parser, debugger, and disassembler.
-
-The internal memory tracking mechanism (leak detection code)
-has been upgraded to reduce the memory overhead (a separate
-tracking block is no longer allocated for each memory
-allocation), and now supports all of the internal object
-caches.
-
-The data structures and code for the internal object caches
-have been coelesced and optimized so that there is a single
-cache and memory list data structure and a single group of
-functions that implement generic cache management. This has
-reduced the code size in both the debug and release versions
-of the subsystem.
+The following ACPI 2.0 ASL operators have been implemented in the
+AML interpreter (These are already supported by the Intel ASL
+compiler): ToDecimalString, ToHexString, ToString, ToInteger,
+and ToBuffer. Support for 64-bit AML constants is implemented in
+the AML parser, debugger, and disassembler.
+
+The internal memory tracking mechanism (leak detection code) has
+been upgraded to reduce the memory overhead (a separate tracking
+block is no longer allocated for each memory allocation), and now
+supports all of the internal object caches.
+
+The data structures and code for the internal object caches have
+been coelesced and optimized so that there is a single cache and
+memory list data structure and a single group of functions that
+implement generic cache management. This has reduced the code
+size in both the debug and release versions of the subsystem.
The DEBUG_PRINT macro(s) have been optimized for size and
replaced by ACPI_DEBUG_PRINT. The syntax for this macro is
slightly different, because it generates a single call to an
-internal function. This results in a savings of about 90
-bytes per invocation, resulting in an overall code and data
-savings of about 16% in the debug version of the subsystem.
+internal function. This results in a savings of about 90 bytes
+per invocation, resulting in an overall code and data savings of
+about 16% in the debug version of the subsystem.
Linux:
-Fixed C3 disk corruption problems and re-enabled C3 on
-supporting machines.
+Fixed C3 disk corruption problems and re-enabled C3 on supporting
+machines.
Integrated low-level sleep code by Patrick Mochel.
@@ -2206,14 +2559,13 @@ Other minor fixes.
ASL Compiler:
-Support for ACPI 2.0 variable length packages is
-fixed/completed.
+Support for ACPI 2.0 variable length packages is fixed/completed.
-Fixed a problem where the optional length parameter for the
-ACPI 2.0 ToString operator.
+Fixed a problem where the optional length parameter for the ACPI
+2.0 ToString operator.
-Fixed multiple extraneous error messages when a syntax error
-is detected within the declaration line of a control method.
+Fixed multiple extraneous error messages when a syntax error is
+detected within the declaration line of a control method.
----------------------------------------
Summary of changes for this label: 07_17_01
@@ -2221,26 +2573,25 @@ Summary of changes for this label: 07_17_01
ACPI CA Core Subsystem:
Added a new interface named AcpiGetFirmwareTable to obtain any
-ACPI table via the ACPI signature. The interface can be
-called at any time during kernel initialization, even before
-the kernel virtual memory manager is initialized and paging is
-enabled. This allows kernel subsystems to obtain ACPI tables
-very early, even before the ACPI CA subsystem is initialized.
+ACPI table via the ACPI signature. The interface can be called
+at any time during kernel initialization, even before the kernel
+virtual memory manager is initialized and paging is enabled.
+This allows kernel subsystems to obtain ACPI tables very early,
+even before the ACPI CA subsystem is initialized.
Fixed a problem where Fields defined with the AnyAcc attribute
could be resolved to the incorrect address under the following
-conditions: 1) the field width is larger than 8 bits and 2)
-the parent operation region is not defined on a DWORD
-boundary.
+conditions: 1) the field width is larger than 8 bits and 2) the
+parent operation region is not defined on a DWORD boundary.
-Fixed a problem where the interpreter is not being locked
-during namespace initialization (during execution of the _INI
-control methods), causing an error when an attempt is made to
-release it later.
+Fixed a problem where the interpreter is not being locked during
+namespace initialization (during execution of the _INI control
+methods), causing an error when an attempt is made to release it
+later.
ACPI 2.0 support in the AML Interpreter has begun and will be
-ongoing throughout the rest of this year. In this label, The
-Mod operator is implemented.
+ongoing throughout the rest of this year. In this label, The Mod
+operator is implemented.
Added a new data type to contain full PCI addresses named
ACPI_PCI_ID. This structure contains the PCI Segment, Bus,
@@ -2250,32 +2601,30 @@ Device, and Function values.
Enhanced the Linux version of the source code to change most
capitalized ACPI type names to lowercase. For example, all
-instances of ACPI_STATUS are changed to acpi_status. This
-will result in a large diff, but the change is strictly
-cosmetic and aligns the CA code closer to the Linux coding
-standard.
+instances of ACPI_STATUS are changed to acpi_status. This will
+result in a large diff, but the change is strictly cosmetic and
+aligns the CA code closer to the Linux coding standard.
OSL Interfaces:
-The interfaces to the PCI configuration space have been
-changed to add the PCI Segment number and to split the single
-32-bit combined DeviceFunction field into two 16-bit fields.
-This was accomplished by moving the four values that define an
-address in PCI configuration space (segment, bus, device, and
-function) to the new ACPI_PCI_ID structure.
+The interfaces to the PCI configuration space have been changed
+to add the PCI Segment number and to split the single 32-bit
+combined DeviceFunction field into two 16-bit fields. This was
+accomplished by moving the four values that define an address in
+PCI configuration space (segment, bus, device, and function) to
+the new ACPI_PCI_ID structure.
The changes to the PCI configuration space interfaces led to a
reexamination of the complete set of address space access
-interfaces for PCI, I/O, and Memory. The previously existing
-18 interfaces have proven difficult to maintain (any small
-change must be propagated across at least 6 interfaces) and do
-not easily allow for future expansion to 64 bits if necessary.
-Also, on some systems, it would not be appropriate to
-demultiplex the access width (8, 16, 32,or 64) before calling
-the OSL if the corresponding native OS interfaces contain a
-similar access width parameter. For these reasons, the 18
-address space interfaces have been replaced by these 6 new
-ones:
+interfaces for PCI, I/O, and Memory. The previously existing 18
+interfaces have proven difficult to maintain (any small change
+must be propagated across at least 6 interfaces) and do not
+easily allow for future expansion to 64 bits if necessary. Also,
+on some systems, it would not be appropriate to demultiplex the
+access width (8, 16, 32,or 64) before calling the OSL if the
+corresponding native OS interfaces contain a similar access width
+parameter. For these reasons, the 18 address space interfaces
+have been replaced by these 6 new ones:
AcpiOsReadPciConfiguration
AcpiOsWritePciConfiguration
@@ -2284,45 +2633,45 @@ AcpiOsWriteMemory
AcpiOsReadPort
AcpiOsWritePort
-Added a new interface named AcpiOsGetRootPointer to allow the
-OSL to perform the platform and/or OS-specific actions
-necessary to obtain the ACPI RSDP table pointer. On IA-32
-platforms, this interface will simply call down to the CA core
-to perform the low-memory search for the table. On IA-64, the
-RSDP is obtained from EFI. Migrating this interface to the
-OSL allows the CA core to remain OS and platform independent.
+Added a new interface named AcpiOsGetRootPointer to allow the OSL
+to perform the platform and/or OS-specific actions necessary to
+obtain the ACPI RSDP table pointer. On IA-32 platforms, this
+interface will simply call down to the CA core to perform the low-
+memory search for the table. On IA-64, the RSDP is obtained from
+EFI. Migrating this interface to the OSL allows the CA core to
+remain OS and platform independent.
Added a new interface named AcpiOsSignal to provide a generic
-"function code and pointer" interface for various
-miscellaneous signals and notifications that must be made to
-the host OS. The first such signals are intended to support
-the ASL Fatal and Breakpoint operators. In the latter case,
-the AcpiOsBreakpoint interface has been obsoleted.
+"function code and pointer" interface for various miscellaneous
+signals and notifications that must be made to the host OS. The
+first such signals are intended to support the ASL Fatal and
+Breakpoint operators. In the latter case, the AcpiOsBreakpoint
+interface has been obsoleted.
The definition of the AcpiFormatException interface has been
-changed to simplify its use. The caller no longer must supply
-a buffer to the call; A pointer to a const string is now
-returned directly. This allows the call to be easily used in
-printf statements, etc. since the caller does not have to
-manage a local buffer.
+changed to simplify its use. The caller no longer must supply a
+buffer to the call; A pointer to a const string is now returned
+directly. This allows the call to be easily used in printf
+statements, etc. since the caller does not have to manage a local
+buffer.
+
ASL Compiler, Version X2025:
-The ACPI 2.0 Switch/Case/Default operators have been
-implemented and are fully functional. They will work with all
-ACPI 1.0 interpreters, since the operators are simply
-translated to If/Else pairs.
+The ACPI 2.0 Switch/Case/Default operators have been implemented
+and are fully functional. They will work with all ACPI 1.0
+interpreters, since the operators are simply translated to
+If/Else pairs.
The ACPI 2.0 ElseIf operator is implemented and will also work
with 1.0 interpreters, for the same reason.
-Implemented support for ACPI 2.0 variable-length packages.
-These packages have a separate opcode, and their size is
-determined by the interpreter at run-time.
+Implemented support for ACPI 2.0 variable-length packages. These
+packages have a separate opcode, and their size is determined by
+the interpreter at run-time.
-Documentation The ACPI CA Programmer Reference has been
-updated to reflect the new interfaces and changes to existing
-interfaces.
+Documentation The ACPI CA Programmer Reference has been updated
+to reflect the new interfaces and changes to existing interfaces.
------------------------------------------
Summary of changes for this label: 06_15_01
@@ -2330,27 +2679,27 @@ Summary of changes for this label: 06_15_01
ACPI CA Core Subsystem:
Fixed a problem where a DWORD-accessed field within a Buffer
-object would get its byte address inadvertently rounded down
-to the nearest DWORD. Buffers are always Byte-accessible.
+object would get its byte address inadvertently rounded down to
+the nearest DWORD. Buffers are always Byte-accessible.
ASL Compiler, version X2024:
-Fixed a problem where the Switch() operator would either fault
-or hang the compiler. Note however, that the AML code for
-this ACPI 2.0 operator is not yet implemented.
+Fixed a problem where the Switch() operator would either fault or
+hang the compiler. Note however, that the AML code for this ACPI
+2.0 operator is not yet implemented.
-Compiler uses the new AcpiOsGetTimer interface to obtain
-compile timings.
+Compiler uses the new AcpiOsGetTimer interface to obtain compile
+timings.
-Implementation of the CreateField operator automatically
-converts a reference to a named field within a resource
-descriptor from a byte offset to a bit offset if required.
+Implementation of the CreateField operator automatically converts
+a reference to a named field within a resource descriptor from a
+byte offset to a bit offset if required.
Added some missing named fields from the resource descriptor
support. These are the names that are automatically created by
-the compiler to reference fields within a descriptor. They
-are only valid at compile time and are not passed through to
-the AML interpreter.
+the compiler to reference fields within a descriptor. They are
+only valid at compile time and are not passed through to the AML
+interpreter.
Resource descriptor named fields are now typed as Integers and
subject to compile-time typechecking when used in expressions.
@@ -2360,21 +2709,21 @@ Summary of changes for this label: 05_18_01
ACPI CA Core Subsystem:
-Fixed a couple of problems in the Field support code where
-bits from adjacent fields could be returned along with the
-proper field bits. Restructured the field support code to
-improve performance, readability and maintainability.
+Fixed a couple of problems in the Field support code where bits
+from adjacent fields could be returned along with the proper
+field bits. Restructured the field support code to improve
+performance, readability and maintainability.
-New DEBUG_PRINTP macro automatically inserts the procedure
-name into the output, saving hundreds of copies of procedure
-name strings within the source, shrinking the memory footprint
-of the debug version of the core subsystem.
+New DEBUG_PRINTP macro automatically inserts the procedure name
+into the output, saving hundreds of copies of procedure name
+strings within the source, shrinking the memory footprint of the
+debug version of the core subsystem.
Source Code Structure:
The source code directory tree was restructured to reflect the
-current organization of the component architecture. Some
-files and directories have been moved and/or renamed.
+current organization of the component architecture. Some files
+and directories have been moved and/or renamed.
Linux:
@@ -2385,10 +2734,9 @@ opened.
ASL Compiler, version X2020:
-Memory allocation performance enhancement - over 24X compile
-time improvement on large ASL files. Parse nodes and
-namestring buffers are now allocated from a large internal
-compiler buffer.
+Memory allocation performance enhancement - over 24X compile time
+improvement on large ASL files. Parse nodes and namestring
+buffers are now allocated from a large internal compiler buffer.
The temporary .SRC file is deleted unless the "-s" option is
specified
@@ -2418,8 +2766,8 @@ EISAID now returns an object of type INTEGER
"Register" with a user-defined region space parse error fixed
-Escaped backslash at the end of a string ("\\") scan/parse
-error fixed
+Escaped backslash at the end of a string ("\\") scan/parse error
+fixed
"Revision" is now an object of type INTEGER.
@@ -2446,11 +2794,11 @@ outside the range of the parent operation region.
ASL Compiler, version X2018:
Added error detection for ASL Fields that extend beyond the
-length of the parent operation region (only if the length of
-the region is known at compile time.) This includes fields
-that have a minimum access width that is smaller than the
-parent region, and individual field units that are partially
-or entirely beyond the extent of the parent.
+length of the parent operation region (only if the length of the
+region is known at compile time.) This includes fields that have
+a minimum access width that is smaller than the parent region,
+and individual field units that are partially or entirely beyond
+the extent of the parent.
@@ -2460,18 +2808,17 @@ Summary of changes for this label: 04_27_01
ACPI CA Core Subsystem:
Fixed a problem where the namespace mutex could be released at
-the wrong time during execution of
-AcpiRemoveAddressSpaceHandler.
+the wrong time during execution of AcpiRemoveAddressSpaceHandler.
Added optional thread ID output for debug traces, to simplify
-debugging of multiple threads. Added context switch
-notification when the debug code realizes that a different
-thread is now executing ACPI code.
+debugging of multiple threads. Added context switch notification
+when the debug code realizes that a different thread is now
+executing ACPI code.
-Some additional external data types have been prefixed with
-the string "ACPI_" for consistency. This may effect existing
-code. The data types affected are the external callback
-typedefs - e.g., WALK_CALLBACK becomes ACPI_WALK_CALLBACK.
+Some additional external data types have been prefixed with the
+string "ACPI_" for consistency. This may effect existing code.
+The data types affected are the external callback typedefs -
+e.g., WALK_CALLBACK becomes ACPI_WALK_CALLBACK.
Linux:
@@ -2479,9 +2826,8 @@ Fixed an issue with the OSL semaphore implementation where a
thread was waking up with an error from receiving a SIGCHLD
signal.
-Linux version of ACPI CA now uses the system C library for
-string manipulation routines instead of a local
-implementation.
+Linux version of ACPI CA now uses the system C library for string
+manipulation routines instead of a local implementation.
Cleaned up comments and removed TBDs.
@@ -2503,19 +2849,18 @@ Summary of changes for this label: 04_13_01
Restructured support for BufferFields and RegionFields.
BankFields support is now fully operational. All known 32-bit
-limitations on field sizes have been removed. Both
-BufferFields and (Operation) RegionFields are now supported by
-the same field management code.
+limitations on field sizes have been removed. Both BufferFields
+and (Operation) RegionFields are now supported by the same field
+management code.
-Resource support now supports QWORD address and IO resources.
-The 16/32/64 bit address structures and the Extended IRQ
-structure have been changed to properly handle Source Resource
-strings.
+Resource support now supports QWORD address and IO resources. The
+16/32/64 bit address structures and the Extended IRQ structure
+have been changed to properly handle Source Resource strings.
-A ThreadId of -1 is now used to indicate a "mutex not
-acquired" condition internally and must never be returned by
-AcpiOsThreadId. This reserved value was changed from 0 since
-Unix systems allow a thread ID of 0.
+A ThreadId of -1 is now used to indicate a "mutex not acquired"
+condition internally and must never be returned by
+AcpiOsThreadId. This reserved value was changed from 0 since Unix
+systems allow a thread ID of 0.
Linux:
@@ -2527,8 +2872,8 @@ Fixed the EC driver to honor _GLK.
ASL Compiler, version X2016:
-Fixed support for the "FixedHw" keyword. Previously, the
-FixedHw address space was set to 0, not 0x7f as it should be.
+Fixed support for the "FixedHw" keyword. Previously, the FixedHw
+address space was set to 0, not 0x7f as it should be.
------------------------------------------
Summary of changes for this label: 03_13_01
@@ -2543,11 +2888,11 @@ method completes execution. This fixes the "mutex already
acquired" issue seen occasionally.
Part of the "implicit conversion" rules in ACPI 2.0 have been
-found to cause compatibility problems with existing ASL/AML.
-The convert "result-to-target-type" implementation has been
-removed for stores to method Args and Locals. Source operand
-conversion is still fully implemented. Possible changes to
-ACPI 2.0 specification pending.
+found to cause compatibility problems with existing ASL/AML. The
+convert "result-to-target-type" implementation has been removed
+for stores to method Args and Locals. Source operand conversion
+is still fully implemented. Possible changes to ACPI 2.0
+specification pending.
Fix to AcpiRsCalculatePciRoutingTableLength to return correct
length.
@@ -2588,15 +2933,15 @@ Modularized all ACPI-specific drivers.
Added new thermal zone and power resource drivers.
-Revamped /proc interface (new functionality is under
-/proc/acpi).
+Revamped /proc interface (new functionality is under /proc/acpi).
New kernel configuration options.
Linux known issues:
-New kernel configuration options not documented in
-Configure.help yet.
+New kernel configuration options not documented in Configure.help
+yet.
+
Module dependencies not currently implemented. If used, they
should be loaded in this order: busmgr, power, ec, system,
@@ -2614,57 +2959,56 @@ message.
ACPI CA Core Subsystem:
-Added a new OSL Interface, AcpiOsGetThreadId. This was
-required for the deadlock detection code. Defined to return a
-non-zero, 32-bit thread ID for the currently executing thread.
-May be a non-zero constant integer on single-thread systems.
+Added a new OSL Interface, AcpiOsGetThreadId. This was required
+for the deadlock detection code. Defined to return a non-zero,
+32-bit thread ID for the currently executing thread. May be a
+non-zero constant integer on single-thread systems.
Implemented deadlock detection for internal subsystem mutexes.
We may add conditional compilation for this code (debug only)
later.
ASL/AML Mutex object semantics are now fully supported. This
-includes multiple acquires/releases by owner and support for
-the Mutex SyncLevel parameter.
+includes multiple acquires/releases by owner and support for the
+Mutex SyncLevel parameter.
A new "Force Release" mechanism automatically frees all ASL
Mutexes that have been acquired but not released when a thread
-exits the interpreter. This forces conformance to the ACPI
-spec ("All mutexes must be released when an invocation exits")
-and prevents deadlocked ASL threads. This mechanism can be
-expanded (later) to monitor other resource acquisitions if OEM
-ASL code continues to misbehave (which it will).
+exits the interpreter. This forces conformance to the ACPI spec
+("All mutexes must be released when an invocation exits") and
+prevents deadlocked ASL threads. This mechanism can be expanded
+(later) to monitor other resource acquisitions if OEM ASL code
+continues to misbehave (which it will).
Several new ACPI exception codes have been added for the Mutex
support.
Recursive method calls are now allowed and supported (the ACPI
-spec does in fact allow recursive method calls.) The number
-of recursive calls is subject to the restrictions imposed by
-the SERIALIZED method keyword and SyncLevel (ACPI 2.0) method
+spec does in fact allow recursive method calls.) The number of
+recursive calls is subject to the restrictions imposed by the
+SERIALIZED method keyword and SyncLevel (ACPI 2.0) method
parameter.
Implemented support for the SyncLevel parameter for control
methods (ACPI 2.0 feature)
-Fixed a deadlock problem when multiple threads attempted to
-use the interpreter.
+Fixed a deadlock problem when multiple threads attempted to use
+the interpreter.
Fixed a problem where the string length of a String package
element was not always set in a package returned from
AcpiEvaluateObject.
-Fixed a problem where the length of a String package element
-was not always included in the length of the overall package
-returned from AcpiEvaluateObject.
+Fixed a problem where the length of a String package element was
+not always included in the length of the overall package returned
+from AcpiEvaluateObject.
Added external interfaces (Acpi*) to the ACPI debug memory
manager. This manager keeps a list of all outstanding
-allocations, and can therefore detect memory leaks and
-attempts to free memory blocks more than once. Useful for code
-such as the power manager, etc. May not be appropriate for
-device drivers. Performance with the debug code enabled is
-slow.
+allocations, and can therefore detect memory leaks and attempts
+to free memory blocks more than once. Useful for code such as the
+power manager, etc. May not be appropriate for device drivers.
+Performance with the debug code enabled is slow.
The ACPI Global Lock is now an optional hardware element.
@@ -2686,9 +3030,8 @@ New header file, Include/acstruct.h
Documentation:
-The programmer reference has been updated for the following
-new interfaces: AcpiOsGetThreadId AcpiAllocate AcpiCallocate
-AcpiFree
+The programmer reference has been updated for the following new
+interfaces: AcpiOsGetThreadId AcpiAllocate AcpiCallocate AcpiFree
------------------------------------------
Summary of changes for this label: 02_08_01
@@ -2697,10 +3040,10 @@ Core ACPI CA Subsystem: Fixed a problem where an error was
incorrectly returned if the return resource buffer was larger
than the actual data (in the resource interfaces).
-References to named objects within packages are resolved to
-the full pathname string before packages are returned directly
-(via the AcpiEvaluateObject interface) or indirectly via the
-resource interfaces.
+References to named objects within packages are resolved to the
+full pathname string before packages are returned directly (via
+the AcpiEvaluateObject interface) or indirectly via the resource
+interfaces.
Linux OS Services Layer (OSL):
@@ -2711,46 +3054,45 @@ Added C-state debugging output and other miscellaneous fixes.
ASL Compiler Version X2014:
-All defined method arguments can now be used as local
-variables, including the ones that are not actually passed in
-as parameters. The compiler tracks initialization of the
-arguments and issues an exception if they are used without
-prior assignment (just like locals).
+All defined method arguments can now be used as local variables,
+including the ones that are not actually passed in as parameters.
+The compiler tracks initialization of the arguments and issues an
+exception if they are used without prior assignment (just like
+locals).
The -o option now specifies a filename prefix that is used for
-all output files, including the AML output file. Otherwise,
-the default behavior is as follows: 1) the AML goes to the
-file specified in the DSDT. 2) all other output files use the
-input source filename as the base.
+all output files, including the AML output file. Otherwise, the
+default behavior is as follows: 1) the AML goes to the file
+specified in the DSDT. 2) all other output files use the input
+source filename as the base.
------------------------------------------
Summary of changes for this label: 01_25_01
-Core ACPI CA Subsystem: Restructured the implementation of
-object store support within the interpreter. This includes
-support for the Store operator as well as any ASL operators
-that include a target operand.
+Core ACPI CA Subsystem: Restructured the implementation of object
+store support within the interpreter. This includes support for
+the Store operator as well as any ASL operators that include a
+target operand.
Partially implemented support for Implicit Result-to-Target
-conversion. This is when a result object is converted on the
-fly to the type of an existing target object. Completion of
-this support is pending further analysis of the ACPI
-specification concerning this matter.
+conversion. This is when a result object is converted on the fly
+to the type of an existing target object. Completion of this
+support is pending further analysis of the ACPI specification
+concerning this matter.
-CPU-specific code has been removed from the subsystem
-(hardware directory).
+CPU-specific code has been removed from the subsystem (hardware
+directory).
New Power Management Timer functions added
-Linux OS Services Layer (OSL): Moved system state transition
-code to the core, fixed it, and modified Linux OSL
-accordingly.
+Linux OS Services Layer (OSL): Moved system state transition code
+to the core, fixed it, and modified Linux OSL accordingly.
Fixed C2 and C3 latency calculations.
-We no longer use the compilation date for the version message
-on initialization, but retrieve the version from
+We no longer use the compilation date for the version message on
+initialization, but retrieve the version from
AcpiGetSystemInfo().
Incorporated for fix Sony VAIO machines.
@@ -2768,26 +3110,25 @@ Summary of changes for this label: 01_15_01
Core ACPI CA Subsystem:
-Implemented support for type conversions in the execution of
-the ASL Concatenate operator (The second operand is converted
-to match the type of the first operand before concatenation.)
+Implemented support for type conversions in the execution of the
+ASL Concatenate operator (The second operand is converted to
+match the type of the first operand before concatenation.)
Support for implicit source operand conversion is partially
-implemented. The ASL source operand types Integer, Buffer,
-and String are freely interchangeable for most ASL operators
-and are converted by the interpreter on the fly as required.
-Implicit Target operand conversion (where the result is
-converted to the target type before storing) is not yet
-implemented.
+implemented. The ASL source operand types Integer, Buffer, and
+String are freely interchangeable for most ASL operators and are
+converted by the interpreter on the fly as required. Implicit
+Target operand conversion (where the result is converted to the
+target type before storing) is not yet implemented.
Support for 32-bit and 64-bit BCD integers is implemented.
-Problem fixed where a field read on an aligned field could
-cause a read past the end of the field.
+Problem fixed where a field read on an aligned field could cause
+a read past the end of the field.
-New exception, AE_AML_NO_RETURN_VALUE, is returned when a
-method does not return a value, but the caller expects one.
-(The ASL compiler flags this as a warning.)
+New exception, AE_AML_NO_RETURN_VALUE, is returned when a method
+does not return a value, but the caller expects one. (The ASL
+compiler flags this as a warning.)
ASL Compiler:
@@ -2796,8 +3137,7 @@ Version X2011:
prevents the use of invalid objects (such as using a Package
where an Integer is required) at compile time instead of at
interpreter run-time.
-2. The ASL source line is printed with ALL errors and
-warnings.
+2. The ASL source line is printed with ALL errors and warnings.
3. Bug fix for source EOF without final linefeed.
4. Debug option is split into a parse trace and a namespace
trace.
@@ -2808,10 +3148,10 @@ integers and strings.
Version X2012:
1. Relaxed typechecking to allow interchangeability between
-strings, integers, and buffers. These types are now converted
-by the interpreter at runtime.
-2. Compiler reports time taken by each internal subsystem in
-the debug output file.
+strings, integers, and buffers. These types are now converted by
+the interpreter at runtime.
+2. Compiler reports time taken by each internal subsystem in the
+debug output file.
------------------------------------------
@@ -2826,12 +3166,13 @@ synchronizes everything.
------------------------------------------
Summary of changes for this label: 12_08_00
-Fixed a problem where named references within the ASL
-definition of both OperationRegions and CreateXXXFields did
-not work properly. The symptom was an AE_AML_OPERAND_TYPE
-during initialization of the region/field. This is similar
-(but not related internally) to the problem that was fixed in
-the last label.
+
+Fixed a problem where named references within the ASL definition
+of both OperationRegions and CreateXXXFields did not work
+properly. The symptom was an AE_AML_OPERAND_TYPE during
+initialization of the region/field. This is similar (but not
+related internally) to the problem that was fixed in the last
+label.
Implemented both 32-bit and 64-bit support for the BCD ASL
functions ToBCD and FromBCD.
@@ -2843,31 +3184,31 @@ years.
Summary of changes for this label: 12_01_00
Fixed a problem where method invocations within the ASL
-definition of both OperationRegions and CreateXXXFields did
-not work properly. The symptom was an AE_AML_OPERAND_TYPE
-during initialization of the region/field:
+definition of both OperationRegions and CreateXXXFields did not
+work properly. The symptom was an AE_AML_OPERAND_TYPE during
+initialization of the region/field:
- nsinit-0209: AE_AML_OPERAND_TYPE while getting region
-arguments [DEBG] ammonad-0284: Exec_monadic2_r/Not: bad
-operand(s) (0x3005)
+ nsinit-0209: AE_AML_OPERAND_TYPE while getting region arguments
+[DEBG] ammonad-0284: Exec_monadic2_r/Not: bad operand(s)
+(0x3005)
Fixed a problem where operators with more than one nested
subexpression would fail. The symptoms were varied, by mostly
-AE_AML_OPERAND_TYPE errors. This was actually a rather
-serious problem that has gone unnoticed until now.
+AE_AML_OPERAND_TYPE errors. This was actually a rather serious
+problem that has gone unnoticed until now.
Subtract (Add (1,2), Multiply (3,4))
-Fixed a problem where AcpiGetHandle didn't quite get fixed in
-the previous build (The prefix part of a relative path was
-handled incorrectly).
+Fixed a problem where AcpiGetHandle didn't quite get fixed in the
+previous build (The prefix part of a relative path was handled
+incorrectly).
-Fixed a problem where Operation Region initialization failed
-if the operation region name was a "namepath" instead of a
-simple "nameseg". Symptom was an AE_NO_OPERAND error.
+Fixed a problem where Operation Region initialization failed if
+the operation region name was a "namepath" instead of a simple
+"nameseg". Symptom was an AE_NO_OPERAND error.
-Fixed a problem where an assignment to a local variable via
-the indirect RefOf mechanism only worked for the first such
+Fixed a problem where an assignment to a local variable via the
+indirect RefOf mechanism only worked for the first such
assignment. Subsequent assignments were ignored.
------------------------------------------
@@ -2885,23 +3226,22 @@ All physical memory addresses across all platforms are now 64
bits wide. Logical address width remains dependent on the
platform (i.e., "void *").
-AcpiOsMapMemory interface changed to a 64-bit physical
-address.
+AcpiOsMapMemory interface changed to a 64-bit physical address.
-The AML interpreter integer size is now 64 bits, as per the
-ACPI 2.0 specification.
+The AML interpreter integer size is now 64 bits, as per the ACPI
+2.0 specification.
For backwards compatibility with ACPI 1.0, ACPI tables with a
revision number less than 2 use 32-bit integers only.
-Fixed a problem where the evaluation of OpRegion operands did
-not always resolve them to numbers properly.
+Fixed a problem where the evaluation of OpRegion operands did not
+always resolve them to numbers properly.
------------------------------------------
Summary of changes for this label: 10_20_00
-Fix for CBN_._STA issue. This fix will allow correct access
-to CBN_ OpRegions when the _STA returns 0x8.
+Fix for CBN_._STA issue. This fix will allow correct access to
+CBN_ OpRegions when the _STA returns 0x8.
Support to convert ACPI constants (Ones, Zeros, One) to actual
values before a package object is returned
@@ -2909,8 +3249,8 @@ values before a package object is returned
Fix for method call as predicate to if/while construct causing
incorrect if/while behavior
-Fix for Else block package lengths sometimes calculated wrong
-(if block > 63 bytes)
+Fix for Else block package lengths sometimes calculated wrong (if
+block > 63 bytes)
Fix for Processor object length field, was always zero
@@ -2928,33 +3268,31 @@ Warning emitted if a named object referenced cannot be found
------------------------------------------
Summary of changes for this label: 9_29_00
-New table initialization interfaces: AcpiInitializeSubsystem
-no longer has any parameters AcpiFindRootPointer - Find the
-RSDP (if necessary) AcpiLoadTables (RSDP) - load all tables
-found at RSDP->RSDT Obsolete Interfaces AcpiLoadFirmwareTables
-- replaced by AcpiLoadTables
+New table initialization interfaces: AcpiInitializeSubsystem no
+longer has any parameters AcpiFindRootPointer - Find the RSDP (if
+necessary) AcpiLoadTables (RSDP) - load all tables found at RSDP-
+>RSDT Obsolete Interfaces AcpiLoadFirmwareTables - replaced by
+AcpiLoadTables
Note: These interface changes require changes to all existing
OSDs
-The PCI_Config default address space handler is always
-installed at the root namespace object.
+The PCI_Config default address space handler is always installed
+at the root namespace object.
-------------------------------------------
Summary of changes for this label: 09_15_00
The new initialization architecture is implemented. New
-interfaces are: AcpiInitializeSubsystem (replaces
-AcpiInitialize) AcpiEnableSubsystem Obsolete Interfaces:
-AcpiLoadNamespace (Namespace is automatically loaded when a
-table is loaded)
+interfaces are: AcpiInitializeSubsystem (replaces AcpiInitialize)
+AcpiEnableSubsystem Obsolete Interfaces: AcpiLoadNamespace
+(Namespace is automatically loaded when a table is loaded)
The ACPI_OPERAND_OBJECT has been optimized to shrink its size
from 52 bytes to 32 bytes. There is usually one of these for
every namespace object, so the memory savings is significant.
-Implemented just-in-time evaluation of the CreateField
-operators.
+Implemented just-in-time evaluation of the CreateField operators.
Bug fixes for IA-64 support have been integrated.
@@ -2978,23 +3316,22 @@ and 2X overall in the ACPI CA subsystem.
Fixed problem where the call to AcpiEvFindPciRootBuses was
inadvertently left commented out.
-Reduced the warning count when generating the source with the
-GCC compiler.
+Reduced the warning count when generating the source with the GCC
+compiler.
Revision numbers added to each module header showing the
SourceSafe version of the file. Please refer to this version
-number when giving us feedback or comments on individual
-modules.
+number when giving us feedback or comments on individual modules.
-The main object types within the subsystem have been renamed
-to clarify their purpose:
+The main object types within the subsystem have been renamed to
+clarify their purpose:
ACPI_INTERNAL_OBJECT -> ACPI_OPERAND_OBJECT
ACPI_GENERIC_OP -> ACPI_PARSE_OBJECT
ACPI_NAME_TABLE_ENTRY -> ACPI_NAMESPACE_NODE
-NOTE: no changes to the initialization sequence are included
-in this label.
+NOTE: no changes to the initialization sequence are included in
+this label.
-------------------------------------------
Summary of changes for this label: 08_23_00
@@ -3002,8 +3339,8 @@ Summary of changes for this label: 08_23_00
Fixed problem where TerminateControlMethod was being called
multiple times per method
-Fixed debugger problem where single stepping caused a
-semaphore to be oversignalled
+Fixed debugger problem where single stepping caused a semaphore
+to be oversignalled
Improved performance through additional parse object caching -
added ACPI_EXTENDED_OP type
@@ -3013,55 +3350,54 @@ Summary of changes for this label: 08_10_00
Parser/Interpreter integration: Eliminated the creation of
complete parse trees for ACPI tables and control methods.
-Instead, parse subtrees are created and then deleted as soon
-as they are processed (Either entered into the namespace or
+Instead, parse subtrees are created and then deleted as soon as
+they are processed (Either entered into the namespace or
executed by the interpreter). This reduces the use of dynamic
kernel memory significantly. (about 10X)
-Exception codes broken into classes and renumbered. Be sure
-to recompile all code that includes acexcep.h. Hopefully we
-won't have to renumber the codes again now that they are
-split into classes (environment, programmer, AML code, ACPI
-table, and internal).
+Exception codes broken into classes and renumbered. Be sure to
+recompile all code that includes acexcep.h. Hopefully we won't
+have to renumber the codes again now that they are split into
+classes (environment, programmer, AML code, ACPI table, and
+internal).
Fixed some additional alignment issues in the Resource Manager
subcomponent
-Implemented semaphore tracking in the AcpiExec utility, and
-fixed several places where mutexes/semaphores were being
-unlocked without a corresponding lock operation. There are
-no known semaphore or mutex "leaks" at this time.
+Implemented semaphore tracking in the AcpiExec utility, and fixed
+several places where mutexes/semaphores were being unlocked
+without a corresponding lock operation. There are no known
+semaphore or mutex "leaks" at this time.
-Fixed the case where an ASL Return operator is used to return
-an unnamed package.
+Fixed the case where an ASL Return operator is used to return an
+unnamed package.
-------------------------------------------
Summary of changes for this label: 07_28_00
Fixed a problem with the way addresses were calculated in
-AcpiAmlReadFieldData() and AcpiAmlWriteFieldData(). This
-problem manifested itself when a Field was created with
-WordAccess or DwordAccess, but the field unit defined within
-the Field was less than a Word or Dword.
+AcpiAmlReadFieldData() and AcpiAmlWriteFieldData(). This problem
+manifested itself when a Field was created with WordAccess or
+DwordAccess, but the field unit defined within the Field was
+less than a Word or Dword.
Fixed a problem in AmlDumpOperands() module's loop to pull
operands off of the operand stack to display information. The
-problem manifested itself as a TLB error on 64-bit systems
-when accessing an operand stack with two or more operands.
-
-Fixed a problem with the PCI configuration space handlers
-where context was getting confused between accesses. This
-required a change to the generic address space handler and
-address space setup definitions. Handlers now get both a
-global handler context (this is the one passed in by the user
-when executing AcpiInstallAddressSpaceHandler() and a
-specific region context that is unique to each region (For
-example, the _ADR, _SEG and _BBN values associated with a
-specific region). The generic function definitions have
-changed to the following:
-
-typedef ACPI_STATUS (*ADDRESS_SPACE_HANDLER) ( UINT32
-Function, UINT32 Address, UINT32 BitWidth, UINT32 *Value, void
+problem manifested itself as a TLB error on 64-bit systems when
+accessing an operand stack with two or more operands.
+
+Fixed a problem with the PCI configuration space handlers where
+context was getting confused between accesses. This required a
+change to the generic address space handler and address space
+setup definitions. Handlers now get both a global handler
+context (this is the one passed in by the user when executing
+AcpiInstallAddressSpaceHandler() and a specific region context
+that is unique to each region (For example, the _ADR, _SEG and
+_BBN values associated with a specific region). The generic
+function definitions have changed to the following:
+
+typedef ACPI_STATUS (*ADDRESS_SPACE_HANDLER) ( UINT32 Function,
+UINT32 Address, UINT32 BitWidth, UINT32 *Value, void
*HandlerContext, // This used to be void *Context void
*RegionContext); // This is an additional parameter
@@ -3074,17 +3410,17 @@ Summary of changes for this label: 07_21_00
Major file consolidation and rename. All files within the
interpreter have been renamed as well as most header files.
-This was done to prevent collisions with existing files in
-the host OSs -- filenames such as "config.h" and "global.h"
-seem to be quite common. The VC project files have been
-updated. All makefiles will require modification.
-
-The parser/interpreter integration continues in Phase 5 with
-the implementation of a complete 2-pass parse (the AML is
-parsed twice) for each table; This avoids the construction
-of a huge parse tree and therefore reduces the amount of
-dynamic memory required by the subsystem. Greater use of the
-parse object cache means that performance is unaffected.
+This was done to prevent collisions with existing files in the
+host OSs -- filenames such as "config.h" and "global.h" seem to
+be quite common. The VC project files have been updated. All
+makefiles will require modification.
+
+The parser/interpreter integration continues in Phase 5 with the
+implementation of a complete 2-pass parse (the AML is parsed
+twice) for each table; This avoids the construction of a huge
+parse tree and therefore reduces the amount of dynamic memory
+required by the subsystem. Greater use of the parse object cache
+means that performance is unaffected.
Many comments from the two code reviews have been rolled in.
@@ -3093,111 +3429,105 @@ The 64-bit alignment support is complete.
-------------------------------------------
Summary of changes for this label: 06_30_00
-With a nod and a tip of the hat to the technology of
-yesteryear, we've added support in the source code for 80
-column output devices. The code is now mostly constrained to
-80 columns or less to support environments and editors that 1)
-cannot display or print more than 80 characters on a single
-line, and 2) cannot disable line wrapping.
+With a nod and a tip of the hat to the technology of yesteryear,
+we've added support in the source code for 80 column output
+devices. The code is now mostly constrained to 80 columns or
+less to support environments and editors that 1) cannot display
+or print more than 80 characters on a single line, and 2) cannot
+disable line wrapping.
A major restructuring of the namespace data structure has been
completed. The result is 1) cleaner and more
-understandable/maintainable code, and 2) a significant
-reduction in the dynamic memory requirement for each named
-ACPI object (almost half).
+understandable/maintainable code, and 2) a significant reduction
+in the dynamic memory requirement for each named ACPI object
+(almost half).
-------------------------------------------
Summary of changes for this label: 06_23_00
-Linux support has been added. In order to obtain approval to
-get the ACPI CA subsystem into the Linux kernel, we've had to
-make quite a few changes to the base subsystem that will
-affect all users (all the changes are generic and OS-
-independent). The effects of these global changes have been
-somewhat far reaching. Files have been merged and/or renamed
-and interfaces have been renamed. The major changes are
-described below.
+Linux support has been added. In order to obtain approval to get
+the ACPI CA subsystem into the Linux kernel, we've had to make
+quite a few changes to the base subsystem that will affect all
+users (all the changes are generic and OS- independent). The
+effects of these global changes have been somewhat far reaching.
+Files have been merged and/or renamed and interfaces have been
+renamed. The major changes are described below.
Osd* interfaces renamed to AcpiOs* to eliminate namespace
pollution/confusion within our target kernels. All OSD
-interfaces must be modified to match the new naming
-convention.
+interfaces must be modified to match the new naming convention.
Files merged across the subsystem. A number of the smaller
source and header files have been merged to reduce the file
-count and increase the density of the existing files. There
-are too many to list here. In general, makefiles that call
-out individual files will require rebuilding.
+count and increase the density of the existing files. There are
+too many to list here. In general, makefiles that call out
+individual files will require rebuilding.
Interpreter files renamed. All interpreter files now have the
prefix am* instead of ie* and is*.
Header files renamed: The acapi.h file is now acpixf.h. The
-acpiosd.h file is now acpiosxf.h. We are removing references
-to the acronym "API" since it is somewhat windowsy. The new
-name is "external interface" or xface or xf in the
-filenames.j
+acpiosd.h file is now acpiosxf.h. We are removing references to
+the acronym "API" since it is somewhat windowsy. The new name is
+"external interface" or xface or xf in the filenames.j
-All manifest constants have been forced to upper case (some
-were mixed case.) Also, the string "ACPI_" has been
-prepended to many (not all) of the constants, typedefs, and
-structs.
+All manifest constants have been forced to upper case (some were
+mixed case.) Also, the string "ACPI_" has been prepended to
+many (not all) of the constants, typedefs, and structs.
The globals "DebugLevel" and "DebugLayer" have been renamed
"AcpiDbgLevel" and "AcpiDbgLayer" respectively.
All other globals within the subsystem are now prefixed with
"AcpiGbl_" Internal procedures within the subsystem are now
-prefixed with "Acpi" (with only a few exceptions). The
-original two-letter abbreviation for the subcomponent remains
-after "Acpi" - for example, CmCallocate became
-AcpiCmCallocate.
+prefixed with "Acpi" (with only a few exceptions). The original
+two-letter abbreviation for the subcomponent remains after
+"Acpi" - for example, CmCallocate became AcpiCmCallocate.
Added a source code translation/conversion utility. Used to
-generate the Linux source code, it can be modified to
-generate other types of source as well. Can also be used to
-cleanup existing source by removing extraneous spaces and
-blank lines. Found in tools/acpisrc/*
+generate the Linux source code, it can be modified to generate
+other types of source as well. Can also be used to cleanup
+existing source by removing extraneous spaces and blank lines.
+Found in tools/acpisrc/*
OsdUnMapMemory was renamed to OsdUnmapMemory and then
AcpiOsUnmapMemory. (UnMap became Unmap).
-A "MaxUnits" parameter has been added to
-AcpiOsCreateSemaphore. When set to one, this indicates that
-the caller wants to use the semaphore as a mutex, not a
-counting semaphore. ACPI CA uses both types. However,
-implementers of this call may want to use different OS
-primitives depending on the type of semaphore requested. For
-example, some operating systems provide separate "mutex" and
-"semaphore" interfaces - where the mutex interface is much
-faster because it doesn't have all the overhead of a full
-semaphore implementation.
+A "MaxUnits" parameter has been added to AcpiOsCreateSemaphore.
+When set to one, this indicates that the caller wants to use the
+semaphore as a mutex, not a counting semaphore. ACPI CA uses
+both types. However, implementers of this call may want to use
+different OS primitives depending on the type of semaphore
+requested. For example, some operating systems provide separate
+"mutex" and "semaphore" interfaces - where the mutex interface
+is much faster because it doesn't have all the overhead of a
+full semaphore implementation.
Fixed a deadlock problem where a method that accesses the PCI
-address space can block forever if it is the first access to
-the space.
+address space can block forever if it is the first access to the
+space.
-------------------------------------------
Summary of changes for this label: 06_02_00
Support for environments that cannot handle unaligned data
-accesses (e.g. firmware and OS environments devoid of
-alignment handler technology namely SAL/EFI and the IA-64
-Linux kernel) has been added (via configurable macros) in
-these three areas: - Transfer of data from the raw AML byte
-stream is done via byte moves instead of word/dword/qword
-moves. - External objects are aligned within the user buffer,
-including package elements (sub-objects). - Conversion of
-name strings to UINT32 Acpi Names is now done byte-wise.
+accesses (e.g. firmware and OS environments devoid of alignment
+handler technology namely SAL/EFI and the IA-64 Linux kernel)
+has been added (via configurable macros) in these three areas: -
+Transfer of data from the raw AML byte stream is done via byte
+moves instead of word/dword/qword moves. - External objects
+are aligned within the user buffer, including package elements
+(sub-objects). - Conversion of name strings to UINT32 Acpi Names
+is now done byte-wise.
The Store operator was modified to mimic Microsoft's
implementation when storing to a Buffer Field.
Added a check of the BM_STS bit before entering C3.
-The methods subdirectory has been obsoleted and removed. A
-new file, cmeval.c subsumes the functionality.
+The methods subdirectory has been obsoleted and removed. A new
+file, cmeval.c subsumes the functionality.
A 16-bit (DOS) version of AcpiExec has been developed. The
makefile is under the acpiexec directory.
diff --git a/sys/contrib/dev/acpica/acapps.h b/sys/contrib/dev/acpica/acapps.h
index 458ba4d..154593f 100644
--- a/sys/contrib/dev/acpica/acapps.h
+++ b/sys/contrib/dev/acpica/acapps.h
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,12 +128,12 @@ extern UINT32 AmlLength;
extern int AcpiGbl_Optind;
-extern NATIVE_CHAR *AcpiGbl_Optarg;
+extern char *AcpiGbl_Optarg;
int
AcpiGetopt(
- int argc,
- char **argv,
+ int argc,
+ char **argv,
char *opts);
ACPI_STATUS
@@ -171,16 +171,18 @@ void
AdDumpTables (void);
ACPI_STATUS
-AdGetTables (
+AdGetLocalTables (
char *Filename,
BOOLEAN GetAllTables);
ACPI_STATUS
-AdParseTables (void);
+AdParseTable (
+ ACPI_TABLE_HEADER *Table);
ACPI_STATUS
AdDisplayTables (
- char *Filename);
+ char *Filename,
+ ACPI_TABLE_HEADER *Table);
ACPI_STATUS
AdDisplayStatistics (void);
diff --git a/sys/contrib/dev/acpica/acdebug.h b/sys/contrib/dev/acpica/acdebug.h
index 9127022..4ca325b 100644
--- a/sys/contrib/dev/acpica/acdebug.h
+++ b/sys/contrib/dev/acpica/acdebug.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
- * $Revision: 64 $
+ * $Revision: 70 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -122,7 +122,7 @@
typedef struct CommandInfo
{
- NATIVE_CHAR *Name; /* Command Name */
+ char *Name; /* Command Name */
UINT8 MinArgs; /* Minimum arguments required */
} COMMAND_INFO;
@@ -130,7 +130,7 @@ typedef struct CommandInfo
typedef struct ArgumentInfo
{
- NATIVE_CHAR *Name; /* Argument Name */
+ char *Name; /* Argument Name */
} ARGUMENT_INFO;
@@ -142,15 +142,15 @@ typedef struct ArgumentInfo
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
AcpiOsPrintf PARAM_LIST(fp);}
-#define EX_NO_SINGLE_STEP 1
-#define EX_SINGLE_STEP 2
+#define EX_NO_SINGLE_STEP 1
+#define EX_SINGLE_STEP 2
/* Prototypes */
/*
- * dbapi - external debugger interfaces
+ * dbxface - external debugger interfaces
*/
ACPI_STATUS
@@ -167,6 +167,15 @@ AcpiDbSingleStep (
ACPI_PARSE_OBJECT *Op,
UINT32 OpType);
+ACPI_STATUS
+AcpiDbStartCommand (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op);
+
+void
+AcpiDbMethodEnd (
+ ACPI_WALK_STATE *WalkState);
+
/*
* dbcmds - debug commands and output routines
@@ -174,16 +183,16 @@ AcpiDbSingleStep (
void
AcpiDbDisplayTableInfo (
- NATIVE_CHAR *TableArg);
+ char *TableArg);
void
AcpiDbUnloadAcpiTable (
- NATIVE_CHAR *TableArg,
- NATIVE_CHAR *InstanceArg);
+ char *TableArg,
+ char *InstanceArg);
void
AcpiDbSetMethodBreakpoint (
- NATIVE_CHAR *Location,
+ char *Location,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op);
@@ -193,46 +202,46 @@ AcpiDbSetMethodCallBreakpoint (
void
AcpiDbDisassembleAml (
- NATIVE_CHAR *Statements,
+ char *Statements,
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDumpNamespace (
- NATIVE_CHAR *StartArg,
- NATIVE_CHAR *DepthArg);
+ char *StartArg,
+ char *DepthArg);
void
AcpiDbDumpNamespaceByOwner (
- NATIVE_CHAR *OwnerArg,
- NATIVE_CHAR *DepthArg);
+ char *OwnerArg,
+ char *DepthArg);
void
AcpiDbSendNotify (
- NATIVE_CHAR *Name,
+ char *Name,
UINT32 Value);
void
AcpiDbSetMethodData (
- NATIVE_CHAR *TypeArg,
- NATIVE_CHAR *IndexArg,
- NATIVE_CHAR *ValueArg);
+ char *TypeArg,
+ char *IndexArg,
+ char *ValueArg);
ACPI_STATUS
AcpiDbDisplayObjects (
- NATIVE_CHAR *ObjTypeArg,
- NATIVE_CHAR *DisplayCountArg);
+ char *ObjTypeArg,
+ char *DisplayCountArg);
ACPI_STATUS
AcpiDbFindNameInNamespace (
- NATIVE_CHAR *NameArg);
+ char *NameArg);
void
AcpiDbSetScope (
- NATIVE_CHAR *Name);
+ char *Name);
void
AcpiDbFindReferences (
- NATIVE_CHAR *ObjectArg);
+ char *ObjectArg);
void
AcpiDbDisplayLocks (void);
@@ -240,7 +249,10 @@ AcpiDbDisplayLocks (void);
void
AcpiDbDisplayResources (
- NATIVE_CHAR *ObjectArg);
+ char *ObjectArg);
+
+void
+AcpiDbDisplayGpes (void);
void
AcpiDbCheckIntegrity (
@@ -274,6 +286,10 @@ AcpiDbWalkForSpecificObjects (
void *Context,
void **ReturnValue);
+void
+AcpiDbGenerateGpe (
+ char *GpeArg,
+ char *BlockArg);
/*
* dbdisply - debug display commands
@@ -285,8 +301,8 @@ AcpiDbDisplayMethodInfo (
void
AcpiDbDecodeAndDisplayObject (
- NATIVE_CHAR *Target,
- NATIVE_CHAR *OutputType);
+ char *Target,
+ char *OutputType);
void
AcpiDbDecodeNode (
@@ -299,7 +315,7 @@ AcpiDbDisplayResultObject (
ACPI_STATUS
AcpiDbDisplayAllMethods (
- NATIVE_CHAR *DisplayCountArg);
+ char *DisplayCountArg);
void
AcpiDbDisplayInternalObject (
@@ -346,15 +362,15 @@ AcpiDbDecodeInternalObject (
void
AcpiDbExecute (
- NATIVE_CHAR *Name,
- NATIVE_CHAR **Args,
+ char *Name,
+ char **Args,
UINT32 Flags);
void
AcpiDbCreateExecutionThreads (
- NATIVE_CHAR *NumThreadsArg,
- NATIVE_CHAR *NumLoopsArg,
- NATIVE_CHAR *MethodNameArg);
+ char *NumThreadsArg,
+ char *NumLoopsArg,
+ char *MethodNameArg);
ACPI_STATUS
AcpiDbExecuteMethod (
@@ -373,6 +389,13 @@ void ACPI_SYSTEM_XFACE
AcpiDbMethodThread (
void *Context);
+ACPI_STATUS
+AcpiDbExecutionWalk (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue);
+
/*
* dbfileio - Debugger file I/O commands
@@ -380,7 +403,7 @@ AcpiDbMethodThread (
ACPI_OBJECT_TYPE
AcpiDbMatchArgument (
- NATIVE_CHAR *UserArgument,
+ char *UserArgument,
ARGUMENT_INFO *Arguments);
ACPI_STATUS
@@ -393,15 +416,21 @@ AcpiDbCloseDebugFile (
void
AcpiDbOpenDebugFile (
- NATIVE_CHAR *Name);
+ char *Name);
ACPI_STATUS
AcpiDbLoadAcpiTable (
- NATIVE_CHAR *Filename);
+ char *Filename);
+
+ACPI_STATUS
+AcpiDbGetTableFromFile (
+ char *Filename,
+ ACPI_TABLE_HEADER **Table);
ACPI_STATUS
-AcpiDbGetAcpiTable (
- NATIVE_CHAR *Filename);
+AcpiDbReadTableFromFile (
+ char *Filename,
+ ACPI_TABLE_HEADER **Table);
/*
* dbhistry - debugger HISTORY command
@@ -409,14 +438,14 @@ AcpiDbGetAcpiTable (
void
AcpiDbAddToHistory (
- NATIVE_CHAR *CommandLine);
+ char *CommandLine);
void
AcpiDbDisplayHistory (void);
-NATIVE_CHAR *
+char *
AcpiDbGetFromHistory (
- NATIVE_CHAR *CommandNumArg);
+ char *CommandNumArg);
/*
@@ -425,7 +454,7 @@ AcpiDbGetFromHistory (
ACPI_STATUS
AcpiDbCommandDispatch (
- NATIVE_CHAR *InputBuffer,
+ char *InputBuffer,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op);
@@ -435,25 +464,25 @@ AcpiDbExecuteThread (
ACPI_STATUS
AcpiDbUserCommands (
- NATIVE_CHAR Prompt,
+ char Prompt,
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDisplayHelp (
- NATIVE_CHAR *HelpType);
+ char *HelpType);
-NATIVE_CHAR *
+char *
AcpiDbGetNextToken (
- NATIVE_CHAR *String,
- NATIVE_CHAR **Next);
+ char *String,
+ char **Next);
UINT32
AcpiDbGetLine (
- NATIVE_CHAR *InputBuffer);
+ char *InputBuffer);
UINT32
AcpiDbMatchCommand (
- NATIVE_CHAR *UserCommand);
+ char *UserCommand);
void
AcpiDbSingleThread (
@@ -472,7 +501,7 @@ AcpiDbGenerateStatistics (
ACPI_STATUS
AcpiDbDisplayStatistics (
- NATIVE_CHAR *TypeArg);
+ char *TypeArg);
ACPI_STATUS
AcpiDbClassifyOneObject (
@@ -509,7 +538,7 @@ AcpiDbDumpObject (
void
AcpiDbPrepNamestring (
- NATIVE_CHAR *Name);
+ char *Name);
ACPI_STATUS
@@ -518,7 +547,7 @@ AcpiDbSecondPassParse (
ACPI_NAMESPACE_NODE *
AcpiDbLocalNsLookup (
- NATIVE_CHAR *Name);
+ char *Name);
#endif /* __ACDEBUG_H__ */
diff --git a/sys/contrib/dev/acpica/acdisasm.h b/sys/contrib/dev/acpica/acdisasm.h
index f0eb26b..021d189 100644
--- a/sys/contrib/dev/acpica/acdisasm.h
+++ b/sys/contrib/dev/acpica/acdisasm.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdisasm.h - AML disassembler
- * $Revision: 5 $
+ * $Revision: 8 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -141,10 +141,10 @@ extern const char *AcpiGbl_SHRDecode[2];
extern const char *AcpiGbl_TYPDecode[4];
extern const char *AcpiGbl_BMDecode[2];
extern const char *AcpiGbl_SIZDecode[4];
-extern const NATIVE_CHAR *AcpiGbl_LockRule[NUM_LOCK_RULES];
-extern const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES];
-extern const NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES];
-extern const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS];
+extern const char *AcpiGbl_LockRule[ACPI_NUM_LOCK_RULES];
+extern const char *AcpiGbl_AccessTypes[ACPI_NUM_ACCESS_TYPES];
+extern const char *AcpiGbl_UpdateRules[ACPI_NUM_UPDATE_RULES];
+extern const char *AcpiGbl_MatchOps[ACPI_NUM_MATCH_OPS];
typedef struct acpi_op_walk_info
@@ -210,7 +210,7 @@ AcpiDmDisassemble (
void
AcpiDmNamestring (
- NATIVE_CHAR *Name);
+ char *Name);
void
AcpiDmDisplayPath (
diff --git a/sys/contrib/dev/acpica/acdispat.h b/sys/contrib/dev/acpica/acdispat.h
index 9ac94e1..bd14a6a 100644
--- a/sys/contrib/dev/acpica/acdispat.h
+++ b/sys/contrib/dev/acpica/acdispat.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
- * $Revision: 55 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acefi.h b/sys/contrib/dev/acpica/acefi.h
index 4c39ef7..a7d7bb0 100644
--- a/sys/contrib/dev/acpica/acefi.h
+++ b/sys/contrib/dev/acpica/acefi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acefi.h - OS specific defines, etc.
- * $Revision: 12 $
+ * $Revision: 13 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acevents.h b/sys/contrib/dev/acpica/acevents.h
index baa7cb8..a18b999 100644
--- a/sys/contrib/dev/acpica/acevents.h
+++ b/sys/contrib/dev/acpica/acevents.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
- * $Revision: 80 $
+ * $Revision: 83 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -165,10 +165,6 @@ AcpiEvInitGlobalLockHandler (
void);
UINT32
-AcpiEvGetGpeRegisterIndex (
- UINT32 GpeNumber);
-
-UINT32
AcpiEvGetGpeNumberIndex (
UINT32 GpeNumber);
@@ -186,17 +182,17 @@ AcpiEvNotifyDispatch (
* Evgpe - GPE handling and dispatch
*/
-ACPI_STATUS
-AcpiEvGpeInitialize (
- void);
+ACPI_GPE_EVENT_INFO *
+AcpiEvGetGpeEventInfo (
+ UINT32 GpeNumber);
ACPI_STATUS
-AcpiEvInitGpeControlMethods (
+AcpiEvGpeInitialize (
void);
UINT32
AcpiEvGpeDispatch (
- UINT32 GpeNumber);
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
UINT32
AcpiEvGpeDetect (
diff --git a/sys/contrib/dev/acpica/acexcep.h b/sys/contrib/dev/acpica/acexcep.h
index ffc2075..9034a4a 100644
--- a/sys/contrib/dev/acpica/acexcep.h
+++ b/sys/contrib/dev/acpica/acexcep.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
- * $Revision: 64 $
+ * $Revision: 67 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -166,8 +166,9 @@
#define AE_NO_HARDWARE_RESPONSE (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL)
#define AE_NO_GLOBAL_LOCK (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL)
#define AE_LOGICAL_ADDRESS (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL)
+#define AE_ABORT_METHOD (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL)
-#define AE_CODE_ENV_MAX 0x001B
+#define AE_CODE_ENV_MAX 0x001C
/*
* Programmer exceptions
@@ -261,7 +262,7 @@
* String versions of the exception codes above
* These strings must match the corresponding defines exactly
*/
-NATIVE_CHAR const *AcpiGbl_ExceptionNames_Env[] =
+char const *AcpiGbl_ExceptionNames_Env[] =
{
"AE_OK",
"AE_ERROR",
@@ -290,10 +291,11 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Env[] =
"AE_ALREADY_ACQUIRED",
"AE_NO_HARDWARE_RESPONSE",
"AE_NO_GLOBAL_LOCK",
- "AE_LOGICAL_ADDRESS"
+ "AE_LOGICAL_ADDRESS",
+ "AE_ABORT_METHOD"
};
-NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
+char const *AcpiGbl_ExceptionNames_Pgm[] =
{
"AE_BAD_PARAMETER",
"AE_BAD_CHARACTER",
@@ -306,7 +308,7 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
"AE_BAD_DECIMAL_CONSTANT"
};
-NATIVE_CHAR const *AcpiGbl_ExceptionNames_Tbl[] =
+char const *AcpiGbl_ExceptionNames_Tbl[] =
{
"AE_BAD_SIGNATURE",
"AE_BAD_HEADER",
@@ -316,7 +318,7 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Tbl[] =
"AE_INVALID_TABLE_LENGTH"
};
-NATIVE_CHAR const *AcpiGbl_ExceptionNames_Aml[] =
+char const *AcpiGbl_ExceptionNames_Aml[] =
{
"AE_AML_ERROR",
"AE_AML_PARSE",
@@ -352,7 +354,7 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_CIRCULAR_REFERENCE"
};
-NATIVE_CHAR const *AcpiGbl_ExceptionNames_Ctrl[] =
+char const *AcpiGbl_ExceptionNames_Ctrl[] =
{
"AE_CTRL_RETURN_VALUE",
"AE_CTRL_PENDING",
diff --git a/sys/contrib/dev/acpica/acglobal.h b/sys/contrib/dev/acpica/acglobal.h
index 0153dfa..92541f7 100644
--- a/sys/contrib/dev/acpica/acglobal.h
+++ b/sys/contrib/dev/acpica/acglobal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
- * $Revision: 132 $
+ * $Revision: 137 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -232,9 +232,9 @@ ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_StartupFlags;
extern const UINT8 AcpiGbl_DecodeTo8bit[8];
-extern const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES];
+extern const char *AcpiGbl_DbSleepStates[ACPI_S_STATE_COUNT];
extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
-extern const NATIVE_CHAR *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
/*****************************************************************************
@@ -307,22 +307,7 @@ ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB;
extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
-
-ACPI_EXTERN ACPI_HANDLE AcpiGbl_GpeObjHandle;
-ACPI_EXTERN UINT32 AcpiGbl_GpeRegisterCount;
-ACPI_EXTERN UINT32 AcpiGbl_GpeNumberMax;
-ACPI_EXTERN ACPI_GPE_REGISTER_INFO *AcpiGbl_GpeRegisterInfo;
-ACPI_EXTERN ACPI_GPE_NUMBER_INFO *AcpiGbl_GpeNumberInfo;
-ACPI_EXTERN ACPI_GPE_BLOCK_INFO AcpiGbl_GpeBlockInfo[ACPI_MAX_GPE_BLOCKS];
-
-/*
- * GPE translation table
- * Indexed by the GPE number, returns a valid index into the global GPE tables.
- *
- * This table is needed because the GPE numbers supported by block 1 do not
- * have to be contiguous with the GPE numbers supported by block 0.
- */
-ACPI_EXTERN ACPI_GPE_INDEX_INFO *AcpiGbl_GpeNumberToIndex;
+ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeBlockListHead;
/*****************************************************************************
@@ -344,24 +329,25 @@ ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_verbose;
#ifdef ACPI_DEBUGGER
extern BOOLEAN AcpiGbl_MethodExecuting;
+extern BOOLEAN AcpiGbl_AbortMethod;
extern BOOLEAN AcpiGbl_DbTerminateThreads;
ACPI_EXTERN int optind;
-ACPI_EXTERN NATIVE_CHAR *optarg;
+ACPI_EXTERN char *optarg;
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_tables;
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_stats;
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_ini_methods;
-ACPI_EXTERN NATIVE_CHAR *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbLineBuf[80];
-ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbParsedBuf[80];
-ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbScopeBuf[40];
-ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbDebugFilename[40];
+ACPI_EXTERN char *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
+ACPI_EXTERN char AcpiGbl_DbLineBuf[80];
+ACPI_EXTERN char AcpiGbl_DbParsedBuf[80];
+ACPI_EXTERN char AcpiGbl_DbScopeBuf[40];
+ACPI_EXTERN char AcpiGbl_DbDebugFilename[40];
ACPI_EXTERN BOOLEAN AcpiGbl_DbOutputToFile;
-ACPI_EXTERN NATIVE_CHAR *AcpiGbl_DbBuffer;
-ACPI_EXTERN NATIVE_CHAR *AcpiGbl_DbFilename;
+ACPI_EXTERN char *AcpiGbl_DbBuffer;
+ACPI_EXTERN char *AcpiGbl_DbFilename;
ACPI_EXTERN UINT32 AcpiGbl_DbDebugLevel;
ACPI_EXTERN UINT32 AcpiGbl_DbConsoleDebugLevel;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DbTablePtr;
diff --git a/sys/contrib/dev/acpica/achware.h b/sys/contrib/dev/acpica/achware.h
index 4411ea2..addc164 100644
--- a/sys/contrib/dev/acpica/achware.h
+++ b/sys/contrib/dev/acpica/achware.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: achware.h -- hardware specific interfaces
- * $Revision: 60 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -188,29 +188,25 @@ AcpiHwClearAcpiStatus (
/* GPE support */
-UINT8
-AcpiHwGetGpeBitMask (
- UINT32 GpeNumber);
-
ACPI_STATUS
AcpiHwEnableGpe (
- UINT32 GpeNumber);
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
void
AcpiHwEnableGpeForWakeup (
- UINT32 GpeNumber);
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
ACPI_STATUS
AcpiHwDisableGpe (
- UINT32 GpeNumber);
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
void
AcpiHwDisableGpeForWakeup (
- UINT32 GpeNumber);
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
ACPI_STATUS
AcpiHwClearGpe (
- UINT32 GpeNumber);
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
ACPI_STATUS
AcpiHwGetGpeStatus (
diff --git a/sys/contrib/dev/acpica/acinterp.h b/sys/contrib/dev/acpica/acinterp.h
index be9c087..240981f 100644
--- a/sys/contrib/dev/acpica/acinterp.h
+++ b/sys/contrib/dev/acpica/acinterp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
- * $Revision: 142 $
+ * $Revision: 145 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -183,7 +183,8 @@ UINT32
AcpiExConvertToAscii (
ACPI_INTEGER Integer,
UINT32 Base,
- UINT8 *String);
+ UINT8 *String,
+ UINT8 MaxLength);
/*
* exfield - ACPI AML (p-code) execution - field manipulation
@@ -545,10 +546,10 @@ void
AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **Operands,
ACPI_INTERPRETER_MODE InterpreterMode,
- NATIVE_CHAR *Ident,
+ char *Ident,
UINT32 NumLevels,
- NATIVE_CHAR *Note,
- NATIVE_CHAR *ModuleName,
+ char *Note,
+ char *ModuleName,
UINT32 LineNumber);
void
@@ -586,7 +587,7 @@ AcpiExOutAddress (
* exnames - interpreter/scanner name load/execute
*/
-NATIVE_CHAR *
+char *
AcpiExAllocateNameString (
UINT32 PrefixCount,
UINT32 NumNameSegs);
@@ -598,13 +599,13 @@ AcpiExGoodChar (
ACPI_STATUS
AcpiExNameSegment (
UINT8 **InAmlAddress,
- NATIVE_CHAR *NameString);
+ char *NameString);
ACPI_STATUS
AcpiExGetNameString (
ACPI_OBJECT_TYPE DataType,
UINT8 *InAmlAddress,
- NATIVE_CHAR **OutNameString,
+ char **OutNameString,
UINT32 *OutNameLength);
ACPI_STATUS
@@ -720,12 +721,12 @@ AcpiExDigitsNeeded (
void
AcpiExEisaIdToString (
UINT32 NumericId,
- NATIVE_CHAR *OutString);
+ char *OutString);
void
AcpiExUnsignedIntegerToString (
ACPI_INTEGER Value,
- NATIVE_CHAR *OutString);
+ char *OutString);
/*
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h
index f2baeb8..4144788 100644
--- a/sys/contrib/dev/acpica/aclocal.h
+++ b/sys/contrib/dev/acpica/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 179 $
+ * $Revision: 189 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,7 +120,7 @@
#define ACPI_WAIT_FOREVER 0xFFFF /* UINT16, as per ACPI spec */
-typedef void* ACPI_MUTEX;
+typedef void * ACPI_MUTEX;
typedef UINT32 ACPI_MUTEX_HANDLE;
@@ -169,7 +169,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
/* Names for the mutexes used in the subsystem */
-static NATIVE_CHAR *AcpiGbl_MutexNames[] =
+static char *AcpiGbl_MutexNames[] =
{
"ACPI_MTX_Execute",
"ACPI_MTX_Interpreter",
@@ -192,7 +192,7 @@ static NATIVE_CHAR *AcpiGbl_MutexNames[] =
/* Table for the global mutexes */
-typedef struct AcpiMutexInfo
+typedef struct acpi_mutex_info
{
ACPI_MUTEX Mutex;
UINT32 UseCount;
@@ -257,23 +257,24 @@ typedef enum
typedef union acpi_name_union
{
- UINT32 Integer;
- char Ascii[4];
+ UINT32 Integer;
+ char Ascii[4];
+
} ACPI_NAME_UNION;
-typedef struct acpi_node
+typedef struct acpi_namespace_node
{
- UINT8 Descriptor; /* Used to differentiate object descriptor types */
- UINT8 Type; /* Type associated with this name */
- UINT16 OwnerId;
- ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */
+ UINT8 Descriptor; /* Used to differentiate object descriptor types */
+ UINT8 Type; /* Type associated with this name */
+ UINT16 OwnerId;
+ ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */
- union acpi_operand_obj *Object; /* Pointer to attached ACPI object (optional) */
- struct acpi_node *Child; /* first child */
- struct acpi_node *Peer; /* Next peer*/
- UINT16 ReferenceCount; /* Current count of references and children */
- UINT8 Flags;
+ union acpi_operand_object *Object; /* Pointer to attached ACPI object (optional) */
+ struct acpi_namespace_node *Child; /* first child */
+ struct acpi_namespace_node *Peer; /* Next peer*/
+ UINT16 ReferenceCount; /* Current count of references and children */
+ UINT8 Flags;
} ACPI_NAMESPACE_NODE;
@@ -297,11 +298,11 @@ typedef struct acpi_node
/*
* ACPI Table Descriptor. One per ACPI table
*/
-typedef struct AcpiTableDesc
+typedef struct acpi_table_desc
{
- struct AcpiTableDesc *Prev;
- struct AcpiTableDesc *Next;
- struct AcpiTableDesc *InstalledDesc;
+ struct acpi_table_desc *Prev;
+ struct acpi_table_desc *Next;
+ struct acpi_table_desc *InstalledDesc;
ACPI_TABLE_HEADER *Pointer;
UINT8 *AmlStart;
UINT64 PhysicalAddress;
@@ -316,29 +317,30 @@ typedef struct AcpiTableDesc
} ACPI_TABLE_DESC;
-typedef struct
+typedef struct acpi_find_context
{
- NATIVE_CHAR *SearchFor;
+ char *SearchFor;
ACPI_HANDLE *List;
UINT32 *Count;
} ACPI_FIND_CONTEXT;
-typedef struct
+typedef struct acpi_ns_search_data
{
ACPI_NAMESPACE_NODE *Node;
+
} ACPI_NS_SEARCH_DATA;
/*
* Predefined Namespace items
*/
-typedef struct
+typedef struct acpi_predefined_names
{
- NATIVE_CHAR *Name;
+ char *Name;
UINT8 Type;
- NATIVE_CHAR *Val;
+ char *Val;
} ACPI_PREDEFINED_NAMES;
@@ -353,9 +355,9 @@ typedef struct
typedef struct acpi_namestring_info
{
- NATIVE_CHAR *ExternalName;
- NATIVE_CHAR *NextExternalChar;
- NATIVE_CHAR *InternalName;
+ char *ExternalName;
+ char *NextExternalChar;
+ char *InternalName;
UINT32 Length;
UINT32 NumSegments;
UINT32 NumCarats;
@@ -366,7 +368,7 @@ typedef struct acpi_namestring_info
/* Field creation info */
-typedef struct
+typedef struct acpi_create_field_info
{
ACPI_NAMESPACE_NODE *RegionNode;
ACPI_NAMESPACE_NODE *FieldNode;
@@ -388,27 +390,29 @@ typedef struct
*
****************************************************************************/
-/* Information about each GPE register block */
+/* Information about each particular GPE level */
-typedef struct
+typedef struct acpi_gpe_event_info
{
- UINT8 AddressSpaceId;
- ACPI_GENERIC_ADDRESS *BlockAddress;
- UINT16 RegisterCount;
- UINT8 BlockBaseNumber;
+ ACPI_NAMESPACE_NODE *MethodNode; /* Method node for this GPE level */
+ ACPI_GPE_HANDLER Handler; /* Address of handler, if any */
+ void *Context; /* Context to be passed to handler */
+ struct acpi_gpe_register_info *RegisterInfo;
+ UINT8 Type; /* Level or Edge */
+ UINT8 BitMask;
-} ACPI_GPE_BLOCK_INFO;
+} ACPI_GPE_EVENT_INFO;
/* Information about a particular GPE register pair */
-typedef struct
+typedef struct acpi_gpe_register_info
{
- ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */
- ACPI_GENERIC_ADDRESS EnableAddress; /* Address of enable reg */
- UINT8 Status; /* Current value of status reg */
- UINT8 Enable; /* Current value of enable reg */
- UINT8 WakeEnable; /* Mask of bits to keep enabled when sleeping */
- UINT8 BaseGpeNumber; /* Base GPE number for this register */
+ ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */
+ ACPI_GENERIC_ADDRESS EnableAddress; /* Address of enable reg */
+ UINT8 Status; /* Current value of status reg */
+ UINT8 Enable; /* Current value of enable reg */
+ UINT8 WakeEnable; /* Mask of bits to keep enabled when sleeping */
+ UINT8 BaseGpeNumber; /* Base GPE number for this register */
} ACPI_GPE_REGISTER_INFO;
@@ -417,29 +421,25 @@ typedef struct
#define ACPI_GPE_EDGE_TRIGGERED 2
-/* Information about each particular GPE level */
+/* Information about each GPE register block */
-typedef struct
+typedef struct acpi_gpe_block_info
{
- ACPI_HANDLE MethodHandle; /* Method handle for direct (fast) execution */
- ACPI_GPE_HANDLER Handler; /* Address of handler, if any */
- void *Context; /* Context to be passed to handler */
- UINT8 Type; /* Level or Edge */
- UINT8 BitMask;
-
-
-} ACPI_GPE_NUMBER_INFO;
-
+ struct acpi_gpe_block_info *Previous;
+ struct acpi_gpe_block_info *Next;
+ struct acpi_gpe_block_info *NextOnInterrupt;
+ ACPI_GPE_REGISTER_INFO *RegisterInfo;
+ ACPI_GPE_EVENT_INFO *EventInfo;
+ ACPI_GENERIC_ADDRESS BlockAddress;
+ UINT32 RegisterCount;
+ UINT8 BlockBaseNumber;
-typedef struct
-{
- UINT8 NumberIndex;
+} ACPI_GPE_BLOCK_INFO;
-} ACPI_GPE_INDEX_INFO;
/* Information about each particular fixed event */
-typedef struct
+typedef struct acpi_fixed_event_handler
{
ACPI_EVENT_HANDLER Handler; /* Address of handler. */
void *Context; /* Context to be passed to handler */
@@ -447,7 +447,7 @@ typedef struct
} ACPI_FIXED_EVENT_HANDLER;
-typedef struct
+typedef struct acpi_fixed_event_info
{
UINT8 StatusRegisterId;
UINT8 EnableRegisterId;
@@ -458,7 +458,7 @@ typedef struct
/* Information used during field processing */
-typedef struct
+typedef struct acpi_field_info
{
UINT8 SkipField;
UINT8 FieldFlag;
@@ -484,16 +484,16 @@ typedef struct
/* Forward declarations */
struct acpi_walk_state;
struct acpi_obj_mutex;
-union acpi_parse_obj;
+union acpi_parse_object;
#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
- UINT8 DataType; /* To differentiate various internal objs */\
- UINT8 Flags; \
- UINT16 Value; \
- UINT16 State; \
- UINT16 Reserved; \
- void *Next; \
+ UINT8 DataType; /* To differentiate various internal objs */\
+ UINT8 Flags; \
+ UINT16 Value; \
+ UINT16 State; \
+ UINT16 Reserved; \
+ void *Next; \
typedef struct acpi_common_state
{
@@ -507,7 +507,7 @@ typedef struct acpi_common_state
typedef struct acpi_update_state
{
ACPI_STATE_COMMON
- union acpi_operand_obj *Object;
+ union acpi_operand_object *Object;
} ACPI_UPDATE_STATE;
@@ -518,12 +518,12 @@ typedef struct acpi_update_state
typedef struct acpi_pkg_state
{
ACPI_STATE_COMMON
- union acpi_operand_obj *SourceObject;
- union acpi_operand_obj *DestObject;
- struct acpi_walk_state *WalkState;
- void *ThisTargetObj;
- UINT32 NumPackages;
- UINT16 Index;
+ union acpi_operand_object *SourceObject;
+ union acpi_operand_object *DestObject;
+ struct acpi_walk_state *WalkState;
+ void *ThisTargetObj;
+ UINT32 NumPackages;
+ UINT16 Index;
} ACPI_PKG_STATE;
@@ -535,10 +535,10 @@ typedef struct acpi_pkg_state
typedef struct acpi_control_state
{
ACPI_STATE_COMMON
- union acpi_parse_obj *PredicateOp;
- UINT8 *AmlPredicateStart; /* Start of if/while predicate */
- UINT8 *PackageEnd; /* End of if/while block */
- UINT16 Opcode;
+ union acpi_parse_object *PredicateOp;
+ UINT8 *AmlPredicateStart; /* Start of if/while predicate */
+ UINT8 *PackageEnd; /* End of if/while block */
+ UINT16 Opcode;
} ACPI_CONTROL_STATE;
@@ -549,7 +549,7 @@ typedef struct acpi_control_state
typedef struct acpi_scope_state
{
ACPI_STATE_COMMON
- ACPI_NAMESPACE_NODE *Node;
+ ACPI_NAMESPACE_NODE *Node;
} ACPI_SCOPE_STATE;
@@ -557,11 +557,11 @@ typedef struct acpi_scope_state
typedef struct acpi_pscope_state
{
ACPI_STATE_COMMON
- union acpi_parse_obj *Op; /* current op being parsed */
- UINT8 *ArgEnd; /* current argument end */
- UINT8 *PkgEnd; /* current package end */
- UINT32 ArgList; /* next argument to parse */
- UINT32 ArgCount; /* Number of fixed arguments */
+ union acpi_parse_object *Op; /* current op being parsed */
+ UINT8 *ArgEnd; /* current argument end */
+ UINT8 *PkgEnd; /* current package end */
+ UINT32 ArgList; /* next argument to parse */
+ UINT32 ArgCount; /* Number of fixed arguments */
} ACPI_PSCOPE_STATE;
@@ -573,10 +573,10 @@ typedef struct acpi_pscope_state
typedef struct acpi_thread_state
{
ACPI_STATE_COMMON
- struct acpi_walk_state *WalkStateList; /* Head of list of WalkStates for this thread */
- union acpi_operand_obj *AcquiredMutexList; /* List of all currently acquired mutexes */
- UINT32 ThreadId; /* Running thread ID */
- UINT16 CurrentSyncLevel; /* Mutex Sync (nested acquire) level */
+ struct acpi_walk_state *WalkStateList; /* Head of list of WalkStates for this thread */
+ union acpi_operand_object *AcquiredMutexList; /* List of all currently acquired mutexes */
+ UINT32 ThreadId; /* Running thread ID */
+ UINT16 CurrentSyncLevel; /* Mutex Sync (nested acquire) level */
} ACPI_THREAD_STATE;
@@ -588,21 +588,21 @@ typedef struct acpi_thread_state
typedef struct acpi_result_values
{
ACPI_STATE_COMMON
- union acpi_operand_obj *ObjDesc [OBJ_NUM_OPERANDS];
- UINT8 NumResults;
- UINT8 LastInsert;
+ union acpi_operand_object *ObjDesc [ACPI_OBJ_NUM_OPERANDS];
+ UINT8 NumResults;
+ UINT8 LastInsert;
} ACPI_RESULT_VALUES;
typedef
ACPI_STATUS (*ACPI_PARSE_DOWNWARDS) (
- struct acpi_walk_state *WalkState,
- union acpi_parse_obj **OutOp);
+ struct acpi_walk_state *WalkState,
+ union acpi_parse_object **OutOp);
typedef
ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
- struct acpi_walk_state *WalkState);
+ struct acpi_walk_state *WalkState);
/*
@@ -612,25 +612,25 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
typedef struct acpi_notify_info
{
ACPI_STATE_COMMON
- ACPI_NAMESPACE_NODE *Node;
- union acpi_operand_obj *HandlerObj;
+ ACPI_NAMESPACE_NODE *Node;
+ union acpi_operand_object *HandlerObj;
} ACPI_NOTIFY_INFO;
/* Generic state is union of structs above */
-typedef union acpi_gen_state
+typedef union acpi_generic_state
{
- ACPI_COMMON_STATE Common;
- ACPI_CONTROL_STATE Control;
- ACPI_UPDATE_STATE Update;
- ACPI_SCOPE_STATE Scope;
- ACPI_PSCOPE_STATE ParseScope;
- ACPI_PKG_STATE Pkg;
- ACPI_THREAD_STATE Thread;
- ACPI_RESULT_VALUES Results;
- ACPI_NOTIFY_INFO Notify;
+ ACPI_COMMON_STATE Common;
+ ACPI_CONTROL_STATE Control;
+ ACPI_UPDATE_STATE Update;
+ ACPI_SCOPE_STATE Scope;
+ ACPI_PSCOPE_STATE ParseScope;
+ ACPI_PKG_STATE Pkg;
+ ACPI_THREAD_STATE Thread;
+ ACPI_RESULT_VALUES Results;
+ ACPI_NOTIFY_INFO Notify;
} ACPI_GENERIC_STATE;
@@ -643,7 +643,7 @@ typedef union acpi_gen_state
typedef
ACPI_STATUS (*ACPI_EXECUTE_OP) (
- struct acpi_walk_state *WalkState);
+ struct acpi_walk_state *WalkState);
/*****************************************************************************
@@ -658,48 +658,49 @@ ACPI_STATUS (*ACPI_EXECUTE_OP) (
typedef struct acpi_opcode_info
{
#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
- NATIVE_CHAR *Name; /* Opcode name (disassembler/debug only) */
+ char *Name; /* Opcode name (disassembler/debug only) */
#endif
- UINT32 ParseArgs; /* Grammar/Parse time arguments */
- UINT32 RuntimeArgs; /* Interpret time arguments */
- UINT32 Flags; /* Misc flags */
- UINT8 ObjectType; /* Corresponding internal object type */
- UINT8 Class; /* Opcode class */
- UINT8 Type; /* Opcode type */
+ UINT32 ParseArgs; /* Grammar/Parse time arguments */
+ UINT32 RuntimeArgs; /* Interpret time arguments */
+ UINT32 Flags; /* Misc flags */
+ UINT8 ObjectType; /* Corresponding internal object type */
+ UINT8 Class; /* Opcode class */
+ UINT8 Type; /* Opcode type */
} ACPI_OPCODE_INFO;
-typedef union acpi_parse_val
+typedef union acpi_parse_value
{
- ACPI_INTEGER Integer; /* integer constant (Up to 64 bits) */
- UINT64_STRUCT Integer64; /* Structure overlay for 2 32-bit Dwords */
- UINT32 Integer32; /* integer constant, 32 bits only */
- UINT16 Integer16; /* integer constant, 16 bits only */
- UINT8 Integer8; /* integer constant, 8 bits only */
- UINT32 Size; /* bytelist or field size */
- NATIVE_CHAR *String; /* NULL terminated string */
- UINT8 *Buffer; /* buffer or string */
- NATIVE_CHAR *Name; /* NULL terminated string */
- union acpi_parse_obj *Arg; /* arguments and contained ops */
+ ACPI_INTEGER Integer; /* integer constant (Up to 64 bits) */
+ UINT64_STRUCT Integer64; /* Structure overlay for 2 32-bit Dwords */
+ UINT32 Integer32; /* integer constant, 32 bits only */
+ UINT16 Integer16; /* integer constant, 16 bits only */
+ UINT8 Integer8; /* integer constant, 8 bits only */
+ UINT32 Size; /* bytelist or field size */
+ char *String; /* NULL terminated string */
+ UINT8 *Buffer; /* buffer or string */
+ char *Name; /* NULL terminated string */
+ union acpi_parse_object *Arg; /* arguments and contained ops */
} ACPI_PARSE_VALUE;
#define ACPI_PARSE_COMMON \
- UINT8 DataType; /* To differentiate various internal objs */\
- UINT8 Flags; /* Type of Op */\
- UINT16 AmlOpcode; /* AML opcode */\
- UINT32 AmlOffset; /* offset of declaration in AML */\
- union acpi_parse_obj *Parent; /* parent op */\
- union acpi_parse_obj *Next; /* next op */\
+ UINT8 DataType; /* To differentiate various internal objs */\
+ UINT8 Flags; /* Type of Op */\
+ UINT16 AmlOpcode; /* AML opcode */\
+ UINT32 AmlOffset; /* offset of declaration in AML */\
+ union acpi_parse_object *Parent; /* parent op */\
+ union acpi_parse_object *Next; /* next op */\
ACPI_DISASM_ONLY_MEMBERS (\
- UINT8 DisasmFlags; /* Used during AML disassembly */\
- UINT8 DisasmOpcode; /* Subtype used for disassembly */\
- NATIVE_CHAR AmlOpName[16]) /* op name (debug only) */\
- /* NON-DEBUG members below: */\
- ACPI_NAMESPACE_NODE *Node; /* for use by interpreter */\
- ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
+ UINT8 DisasmFlags; /* Used during AML disassembly */\
+ UINT8 DisasmOpcode; /* Subtype used for disassembly */\
+ char AmlOpName[16]) /* op name (debug only) */\
+ /* NON-DEBUG members below: */\
+ ACPI_NAMESPACE_NODE *Node; /* for use by interpreter */\
+ ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
+
#define ACPI_DASM_BUFFER 0x00
#define ACPI_DASM_RESOURCE 0x01
@@ -711,7 +712,7 @@ typedef union acpi_parse_val
/*
* generic operation (for example: If, While, Store)
*/
-typedef struct acpi_parseobj_common
+typedef struct acpi_parse_obj_common
{
ACPI_PARSE_COMMON
} ACPI_PARSE_OBJ_COMMON;
@@ -721,27 +722,24 @@ typedef struct acpi_parseobj_common
* Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and OpRegions),
* and bytelists.
*/
-typedef struct acpi_parseobj_named
+typedef struct acpi_parse_obj_named
{
ACPI_PARSE_COMMON
- UINT8 *Path;
- UINT8 *Data; /* AML body or bytelist data */
- UINT32 Length; /* AML length */
- UINT32 Name; /* 4-byte name or zero if no name */
+ UINT8 *Path;
+ UINT8 *Data; /* AML body or bytelist data */
+ UINT32 Length; /* AML length */
+ UINT32 Name; /* 4-byte name or zero if no name */
} ACPI_PARSE_OBJ_NAMED;
/* The parse node is the fundamental element of the parse tree */
-typedef struct acpi_parseobj_asl
+typedef struct acpi_parse_obj_asl
{
ACPI_PARSE_COMMON
-
- union acpi_parse_obj *Child;
-
-
- union acpi_parse_obj *ParentMethod;
+ union acpi_parse_object *Child;
+ union acpi_parse_object *ParentMethod;
char *Filename;
char *ExternalName;
char *Namepath;
@@ -768,7 +766,7 @@ typedef struct acpi_parseobj_asl
} ACPI_PARSE_OBJ_ASL;
-typedef union acpi_parse_obj
+typedef union acpi_parse_object
{
ACPI_PARSE_OBJ_COMMON Common;
ACPI_PARSE_OBJ_NAMED Named;
@@ -783,16 +781,16 @@ typedef union acpi_parse_obj
*/
typedef struct acpi_parse_state
{
- UINT32 AmlSize;
- UINT8 *AmlStart; /* first AML byte */
- UINT8 *Aml; /* next AML byte */
- UINT8 *AmlEnd; /* (last + 1) AML byte */
- UINT8 *PkgStart; /* current package begin */
- UINT8 *PkgEnd; /* current package end */
- union acpi_parse_obj *StartOp; /* root of parse tree */
- struct acpi_node *StartNode;
- union acpi_gen_state *Scope; /* current scope */
- union acpi_parse_obj *StartScope;
+ UINT32 AmlSize;
+ UINT8 *AmlStart; /* first AML byte */
+ UINT8 *Aml; /* next AML byte */
+ UINT8 *AmlEnd; /* (last + 1) AML byte */
+ UINT8 *PkgStart; /* current package begin */
+ UINT8 *PkgEnd; /* current package end */
+ union acpi_parse_object *StartOp; /* root of parse tree */
+ struct acpi_namespace_node *StartNode;
+ union acpi_generic_state *Scope; /* current scope */
+ union acpi_parse_object *StartScope;
} ACPI_PARSE_STATE;
@@ -821,11 +819,11 @@ typedef struct acpi_parse_state
#define PCI_ROOT_HID_STRING "PNP0A03"
-typedef struct
+typedef struct acpi_bit_register_info
{
- UINT8 ParentRegister;
- UINT8 BitPosition;
- UINT16 AccessBitMask;
+ UINT8 ParentRegister;
+ UINT8 BitPosition;
+ UINT16 AccessBitMask;
} ACPI_BIT_REGISTER_INFO;
@@ -957,7 +955,7 @@ typedef struct
#define ACPI_DEVICE_ID_LENGTH 0x09
-typedef struct
+typedef struct acpi_device_id
{
char Buffer[ACPI_DEVICE_ID_LENGTH];
@@ -979,17 +977,24 @@ typedef struct
*
****************************************************************************/
-typedef struct dbmethodinfo
+typedef struct acpi_db_method_info
{
ACPI_HANDLE ThreadGate;
- NATIVE_CHAR *Name;
- NATIVE_CHAR **Args;
+ char *Name;
+ char **Args;
UINT32 Flags;
UINT32 NumLoops;
- NATIVE_CHAR Pathname[128];
+ char Pathname[128];
} ACPI_DB_METHOD_INFO;
+typedef struct acpi_integrity_info
+{
+ UINT32 Nodes;
+ UINT32 Objects;
+
+} ACPI_INTEGRITY_INFO;
+
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
#define ACPI_DB_CONSOLE_OUTPUT 0x02
@@ -1002,11 +1007,11 @@ typedef struct dbmethodinfo
*
****************************************************************************/
-typedef struct
+typedef struct acpi_debug_print_info
{
UINT32 ComponentId;
- NATIVE_CHAR *ProcName;
- NATIVE_CHAR *ModuleName;
+ char *ProcName;
+ char *ModuleName;
} ACPI_DEBUG_PRINT_INFO;
@@ -1018,21 +1023,21 @@ typedef struct
#define ACPI_MAX_MODULE_NAME 16
#define ACPI_COMMON_DEBUG_MEM_HEADER \
- struct AcpiDebugMemBlock *Previous; \
- struct AcpiDebugMemBlock *Next; \
+ struct acpi_debug_mem_block *Previous; \
+ struct acpi_debug_mem_block *Next; \
UINT32 Size; \
UINT32 Component; \
UINT32 Line; \
- NATIVE_CHAR Module[ACPI_MAX_MODULE_NAME]; \
+ char Module[ACPI_MAX_MODULE_NAME]; \
UINT8 AllocType;
-typedef struct
+typedef struct acpi_debug_mem_header
{
ACPI_COMMON_DEBUG_MEM_HEADER
} ACPI_DEBUG_MEM_HEADER;
-typedef struct AcpiDebugMemBlock
+typedef struct acpi_debug_mem_block
{
ACPI_COMMON_DEBUG_MEM_HEADER
UINT64 UserSpace;
@@ -1053,7 +1058,7 @@ typedef struct AcpiDebugMemBlock
#define ACPI_NUM_MEM_LISTS 7
-typedef struct
+typedef struct acpi_memory_list
{
void *ListHead;
UINT16 LinkOffset;
diff --git a/sys/contrib/dev/acpica/acmacros.h b/sys/contrib/dev/acpica/acmacros.h
index cf3a30e..998cab4 100644
--- a/sys/contrib/dev/acpica/acmacros.h
+++ b/sys/contrib/dev/acpica/acmacros.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
- * $Revision: 130 $
+ * $Revision: 137 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -175,12 +175,12 @@
/* Pointer arithmetic */
-#define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (NATIVE_UINT)(b))
-#define ACPI_PTR_DIFF(a,b) (NATIVE_UINT) ((char *)(a) - (char *)(b))
+#define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (ACPI_NATIVE_UINT)(b))
+#define ACPI_PTR_DIFF(a,b) (ACPI_NATIVE_UINT) ((char *)(a) - (char *)(b))
/* Pointer/Integer type conversions */
-#define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(NATIVE_UINT)i)
+#define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(ACPI_NATIVE_UINT)i)
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
#define ACPI_OFFSET(d,f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
#define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f)
@@ -269,8 +269,8 @@
/*
* Rounding macros (Power of two boundaries only)
*/
-#define ACPI_ROUND_DOWN(value,boundary) (((NATIVE_UINT)(value)) & (~(((NATIVE_UINT) boundary)-1)))
-#define ACPI_ROUND_UP(value,boundary) ((((NATIVE_UINT)(value)) + (((NATIVE_UINT) boundary)-1)) & (~(((NATIVE_UINT) boundary)-1)))
+#define ACPI_ROUND_DOWN(value,boundary) (((ACPI_NATIVE_UINT)(value)) & (~(((ACPI_NATIVE_UINT) boundary)-1)))
+#define ACPI_ROUND_UP(value,boundary) ((((ACPI_NATIVE_UINT)(value)) + (((ACPI_NATIVE_UINT) boundary)-1)) & (~(((ACPI_NATIVE_UINT) boundary)-1)))
#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4)
#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8)
@@ -360,32 +360,16 @@
#define ACPI_IS_SINGLE_TABLE(x) (((x) & 0x01) == ACPI_TABLE_SINGLE ? 1 : 0)
/*
- * Macro to check if a pointer is within an ACPI table.
- * Parameter (a) is the pointer to check. Parameter (b) must be defined
- * as a pointer to an ACPI_TABLE_HEADER. (b+1) then points past the header,
- * and ((UINT8 *)b+b->Length) points one byte past the end of the table.
- */
-#if ACPI_MACHINE_WIDTH != 16
-#define ACPI_IS_IN_ACPI_TABLE(a,b) (((UINT8 *)(a) >= (UINT8 *)(b + 1)) &&\
- ((UINT8 *)(a) < ((UINT8 *)b + b->Length)))
-
-#else
-#define ACPI_IS_IN_ACPI_TABLE(a,b) (_segment)(a) == (_segment)(b) &&\
- (((UINT8 *)(a) >= (UINT8 *)(b + 1)) &&\
- ((UINT8 *)(a) < ((UINT8 *)b + b->Length)))
-#endif
-
-/*
* Macros for the master AML opcode table
*/
#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
-#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {Name,PArgs,IArgs,Flags,ObjType,Class,Type}
+#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {Name,(UINT32)(PArgs),(UINT32)(IArgs),(UINT32)(Flags),ObjType,Class,Type}
#else
-#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {PArgs,IArgs,Flags,ObjType,Class,Type}
+#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {(UINT32)(PArgs),(UINT32)(IArgs),(UINT32)(Flags),ObjType,Class,Type}
#endif
#ifdef ACPI_DISASSEMBLER
-#define ACPI_DISASM_ONLY_MEMBERS(a) a;
+#define ACPI_DISASM_ONLY_MEMBERS(a) a;
#else
#define ACPI_DISASM_ONLY_MEMBERS(a)
#endif
@@ -425,11 +409,11 @@
* 4) Reserved field is zero
* 5) Expand address to 64 bits
*/
-#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) {a.AddressSpaceId = (UINT8) d;\
- a.RegisterBitWidth = (UINT8) ACPI_MUL_8 (b);\
- a.RegisterBitOffset = 0;\
- a.Reserved = 0;\
- ACPI_STORE_ADDRESS (a.Address,(ACPI_PHYSICAL_ADDRESS) c);}
+#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) do {a.AddressSpaceId = (UINT8) d;\
+ a.RegisterBitWidth = (UINT8) ACPI_MUL_8 (b);\
+ a.RegisterBitOffset = 0;\
+ a.Reserved = 0;\
+ ACPI_STORE_ADDRESS (a.Address,(ACPI_PHYSICAL_ADDRESS) c);} while (0)
/* ACPI V1.0 entries -- address space is always I/O */
@@ -458,6 +442,8 @@
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
#define ACPI_REPORT_NSERROR(s,e) AcpiNsReportError(_THIS_MODULE,__LINE__,_COMPONENT, s, e);
+#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) AcpiNsReportMethodError(_THIS_MODULE,__LINE__,_COMPONENT, s, n, p, e);
+
#else
#define ACPI_REPORT_INFO(fp) {AcpiUtReportInfo("ACPI",__LINE__,_COMPONENT); \
@@ -468,6 +454,8 @@
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
#define ACPI_REPORT_NSERROR(s,e) AcpiNsReportError("ACPI",__LINE__,_COMPONENT, s, e);
+#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) AcpiNsReportMethodError("ACPI",__LINE__,_COMPONENT, s, n, p, e);
+
#endif
/* Error reporting. These versions pass thru the module and line# */
@@ -485,7 +473,7 @@
#ifdef ACPI_DEBUG_OUTPUT
-#define ACPI_MODULE_NAME(name) static char *_THIS_MODULE = name;
+#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_THIS_MODULE = name;
/*
* Function entry tracing.
@@ -505,7 +493,7 @@
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a)\
AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b)
#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a)\
- AcpiUtTraceStr(__LINE__,&_Dbg,(NATIVE_CHAR *)b)
+ AcpiUtTraceStr(__LINE__,&_Dbg,(char *)b)
#define ACPI_FUNCTION_ENTRY() AcpiUtTrackStackPtr()
@@ -545,7 +533,7 @@
#define ACPI_DUMP_ENTRY(a,b) AcpiNsDumpEntry (a,b)
#define ACPI_DUMP_TABLES(a,b) AcpiNsDumpTables(a,b)
-#define ACPI_DUMP_PATHNAME(a,b,c,d) (void) AcpiNsDumpPathname(a,b,c,d)
+#define ACPI_DUMP_PATHNAME(a,b,c,d) AcpiNsDumpPathname(a,b,c,d)
#define ACPI_DUMP_RESOURCE_LIST(a) AcpiRsDumpResourceList(a)
#define ACPI_DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
#define ACPI_BREAK_MSG(a) AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT,(a))
diff --git a/sys/contrib/dev/acpica/acnamesp.h b/sys/contrib/dev/acpica/acnamesp.h
index d38183d..54c1c25 100644
--- a/sys/contrib/dev/acpica/acnamesp.h
+++ b/sys/contrib/dev/acpica/acnamesp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
- * $Revision: 129 $
+ * $Revision: 133 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -237,7 +237,7 @@ AcpiNsRootInitialize (
ACPI_STATUS
AcpiNsLookup (
ACPI_GENERIC_STATE *ScopeInfo,
- NATIVE_CHAR *Name,
+ char *Name,
ACPI_OBJECT_TYPE Type,
ACPI_INTERPRETER_MODE InterpreterMode,
UINT32 Flags,
@@ -301,10 +301,10 @@ AcpiNsDumpEntry (
ACPI_HANDLE Handle,
UINT32 DebugLevel);
-ACPI_STATUS
+void
AcpiNsDumpPathname (
ACPI_HANDLE Handle,
- NATIVE_CHAR *Msg,
+ char *Msg,
UINT32 Level,
UINT32 Component);
@@ -352,14 +352,14 @@ AcpiNsEvaluateByHandle (
ACPI_STATUS
AcpiNsEvaluateByName (
- NATIVE_CHAR *Pathname,
+ char *Pathname,
ACPI_OPERAND_OBJECT **Params,
ACPI_OPERAND_OBJECT **ReturnObject);
ACPI_STATUS
AcpiNsEvaluateRelative (
ACPI_NAMESPACE_NODE *PrefixNode,
- NATIVE_CHAR *Pathname,
+ char *Pathname,
ACPI_OPERAND_OBJECT **Params,
ACPI_OPERAND_OBJECT **ReturnObject);
@@ -396,13 +396,13 @@ void
AcpiNsBuildExternalPath (
ACPI_NAMESPACE_NODE *Node,
ACPI_SIZE Size,
- NATIVE_CHAR *NameBuffer);
+ char *NameBuffer);
-NATIVE_CHAR *
+char *
AcpiNsGetExternalPathname (
ACPI_NAMESPACE_NODE *Node);
-NATIVE_CHAR *
+char *
AcpiNsNameOfCurrentScope (
ACPI_WALK_STATE *WalkState);
@@ -414,11 +414,11 @@ AcpiNsHandleToPathname (
BOOLEAN
AcpiNsPatternMatch (
ACPI_NAMESPACE_NODE *ObjNode,
- NATIVE_CHAR *SearchFor);
+ char *SearchFor);
ACPI_STATUS
AcpiNsGetNodeByPath (
- NATIVE_CHAR *ExternalPathname,
+ char *ExternalPathname,
ACPI_NAMESPACE_NODE *InPrefixNode,
UINT32 Flags,
ACPI_NAMESPACE_NODE **OutNode);
@@ -499,11 +499,11 @@ AcpiNsInstallNode (
BOOLEAN
AcpiNsValidRootPrefix (
- NATIVE_CHAR Prefix);
+ char Prefix);
BOOLEAN
AcpiNsValidPathSeparator (
- NATIVE_CHAR Sep);
+ char Sep);
ACPI_OBJECT_TYPE
AcpiNsGetType (
@@ -515,12 +515,27 @@ AcpiNsLocal (
void
AcpiNsReportError (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
char *InternalName,
ACPI_STATUS LookupStatus);
+void
+AcpiNsReportMethodError (
+ char *ModuleName,
+ UINT32 LineNumber,
+ UINT32 ComponentId,
+ char *Message,
+ ACPI_NAMESPACE_NODE *Node,
+ char *Path,
+ ACPI_STATUS LookupStatus);
+
+void
+AcpiNsPrintNodePathname (
+ ACPI_NAMESPACE_NODE *Node,
+ char *Msg);
+
ACPI_STATUS
AcpiNsBuildInternalName (
ACPI_NAMESTRING_INFO *Info);
@@ -531,15 +546,15 @@ AcpiNsGetInternalNameLength (
ACPI_STATUS
AcpiNsInternalizeName (
- NATIVE_CHAR *DottedName,
- NATIVE_CHAR **ConvertedName);
+ char *DottedName,
+ char **ConvertedName);
ACPI_STATUS
AcpiNsExternalizeName (
UINT32 InternalNameLength,
- NATIVE_CHAR *InternalName,
+ char *InternalName,
UINT32 *ConvertedNameLength,
- NATIVE_CHAR **ConvertedName);
+ char **ConvertedName);
ACPI_NAMESPACE_NODE *
AcpiNsMapHandleToNode (
diff --git a/sys/contrib/dev/acpica/acobject.h b/sys/contrib/dev/acpica/acobject.h
index 566758d..2f92f05 100644
--- a/sys/contrib/dev/acpica/acobject.h
+++ b/sys/contrib/dev/acpica/acobject.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
- * $Revision: 114 $
+ * $Revision: 118 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,12 +138,12 @@
* DataType is used to differentiate between internal descriptors, and MUST
* be the first byte in this structure.
*/
-#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
- UINT8 Descriptor; /* To differentiate various internal objs */\
- UINT8 Type; /* ACPI_OBJECT_TYPE */\
- UINT16 ReferenceCount; /* For object deletion management */\
- union acpi_operand_obj *NextObject; /* Objects linked to parent NS node */\
- UINT8 Flags; \
+#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
+ UINT8 Descriptor; /* To differentiate various internal objs */\
+ UINT8 Type; /* ACPI_OBJECT_TYPE */\
+ UINT16 ReferenceCount; /* For object deletion management */\
+ union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\
+ UINT8 Flags; \
/* Values for flag byte above */
@@ -160,34 +160,34 @@
* "Field Datum" -- a datum from the actual field object
* "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
*/
-#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
- UINT8 FieldFlags; /* Access, update, and lock bits */\
- UINT8 Attribute; /* From AccessAs keyword */\
- UINT8 AccessByteWidth; /* Read/Write size in bytes */\
- UINT32 BitLength; /* Length of field in bits */\
- UINT32 BaseByteOffset; /* Byte offset within containing object */\
- UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
- UINT8 DatumValidBits; /* Valid bit in first "Field datum" */\
- UINT8 EndFieldValidBits; /* Valid bits in the last "field datum" */\
- UINT8 EndBufferValidBits; /* Valid bits in the last "buffer datum" */\
- UINT32 Value; /* Value to store into the Bank or Index register */\
- ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
+#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
+ UINT8 FieldFlags; /* Access, update, and lock bits */\
+ UINT8 Attribute; /* From AccessAs keyword */\
+ UINT8 AccessByteWidth; /* Read/Write size in bytes */\
+ UINT32 BitLength; /* Length of field in bits */\
+ UINT32 BaseByteOffset; /* Byte offset within containing object */\
+ UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
+ UINT8 DatumValidBits; /* Valid bit in first "Field datum" */\
+ UINT8 EndFieldValidBits; /* Valid bits in the last "field datum" */\
+ UINT8 EndBufferValidBits; /* Valid bits in the last "buffer datum" */\
+ UINT32 Value; /* Value to store into the Bank or Index register */\
+ ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
/*
* Fields common to both Strings and Buffers
*/
#define ACPI_COMMON_BUFFER_INFO \
- UINT32 Length;
+ UINT32 Length;
/*
* Common fields for objects that support ASL notifications
*/
#define ACPI_COMMON_NOTIFY_INFO \
- union acpi_operand_obj *SysHandler; /* Handler for system notifies */\
- union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */\
- union acpi_operand_obj *AddrHandler; /* Handler for Address space */
+ union acpi_operand_object *SysHandler; /* Handler for system notifies */\
+ union acpi_operand_object *DrvHandler; /* Handler for driver notifies */\
+ union acpi_operand_object *AddrHandler; /* Handler for Address space */
/******************************************************************************
@@ -196,52 +196,51 @@
*
*****************************************************************************/
-typedef struct AcpiObjectCommon
+typedef struct acpi_object_common
{
ACPI_OBJECT_COMMON_HEADER
} ACPI_OBJECT_COMMON;
-typedef struct AcpiObjectInteger
+typedef struct acpi_object_integer
{
ACPI_OBJECT_COMMON_HEADER
-
- ACPI_INTEGER Value;
+ ACPI_INTEGER Value;
} ACPI_OBJECT_INTEGER;
-typedef struct AcpiObjectString /* Null terminated, ASCII characters only */
+typedef struct acpi_object_string /* Null terminated, ASCII characters only */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO
- NATIVE_CHAR *Pointer; /* String in AML stream or allocated string */
+ char *Pointer; /* String in AML stream or allocated string */
} ACPI_OBJECT_STRING;
-typedef struct AcpiObjectBuffer
+typedef struct acpi_object_buffer
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO
- UINT8 *Pointer; /* Buffer in AML stream or allocated buffer */
- ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
- UINT8 *AmlStart;
- UINT32 AmlLength;
+ UINT8 *Pointer; /* Buffer in AML stream or allocated buffer */
+ ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
+ UINT8 *AmlStart;
+ UINT32 AmlLength;
} ACPI_OBJECT_BUFFER;
-typedef struct AcpiObjectPackage
+typedef struct acpi_object_package
{
ACPI_OBJECT_COMMON_HEADER
- UINT32 Count; /* # of elements in package */
- UINT32 AmlLength;
- UINT8 *AmlStart;
- ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
- union acpi_operand_obj **Elements; /* Array of pointers to AcpiObjects */
+ UINT32 Count; /* # of elements in package */
+ UINT32 AmlLength;
+ UINT8 *AmlStart;
+ ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
+ union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */
} ACPI_OBJECT_PACKAGE;
@@ -252,60 +251,55 @@ typedef struct AcpiObjectPackage
*
*****************************************************************************/
-typedef struct AcpiObjectEvent
+typedef struct acpi_object_event
{
ACPI_OBJECT_COMMON_HEADER
- void *Semaphore;
+ void *Semaphore;
} ACPI_OBJECT_EVENT;
#define INFINITE_CONCURRENCY 0xFF
-typedef struct AcpiObjectMethod
+typedef struct acpi_object_method
{
ACPI_OBJECT_COMMON_HEADER
- UINT8 MethodFlags;
- UINT8 ParamCount;
-
- UINT32 AmlLength;
-
- void *Semaphore;
- UINT8 *AmlStart;
-
- UINT8 Concurrency;
- UINT8 ThreadCount;
- ACPI_OWNER_ID OwningId;
+ UINT8 MethodFlags;
+ UINT8 ParamCount;
+ UINT32 AmlLength;
+ void *Semaphore;
+ UINT8 *AmlStart;
+ UINT8 Concurrency;
+ UINT8 ThreadCount;
+ ACPI_OWNER_ID OwningId;
} ACPI_OBJECT_METHOD;
-typedef struct AcpiObjectMutex
+typedef struct acpi_object_mutex
{
ACPI_OBJECT_COMMON_HEADER
- UINT16 SyncLevel;
- UINT16 AcquisitionDepth;
-
- struct acpi_thread_state *OwnerThread;
- void *Semaphore;
- union acpi_operand_obj *Prev; /* Link for list of acquired mutexes */
- union acpi_operand_obj *Next; /* Link for list of acquired mutexes */
- ACPI_NAMESPACE_NODE *Node; /* containing object */
+ UINT16 SyncLevel;
+ UINT16 AcquisitionDepth;
+ struct acpi_thread_state *OwnerThread;
+ void *Semaphore;
+ union acpi_operand_object *Prev; /* Link for list of acquired mutexes */
+ union acpi_operand_object *Next; /* Link for list of acquired mutexes */
+ ACPI_NAMESPACE_NODE *Node; /* containing object */
} ACPI_OBJECT_MUTEX;
-typedef struct AcpiObjectRegion
+typedef struct acpi_object_region
{
ACPI_OBJECT_COMMON_HEADER
- UINT8 SpaceId;
-
- union acpi_operand_obj *AddrHandler; /* Handler for system notifies */
- ACPI_NAMESPACE_NODE *Node; /* containing object */
- union acpi_operand_obj *Next;
- UINT32 Length;
- ACPI_PHYSICAL_ADDRESS Address;
+ UINT8 SpaceId;
+ union acpi_operand_object *AddrHandler; /* Handler for system notifies */
+ ACPI_NAMESPACE_NODE *Node; /* containing object */
+ union acpi_operand_object *Next;
+ UINT32 Length;
+ ACPI_PHYSICAL_ADDRESS Address;
} ACPI_OBJECT_REGION;
@@ -316,7 +310,7 @@ typedef struct AcpiObjectRegion
*
*****************************************************************************/
-typedef struct AcpiObjectNotifyCommon /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
@@ -324,7 +318,7 @@ typedef struct AcpiObjectNotifyCommon /* COMMON NOTIFY for POWER,
} ACPI_OBJECT_NOTIFY_COMMON;
-typedef struct AcpiObjectDevice
+typedef struct acpi_object_device
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
@@ -332,35 +326,32 @@ typedef struct AcpiObjectDevice
} ACPI_OBJECT_DEVICE;
-typedef struct AcpiObjectPowerResource
+typedef struct acpi_object_power_resource
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
- UINT32 SystemLevel;
- UINT32 ResourceOrder;
+ UINT32 SystemLevel;
+ UINT32 ResourceOrder;
} ACPI_OBJECT_POWER_RESOURCE;
-typedef struct AcpiObjectProcessor
+typedef struct acpi_object_processor
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
- UINT32 ProcId;
- UINT32 Length;
- ACPI_IO_ADDRESS Address;
+ UINT32 ProcId;
+ UINT32 Length;
+ ACPI_IO_ADDRESS Address;
} ACPI_OBJECT_PROCESSOR;
-typedef struct AcpiObjectThermalZone
+typedef struct acpi_object_thermal_zone
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
} ACPI_OBJECT_THERMAL_ZONE;
@@ -370,36 +361,35 @@ typedef struct AcpiObjectThermalZone
*
*****************************************************************************/
-typedef struct AcpiObjectFieldCommon /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- union acpi_operand_obj *RegionObj; /* Containing Operation Region object */
- /* (REGION/BANK fields only) */
+ union acpi_operand_object *RegionObj; /* Containing Operation Region object */
+ /* (REGION/BANK fields only) */
} ACPI_OBJECT_FIELD_COMMON;
-typedef struct AcpiObjectRegionField
+typedef struct acpi_object_region_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- union acpi_operand_obj *RegionObj; /* Containing OpRegion object */
+ union acpi_operand_object *RegionObj; /* Containing OpRegion object */
} ACPI_OBJECT_REGION_FIELD;
-typedef struct AcpiObjectBankField
+typedef struct acpi_object_bank_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
-
- union acpi_operand_obj *RegionObj; /* Containing OpRegion object */
- union acpi_operand_obj *BankObj; /* BankSelect Register object */
+ union acpi_operand_object *RegionObj; /* Containing OpRegion object */
+ union acpi_operand_object *BankObj; /* BankSelect Register object */
} ACPI_OBJECT_BANK_FIELD;
-typedef struct AcpiObjectIndexField
+typedef struct acpi_object_index_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
@@ -408,21 +398,19 @@ typedef struct AcpiObjectIndexField
* No "RegionObj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
- union acpi_operand_obj *IndexObj; /* Index register */
- union acpi_operand_obj *DataObj; /* Data register */
-
+ union acpi_operand_object *IndexObj; /* Index register */
+ union acpi_operand_object *DataObj; /* Data register */
} ACPI_OBJECT_INDEX_FIELD;
/* The BufferField is different in that it is part of a Buffer, not an OpRegion */
-typedef struct AcpiObjectBufferField
+typedef struct acpi_object_buffer_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
-
- union acpi_operand_obj *BufferObj; /* Containing Buffer object */
+ union acpi_operand_object *BufferObj; /* Containing Buffer object */
} ACPI_OBJECT_BUFFER_FIELD;
@@ -433,13 +421,12 @@ typedef struct AcpiObjectBufferField
*
*****************************************************************************/
-typedef struct AcpiObjectNotifyHandler
+typedef struct acpi_object_notify_handler
{
ACPI_OBJECT_COMMON_HEADER
-
- ACPI_NAMESPACE_NODE *Node; /* Parent device */
- ACPI_NOTIFY_HANDLER Handler;
- void *Context;
+ ACPI_NAMESPACE_NODE *Node; /* Parent device */
+ ACPI_NOTIFY_HANDLER Handler;
+ void *Context;
} ACPI_OBJECT_NOTIFY_HANDLER;
@@ -449,19 +436,17 @@ typedef struct AcpiObjectNotifyHandler
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1
-typedef struct AcpiObjectAddrHandler
+typedef struct acpi_object_addr_handler
{
ACPI_OBJECT_COMMON_HEADER
-
- UINT8 SpaceId;
- UINT16 Hflags;
- ACPI_ADR_SPACE_HANDLER Handler;
-
- ACPI_NAMESPACE_NODE *Node; /* Parent device */
- void *Context;
- ACPI_ADR_SPACE_SETUP Setup;
- union acpi_operand_obj *RegionList; /* regions using this handler */
- union acpi_operand_obj *Next;
+ UINT8 SpaceId;
+ UINT16 Hflags;
+ ACPI_ADR_SPACE_HANDLER Handler;
+ ACPI_NAMESPACE_NODE *Node; /* Parent device */
+ void *Context;
+ ACPI_ADR_SPACE_SETUP Setup;
+ union acpi_operand_object *RegionList; /* regions using this handler */
+ union acpi_operand_object *Next;
} ACPI_OBJECT_ADDR_HANDLER;
@@ -476,17 +461,15 @@ typedef struct AcpiObjectAddrHandler
* The Reference object type is used for these opcodes:
* Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp
*/
-typedef struct AcpiObjectReference
+typedef struct acpi_object_reference
{
ACPI_OBJECT_COMMON_HEADER
-
- UINT8 TargetType; /* Used for IndexOp */
- UINT16 Opcode;
- UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */
-
- void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
- ACPI_NAMESPACE_NODE *Node;
- union acpi_operand_obj **Where;
+ UINT8 TargetType; /* Used for IndexOp */
+ UINT16 Opcode;
+ UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */
+ void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
+ ACPI_NAMESPACE_NODE *Node;
+ union acpi_operand_object **Where;
} ACPI_OBJECT_REFERENCE;
@@ -498,36 +481,36 @@ typedef struct AcpiObjectReference
*
* Currently: Region and FieldUnit types
*/
-typedef struct AcpiObjectExtra
+typedef struct acpi_object_extra
{
ACPI_OBJECT_COMMON_HEADER
- UINT8 ByteFill1;
- UINT16 WordFill1;
- UINT32 AmlLength;
- UINT8 *AmlStart;
- ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
- void *RegionContext; /* Region-specific data */
+ UINT8 ByteFill1;
+ UINT16 WordFill1;
+ UINT32 AmlLength;
+ UINT8 *AmlStart;
+ ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
+ void *RegionContext; /* Region-specific data */
} ACPI_OBJECT_EXTRA;
/* Additional data that can be attached to namespace nodes */
-typedef struct AcpiObjectData
+typedef struct acpi_object_data
{
ACPI_OBJECT_COMMON_HEADER
- ACPI_OBJECT_HANDLER Handler;
- void *Pointer;
+ ACPI_OBJECT_HANDLER Handler;
+ void *Pointer;
} ACPI_OBJECT_DATA;
/* Structure used when objects are cached for reuse */
-typedef struct AcpiObjectCacheList
+typedef struct acpi_object_cache_list
{
ACPI_OBJECT_COMMON_HEADER
- union acpi_operand_obj *Next; /* Link for object cache and internal lists*/
+ union acpi_operand_object *Next; /* Link for object cache and internal lists*/
} ACPI_OBJECT_CACHE_LIST;
@@ -538,39 +521,33 @@ typedef struct AcpiObjectCacheList
*
*****************************************************************************/
-typedef union acpi_operand_obj
+typedef union acpi_operand_object
{
- ACPI_OBJECT_COMMON Common;
-
- ACPI_OBJECT_INTEGER Integer;
- ACPI_OBJECT_STRING String;
- ACPI_OBJECT_BUFFER Buffer;
- ACPI_OBJECT_PACKAGE Package;
-
- ACPI_OBJECT_EVENT Event;
- ACPI_OBJECT_METHOD Method;
- ACPI_OBJECT_MUTEX Mutex;
- ACPI_OBJECT_REGION Region;
-
- ACPI_OBJECT_NOTIFY_COMMON CommonNotify;
- ACPI_OBJECT_DEVICE Device;
- ACPI_OBJECT_POWER_RESOURCE PowerResource;
- ACPI_OBJECT_PROCESSOR Processor;
- ACPI_OBJECT_THERMAL_ZONE ThermalZone;
-
- ACPI_OBJECT_FIELD_COMMON CommonField;
- ACPI_OBJECT_REGION_FIELD Field;
- ACPI_OBJECT_BUFFER_FIELD BufferField;
- ACPI_OBJECT_BANK_FIELD BankField;
- ACPI_OBJECT_INDEX_FIELD IndexField;
-
- ACPI_OBJECT_NOTIFY_HANDLER NotifyHandler;
- ACPI_OBJECT_ADDR_HANDLER AddrHandler;
-
- ACPI_OBJECT_REFERENCE Reference;
- ACPI_OBJECT_EXTRA Extra;
- ACPI_OBJECT_DATA Data;
- ACPI_OBJECT_CACHE_LIST Cache;
+ ACPI_OBJECT_COMMON Common;
+ ACPI_OBJECT_INTEGER Integer;
+ ACPI_OBJECT_STRING String;
+ ACPI_OBJECT_BUFFER Buffer;
+ ACPI_OBJECT_PACKAGE Package;
+ ACPI_OBJECT_EVENT Event;
+ ACPI_OBJECT_METHOD Method;
+ ACPI_OBJECT_MUTEX Mutex;
+ ACPI_OBJECT_REGION Region;
+ ACPI_OBJECT_NOTIFY_COMMON CommonNotify;
+ ACPI_OBJECT_DEVICE Device;
+ ACPI_OBJECT_POWER_RESOURCE PowerResource;
+ ACPI_OBJECT_PROCESSOR Processor;
+ ACPI_OBJECT_THERMAL_ZONE ThermalZone;
+ ACPI_OBJECT_FIELD_COMMON CommonField;
+ ACPI_OBJECT_REGION_FIELD Field;
+ ACPI_OBJECT_BUFFER_FIELD BufferField;
+ ACPI_OBJECT_BANK_FIELD BankField;
+ ACPI_OBJECT_INDEX_FIELD IndexField;
+ ACPI_OBJECT_NOTIFY_HANDLER NotifyHandler;
+ ACPI_OBJECT_ADDR_HANDLER AddrHandler;
+ ACPI_OBJECT_REFERENCE Reference;
+ ACPI_OBJECT_EXTRA Extra;
+ ACPI_OBJECT_DATA Data;
+ ACPI_OBJECT_CACHE_LIST Cache;
} ACPI_OPERAND_OBJECT;
@@ -584,7 +561,7 @@ typedef union acpi_operand_obj
/* Object descriptor types */
-#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
+#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x20
#define ACPI_DESC_TYPE_STATE_UPDATE 0x21
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x22
@@ -601,12 +578,12 @@ typedef union acpi_operand_obj
#define ACPI_DESC_TYPE_NAMED 0xAA
-typedef union acpi_desc
+typedef union acpi_descriptor
{
- UINT8 DescriptorId; /* To differentiate various internal objs */\
- ACPI_OPERAND_OBJECT Object;
- ACPI_NAMESPACE_NODE Node;
- ACPI_PARSE_OBJECT Op;
+ UINT8 DescriptorId; /* To differentiate various internal objs */\
+ ACPI_OPERAND_OBJECT Object;
+ ACPI_NAMESPACE_NODE Node;
+ ACPI_PARSE_OBJECT Op;
} ACPI_DESCRIPTOR;
diff --git a/sys/contrib/dev/acpica/acoutput.h b/sys/contrib/dev/acpica/acoutput.h
index 25e7e6f..74f7aeb 100644
--- a/sys/contrib/dev/acpica/acoutput.h
+++ b/sys/contrib/dev/acpica/acoutput.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acoutput.h -- debug output
- * $Revision: 90 $
+ * $Revision: 93 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -144,7 +144,6 @@
#define ACPI_TOOLS 0x00002000
#define ACPI_ALL_COMPONENTS 0x00003FFF
-
#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
@@ -152,21 +151,20 @@
#define ACPI_ALL_DRIVERS 0xFFFF0000
+
/*
* Raw debug output levels, do not use these in the DEBUG_PRINT macros
*/
-
-#define ACPI_LV_OK 0x00000001
-#define ACPI_LV_INFO 0x00000002
-#define ACPI_LV_WARN 0x00000004
-#define ACPI_LV_ERROR 0x00000008
-#define ACPI_LV_FATAL 0x00000010
-#define ACPI_LV_DEBUG_OBJECT 0x00000020
-#define ACPI_LV_ALL_EXCEPTIONS 0x0000003F
-
+#define ACPI_LV_ERROR 0x00000001
+#define ACPI_LV_WARN 0x00000002
+#define ACPI_LV_INIT 0x00000004
+#define ACPI_LV_DEBUG_OBJECT 0x00000008
+#define ACPI_LV_INFO 0x00000010
+#define ACPI_LV_ALL_EXCEPTIONS 0x0000001F
/* Trace verbosity level 1 [Standard Trace Level] */
+#define ACPI_LV_INIT_NAMES 0x00000020
#define ACPI_LV_PARSE 0x00000040
#define ACPI_LV_LOAD 0x00000080
#define ACPI_LV_DISPATCH 0x00000100
@@ -180,8 +178,7 @@
#define ACPI_LV_RESOURCES 0x00010000
#define ACPI_LV_USER_REQUESTS 0x00020000
#define ACPI_LV_PACKAGE 0x00040000
-#define ACPI_LV_INIT 0x00080000
-#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS
+#define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS
/* Trace verbosity level 2 [Function tracing and memory allocation] */
@@ -212,22 +209,21 @@
/*
* Debug level macros that are used in the DEBUG_PRINT macros
*/
-
-#define ACPI_DEBUG_LEVEL(dl) dl,__LINE__,&_Dbg
+#define ACPI_DEBUG_LEVEL(dl) (UINT32) dl,__LINE__,&_Dbg
/* Exception level -- used in the global "DebugLevel" */
-#define ACPI_DB_OK ACPI_DEBUG_LEVEL (ACPI_LV_OK)
-#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
-#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
#define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
-#define ACPI_DB_FATAL ACPI_DEBUG_LEVEL (ACPI_LV_FATAL)
+#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
+#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
+#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
/* Trace level -- also used in the global "DebugLevel" */
+#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
#define ACPI_DB_THREADS ACPI_DEBUG_LEVEL (ACPI_LV_THREADS)
#define ACPI_DB_PARSE ACPI_DEBUG_LEVEL (ACPI_LV_PARSE)
#define ACPI_DB_DISPATCH ACPI_DEBUG_LEVEL (ACPI_LV_DISPATCH)
@@ -248,23 +244,15 @@
#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
-#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
/* Defaults for DebugLevel, debug and normal */
-#define DEBUG_DEFAULT (ACPI_LV_OK | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
-#define NORMAL_DEFAULT (ACPI_LV_OK | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
-#define DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
-
-/* Misc defines */
-
-#define HEX 0x01
-#define ASCII 0x02
-#define FULL_ADDRESS 0x04
-#define CHARS_PER_LINE 16 /* used in DumpBuf function */
+#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
+#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
+#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
#endif /* __ACOUTPUT_H__ */
diff --git a/sys/contrib/dev/acpica/acparser.h b/sys/contrib/dev/acpica/acparser.h
index 36bba92..d3f6727 100644
--- a/sys/contrib/dev/acpica/acparser.h
+++ b/sys/contrib/dev/acpica/acparser.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- * $Revision: 63 $
+ * $Revision: 65 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -168,7 +168,7 @@ UINT32
AcpiPsGetNextPackageLength (
ACPI_PARSE_STATE *ParserState);
-NATIVE_CHAR *
+char *
AcpiPsGetNextNamestring (
ACPI_PARSE_STATE *ParserState);
@@ -216,7 +216,7 @@ const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
UINT16 Opcode);
-NATIVE_CHAR *
+char *
AcpiPsGetOpcodeName (
UINT16 Opcode);
@@ -313,7 +313,7 @@ AcpiPsAppendArg(
ACPI_PARSE_OBJECT*
AcpiPsFind (
ACPI_PARSE_OBJECT *Scope,
- NATIVE_CHAR *Path,
+ char *Path,
UINT16 Opcode,
UINT32 Create);
@@ -402,13 +402,13 @@ AcpiPsSetName(
UINT32
AcpiPsSprintPath (
- NATIVE_CHAR *BufferStart,
+ char *BufferStart,
UINT32 BufferSize,
ACPI_PARSE_OBJECT *Op);
UINT32
AcpiPsSprintOp (
- NATIVE_CHAR *BufferStart,
+ char *BufferStart,
UINT32 BufferSize,
ACPI_PARSE_OBJECT *Op);
diff --git a/sys/contrib/dev/acpica/acresrc.h b/sys/contrib/dev/acpica/acresrc.h
index cdd491f..f1b1729 100644
--- a/sys/contrib/dev/acpica/acresrc.h
+++ b/sys/contrib/dev/acpica/acresrc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acresrc.h - Resource Manager function prototypes
- * $Revision: 34 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -140,6 +140,12 @@ AcpiRsGetPrsMethodData (
ACPI_BUFFER *RetBuffer);
ACPI_STATUS
+AcpiRsGetMethodData (
+ ACPI_HANDLE Handle,
+ char *Path,
+ ACPI_BUFFER *RetBuffer);
+
+ACPI_STATUS
AcpiRsSetSrsMethodData (
ACPI_HANDLE Handle,
ACPI_BUFFER *RetBuffer);
diff --git a/sys/contrib/dev/acpica/acstruct.h b/sys/contrib/dev/acpica/acstruct.h
index 7b12f76..9ce641e 100644
--- a/sys/contrib/dev/acpica/acstruct.h
+++ b/sys/contrib/dev/acpica/acstruct.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acstruct.h - Internal structs
- * $Revision: 20 $
+ * $Revision: 25 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -141,53 +141,51 @@
typedef struct acpi_walk_state
{
- UINT8 DataType; /* To differentiate various internal objs MUST BE FIRST!*/\
- ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
- BOOLEAN LastPredicate; /* Result of last predicate */
- UINT8 CurrentResult; /* */
- UINT8 NextOpInfo; /* Info about NextOp */
- UINT8 NumOperands; /* Stack pointer for Operands[] array */
- UINT8 ReturnUsed;
- UINT8 WalkType;
- UINT16 Opcode; /* Current AML opcode */
- UINT8 ScopeDepth;
- UINT8 Reserved1;
- UINT32 ArgCount; /* push for fixed or var args */
- UINT32 AmlOffset;
- UINT32 ArgTypes;
- UINT32 MethodBreakpoint; /* For single stepping */
- UINT32 UserBreakpoint; /* User AML breakpoint */
- UINT32 ParseFlags;
- UINT32 PrevArgTypes;
-
-
- UINT8 *AmlLastWhile;
- struct acpi_node Arguments[MTH_NUM_ARGS]; /* Control method arguments */
- union acpi_operand_obj **CallerReturnDesc;
- ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
- struct acpi_node LocalVariables[MTH_NUM_LOCALS]; /* Control method locals */
- struct acpi_node *MethodCallNode; /* Called method Node*/
- ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
- union acpi_operand_obj *MethodDesc; /* Method descriptor if running a method */
- struct acpi_node *MethodNode; /* Method Node if running a method */
- ACPI_PARSE_OBJECT *Op; /* Current parser op */
- union acpi_operand_obj *Operands[OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
- const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
- ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */
- union acpi_operand_obj **Params;
- ACPI_PARSE_STATE ParserState; /* Current state of parser */
- union acpi_operand_obj *ResultObj;
- ACPI_GENERIC_STATE *Results; /* Stack of accumulated results */
- union acpi_operand_obj *ReturnDesc; /* Return object, if any */
- ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
-
- ACPI_PARSE_OBJECT *PrevOp; /* Last op that was processed */
- ACPI_PARSE_OBJECT *NextOp; /* next op to be processed */
- ACPI_PARSE_DOWNWARDS DescendingCallback;
- ACPI_PARSE_UPWARDS AscendingCallback;
- ACPI_THREAD_STATE *Thread;
- struct acpi_walk_state *Next; /* Next WalkState in list */
-
+ UINT8 DataType; /* To differentiate various internal objs MUST BE FIRST!*/\
+ ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
+ BOOLEAN LastPredicate; /* Result of last predicate */
+ UINT8 CurrentResult; /* */
+ UINT8 NextOpInfo; /* Info about NextOp */
+ UINT8 NumOperands; /* Stack pointer for Operands[] array */
+ UINT8 ReturnUsed;
+ UINT8 WalkType;
+ UINT16 Opcode; /* Current AML opcode */
+ UINT8 ScopeDepth;
+ UINT8 Reserved1;
+ UINT32 ArgCount; /* push for fixed or var args */
+ UINT32 AmlOffset;
+ UINT32 ArgTypes;
+ UINT32 MethodBreakpoint; /* For single stepping */
+ UINT32 UserBreakpoint; /* User AML breakpoint */
+ UINT32 ParseFlags;
+ UINT32 PrevArgTypes;
+
+ UINT8 *AmlLastWhile;
+ struct acpi_namespace_node Arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
+ union acpi_operand_object **CallerReturnDesc;
+ ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
+ struct acpi_namespace_node LocalVariables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
+ struct acpi_namespace_node *MethodCallNode; /* Called method Node*/
+ ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
+ union acpi_operand_object *MethodDesc; /* Method descriptor if running a method */
+ struct acpi_namespace_node *MethodNode; /* Method Node if running a method */
+ ACPI_PARSE_OBJECT *Op; /* Current parser op */
+ union acpi_operand_object *Operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
+ const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
+ ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */
+ union acpi_operand_object **Params;
+ ACPI_PARSE_STATE ParserState; /* Current state of parser */
+ union acpi_operand_object *ResultObj;
+ ACPI_GENERIC_STATE *Results; /* Stack of accumulated results */
+ union acpi_operand_object *ReturnDesc; /* Return object, if any */
+ ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
+
+ ACPI_PARSE_OBJECT *PrevOp; /* Last op that was processed */
+ ACPI_PARSE_OBJECT *NextOp; /* next op to be processed */
+ ACPI_PARSE_DOWNWARDS DescendingCallback;
+ ACPI_PARSE_UPWARDS AscendingCallback;
+ ACPI_THREAD_STATE *Thread;
+ struct acpi_walk_state *Next; /* Next WalkState in list */
} ACPI_WALK_STATE;
@@ -243,7 +241,7 @@ typedef struct acpi_get_devices_info
{
ACPI_WALK_CALLBACK UserFunction;
void *Context;
- NATIVE_CHAR *Hid;
+ char *Hid;
} ACPI_GET_DEVICES_INFO;
diff --git a/sys/contrib/dev/acpica/actables.h b/sys/contrib/dev/acpica/actables.h
index 0fcfd87..ecf733f 100644
--- a/sys/contrib/dev/acpica/actables.h
+++ b/sys/contrib/dev/acpica/actables.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actables.h - ACPI table management
- * $Revision: 42 $
+ * $Revision: 44 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -223,7 +223,7 @@ AcpiTbInstallTable (
ACPI_STATUS
AcpiTbMatchSignature (
- NATIVE_CHAR *Signature,
+ char *Signature,
ACPI_TABLE_DESC *TableInfo,
UINT8 SearchType);
@@ -288,9 +288,9 @@ AcpiTbFindRsdp (
ACPI_STATUS
AcpiTbFindTable (
- NATIVE_CHAR *Signature,
- NATIVE_CHAR *OemId,
- NATIVE_CHAR *OemTableId,
+ char *Signature,
+ char *OemId,
+ char *OemTableId,
ACPI_TABLE_HEADER **TablePtr);
ACPI_STATUS
diff --git a/sys/contrib/dev/acpica/actbl.h b/sys/contrib/dev/acpica/actbl.h
index ea06eff..82f3d28 100644
--- a/sys/contrib/dev/acpica/actbl.h
+++ b/sys/contrib/dev/acpica/actbl.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl.h - Table data structures defined in ACPI specification
- * $Revision: 53 $
+ * $Revision: 58 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -165,37 +165,37 @@
* Architecture-independent tables
* The architecture dependent tables are in separate files
*/
-typedef struct /* Root System Descriptor Pointer */
+typedef struct rsdp_descriptor /* Root System Descriptor Pointer */
{
- NATIVE_CHAR Signature [8]; /* ACPI signature, contains "RSD PTR " */
+ char Signature [8]; /* ACPI signature, contains "RSD PTR " */
UINT8 Checksum; /* To make sum of struct == 0 */
- NATIVE_CHAR OemId [6]; /* OEM identification */
+ char OemId [6]; /* OEM identification */
UINT8 Revision; /* Must be 0 for 1.0, 2 for 2.0 */
UINT32 RsdtPhysicalAddress; /* 32-bit physical address of RSDT */
UINT32 Length; /* XSDT Length in bytes including hdr */
UINT64 XsdtPhysicalAddress; /* 64-bit physical address of XSDT */
UINT8 ExtendedChecksum; /* Checksum of entire table */
- NATIVE_CHAR Reserved [3]; /* Reserved field must be 0 */
+ char Reserved [3]; /* Reserved field must be 0 */
} RSDP_DESCRIPTOR;
-typedef struct /* ACPI common table header */
+typedef struct acpi_table_header /* ACPI common table header */
{
- NATIVE_CHAR Signature [4]; /* ACPI signature (4 ASCII characters) */
+ char Signature [4]; /* ACPI signature (4 ASCII characters) */
UINT32 Length; /* Length of table, in bytes, including header */
UINT8 Revision; /* ACPI Specification minor version # */
UINT8 Checksum; /* To make sum of entire table == 0 */
- NATIVE_CHAR OemId [6]; /* OEM identification */
- NATIVE_CHAR OemTableId [8]; /* OEM table identification */
+ char OemId [6]; /* OEM identification */
+ char OemTableId [8]; /* OEM table identification */
UINT32 OemRevision; /* OEM revision number */
- NATIVE_CHAR AslCompilerId [4]; /* ASL compiler vendor ID */
+ char AslCompilerId [4]; /* ASL compiler vendor ID */
UINT32 AslCompilerRevision; /* ASL compiler revision number */
} ACPI_TABLE_HEADER;
-typedef struct /* Common FACS for internal use */
+typedef struct acpi_common_facs /* Common FACS for internal use */
{
UINT32 *GlobalLock;
UINT64 *FirmwareWakingVector;
@@ -204,7 +204,7 @@ typedef struct /* Common FACS for internal use */
} ACPI_COMMON_FACS;
-typedef struct /* APIC Table */
+typedef struct apic_table
{
ACPI_TABLE_HEADER Header; /* ACPI table header */
UINT32 LocalApicAddress; /* Physical address for accessing local APICs */
@@ -214,7 +214,7 @@ typedef struct /* APIC Table */
} APIC_TABLE;
-typedef struct /* APIC Header */
+typedef struct apic_header
{
UINT8 Type; /* APIC type. Either APIC_PROC or APIC_IO */
UINT8 Length; /* Length of APIC structure */
@@ -222,7 +222,7 @@ typedef struct /* APIC Header */
} APIC_HEADER;
-typedef struct /* Processor APIC */
+typedef struct processor_apic
{
APIC_HEADER Header;
UINT8 ProcessorApicId; /* ACPI processor id */
@@ -233,7 +233,7 @@ typedef struct /* Processor APIC */
} PROCESSOR_APIC;
-typedef struct /* IO APIC */
+typedef struct io_apic
{
APIC_HEADER Header;
UINT8 IoApicId; /* I/O APIC ID */
@@ -252,7 +252,7 @@ typedef struct /* IO APIC */
* IA64 TBD: Modify Smart Battery Description to comply with ACPI IA64
* extensions.
*/
-typedef struct /* Smart Battery Description Table */
+typedef struct smart_battery_description_table
{
ACPI_TABLE_HEADER Header;
UINT32 WarningLevel;
@@ -283,15 +283,15 @@ typedef struct /* Smart Battery Description Table */
#define ACPI_TABLE_ROOT 0x00
#define ACPI_TABLE_PRIMARY 0x10
#define ACPI_TABLE_SECONDARY 0x20
-#define ACPI_TABLE_OTHER 0x30
+#define ACPI_TABLE_ALL 0x30
#define ACPI_TABLE_TYPE_MASK 0x30
/* Data about each known table type */
-typedef struct _AcpiTableSupport
+typedef struct acpi_table_support
{
- NATIVE_CHAR *Name;
- NATIVE_CHAR *Signature;
+ char *Name;
+ char *Signature;
void **GlobalPtr;
UINT8 SigLength;
UINT8 Flags;
diff --git a/sys/contrib/dev/acpica/actbl1.h b/sys/contrib/dev/acpica/actbl1.h
index c99792c..5b931a3 100644
--- a/sys/contrib/dev/acpica/actbl1.h
+++ b/sys/contrib/dev/acpica/actbl1.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl1.h - ACPI 1.0 tables
- * $Revision: 21 $
+ * $Revision: 26 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -122,7 +122,7 @@
/*
* ACPI 1.0 Root System Description Table (RSDT)
*/
-typedef struct
+typedef struct rsdt_descriptor_rev1
{
ACPI_TABLE_HEADER Header; /* ACPI Table header */
UINT32 TableOffsetEntry [1]; /* Array of pointers to other */
@@ -133,9 +133,9 @@ typedef struct
/*
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
*/
-typedef struct
+typedef struct facs_descriptor_rev1
{
- NATIVE_CHAR Signature[4]; /* ACPI Signature */
+ char Signature[4]; /* ACPI Signature */
UINT32 Length; /* Length of structure, in bytes */
UINT32 HardwareSignature; /* Hardware configuration signature */
UINT32 FirmwareWakingVector; /* ACPI OS waking vector */
@@ -150,7 +150,7 @@ typedef struct
/*
* ACPI 1.0 Fixed ACPI Description Table (FADT)
*/
-typedef struct
+typedef struct fadt_descriptor_rev1
{
ACPI_TABLE_HEADER Header; /* ACPI Table header */
UINT32 FirmwareCtrl; /* Physical address of FACS */
@@ -202,7 +202,7 @@ typedef struct
UINT32_BIT TmrValExt : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
UINT32_BIT Reserved5 : 23; /* Reserved - must be zero */
-} FADT_DESCRIPTOR_REV1;
+} FADT_DESCRIPTOR_REV1;
#pragma pack()
diff --git a/sys/contrib/dev/acpica/actbl2.h b/sys/contrib/dev/acpica/actbl2.h
index 0f81b3a..a683645 100644
--- a/sys/contrib/dev/acpica/actbl2.h
+++ b/sys/contrib/dev/acpica/actbl2.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- * $Revision: 28 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -142,7 +142,7 @@
/*
* ACPI 2.0 Root System Description Table (RSDT)
*/
-typedef struct
+typedef struct rsdt_descriptor_rev2
{
ACPI_TABLE_HEADER Header; /* ACPI table header */
UINT32 TableOffsetEntry [1]; /* Array of pointers to */
@@ -153,7 +153,7 @@ typedef struct
/*
* ACPI 2.0 Extended System Description Table (XSDT)
*/
-typedef struct
+typedef struct xsdt_descriptor_rev2
{
ACPI_TABLE_HEADER Header; /* ACPI table header */
UINT64 TableOffsetEntry [1]; /* Array of pointers to */
@@ -164,9 +164,9 @@ typedef struct
/*
* ACPI 2.0 Firmware ACPI Control Structure (FACS)
*/
-typedef struct
+typedef struct facs_descriptor_rev2
{
- NATIVE_CHAR Signature[4]; /* ACPI signature */
+ char Signature[4]; /* ACPI signature */
UINT32 Length; /* Length of structure, in bytes */
UINT32 HardwareSignature; /* Hardware configuration signature */
UINT32 FirmwareWakingVector; /* 32bit physical address of the Firmware Waking Vector. */
@@ -183,7 +183,7 @@ typedef struct
/*
* ACPI 2.0 Generic Address Structure (GAS)
*/
-typedef struct
+typedef struct acpi_generic_address
{
UINT8 AddressSpaceId; /* Address space where struct or register exists. */
UINT8 RegisterBitWidth; /* Size in bits of given register */
@@ -197,7 +197,7 @@ typedef struct
/*
* ACPI 2.0 Fixed ACPI Description Table (FADT)
*/
-typedef struct
+typedef struct fadt_descriptor_rev2
{
ACPI_TABLE_HEADER Header; /* ACPI table header */
UINT32 V1_FirmwareCtrl; /* 32-bit physical address of FACS */
@@ -268,7 +268,7 @@ typedef struct
ACPI_GENERIC_ADDRESS XGpe0Blk; /* Extended General Purpose AcpiEvent 0 Reg Blk address */
ACPI_GENERIC_ADDRESS XGpe1Blk; /* Extended General Purpose AcpiEvent 1 Reg Blk address */
-} FADT_DESCRIPTOR_REV2;
+} FADT_DESCRIPTOR_REV2;
#pragma pack()
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h
index 420ac3b..0b19399 100644
--- a/sys/contrib/dev/acpica/actypes.h
+++ b/sys/contrib/dev/acpica/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 241 $
+ * $Revision: 253 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,21 +131,34 @@
#define ACPI_ASCII_MAX 0x7F
+#ifdef DEFINE_ALTERNATE_TYPES
+/*
+ * Types used only in translated source, defined here to enable
+ * cross-platform compilation only.
+ */
+typedef int s32;
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int u32;
+typedef COMPILER_DEPENDENT_UINT64 u64;
+
+#endif
+
/*
* Data types - Fixed across all compilation models (16/32/64)
*
- * BOOLEAN Logical Boolean.
- * INT8 8-bit (1 byte) signed value
- * UINT8 8-bit (1 byte) unsigned value
- * INT16 16-bit (2 byte) signed value
- * UINT16 16-bit (2 byte) unsigned value
- * INT32 32-bit (4 byte) signed value
- * UINT32 32-bit (4 byte) unsigned value
- * INT64 64-bit (8 byte) signed value
- * UINT64 64-bit (8 byte) unsigned value
- * NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value
- * NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
+ * BOOLEAN Logical Boolean.
+ * INT8 8-bit (1 byte) signed value
+ * UINT8 8-bit (1 byte) unsigned value
+ * INT16 16-bit (2 byte) signed value
+ * UINT16 16-bit (2 byte) unsigned value
+ * INT32 32-bit (4 byte) signed value
+ * UINT32 32-bit (4 byte) unsigned value
+ * INT64 64-bit (8 byte) signed value
+ * UINT64 64-bit (8 byte) unsigned value
+ * ACPI_NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value
+ * ACPI_NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
*/
#ifndef ACPI_MACHINE_WIDTH
@@ -153,6 +166,9 @@
#endif
#if ACPI_MACHINE_WIDTH == 64
+
+/*! [Begin] no source code translation (keep the typedefs) */
+
/*
* 64-bit type definitions
*/
@@ -164,13 +180,12 @@ typedef unsigned int UINT32;
typedef COMPILER_DEPENDENT_INT64 INT64;
typedef COMPILER_DEPENDENT_UINT64 UINT64;
-typedef INT64 NATIVE_INT;
-typedef UINT64 NATIVE_UINT;
+/*! [End] no source code translation !*/
-typedef UINT32 NATIVE_UINT_MAX32;
-typedef UINT64 NATIVE_UINT_MIN32;
+typedef INT64 ACPI_NATIVE_INT;
+typedef UINT64 ACPI_NATIVE_UINT;
-typedef UINT64 ACPI_TBLPTR;
+typedef UINT64 ACPI_TABLE_PTR;
typedef UINT64 ACPI_IO_ADDRESS;
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
typedef UINT64 ACPI_SIZE;
@@ -183,6 +198,8 @@ typedef UINT64 ACPI_SIZE;
#elif ACPI_MACHINE_WIDTH == 16
+/*! [Begin] no source code translation (keep the typedefs) */
+
/*
* 16-bit type definitions
*/
@@ -200,13 +217,12 @@ typedef struct
} UINT64;
-typedef UINT16 NATIVE_UINT;
-typedef INT16 NATIVE_INT;
+/*! [End] no source code translation !*/
-typedef UINT16 NATIVE_UINT_MAX32;
-typedef UINT32 NATIVE_UINT_MIN32;
+typedef UINT16 ACPI_NATIVE_UINT;
+typedef INT16 ACPI_NATIVE_INT;
-typedef UINT32 ACPI_TBLPTR;
+typedef UINT32 ACPI_TABLE_PTR;
typedef UINT32 ACPI_IO_ADDRESS;
typedef char *ACPI_PHYSICAL_ADDRESS;
typedef UINT16 ACPI_SIZE;
@@ -226,6 +242,8 @@ typedef UINT16 ACPI_SIZE;
#elif ACPI_MACHINE_WIDTH == 32
+/*! [Begin] no source code translation (keep the typedefs) */
+
/*
* 32-bit type definitions (default)
*/
@@ -237,13 +255,12 @@ typedef unsigned int UINT32;
typedef COMPILER_DEPENDENT_INT64 INT64;
typedef COMPILER_DEPENDENT_UINT64 UINT64;
-typedef INT32 NATIVE_INT;
-typedef UINT32 NATIVE_UINT;
+/*! [End] no source code translation !*/
-typedef UINT32 NATIVE_UINT_MAX32;
-typedef UINT32 NATIVE_UINT_MIN32;
+typedef INT32 ACPI_NATIVE_INT;
+typedef UINT32 ACPI_NATIVE_UINT;
-typedef UINT64 ACPI_TBLPTR;
+typedef UINT64 ACPI_TABLE_PTR;
typedef UINT32 ACPI_IO_ADDRESS;
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
typedef UINT32 ACPI_SIZE;
@@ -262,40 +279,24 @@ typedef UINT32 ACPI_SIZE;
* Miscellaneous common types
*/
typedef UINT32 UINT32_BIT;
-typedef NATIVE_UINT ACPI_PTRDIFF;
-typedef char NATIVE_CHAR;
-
-
-#ifdef DEFINE_ALTERNATE_TYPES
-/*
- * Types used only in translated source, defined here to enable
- * cross-platform compilation only.
- */
-typedef INT32 s32;
-typedef UINT8 u8;
-typedef UINT16 u16;
-typedef UINT32 u32;
-typedef UINT64 u64;
-#endif
-/*! [End] no source code translation !*/
-
+typedef ACPI_NATIVE_UINT ACPI_PTRDIFF;
/*
* Pointer overlays to avoid lots of typecasting for
* code that accepts both physical and logical pointers.
*/
-typedef union acpi_ptrs
+typedef union acpi_pointers
{
ACPI_PHYSICAL_ADDRESS Physical;
void *Logical;
- ACPI_TBLPTR Value;
+ ACPI_TABLE_PTR Value;
} ACPI_POINTERS;
-typedef struct AcpiPointer
+typedef struct acpi_pointer
{
UINT32 PointerType;
- union acpi_ptrs Pointer;
+ union acpi_pointers Pointer;
} ACPI_POINTER;
@@ -338,24 +339,24 @@ typedef struct AcpiPointer
*/
typedef UINT32 ACPI_STATUS; /* All ACPI Exceptions */
typedef UINT32 ACPI_NAME; /* 4-byte ACPI name */
-typedef char* ACPI_STRING; /* Null terminated ASCII string */
-typedef void* ACPI_HANDLE; /* Actually a ptr to an Node */
+typedef char * ACPI_STRING; /* Null terminated ASCII string */
+typedef void * ACPI_HANDLE; /* Actually a ptr to an Node */
-typedef struct
+typedef struct uint64_struct
{
UINT32 Lo;
UINT32 Hi;
} UINT64_STRUCT;
-typedef union
+typedef union uint64_overlay
{
UINT64 Full;
UINT64_STRUCT Part;
} UINT64_OVERLAY;
-typedef struct
+typedef struct uint32_struct
{
UINT32 Lo;
UINT32 Hi;
@@ -520,9 +521,9 @@ typedef UINT32 ACPI_OBJECT_TYPE;
#define ACPI_TYPE_EXTERNAL_MAX 0x10
/*
- * These are object types that do not map directly to the ACPI
- * ObjectType() operator. They are used for various internal purposes only.
- * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
+ * These are object types that do not map directly to the ACPI
+ * ObjectType() operator. They are used for various internal purposes only.
+ * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
* internal types must move upwards. (There is code that depends on these
* values being contiguous with the external types above.)
*/
@@ -670,6 +671,7 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
#define ACPI_ADR_SPACE_CMOS (ACPI_ADR_SPACE_TYPE) 5
#define ACPI_ADR_SPACE_PCI_BAR_TARGET (ACPI_ADR_SPACE_TYPE) 6
#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 7
+#define ACPI_ADR_SPACE_FIXED_HARDWARE (ACPI_ADR_SPACE_TYPE) 127
/*
@@ -707,7 +709,7 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
/*
* External ACPI object definition
*/
-typedef union AcpiObj
+typedef union acpi_object
{
ACPI_OBJECT_TYPE Type; /* See definition of AcpiNsType for values */
struct
@@ -720,7 +722,7 @@ typedef union AcpiObj
{
ACPI_OBJECT_TYPE Type;
UINT32 Length; /* # of bytes in string, excluding trailing null */
- NATIVE_CHAR *Pointer; /* points to the string value */
+ char *Pointer; /* points to the string value */
} String;
struct
@@ -741,7 +743,7 @@ typedef union AcpiObj
{
ACPI_OBJECT_TYPE Type;
UINT32 Count; /* # of elements in package */
- union AcpiObj *Elements; /* Pointer to an array of ACPI_OBJECTs */
+ union acpi_object *Elements; /* Pointer to an array of ACPI_OBJECTs */
} Package;
struct
@@ -765,7 +767,7 @@ typedef union AcpiObj
/*
* List of objects, used as a parameter list for control method evaluation
*/
-typedef struct AcpiObjList
+typedef struct acpi_object_list
{
UINT32 Count;
ACPI_OBJECT *Pointer;
@@ -780,7 +782,7 @@ typedef struct AcpiObjList
#define ACPI_ALLOCATE_BUFFER (ACPI_SIZE) (-1)
#define ACPI_ALLOCATE_LOCAL_BUFFER (ACPI_SIZE) (-2)
-typedef struct
+typedef struct acpi_buffer
{
ACPI_SIZE Length; /* Length in bytes of the buffer */
void *Pointer; /* pointer to buffer */
@@ -808,7 +810,7 @@ typedef struct
/*
* ACPI Table Info. One per ACPI table _type_
*/
-typedef struct AcpiTableInfo
+typedef struct acpi_table_info
{
UINT32 Count;
@@ -818,7 +820,7 @@ typedef struct AcpiTableInfo
/*
* System info returned by AcpiGetSystemInfo()
*/
-typedef struct _AcpiSysInfo
+typedef struct acpi_system_info
{
UINT32 AcpiCaVersion;
UINT32 Flags;
@@ -915,48 +917,47 @@ ACPI_STATUS (*ACPI_WALK_CALLBACK) (
ACPI_NAME Name /* ACPI object Name */
-typedef struct
+typedef struct acpi_obj_info_header
{
ACPI_COMMON_OBJ_INFO;
+
} ACPI_OBJ_INFO_HEADER;
-typedef struct
+typedef struct acpi_device_info
{
ACPI_COMMON_OBJ_INFO;
UINT32 Valid; /* Are the next bits legit? */
- NATIVE_CHAR HardwareId[9]; /* _HID value if any */
- NATIVE_CHAR UniqueId[9]; /* _UID value if any */
+ char HardwareId[9]; /* _HID value if any */
+ char UniqueId[9]; /* _UID value if any */
ACPI_INTEGER Address; /* _ADR value if any */
UINT32 CurrentStatus; /* _STA value */
+
} ACPI_DEVICE_INFO;
/* Context structs for address space handlers */
-typedef struct
+typedef struct acpi_pci_id
{
UINT16 Segment;
UINT16 Bus;
UINT16 Device;
UINT16 Function;
+
} ACPI_PCI_ID;
-typedef struct
+typedef struct acpi_mem_space_context
{
UINT32 Length;
ACPI_PHYSICAL_ADDRESS Address;
ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress;
UINT8 *MappedLogicalAddress;
ACPI_SIZE MappedLength;
-} ACPI_MEM_SPACE_CONTEXT;
-
-/* Sleep states */
-
-#define ACPI_NUM_SLEEP_STATES 7
+} ACPI_MEM_SPACE_CONTEXT;
/*
@@ -983,6 +984,8 @@ typedef struct
#define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
#define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
+#define ACPI_SPARSE_TRANSLATION (UINT8) 0x03
+
/*
* IO Port Descriptor Decode
*/
@@ -1043,7 +1046,7 @@ typedef struct
/*
* Structures used to describe device resources
*/
-typedef struct
+typedef struct acpi_resource_irq
{
UINT32 EdgeLevel;
UINT32 ActiveHighLow;
@@ -1053,7 +1056,7 @@ typedef struct
} ACPI_RESOURCE_IRQ;
-typedef struct
+typedef struct ACPI_RESOURCE_DMA
{
UINT32 Type;
UINT32 BusMaster;
@@ -1063,7 +1066,7 @@ typedef struct
} ACPI_RESOURCE_DMA;
-typedef struct
+typedef struct acpi_resource_start_dpf
{
UINT32 CompatibilityPriority;
UINT32 PerformanceRobustness;
@@ -1075,7 +1078,7 @@ typedef struct
* needed because it has no fields
*/
-typedef struct
+typedef struct acpi_resource_io
{
UINT32 IoDecode;
UINT32 MinBaseAddress;
@@ -1085,27 +1088,27 @@ typedef struct
} ACPI_RESOURCE_IO;
-typedef struct
+typedef struct acpi_resource_fixed_io
{
UINT32 BaseAddress;
UINT32 RangeLength;
} ACPI_RESOURCE_FIXED_IO;
-typedef struct
+typedef struct acpi_resource_vendor
{
UINT32 Length;
UINT8 Reserved[1];
} ACPI_RESOURCE_VENDOR;
-typedef struct
+typedef struct acpi_resource_end_tag
{
UINT8 Checksum;
} ACPI_RESOURCE_END_TAG;
-typedef struct
+typedef struct acpi_resource_mem24
{
UINT32 ReadWriteAttribute;
UINT32 MinBaseAddress;
@@ -1115,7 +1118,7 @@ typedef struct
} ACPI_RESOURCE_MEM24;
-typedef struct
+typedef struct acpi_resource_mem32
{
UINT32 ReadWriteAttribute;
UINT32 MinBaseAddress;
@@ -1125,7 +1128,7 @@ typedef struct
} ACPI_RESOURCE_MEM32;
-typedef struct
+typedef struct acpi_resource_fixed_mem32
{
UINT32 ReadWriteAttribute;
UINT32 RangeBaseAddress;
@@ -1133,28 +1136,28 @@ typedef struct
} ACPI_RESOURCE_FIXED_MEM32;
-typedef struct
+typedef struct acpi_memory_attribute
{
UINT16 CacheAttribute;
UINT16 ReadWriteAttribute;
} ACPI_MEMORY_ATTRIBUTE;
-typedef struct
+typedef struct acpi_io_attribute
{
UINT16 RangeAttribute;
- UINT16 Reserved;
+ UINT16 TranslationAttribute;
} ACPI_IO_ATTRIBUTE;
-typedef struct
+typedef struct acpi_bus_attribute
{
UINT16 Reserved1;
UINT16 Reserved2;
} ACPI_BUS_ATTRIBUTE;
-typedef union
+typedef union acpi_resource_attribute
{
ACPI_MEMORY_ATTRIBUTE Memory;
ACPI_IO_ATTRIBUTE Io;
@@ -1162,15 +1165,15 @@ typedef union
} ACPI_RESOURCE_ATTRIBUTE;
-typedef struct
+typedef struct acpi_resource_source
{
UINT32 Index;
UINT32 StringLength;
- NATIVE_CHAR *StringPtr;
+ char *StringPtr;
} ACPI_RESOURCE_SOURCE;
-typedef struct
+typedef struct acpi_resource_address16
{
UINT32 ResourceType;
UINT32 ProducerConsumer;
@@ -1187,7 +1190,7 @@ typedef struct
} ACPI_RESOURCE_ADDRESS16;
-typedef struct
+typedef struct acpi_resource_address32
{
UINT32 ResourceType;
UINT32 ProducerConsumer;
@@ -1204,7 +1207,7 @@ typedef struct
} ACPI_RESOURCE_ADDRESS32;
-typedef struct
+typedef struct acpi_resource_address64
{
UINT32 ResourceType;
UINT32 ProducerConsumer;
@@ -1221,7 +1224,7 @@ typedef struct
} ACPI_RESOURCE_ADDRESS64;
-typedef struct
+typedef struct acpi_resource_ext_irq
{
UINT32 ProducerConsumer;
UINT32 EdgeLevel;
@@ -1254,7 +1257,7 @@ typedef struct
typedef UINT32 ACPI_RESOURCE_TYPE;
-typedef union
+typedef union acpi_resource_data
{
ACPI_RESOURCE_IRQ Irq;
ACPI_RESOURCE_DMA Dma;
@@ -1273,7 +1276,7 @@ typedef union
} ACPI_RESOURCE_DATA;
-typedef struct AcpiResource
+typedef struct acpi_resource
{
ACPI_RESOURCE_TYPE Id;
UINT32 Length;
@@ -1305,7 +1308,7 @@ typedef struct acpi_pci_routing_table
UINT32 Pin;
ACPI_INTEGER Address; /* here for 64-bit alignment */
UINT32 SourceIndex;
- NATIVE_CHAR Source[4]; /* pad to 64 bits so sizeof() works in all cases */
+ char Source[4]; /* pad to 64 bits so sizeof() works in all cases */
} ACPI_PCI_ROUTING_TABLE;
diff --git a/sys/contrib/dev/acpica/amlcode.h b/sys/contrib/dev/acpica/amlcode.h
index 024b914..fba83b2 100644
--- a/sys/contrib/dev/acpica/amlcode.h
+++ b/sys/contrib/dev/acpica/amlcode.h
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
- * $Revision: 71 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -284,6 +284,7 @@
* Argument types for the AML Parser
* Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
* There can be up to 31 unique argument types
+ * Zero is reserved as end-of-list indicator
*/
#define ARGP_BYTEDATA 0x01
@@ -310,38 +311,47 @@
* Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
* There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
*
- * Note: If and when 5 bits becomes insufficient, it would probably be best
+ * Note1: These values are completely independent from the ACPI_TYPEs
+ * i.e., ARGI_INTEGER != ACPI_TYPE_INTEGER
+ *
+ * Note2: If and when 5 bits becomes insufficient, it would probably be best
* to convert to a 6-byte array of argument types, allowing 8 bits per argument.
*/
-/* "Standard" ACPI types are 1-15 (0x0F) */
-
-#define ARGI_INTEGER ACPI_TYPE_INTEGER /* 1 */
-#define ARGI_STRING ACPI_TYPE_STRING /* 2 */
-#define ARGI_BUFFER ACPI_TYPE_BUFFER /* 3 */
-#define ARGI_PACKAGE ACPI_TYPE_PACKAGE /* 4 */
-#define ARGI_EVENT ACPI_TYPE_EVENT
-#define ARGI_MUTEX ACPI_TYPE_MUTEX
-#define ARGI_REGION ACPI_TYPE_REGION
-#define ARGI_DDBHANDLE ACPI_TYPE_DDB_HANDLE
-
-/* Custom types are 0x10 through 0x1F */
-
-#define ARGI_IF 0x10
-#define ARGI_ANYOBJECT 0x11
-#define ARGI_ANYTYPE 0x12
-#define ARGI_COMPUTEDATA 0x13 /* Buffer, String, or Integer */
-#define ARGI_DATAOBJECT 0x14 /* Buffer, String, package or reference to a Node - Used only by SizeOf operator*/
-#define ARGI_COMPLEXOBJ 0x15 /* Buffer, String, or package (Used by INDEX op only) */
-#define ARGI_INTEGER_REF 0x16
-#define ARGI_OBJECT_REF 0x17
-#define ARGI_DEVICE_REF 0x18
-#define ARGI_REFERENCE 0x19
-#define ARGI_TARGETREF 0x1A /* Target, subject to implicit conversion */
-#define ARGI_FIXED_TARGET 0x1B /* Target, no implicit conversion */
-#define ARGI_SIMPLE_TARGET 0x1C /* Name, Local, Arg -- no implicit conversion */
-#define ARGI_BUFFERSTRING 0x1D
-#define ARGI_REF_OR_STRING 0x1E /* Reference or String (Used by DEREFOF op only) */
+/* Single, simple types */
+
+#define ARGI_ANYTYPE 0x01 /* Don't care */
+#define ARGI_PACKAGE 0x02
+#define ARGI_EVENT 0x03
+#define ARGI_MUTEX 0x04
+#define ARGI_DDBHANDLE 0x05
+
+/* Interchangeable types (via implicit conversion) */
+
+#define ARGI_INTEGER 0x06
+#define ARGI_STRING 0x07
+#define ARGI_BUFFER 0x08
+#define ARGI_BUFFER_OR_STRING 0x09 /* Used by MID op only */
+#define ARGI_COMPUTEDATA 0x0A /* Buffer, String, or Integer */
+
+/* Reference objects */
+
+#define ARGI_INTEGER_REF 0x0B
+#define ARGI_OBJECT_REF 0x0C
+#define ARGI_DEVICE_REF 0x0D
+#define ARGI_REFERENCE 0x0E
+#define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */
+#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */
+#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */
+
+/* Multiple/complex types */
+
+#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by SizeOf operator*/
+#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */
+#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */
+#define ARGI_REGION_OR_FIELD 0x15 /* Used by LOAD op only */
+
+/* Note: types above can expand to 0x1F maximum */
#define ARGI_INVALID_OPCODE 0xFFFFFFFF
diff --git a/sys/contrib/dev/acpica/amlresrc.h b/sys/contrib/dev/acpica/amlresrc.h
index 815fafb..6ca7978 100644
--- a/sys/contrib/dev/acpica/amlresrc.h
+++ b/sys/contrib/dev/acpica/amlresrc.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amlresrc.h - AML resource descriptors
- * $Revision: 22 $
+ * $Revision: 23 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dbdisply.c b/sys/contrib/dev/acpica/dbdisply.c
index 9d6e798..2f74d1f 100644
--- a/sys/contrib/dev/acpica/dbdisply.c
+++ b/sys/contrib/dev/acpica/dbdisply.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
- * $Revision: 81 $
+ * $Revision: 89 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -220,14 +220,14 @@ AcpiDbDumpParserDescriptor (
void
AcpiDbDecodeAndDisplayObject (
- NATIVE_CHAR *Target,
- NATIVE_CHAR *OutputType)
+ char *Target,
+ char *OutputType)
{
void *ObjPtr;
ACPI_NAMESPACE_NODE *Node;
ACPI_OPERAND_OBJECT *ObjDesc;
UINT32 Display = DB_BYTE_DISPLAY;
- NATIVE_CHAR Buffer[80];
+ char Buffer[80];
ACPI_BUFFER RetBuf;
ACPI_STATUS Status;
UINT32 Size;
@@ -793,9 +793,15 @@ AcpiDbDisplayLocals (void)
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
+ if (!Node)
+ {
+ AcpiOsPrintf ("No method node (Executing subtree for buffer or opregion)\n");
+ return;
+ }
+
AcpiOsPrintf ("Local Variables for method [%4.4s]:\n", Node->Name.Ascii);
- for (i = 0; i < MTH_NUM_LOCALS; i++)
+ for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
{
ObjDesc = WalkState->LocalVariables[i].Object;
AcpiOsPrintf ("Local%d: ", i);
@@ -836,6 +842,11 @@ AcpiDbDisplayArguments (void)
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
+ if (!Node)
+ {
+ AcpiOsPrintf ("No method node (Executing subtree for buffer or opregion)\n");
+ return;
+ }
NumArgs = ObjDesc->Method.ParamCount;
Concurrency = ObjDesc->Method.Concurrency;
@@ -843,7 +854,7 @@ AcpiDbDisplayArguments (void)
AcpiOsPrintf ("Method [%4.4s] has %X arguments, max concurrency = %X\n",
Node->Name.Ascii, NumArgs, Concurrency);
- for (i = 0; i < NumArgs; i++)
+ for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
{
ObjDesc = WalkState->Arguments[i].Object;
AcpiOsPrintf ("Arg%d: ", i);
@@ -1005,5 +1016,41 @@ AcpiDbDisplayArgumentObject (
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbDisplayGpes
+ *
+ * PARAMETERS:
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Display the GPE structures
+ *
+ ******************************************************************************/
+
+void
+AcpiDbDisplayGpes (void)
+{
+ ACPI_GPE_BLOCK_INFO *GpeBlock;
+ UINT32 i = 0;
+
+
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
+ {
+ AcpiOsPrintf ("Block %d - %p\n", i, GpeBlock);
+ AcpiOsPrintf (" Registers: %d\n", GpeBlock->RegisterCount);
+ AcpiOsPrintf (" GPE range: %d to %d\n", GpeBlock->BlockBaseNumber,
+ GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8) -1);
+ AcpiOsPrintf (" RegisterInfo: %p\n", GpeBlock->RegisterInfo);
+ AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
+ i++;
+
+ GpeBlock = GpeBlock->Next;
+ }
+}
+
+
#endif /* ACPI_DEBUGGER */
diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c
index d4ccd64..505496e 100644
--- a/sys/contrib/dev/acpica/dbexec.c
+++ b/sys/contrib/dev/acpica/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 46 $
+ * $Revision: 53 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,6 +117,7 @@
#include "acpi.h"
#include "acdebug.h"
+#include "acnamesp.h"
#ifdef ACPI_DEBUGGER
@@ -147,7 +148,7 @@ AcpiDbExecuteMethod (
{
ACPI_STATUS Status;
ACPI_OBJECT_LIST ParamObjects;
- ACPI_OBJECT Params[MTH_NUM_ARGS];
+ ACPI_OBJECT Params[ACPI_METHOD_NUM_ARGS];
UINT32 i;
@@ -160,7 +161,7 @@ AcpiDbExecuteMethod (
if (Info->Args && Info->Args[0])
{
- for (i = 0; Info->Args[i] && i < MTH_NUM_ARGS; i++)
+ for (i = 0; Info->Args[i] && i < ACPI_METHOD_NUM_ARGS; i++)
{
Params[i].Type = ACPI_TYPE_INTEGER;
Params[i].Integer.Value = ACPI_STRTOUL (Info->Args[i], NULL, 16);
@@ -191,6 +192,7 @@ AcpiDbExecuteMethod (
/* Do the actual method execution */
+ AcpiGbl_MethodExecuting = TRUE;
Status = AcpiEvaluateObject (NULL, Info->Pathname, &ParamObjects, ReturnObj);
AcpiGbl_CmSingleStep = FALSE;
@@ -285,6 +287,58 @@ AcpiDbGetOutstandingAllocations (
/*******************************************************************************
*
+ * FUNCTION: AcpiDbExecutionWalk
+ *
+ * PARAMETERS: WALK_CALLBACK
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Execute a control method. Name is relative to the current
+ * scope.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDbExecutionWalk (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
+ ACPI_BUFFER ReturnObj;
+ ACPI_STATUS Status;
+
+
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (ObjDesc->Method.ParamCount)
+ {
+ return (AE_OK);
+ }
+
+ ReturnObj.Pointer = NULL;
+ ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+
+ AcpiNsPrintNodePathname (Node, "Execute");
+
+ /* Do the actual method execution */
+
+ AcpiOsPrintf ("\n");
+ AcpiGbl_MethodExecuting = TRUE;
+
+ Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj);
+
+ AcpiOsPrintf ("[%4.4s] returned %s\n", Node->Name.Ascii,
+ AcpiFormatException (Status));
+ AcpiGbl_MethodExecuting = FALSE;
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbExecute
*
* PARAMETERS: Name - Name of method to execute
@@ -300,8 +354,8 @@ AcpiDbGetOutstandingAllocations (
void
AcpiDbExecute (
- NATIVE_CHAR *Name,
- NATIVE_CHAR **Args,
+ char *Name,
+ char **Args,
UINT32 Flags)
{
ACPI_STATUS Status;
@@ -318,15 +372,24 @@ AcpiDbExecute (
PreviousAllocations = AcpiDbGetOutstandingAllocations ();
#endif
- AcpiGbl_DbMethodInfo.Name = Name;
- AcpiGbl_DbMethodInfo.Args = Args;
- AcpiGbl_DbMethodInfo.Flags = Flags;
+ if (*Name == '*')
+ {
+ (void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
+ AcpiDbExecutionWalk, NULL, NULL);
+ return;
+ }
+ else
+ {
+ AcpiGbl_DbMethodInfo.Name = Name;
+ AcpiGbl_DbMethodInfo.Args = Args;
+ AcpiGbl_DbMethodInfo.Flags = Flags;
- ReturnObj.Pointer = NULL;
- ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ ReturnObj.Pointer = NULL;
+ ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
- AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
- Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
+ AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
+ Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
+ }
/*
* Allow any handlers in separate threads to complete.
@@ -363,7 +426,7 @@ AcpiDbExecute (
if (ReturnObj.Length)
{
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
- AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
+ AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
(UINT32) ReturnObj.Length);
AcpiDbDumpObject (ReturnObj.Pointer, 1);
}
@@ -441,9 +504,9 @@ AcpiDbMethodThread (
void
AcpiDbCreateExecutionThreads (
- NATIVE_CHAR *NumThreadsArg,
- NATIVE_CHAR *NumLoopsArg,
- NATIVE_CHAR *MethodNameArg)
+ char *NumThreadsArg,
+ char *NumLoopsArg,
+ char *MethodNameArg)
{
ACPI_STATUS Status;
UINT32 NumThreads;
diff --git a/sys/contrib/dev/acpica/dbhistry.c b/sys/contrib/dev/acpica/dbhistry.c
index fb5b0e8..bbdaa25 100644
--- a/sys/contrib/dev/acpica/dbhistry.c
+++ b/sys/contrib/dev/acpica/dbhistry.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
- * $Revision: 25 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,7 +131,7 @@
typedef struct HistoryInfo
{
- NATIVE_CHAR Command[80];
+ char Command[80];
UINT32 CmdNum;
} HISTORY_INFO;
@@ -158,7 +158,7 @@ static UINT32 AcpiGbl_NextCmdNum = 1;
void
AcpiDbAddToHistory (
- NATIVE_CHAR *CommandLine)
+ char *CommandLine)
{
/* Put command into the next available slot */
@@ -208,7 +208,7 @@ AcpiDbAddToHistory (
void
AcpiDbDisplayHistory (void)
{
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
UINT16 HistoryIndex;
@@ -243,11 +243,11 @@ AcpiDbDisplayHistory (void)
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiDbGetFromHistory (
- NATIVE_CHAR *CommandNumArg)
+ char *CommandNumArg)
{
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
UINT16 HistoryIndex;
UINT32 CmdNum;
diff --git a/sys/contrib/dev/acpica/dbinput.c b/sys/contrib/dev/acpica/dbinput.c
index 8edcbda..546a09f 100644
--- a/sys/contrib/dev/acpica/dbinput.c
+++ b/sys/contrib/dev/acpica/dbinput.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
- * $Revision: 88 $
+ * $Revision: 96 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -148,6 +148,8 @@ enum AcpiExDebuggerCommands
CMD_EXIT,
CMD_FIND,
CMD_GO,
+ CMD_GPE,
+ CMD_GPES,
CMD_HELP,
CMD_HELP2,
CMD_HISTORY,
@@ -203,6 +205,8 @@ static const COMMAND_INFO AcpiGbl_DbCommands[] =
{"EXIT", 0},
{"FIND", 1},
{"GO", 0},
+ {"GPE", 2},
+ {"GPES", 0},
{"HELP", 0},
{"?", 0},
{"HISTORY", 0},
@@ -253,7 +257,7 @@ static const COMMAND_INFO AcpiGbl_DbCommands[] =
void
AcpiDbDisplayHelp (
- NATIVE_CHAR *HelpType)
+ char *HelpType)
{
@@ -269,7 +273,6 @@ AcpiDbDisplayHelp (
AcpiOsPrintf (" [METHOD] Control Method Execution Commands\n");
AcpiOsPrintf (" [FILE] File I/O Commands\n");
return;
-
}
/*
@@ -300,9 +303,7 @@ AcpiDbDisplayHelp (
case 'N':
AcpiOsPrintf ("\nNamespace Access Commands\n\n");
- AcpiOsPrintf ("Debug <Namepath> [Arguments] Single Step a control method\n");
AcpiOsPrintf ("Event <F|G> <Value> Generate AcpiEvent (Fixed/GPE)\n");
- AcpiOsPrintf ("Execute <Namepath> [Arguments] Execute control method\n");
AcpiOsPrintf ("Find <Name> (? is wildcard) Find ACPI name(s) with wildcards\n");
AcpiOsPrintf ("Method Display list of loaded control methods\n");
AcpiOsPrintf ("Namespace [<Addr>|<Path>] [Depth] Display loaded namespace tree/subtree\n");
@@ -321,6 +322,8 @@ AcpiDbDisplayHelp (
AcpiOsPrintf ("Arguments (or Args) Display method arguments\n");
AcpiOsPrintf ("Breakpoint <AmlOffset> Set an AML execution breakpoint\n");
AcpiOsPrintf ("Call Run to next control method invocation\n");
+ AcpiOsPrintf ("Debug <Namepath> [Arguments] Single Step a control method\n");
+ AcpiOsPrintf ("Execute <Namepath> [Arguments] Execute control method\n");
AcpiOsPrintf ("Go Allow method to run to completion\n");
AcpiOsPrintf ("Information Display info about the current method\n");
AcpiOsPrintf ("Into Step into (not over) a method call\n");
@@ -360,12 +363,12 @@ AcpiDbDisplayHelp (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiDbGetNextToken (
- NATIVE_CHAR *String,
- NATIVE_CHAR **Next)
+ char *String,
+ char **Next)
{
- NATIVE_CHAR *Start;
+ char *Start;
/* At end of buffer? */
@@ -428,12 +431,12 @@ AcpiDbGetNextToken (
UINT32
AcpiDbGetLine (
- NATIVE_CHAR *InputBuffer)
+ char *InputBuffer)
{
UINT32 i;
UINT32 Count;
- NATIVE_CHAR *Next;
- NATIVE_CHAR *This;
+ char *Next;
+ char *This;
ACPI_STRCPY (AcpiGbl_DbParsedBuf, InputBuffer);
@@ -482,7 +485,7 @@ AcpiDbGetLine (
UINT32
AcpiDbMatchCommand (
- NATIVE_CHAR *UserCommand)
+ char *UserCommand)
{
UINT32 i;
@@ -523,14 +526,14 @@ AcpiDbMatchCommand (
ACPI_STATUS
AcpiDbCommandDispatch (
- NATIVE_CHAR *InputBuffer,
+ char *InputBuffer,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op)
{
UINT32 Temp;
UINT32 CommandIndex;
UINT32 ParamCount;
- NATIVE_CHAR *CommandLine;
+ char *CommandLine;
ACPI_STATUS Status = AE_CTRL_TRUE;
@@ -616,13 +619,21 @@ AcpiDbCommandDispatch (
break;
case CMD_FIND:
- Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
+ AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
break;
case CMD_GO:
AcpiGbl_CmSingleStep = FALSE;
return (AE_OK);
+ case CMD_GPE:
+ AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+ break;
+
+ case CMD_GPES:
+ AcpiDbDisplayGpes ();
+ break;
+
case CMD_HELP:
case CMD_HELP2:
AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);
@@ -701,7 +712,7 @@ AcpiDbCommandDispatch (
break;
case CMD_LOAD:
- Status = AcpiDbLoadAcpiTable (AcpiGbl_DbArgs[1]);
+ Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -717,7 +728,7 @@ AcpiDbCommandDispatch (
break;
case CMD_METHODS:
- Status = AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
+ AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
break;
case CMD_NAMESPACE:
@@ -731,7 +742,7 @@ AcpiDbCommandDispatch (
case CMD_OBJECT:
ACPI_STRUPR (AcpiGbl_DbArgs[1]);
- Status = AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+ AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
case CMD_OPEN:
@@ -763,7 +774,7 @@ AcpiDbCommandDispatch (
break;
case CMD_STATS:
- Status = AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
+ AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
break;
case CMD_STOP:
@@ -804,7 +815,7 @@ AcpiDbCommandDispatch (
if (!AcpiGbl_DbOutputToFile)
{
- AcpiDbgLevel = DEBUG_DEFAULT;
+ AcpiDbgLevel = ACPI_DEBUG_DEFAULT;
}
/* Shutdown */
@@ -914,7 +925,7 @@ AcpiDbSingleThread (
ACPI_STATUS
AcpiDbUserCommands (
- NATIVE_CHAR Prompt,
+ char Prompt,
ACPI_PARSE_OBJECT *Op)
{
ACPI_STATUS Status = AE_OK;
diff --git a/sys/contrib/dev/acpica/dbstats.c b/sys/contrib/dev/acpica/dbstats.c
index 37de8fb..cf6c531 100644
--- a/sys/contrib/dev/acpica/dbstats.c
+++ b/sys/contrib/dev/acpica/dbstats.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
- * $Revision: 64 $
+ * $Revision: 66 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -366,7 +366,7 @@ AcpiDbCountNamespaceObjects (
ACPI_STATUS
AcpiDbDisplayStatistics (
- NATIVE_CHAR *TypeArg)
+ char *TypeArg)
{
UINT32 i;
UINT32 Type;
diff --git a/sys/contrib/dev/acpica/dbutils.c b/sys/contrib/dev/acpica/dbutils.c
index cd4f435..3fa3eb0 100644
--- a/sys/contrib/dev/acpica/dbutils.c
+++ b/sys/contrib/dev/acpica/dbutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
- * $Revision: 57 $
+ * $Revision: 61 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,6 +131,46 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDbMatchArgument
+ *
+ * PARAMETERS: UserArgument - User command line
+ * Arguments - Array of commands to match against
+ *
+ * RETURN: Index into command array or ACPI_TYPE_NOT_FOUND if not found
+ *
+ * DESCRIPTION: Search command array for a command match
+ *
+ ******************************************************************************/
+
+ACPI_OBJECT_TYPE
+AcpiDbMatchArgument (
+ char *UserArgument,
+ ARGUMENT_INFO *Arguments)
+{
+ UINT32 i;
+
+
+ if (!UserArgument || UserArgument[0] == 0)
+ {
+ return (ACPI_TYPE_NOT_FOUND);
+ }
+
+ for (i = 0; Arguments[i].Name; i++)
+ {
+ if (ACPI_STRSTR (Arguments[i].Name, UserArgument) == Arguments[i].Name)
+ {
+ return (i);
+ }
+ }
+
+ /* Argument not recognized */
+
+ return (ACPI_TYPE_NOT_FOUND);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbSetOutputDestination
*
* PARAMETERS: OutputFlags - Current flags word
@@ -246,7 +286,14 @@ AcpiDbDumpObject (
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
- AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
+ if (ObjDesc->Buffer.Length)
+ {
+ AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
+ }
+ else
+ {
+ AcpiOsPrintf ("\n");
+ }
break;
@@ -301,7 +348,7 @@ AcpiDbDumpObject (
void
AcpiDbPrepNamestring (
- NATIVE_CHAR *Name)
+ char *Name)
{
@@ -452,9 +499,9 @@ AcpiDbSecondPassParse (
ACPI_NAMESPACE_NODE *
AcpiDbLocalNsLookup (
- NATIVE_CHAR *Name)
+ char *Name)
{
- NATIVE_CHAR *InternalPath;
+ char *InternalPath;
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node = NULL;
diff --git a/sys/contrib/dev/acpica/dmbuffer.c b/sys/contrib/dev/acpica/dmbuffer.c
index 32271db7..5d734c4 100644
--- a/sys/contrib/dev/acpica/dmbuffer.c
+++ b/sys/contrib/dev/acpica/dmbuffer.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmbuffer - AML disassembler, buffer and string support
- * $Revision: 8 $
+ * $Revision: 10 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -264,7 +264,7 @@ AcpiDmIsUnicodeBuffer (
UINT32 WordCount;
ACPI_PARSE_OBJECT *SizeOp;
ACPI_PARSE_OBJECT *NextOp;
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
/* Buffer size is the buffer argument */
@@ -440,7 +440,7 @@ AcpiIsEisaId (
UINT32 Name;
UINT32 BigEndianId;
ACPI_PARSE_OBJECT *NextOp;
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
UINT32 Prefix[3];
diff --git a/sys/contrib/dev/acpica/dmnames.c b/sys/contrib/dev/acpica/dmnames.c
index 799bfe1..c9a0069 100644
--- a/sys/contrib/dev/acpica/dmnames.c
+++ b/sys/contrib/dev/acpica/dmnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmnames - AML disassembler, names, namestrings, pathnames
- * $Revision: 4 $
+ * $Revision: 6 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -316,7 +316,7 @@ Exit:
void
AcpiDmNamestring (
- NATIVE_CHAR *Name)
+ char *Name)
{
UINT32 SegCount;
diff --git a/sys/contrib/dev/acpica/dmopcode.c b/sys/contrib/dev/acpica/dmopcode.c
index 8f89c66..4059848 100644
--- a/sys/contrib/dev/acpica/dmopcode.c
+++ b/sys/contrib/dev/acpica/dmopcode.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmopcode - AML disassembler, specific AML opcodes
- * $Revision: 79 $
+ * $Revision: 81 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -335,7 +335,7 @@ AcpiDmMatchKeyword (
{
- if (Op->Common.Value.Integer32 >= NUM_MATCH_OPS)
+ if (Op->Common.Value.Integer32 >= ACPI_NUM_MATCH_OPS)
{
AcpiOsPrintf ("/* Unknown Match Keyword encoding */");
}
diff --git a/sys/contrib/dev/acpica/dmresrc.c b/sys/contrib/dev/acpica/dmresrc.c
index 03d34bc..5c8c52f 100644
--- a/sys/contrib/dev/acpica/dmresrc.c
+++ b/sys/contrib/dev/acpica/dmresrc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrc.c - Resource Descriptor disassembly
- * $Revision: 5 $
+ * $Revision: 7 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -195,7 +195,7 @@ AcpiDmResourceDescriptor (
UINT8 *ByteData,
UINT32 ByteCount)
{
- NATIVE_UINT CurrentByteOffset;
+ ACPI_NATIVE_UINT CurrentByteOffset;
UINT8 CurrentByte;
UINT8 DescriptorId;
UINT32 Length;
@@ -224,7 +224,7 @@ AcpiDmResourceDescriptor (
CurrentByteOffset += 1;
}
- CurrentByteOffset += (NATIVE_UINT) Length;
+ CurrentByteOffset += (ACPI_NATIVE_UINT) Length;
/* Determine type of resource */
@@ -406,7 +406,7 @@ AcpiDmIsResourceDescriptor (
UINT8 *ByteData;
UINT32 ByteCount;
ACPI_PARSE_OBJECT *NextOp;
- NATIVE_UINT CurrentByteOffset;
+ ACPI_NATIVE_UINT CurrentByteOffset;
UINT8 CurrentByte;
UINT8 DescriptorId;
UINT32 Length;
@@ -463,7 +463,7 @@ AcpiDmIsResourceDescriptor (
CurrentByteOffset += 1;
}
- CurrentByteOffset += (NATIVE_UINT) Length;
+ CurrentByteOffset += (ACPI_NATIVE_UINT) Length;
/* Determine type of resource */
diff --git a/sys/contrib/dev/acpica/dmresrcl.c b/sys/contrib/dev/acpica/dmresrcl.c
index df27704..34993ed 100644
--- a/sys/contrib/dev/acpica/dmresrcl.c
+++ b/sys/contrib/dev/acpica/dmresrcl.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
- * $Revision: 7 $
+ * $Revision: 10 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -544,17 +544,31 @@ AcpiDmInterruptDescriptor (
UINT32 Level)
{
UINT32 i;
+ UINT8 *Rover;
AcpiDmIndent (Level);
- AcpiOsPrintf ("Interrupt (%s, %s, %s, %s)\n",
+ AcpiOsPrintf ("Interrupt (%s, %s, %s, %s",
AcpiGbl_ConsumeDecode [(Resource->Flags & 1)],
AcpiGbl_HEDecode [(Resource->Flags >> 1) & 1],
AcpiGbl_LLDecode [(Resource->Flags >> 2) & 1],
AcpiGbl_SHRDecode [(Resource->Flags >> 3) & 1]);
- /* TBD "Resource Source, optional */
+ /* Resource Index/Source, optional -- at end of descriptor */
+ if (Resource->Length > (UINT16) (4 * Resource->TableLength) + 2)
+ {
+ /* Get a pointer past the interrupt values */
+
+ Rover = ((UINT8 *) Resource) + ((4 * Resource->TableLength) + 5);
+
+ /* Resource Index */
+ /* Resource Source */
+
+ AcpiOsPrintf (", 0x%X, \"%s\"", (UINT32) Rover[0], (char *) &Rover[1]);
+ }
+
+ AcpiOsPrintf (")\n");
AcpiDmIndent (Level);
AcpiOsPrintf ("{\n");
for (i = 0; i < Resource->TableLength; i++)
diff --git a/sys/contrib/dev/acpica/dmresrcs.c b/sys/contrib/dev/acpica/dmresrcs.c
index a0ecee9..3c12a37 100644
--- a/sys/contrib/dev/acpica/dmresrcs.c
+++ b/sys/contrib/dev/acpica/dmresrcs.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
- * $Revision: 3 $
+ * $Revision: 4 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dmutils.c b/sys/contrib/dev/acpica/dmutils.c
index add7780..02d2072 100644
--- a/sys/contrib/dev/acpica/dmutils.c
+++ b/sys/contrib/dev/acpica/dmutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmutils - AML disassembler utilities
- * $Revision: 5 $
+ * $Revision: 8 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,7 +128,7 @@
/* Data used in keeping track of fields */
#if 0
-const NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
+const char *AcpiGbl_FENames[ACPI_NUM_FIELD_NAMES] =
{
"skip",
"?access?"
@@ -136,7 +136,7 @@ const NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
#endif
-const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
+const char *AcpiGbl_MatchOps[ACPI_NUM_MATCH_OPS] =
{
"MTR",
"MEQ",
@@ -149,7 +149,7 @@ const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
/* Access type decoding */
-const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
+const char *AcpiGbl_AccessTypes[ACPI_NUM_ACCESS_TYPES] =
{
"AnyAcc",
"ByteAcc",
@@ -162,7 +162,7 @@ const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
/* Lock rule decoding */
-const NATIVE_CHAR *AcpiGbl_LockRule[NUM_LOCK_RULES] =
+const char *AcpiGbl_LockRule[ACPI_NUM_LOCK_RULES] =
{
"NoLock",
"Lock"
@@ -170,7 +170,7 @@ const NATIVE_CHAR *AcpiGbl_LockRule[NUM_LOCK_RULES] =
/* Update rule decoding */
-const NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
+const char *AcpiGbl_UpdateRules[ACPI_NUM_UPDATE_RULES] =
{
"Preserve",
"WriteAsOnes",
diff --git a/sys/contrib/dev/acpica/dmwalk.c b/sys/contrib/dev/acpica/dmwalk.c
index 2883a29..d73db16 100644
--- a/sys/contrib/dev/acpica/dmwalk.c
+++ b/sys/contrib/dev/acpica/dmwalk.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmwalk - AML disassembly tree walk
- * $Revision: 8 $
+ * $Revision: 9 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dsfield.c b/sys/contrib/dev/acpica/dsfield.c
index 13c7bb2..58d35c4 100644
--- a/sys/contrib/dev/acpica/dsfield.c
+++ b/sys/contrib/dev/acpica/dsfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
- * $Revision: 69 $
+ * $Revision: 71 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -346,7 +346,7 @@ AcpiDsGetFieldNames (
/* Lookup the name */
Status = AcpiNsLookup (WalkState->ScopeInfo,
- (NATIVE_CHAR *) &Arg->Named.Name,
+ (char *) &Arg->Named.Name,
Info->FieldType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Info->FieldNode);
if (ACPI_FAILURE (Status))
@@ -523,7 +523,7 @@ AcpiDsInitFieldObjects (
if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
{
Status = AcpiNsLookup (WalkState->ScopeInfo,
- (NATIVE_CHAR *) &Arg->Named.Name,
+ (char *) &Arg->Named.Name,
Type, ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND,
WalkState, &Node);
diff --git a/sys/contrib/dev/acpica/dsmethod.c b/sys/contrib/dev/acpica/dsmethod.c
index 9676539..3916387 100644
--- a/sys/contrib/dev/acpica/dsmethod.c
+++ b/sys/contrib/dev/acpica/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 89 $
+ * $Revision: 90 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dsmthdat.c b/sys/contrib/dev/acpica/dsmthdat.c
index 301cadb..61a4fc5 100644
--- a/sys/contrib/dev/acpica/dsmthdat.c
+++ b/sys/contrib/dev/acpica/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 64 $
+ * $Revision: 69 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,6 +120,7 @@
#include "acdispat.h"
#include "amlcode.h"
#include "acnamesp.h"
+#include "acinterp.h"
#define _COMPONENT ACPI_DISPATCHER
@@ -159,7 +160,7 @@ AcpiDsMethodDataInit (
/* Init the method arguments */
- for (i = 0; i < MTH_NUM_ARGS; i++)
+ for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
{
ACPI_MOVE_UNALIGNED32_TO_32 (&WalkState->Arguments[i].Name,
NAMEOF_ARG_NTE);
@@ -171,7 +172,7 @@ AcpiDsMethodDataInit (
/* Init the method locals */
- for (i = 0; i < MTH_NUM_LOCALS; i++)
+ for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
{
ACPI_MOVE_UNALIGNED32_TO_32 (&WalkState->LocalVariables[i].Name,
NAMEOF_LOCAL_NTE);
@@ -211,7 +212,7 @@ AcpiDsMethodDataDeleteAll (
/* Detach the locals */
- for (Index = 0; Index < MTH_NUM_LOCALS; Index++)
+ for (Index = 0; Index < ACPI_METHOD_NUM_LOCALS; Index++)
{
if (WalkState->LocalVariables[Index].Object)
{
@@ -226,7 +227,7 @@ AcpiDsMethodDataDeleteAll (
/* Detach the arguments */
- for (Index = 0; Index < MTH_NUM_ARGS; Index++)
+ for (Index = 0; Index < ACPI_METHOD_NUM_ARGS; Index++)
{
if (WalkState->Arguments[Index].Object)
{
@@ -280,7 +281,7 @@ AcpiDsMethodDataInitArgs (
/* Copy passed parameters into the new method stack frame */
- while ((Index < MTH_NUM_ARGS) && (Index < MaxParamCount) && Params[Index])
+ while ((Index < ACPI_METHOD_NUM_ARGS) && (Index < MaxParamCount) && Params[Index])
{
/*
* A valid parameter.
@@ -331,10 +332,10 @@ AcpiDsMethodDataGetNode (
{
case AML_LOCAL_OP:
- if (Index > MTH_MAX_LOCAL)
+ if (Index > ACPI_METHOD_MAX_LOCAL)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Local index %d is invalid (max %d)\n",
- Index, MTH_MAX_LOCAL));
+ Index, ACPI_METHOD_MAX_LOCAL));
return_ACPI_STATUS (AE_AML_INVALID_INDEX);
}
@@ -345,10 +346,10 @@ AcpiDsMethodDataGetNode (
case AML_ARG_OP:
- if (Index > MTH_MAX_ARG)
+ if (Index > ACPI_METHOD_MAX_ARG)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Arg index %d is invalid (max %d)\n",
- Index, MTH_MAX_ARG));
+ Index, ACPI_METHOD_MAX_ARG));
return_ACPI_STATUS (AE_AML_INVALID_INDEX);
}
@@ -378,6 +379,7 @@ AcpiDsMethodDataGetNode (
* RETURN: Status
*
* DESCRIPTION: Insert an object onto the method stack at entry Opcode:Index.
+ * Note: There is no "implicit conversion" for locals.
*
******************************************************************************/
@@ -390,11 +392,17 @@ AcpiDsMethodDataSetValue (
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node;
+ ACPI_OPERAND_OBJECT *NewDesc = Object;
ACPI_FUNCTION_TRACE ("DsMethodDataSetValue");
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "obj %p op %X, ref count = %d [%s]\n", Object,
+ Opcode, Object->Common.ReferenceCount,
+ AcpiUtGetTypeName (Object->Common.Type)));
+
/* Get the namespace node for the arg/local */
Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
@@ -403,14 +411,33 @@ AcpiDsMethodDataSetValue (
return_ACPI_STATUS (Status);
}
- /* Increment ref count so object can't be deleted while installed */
+ /*
+ * If the object has just been created and is not attached to anything,
+ * (the reference count is 1), then we can just store it directly into
+ * the arg/local. Otherwise, we must copy it.
+ */
+ if (Object->Common.ReferenceCount > 1)
+ {
+ Status = AcpiUtCopyIobjectToIobject (Object, &NewDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
- AcpiUtAddReference (Object);
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object Copied %p, new %p\n",
+ Object, NewDesc));
+ }
+ else
+ {
+ /* Increment ref count so object can't be deleted while installed */
- /* Install the object into the stack entry */
+ AcpiUtAddReference (NewDesc);
+ }
- Node->Object = Object;
- return_ACPI_STATUS (AE_OK);
+ /* Install the object */
+
+ Node->Object = NewDesc;
+ return_ACPI_STATUS (Status);
}
@@ -676,7 +703,8 @@ AcpiDsStoreObjectToLocal (
CurrentObjDesc = AcpiNsGetAttachedObject (Node);
if (CurrentObjDesc == ObjDesc)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n", ObjDesc));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n",
+ ObjDesc));
return_ACPI_STATUS (Status);
}
@@ -706,19 +734,19 @@ AcpiDsStoreObjectToLocal (
*/
if (Opcode == AML_ARG_OP)
{
- /*
+ /*
* Make sure that the object is the correct type. This may be overkill, but
* it is here because references were NS nodes in the past. Now they are
* operand objects of type Reference.
*/
if (ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) != ACPI_DESC_TYPE_OPERAND)
{
- ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: %X\n",
+ ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: %X\n",
CurrentObjDesc->Common.Type));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
- /*
+ /*
* If we have a valid reference object that came from RefOf(), do the
* indirect store
*/
@@ -729,16 +757,12 @@ AcpiDsStoreObjectToLocal (
"Arg (%p) is an ObjRef(Node), storing in node %p\n",
ObjDesc, CurrentObjDesc));
- /* Detach an existing object from the referenced Node */
-
- AcpiNsDetachObject (CurrentObjDesc->Reference.Object);
-
/*
- * Store this object into the Node
+ * Store this object to the Node
* (perform the indirect store)
*/
- Status = AcpiNsAttachObject (CurrentObjDesc->Reference.Object,
- ObjDesc, ACPI_GET_OBJECT_TYPE (ObjDesc));
+ Status = AcpiExStoreObjectToNode (ObjDesc,
+ CurrentObjDesc->Reference.Object, WalkState);
return_ACPI_STATUS (Status);
}
}
diff --git a/sys/contrib/dev/acpica/dsobject.c b/sys/contrib/dev/acpica/dsobject.c
index a81a830..aa455c5 100644
--- a/sys/contrib/dev/acpica/dsobject.c
+++ b/sys/contrib/dev/acpica/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 110 $
+ * $Revision: 114 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,194 +128,6 @@
#ifndef ACPI_NO_METHOD_EXECUTION
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsInitOneObject
- *
- * PARAMETERS: ObjHandle - Node
- * Level - Current nesting level
- * Context - Points to a init info struct
- * ReturnValue - Not used
- *
- * RETURN: Status
- *
- * DESCRIPTION: Callback from AcpiWalkNamespace. Invoked for every object
- * within the namespace.
- *
- * Currently, the only objects that require initialization are:
- * 1) Methods
- * 2) Operation Regions
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsInitOneObject (
- ACPI_HANDLE ObjHandle,
- UINT32 Level,
- void *Context,
- void **ReturnValue)
-{
- ACPI_OBJECT_TYPE Type;
- ACPI_STATUS Status;
- ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context;
-
-
- ACPI_FUNCTION_NAME ("DsInitOneObject");
-
-
- /*
- * We are only interested in objects owned by the table that
- * was just loaded
- */
- if (((ACPI_NAMESPACE_NODE *) ObjHandle)->OwnerId !=
- Info->TableDesc->TableId)
- {
- return (AE_OK);
- }
-
- Info->ObjectCount++;
-
- /* And even then, we are only interested in a few object types */
-
- Type = AcpiNsGetType (ObjHandle);
-
- switch (Type)
- {
- case ACPI_TYPE_REGION:
-
- Status = AcpiDsInitializeRegion (ObjHandle);
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
- ObjHandle, ((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Ascii,
- AcpiFormatException (Status)));
- }
-
- Info->OpRegionCount++;
- break;
-
-
- case ACPI_TYPE_METHOD:
-
- Info->MethodCount++;
-
- if (!(AcpiDbgLevel & ACPI_LV_INIT))
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
- }
-
- /*
- * Set the execution data width (32 or 64) based upon the
- * revision number of the parent ACPI table.
- * TBD: This is really for possible future support of integer width
- * on a per-table basis. Currently, we just use a global for the width.
- */
- if (Info->TableDesc->Pointer->Revision == 1)
- {
- ((ACPI_NAMESPACE_NODE *) ObjHandle)->Flags |= ANOBJ_DATA_WIDTH_32;
- }
-
- /*
- * Always parse methods to detect errors, we may delete
- * the parse tree below
- */
- Status = AcpiDsParseMethod (ObjHandle);
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
- ObjHandle, ((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Ascii,
- AcpiFormatException (Status)));
-
- /* This parse failed, but we will continue parsing more methods */
-
- break;
- }
-
- /*
- * Delete the parse tree. We simple re-parse the method
- * for every execution since there isn't much overhead
- */
- AcpiNsDeleteNamespaceSubtree (ObjHandle);
- AcpiNsDeleteNamespaceByOwner (((ACPI_NAMESPACE_NODE *) ObjHandle)->Object->Method.OwningId);
- break;
-
-
- case ACPI_TYPE_DEVICE:
-
- Info->DeviceCount++;
- break;
-
-
- default:
- break;
- }
-
- /*
- * We ignore errors from above, and always return OK, since
- * we don't want to abort the walk on a single error.
- */
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsInitializeObjects
- *
- * PARAMETERS: TableDesc - Descriptor for parent ACPI table
- * StartNode - Root of subtree to be initialized.
- *
- * RETURN: Status
- *
- * DESCRIPTION: Walk the namespace starting at "StartNode" and perform any
- * necessary initialization on the objects found therein
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsInitializeObjects (
- ACPI_TABLE_DESC *TableDesc,
- ACPI_NAMESPACE_NODE *StartNode)
-{
- ACPI_STATUS Status;
- ACPI_INIT_WALK_INFO Info;
-
-
- ACPI_FUNCTION_TRACE ("DsInitializeObjects");
-
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "**** Starting initialization of namespace objects ****\n"));
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Parsing Methods:"));
-
- Info.MethodCount = 0;
- Info.OpRegionCount = 0;
- Info.ObjectCount = 0;
- Info.DeviceCount = 0;
- Info.TableDesc = TableDesc;
-
- /* Walk entire namespace from the supplied root */
-
- Status = AcpiWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
- AcpiDsInitOneObject, &Info, NULL);
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "WalkNamespace failed, %s\n",
- AcpiFormatException (Status)));
- }
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
- "\nTable [%4.4s] - %hd Objects with %hd Devices %hd Methods %hd Regions\n",
- TableDesc->Pointer->Signature, Info.ObjectCount,
- Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "%hd Methods, %hd Regions\n", Info.MethodCount, Info.OpRegionCount));
-
- return_ACPI_STATUS (AE_OK);
-}
-
-
/*****************************************************************************
*
* FUNCTION: AcpiDsBuildInternalObject
@@ -479,23 +291,24 @@ AcpiDsBuildInternalBufferObj (
{
ObjDesc->Buffer.Pointer = NULL;
ACPI_REPORT_WARNING (("Buffer created with zero length in AML\n"));
- return_ACPI_STATUS (AE_OK);
}
-
- ObjDesc->Buffer.Pointer = ACPI_MEM_CALLOCATE (
- ObjDesc->Buffer.Length);
- if (!ObjDesc->Buffer.Pointer)
+ else
{
- AcpiUtDeleteObjectDesc (ObjDesc);
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
+ ObjDesc->Buffer.Pointer = ACPI_MEM_CALLOCATE (
+ ObjDesc->Buffer.Length);
+ if (!ObjDesc->Buffer.Pointer)
+ {
+ AcpiUtDeleteObjectDesc (ObjDesc);
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
- /* Initialize buffer from the ByteList (if present) */
+ /* Initialize buffer from the ByteList (if present) */
- if (ByteList)
- {
- ACPI_MEMCPY (ObjDesc->Buffer.Pointer, ByteList->Named.Data,
- ByteListLength);
+ if (ByteList)
+ {
+ ACPI_MEMCPY (ObjDesc->Buffer.Pointer, ByteList->Named.Data,
+ ByteListLength);
+ }
}
ObjDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
@@ -685,7 +498,7 @@ AcpiDsCreateNode (
return_ACPI_STATUS (Status);
}
- /* Re-type the object according to it's argument */
+ /* Re-type the object according to its argument */
Node->Type = ACPI_GET_OBJECT_TYPE (ObjDesc);
diff --git a/sys/contrib/dev/acpica/dsopcode.c b/sys/contrib/dev/acpica/dsopcode.c
index 4262bb4..a2ec1dd 100644
--- a/sys/contrib/dev/acpica/dsopcode.c
+++ b/sys/contrib/dev/acpica/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 83 $
+ * $Revision: 85 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -273,7 +273,7 @@ AcpiDsGetBufferFieldArguments (
ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
Node = ObjDesc->BufferField.Node;
- ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Field]"));
+ ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_BUFFER_FIELD, Node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] BufferField JIT Init\n",
Node->Name.Ascii));
@@ -423,7 +423,7 @@ AcpiDsGetRegionArguments (
Node = ObjDesc->Region.Node;
- ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Operation Region]"));
+ ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_REGION, Node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Init at AML %p\n",
Node->Name.Ascii, ExtraDesc->Extra.AmlStart));
diff --git a/sys/contrib/dev/acpica/dsutils.c b/sys/contrib/dev/acpica/dsutils.c
index 4c553d3..11a140a 100644
--- a/sys/contrib/dev/acpica/dsutils.c
+++ b/sys/contrib/dev/acpica/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 97 $
+ * $Revision: 99 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -445,7 +445,7 @@ AcpiDsCreateOperand (
UINT32 ArgIndex)
{
ACPI_STATUS Status = AE_OK;
- NATIVE_CHAR *NameString;
+ char *NameString;
UINT32 NameLength;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_PARSE_OBJECT *ParentOp;
diff --git a/sys/contrib/dev/acpica/dswexec.c b/sys/contrib/dev/acpica/dswexec.c
index f90dd08..9e80c37 100644
--- a/sys/contrib/dev/acpica/dswexec.c
+++ b/sys/contrib/dev/acpica/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 96 $
+ * $Revision: 98 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -763,6 +763,14 @@ Cleanup:
AcpiDsDeleteResultIfNotUsed (Op, WalkState->ResultObj, WalkState);
}
+#if _UNDER_DEVELOPMENT
+
+ if (WalkState->ParserState.Aml == WalkState->ParserState.AmlEnd)
+ {
+ AcpiDbMethodEnd (WalkState);
+ }
+#endif
+
/* Always clear the object stack */
WalkState->NumOperands = 0;
diff --git a/sys/contrib/dev/acpica/dswload.c b/sys/contrib/dev/acpica/dswload.c
index 1afd9cf..bc9a308 100644
--- a/sys/contrib/dev/acpica/dswload.c
+++ b/sys/contrib/dev/acpica/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 78 $
+ * $Revision: 83 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -201,7 +201,7 @@ AcpiDsLoad1BeginOp (
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_OBJECT_TYPE ObjectType;
- NATIVE_CHAR *Path;
+ char *Path;
UINT32 Flags;
@@ -284,7 +284,7 @@ AcpiDsLoad1BeginOp (
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
- /*
+ /*
* These types we will allow, but we will change the type. This
* enables some existing code of the form:
*
@@ -294,7 +294,7 @@ AcpiDsLoad1BeginOp (
* Note: silently change the type here. On the second pass, we will report a warning
*/
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
Path, AcpiUtGetTypeName (Node->Type)));
Node->Type = ACPI_TYPE_ANY;
@@ -305,7 +305,7 @@ AcpiDsLoad1BeginOp (
/* All other types are an error */
- ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n",
+ ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n",
AcpiUtGetTypeName (Node->Type), Path));
return (AE_AML_OPERAND_TYPE);
@@ -319,15 +319,15 @@ AcpiDsLoad1BeginOp (
* For all other named opcodes, we will enter the name into the namespace.
*
* Setup the search flags.
- * Since we are entering a name into the namespace, we do not want to
+ * Since we are entering a name into the namespace, we do not want to
* enable the search-to-root upsearch.
*
* There are only two conditions where it is acceptable that the name
* already exists:
- * 1) the Scope() operator can reopen a scoping object that was
+ * 1) the Scope() operator can reopen a scoping object that was
* previously defined (Scope, Method, Device, etc.)
- * 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer,
- * BufferField, or Package), the name of the object is already
+ * 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer,
+ * BufferField, or Package), the name of the object is already
* in the namespace.
*/
Flags = ACPI_NS_NO_UPSEARCH;
@@ -468,6 +468,41 @@ AcpiDsLoad1EndOp (
}
}
+ if (Op->Common.AmlOpcode == AML_METHOD_OP)
+ {
+ /*
+ * MethodOp PkgLength NameString MethodFlags TermList
+ *
+ * Note: We must create the method node/object pair as soon as we
+ * see the method declaration. This allows later pass1 parsing
+ * of invocations of the method (need to know the number of
+ * arguments.)
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "LOADING-Method: State=%p Op=%p NamedObj=%p\n",
+ WalkState, Op, Op->Named.Node));
+
+ if (!AcpiNsGetAttachedObject (Op->Named.Node))
+ {
+ WalkState->Operands[0] = (void *) Op->Named.Node;
+ WalkState->NumOperands = 1;
+
+ Status = AcpiDsCreateOperands (WalkState, Op->Common.Value.Arg);
+ if (ACPI_SUCCESS (Status))
+ {
+ Status = AcpiExCreateMethod (Op->Named.Data,
+ Op->Named.Length, WalkState);
+ }
+ WalkState->Operands[0] = NULL;
+ WalkState->NumOperands = 0;
+
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+ }
+
/* Pop the scope stack */
if (AcpiNsOpensScope (ObjectType))
@@ -505,7 +540,7 @@ AcpiDsLoad2BeginOp (
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_OBJECT_TYPE ObjectType;
- NATIVE_CHAR *BufferPtr;
+ char *BufferPtr;
ACPI_FUNCTION_TRACE ("DsLoad2BeginOp");
@@ -543,7 +578,7 @@ AcpiDsLoad2BeginOp (
{
/* Get name from the op */
- BufferPtr = (NATIVE_CHAR *) &Op->Named.Name;
+ BufferPtr = (char *) &Op->Named.Name;
}
}
else
@@ -613,7 +648,7 @@ AcpiDsLoad2BeginOp (
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
- /*
+ /*
* These types we will allow, but we will change the type. This
* enables some existing code of the form:
*
@@ -621,7 +656,7 @@ AcpiDsLoad2BeginOp (
* Scope (DEB) { ... }
*/
- ACPI_REPORT_WARNING (("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
+ ACPI_REPORT_WARNING (("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
BufferPtr, AcpiUtGetTypeName (Node->Type)));
Node->Type = ACPI_TYPE_ANY;
@@ -632,7 +667,7 @@ AcpiDsLoad2BeginOp (
/* All other types are an error */
- ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s]\n",
+ ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s]\n",
AcpiUtGetTypeName (Node->Type), BufferPtr));
return (AE_AML_OPERAND_TYPE);
@@ -785,11 +820,10 @@ AcpiDsLoad2EndOp (
Status = AcpiDsScopeStackPop (WalkState);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto Cleanup;
}
}
-
/*
* Named operations are as follows:
*
@@ -929,28 +963,6 @@ AcpiDsLoad2EndOp (
switch (Op->Common.AmlOpcode)
{
- case AML_METHOD_OP:
- /*
- * MethodOp PkgLength NameString MethodFlags TermList
- */
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "LOADING-Method: State=%p Op=%p NamedObj=%p\n",
- WalkState, Op, Node));
-
- if (!AcpiNsGetAttachedObject (Node))
- {
- Status = AcpiDsCreateOperands (WalkState, Arg);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- Status = AcpiExCreateMethod (Op->Named.Data,
- Op->Named.Length, WalkState);
- }
- break;
-
-
#ifndef ACPI_NO_METHOD_EXECUTION
case AML_REGION_OP:
/*
@@ -986,6 +998,7 @@ AcpiDsLoad2EndOp (
default:
/* All NAMED_COMPLEX opcodes must be handled above */
+ /* Note: Method objects were already created in Pass 1 */
break;
}
break;
@@ -1038,7 +1051,6 @@ AcpiDsLoad2EndOp (
break;
}
-
Cleanup:
/* Remove the Node pushed at the very beginning */
diff --git a/sys/contrib/dev/acpica/dswscope.c b/sys/contrib/dev/acpica/dswscope.c
index 60e06c5..fb6f579 100644
--- a/sys/contrib/dev/acpica/dswscope.c
+++ b/sys/contrib/dev/acpica/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 56 $
+ * $Revision: 57 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dswstate.c b/sys/contrib/dev/acpica/dswstate.c
index e979a1e..783dcab 100644
--- a/sys/contrib/dev/acpica/dswstate.c
+++ b/sys/contrib/dev/acpica/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 70 $
+ * $Revision: 75 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -159,7 +159,7 @@ AcpiDsResultInsert (
return (AE_NOT_EXIST);
}
- if (Index >= OBJ_NUM_OPERANDS)
+ if (Index >= ACPI_OBJ_NUM_OPERANDS)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Index out of range: %X Obj=%p State=%p Num=%X\n",
@@ -221,7 +221,7 @@ AcpiDsResultRemove (
return (AE_NOT_EXIST);
}
- if (Index >= OBJ_MAX_OPERAND)
+ if (Index >= ACPI_OBJ_MAX_OPERAND)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Index out of range: %X State=%p Num=%X\n",
@@ -273,7 +273,7 @@ AcpiDsResultPop (
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState)
{
- NATIVE_UINT Index;
+ ACPI_NATIVE_UINT Index;
ACPI_GENERIC_STATE *State;
@@ -297,7 +297,7 @@ AcpiDsResultPop (
State->Results.NumResults--;
- for (Index = OBJ_NUM_OPERANDS; Index; Index--)
+ for (Index = ACPI_OBJ_NUM_OPERANDS; Index; Index--)
{
/* Check for a valid result object */
@@ -337,7 +337,7 @@ AcpiDsResultPopFromBottom (
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState)
{
- NATIVE_UINT Index;
+ ACPI_NATIVE_UINT Index;
ACPI_GENERIC_STATE *State;
@@ -420,7 +420,7 @@ AcpiDsResultPush (
return (AE_AML_INTERNAL);
}
- if (State->Results.NumResults == OBJ_NUM_OPERANDS)
+ if (State->Results.NumResults == ACPI_OBJ_NUM_OPERANDS)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Result stack overflow: Obj=%p State=%p Num=%X\n",
@@ -552,7 +552,7 @@ AcpiDsObjStackDeleteAll (
/* The stack size is configurable, but fixed */
- for (i = 0; i < OBJ_NUM_OPERANDS; i++)
+ for (i = 0; i < ACPI_OBJ_NUM_OPERANDS; i++)
{
if (WalkState->Operands[i])
{
@@ -588,7 +588,7 @@ AcpiDsObjStackPush (
/* Check for stack overflow */
- if (WalkState->NumOperands >= OBJ_NUM_OPERANDS)
+ if (WalkState->NumOperands >= ACPI_OBJ_NUM_OPERANDS)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"overflow! Obj=%p State=%p #Ops=%X\n",
@@ -813,7 +813,7 @@ AcpiDsObjStackGetValue (
return_PTR (NULL);
}
- return_PTR (WalkState->Operands[(NATIVE_UINT)(WalkState->NumOperands - 1) -
+ return_PTR (WalkState->Operands[(ACPI_NATIVE_UINT)(WalkState->NumOperands - 1) -
Index]);
}
@@ -844,7 +844,7 @@ AcpiDsGetCurrentWalkState (
return (NULL);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "DsGetCurrentWalkState, =%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Current WalkState %p\n",
Thread->WalkStateList));
return (Thread->WalkStateList);
@@ -1054,7 +1054,7 @@ AcpiDsInitAmlWalk (
/* Init the method arguments */
- Status = AcpiDsMethodDataInitArgs (Params, MTH_NUM_ARGS, WalkState);
+ Status = AcpiDsMethodDataInitArgs (Params, ACPI_METHOD_NUM_ARGS, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -1062,7 +1062,7 @@ AcpiDsInitAmlWalk (
}
else
{
- /*
+ /*
* Setup the current scope.
* Find a Named Op that has a namespace node associated with it.
* search upwards from this Op. Current scope is the first
@@ -1081,7 +1081,7 @@ AcpiDsInitAmlWalk (
{
ParserState->StartNode = ExtraOp->Common.Node;
}
-
+
if (ParserState->StartNode)
{
/* Push start scope on scope stack and make it current */
diff --git a/sys/contrib/dev/acpica/evevent.c b/sys/contrib/dev/acpica/evevent.c
index fe4bc56..76e8aa2 100644
--- a/sys/contrib/dev/acpica/evevent.c
+++ b/sys/contrib/dev/acpica/evevent.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
- * Module Name: evevent - Fixed and General Purpose Even handling and dispatch
- * $Revision: 96 $
+ * Module Name: evevent - Fixed Event handling and dispatch
+ * $Revision: 108 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -116,7 +116,6 @@
#include "acpi.h"
#include "acevents.h"
-#include "acnamesp.h"
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evevent")
@@ -154,13 +153,13 @@ AcpiEvInitialize (
/*
* Initialize the Fixed and General Purpose AcpiEvents prior. This is
- * done prior to enabling SCIs to prevent interrupts from occuring
+ * done prior to enabling SCIs to prevent interrupts from occurring
* before handers are installed.
*/
Status = AcpiEvFixedEventInitialize ();
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
+ ACPI_REPORT_ERROR ((
"Unable to initialize fixed events, %s\n",
AcpiFormatException (Status)));
return_ACPI_STATUS (Status);
@@ -169,7 +168,7 @@ AcpiEvInitialize (
Status = AcpiEvGpeInitialize ();
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
+ ACPI_REPORT_ERROR ((
"Unable to initialize general purpose events, %s\n",
AcpiFormatException (Status)));
return_ACPI_STATUS (Status);
@@ -187,7 +186,7 @@ AcpiEvInitialize (
*
* RETURN: Status
*
- * DESCRIPTION: Install handlers for the SCI, Global Lock, and GPEs.
+ * DESCRIPTION: Install interrupt handlers for the SCI and Global Lock
*
******************************************************************************/
@@ -206,29 +205,18 @@ AcpiEvHandlerInitialize (
Status = AcpiEvInstallSciHandler ();
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
+ ACPI_REPORT_ERROR ((
"Unable to install System Control Interrupt Handler, %s\n",
AcpiFormatException (Status)));
return_ACPI_STATUS (Status);
}
- /* Install handlers for control method GPE handlers (_Lxx, _Exx) */
-
- Status = AcpiEvInitGpeControlMethods ();
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
- "Unable to initialize GPE control methods, %s\n",
- AcpiFormatException (Status)));
- return_ACPI_STATUS (Status);
- }
-
/* Install the handler for the Global Lock */
Status = AcpiEvInitGlobalLockHandler ();
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
+ ACPI_REPORT_ERROR ((
"Unable to initialize Global Lock handler, %s\n",
AcpiFormatException (Status)));
return_ACPI_STATUS (Status);
@@ -255,7 +243,7 @@ ACPI_STATUS
AcpiEvFixedEventInitialize (
void)
{
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
ACPI_STATUS Status;
@@ -304,7 +292,7 @@ AcpiEvFixedEventDetect (
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
UINT32 FixedStatus;
UINT32 FixedEnable;
- NATIVE_UINT_MAX32 i;
+ ACPI_NATIVE_UINT i;
ACPI_FUNCTION_NAME ("EvFixedEventDetect");
@@ -333,7 +321,7 @@ AcpiEvFixedEventDetect (
{
/* Found an active (signalled) event */
- IntStatus |= AcpiEvFixedEventDispatch (i);
+ IntStatus |= AcpiEvFixedEventDispatch ((UINT32) i);
}
}
@@ -391,705 +379,3 @@ AcpiEvFixedEventDispatch (
}
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvGpeInitialize
- *
- * PARAMETERS: None
- *
- * RETURN: Status
- *
- * DESCRIPTION: Initialize the GPE data structures
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiEvGpeInitialize (void)
-{
- NATIVE_UINT_MAX32 i;
- NATIVE_UINT_MAX32 j;
- UINT32 GpeBlock;
- UINT32 GpeRegister;
- UINT32 GpeNumberIndex;
- UINT32 GpeNumber;
- ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE ("EvGpeInitialize");
-
-
- /*
- * Initialize the GPE Block globals
- *
- * Why the GPE register block lengths divided by 2: From the ACPI Spec,
- * section "General-Purpose Event Registers", we have:
- *
- * "Each register block contains two registers of equal length
- * GPEx_STS and GPEx_EN (where x is 0 or 1). The length of the
- * GPE0_STS and GPE0_EN registers is equal to half the GPE0_LEN
- * The length of the GPE1_STS and GPE1_EN registers is equal to
- * half the GPE1_LEN. If a generic register block is not supported
- * then its respective block pointer and block length values in the
- * FADT table contain zeros. The GPE0_LEN and GPE1_LEN do not need
- * to be the same size."
- */
- AcpiGbl_GpeBlockInfo[0].AddressSpaceId = AcpiGbl_FADT->XGpe0Blk.AddressSpaceId;
- AcpiGbl_GpeBlockInfo[1].AddressSpaceId = AcpiGbl_FADT->XGpe1Blk.AddressSpaceId;
-
- AcpiGbl_GpeBlockInfo[0].RegisterCount = (UINT16) ACPI_DIV_16 (AcpiGbl_FADT->XGpe0Blk.RegisterBitWidth);
- AcpiGbl_GpeBlockInfo[1].RegisterCount = (UINT16) ACPI_DIV_16 (AcpiGbl_FADT->XGpe1Blk.RegisterBitWidth);
-
- AcpiGbl_GpeBlockInfo[0].BlockAddress = &AcpiGbl_FADT->XGpe0Blk;
- AcpiGbl_GpeBlockInfo[1].BlockAddress = &AcpiGbl_FADT->XGpe1Blk;
-
- AcpiGbl_GpeBlockInfo[0].BlockBaseNumber = 0;
- AcpiGbl_GpeBlockInfo[1].BlockBaseNumber = AcpiGbl_FADT->Gpe1Base;
-
- /* Warn and exit if there are no GPE registers */
-
- AcpiGbl_GpeRegisterCount = AcpiGbl_GpeBlockInfo[0].RegisterCount +
- AcpiGbl_GpeBlockInfo[1].RegisterCount;
- if (!AcpiGbl_GpeRegisterCount)
- {
- ACPI_REPORT_WARNING (("There are no GPE blocks defined in the FADT\n"));
- return_ACPI_STATUS (AE_OK);
- }
-
- /*
- * Determine the maximum GPE number for this machine.
- * Note: both GPE0 and GPE1 are optional, and either can exist without
- * the other
- */
- if (AcpiGbl_GpeBlockInfo[0].RegisterCount)
- {
- /* GPE block 0 exists */
-
- AcpiGbl_GpeNumberMax = ACPI_MUL_8 (AcpiGbl_GpeBlockInfo[0].RegisterCount) - 1;
- }
-
- if (AcpiGbl_GpeBlockInfo[1].RegisterCount)
- {
- /* GPE block 1 exists */
-
- /* Check for GPE0/GPE1 overlap (if both banks exist) */
-
- if ((AcpiGbl_GpeBlockInfo[0].RegisterCount) &&
- (AcpiGbl_GpeNumberMax >= AcpiGbl_FADT->Gpe1Base))
- {
- ACPI_REPORT_ERROR ((
- "GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d)\n",
- AcpiGbl_GpeNumberMax, AcpiGbl_FADT->Gpe1Base,
- AcpiGbl_FADT->Gpe1Base + (ACPI_MUL_8 (AcpiGbl_GpeBlockInfo[1].RegisterCount) - 1)));
- return_ACPI_STATUS (AE_BAD_VALUE);
- }
-
- /*
- * GPE0 and GPE1 do not have to be contiguous in the GPE number space,
- * But, GPE0 always starts at zero.
- */
- AcpiGbl_GpeNumberMax = AcpiGbl_FADT->Gpe1Base +
- (ACPI_MUL_8 (AcpiGbl_GpeBlockInfo[1].RegisterCount) - 1);
- }
-
- /* Check for Max GPE number out-of-range */
-
- if (AcpiGbl_GpeNumberMax > ACPI_GPE_MAX)
- {
- ACPI_REPORT_ERROR (("Maximum GPE number from FADT is too large: 0x%X\n",
- AcpiGbl_GpeNumberMax));
- return_ACPI_STATUS (AE_BAD_VALUE);
- }
-
- /* Allocate the GPE number-to-index translation table */
-
- AcpiGbl_GpeNumberToIndex = ACPI_MEM_CALLOCATE (
- sizeof (ACPI_GPE_INDEX_INFO) *
- ((ACPI_SIZE) AcpiGbl_GpeNumberMax + 1));
- if (!AcpiGbl_GpeNumberToIndex)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Could not allocate the GpeNumberToIndex table\n"));
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- /* Set the Gpe index table to GPE_INVALID */
-
- ACPI_MEMSET (AcpiGbl_GpeNumberToIndex, (int) ACPI_GPE_INVALID,
- sizeof (ACPI_GPE_INDEX_INFO) * ((ACPI_SIZE) AcpiGbl_GpeNumberMax + 1));
-
- /* Allocate the GPE register information block */
-
- AcpiGbl_GpeRegisterInfo = ACPI_MEM_CALLOCATE (
- (ACPI_SIZE) AcpiGbl_GpeRegisterCount *
- sizeof (ACPI_GPE_REGISTER_INFO));
- if (!AcpiGbl_GpeRegisterInfo)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Could not allocate the GpeRegisterInfo table\n"));
- goto ErrorExit1;
- }
-
- /*
- * Allocate the GPE dispatch handler block. There are eight distinct GPEs
- * per register. Initialization to zeros is sufficient.
- */
- AcpiGbl_GpeNumberInfo = ACPI_MEM_CALLOCATE (
- (ACPI_SIZE) ACPI_MUL_8 (AcpiGbl_GpeRegisterCount) *
- sizeof (ACPI_GPE_NUMBER_INFO));
- if (!AcpiGbl_GpeNumberInfo)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not allocate the GpeNumberInfo table\n"));
- goto ErrorExit2;
- }
-
- /*
- * Initialize the GPE information and validation tables. A goal of these
- * tables is to hide the fact that there are two separate GPE register sets
- * in a given gpe hardware block, the status registers occupy the first half,
- * and the enable registers occupy the second half. Another goal is to hide
- * the fact that there may be multiple GPE hardware blocks.
- */
- GpeRegister = 0;
- GpeNumberIndex = 0;
-
- for (GpeBlock = 0; GpeBlock < ACPI_MAX_GPE_BLOCKS; GpeBlock++)
- {
- for (i = 0; i < AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount; i++)
- {
- GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[GpeRegister];
-
- /* Init the Register info for this entire GPE register (8 GPEs) */
-
- GpeRegisterInfo->BaseGpeNumber = (UINT8) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber
- + (ACPI_MUL_8 (i)));
-
- ACPI_STORE_ADDRESS (GpeRegisterInfo->StatusAddress.Address,
- (ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address)
- + i));
-
- ACPI_STORE_ADDRESS (GpeRegisterInfo->EnableAddress.Address,
- (ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address)
- + i
- + AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount));
-
- GpeRegisterInfo->StatusAddress.AddressSpaceId = AcpiGbl_GpeBlockInfo[GpeBlock].AddressSpaceId;
- GpeRegisterInfo->EnableAddress.AddressSpaceId = AcpiGbl_GpeBlockInfo[GpeBlock].AddressSpaceId;
- GpeRegisterInfo->StatusAddress.RegisterBitWidth = 8;
- GpeRegisterInfo->EnableAddress.RegisterBitWidth = 8;
- GpeRegisterInfo->StatusAddress.RegisterBitOffset = 8;
- GpeRegisterInfo->EnableAddress.RegisterBitOffset = 8;
-
- /* Init the Index mapping info for each GPE number within this register */
-
- for (j = 0; j < 8; j++)
- {
- GpeNumber = GpeRegisterInfo->BaseGpeNumber + j;
- AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex = (UINT8) GpeNumberIndex;
-
- AcpiGbl_GpeNumberInfo[GpeNumberIndex].BitMask = AcpiGbl_DecodeTo8bit[j];
- GpeNumberIndex++;
- }
-
- /*
- * Clear the status/enable registers. Note that status registers
- * are cleared by writing a '1', while enable registers are cleared
- * by writing a '0'.
- */
- Status = AcpiHwLowLevelWrite (8, 0x00, &GpeRegisterInfo->EnableAddress, 0);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- Status = AcpiHwLowLevelWrite (8, 0xFF, &GpeRegisterInfo->StatusAddress, 0);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- GpeRegister++;
- }
-
- if (i)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d: %X registers at %8.8X%8.8X\n",
- (INT32) GpeBlock, AcpiGbl_GpeBlockInfo[0].RegisterCount,
- ACPI_HIDWORD (ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address)),
- ACPI_LODWORD (ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address))));
-
- ACPI_REPORT_INFO (("GPE Block%d defined as GPE%d to GPE%d\n",
- (INT32) GpeBlock,
- (UINT32) AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber,
- (UINT32) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber +
- ((AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount * 8) -1))));
- }
- }
-
- return_ACPI_STATUS (AE_OK);
-
-
- /* Error cleanup */
-
-ErrorExit2:
- ACPI_MEM_FREE (AcpiGbl_GpeRegisterInfo);
-
-ErrorExit1:
- ACPI_MEM_FREE (AcpiGbl_GpeNumberToIndex);
- return_ACPI_STATUS (AE_NO_MEMORY);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvSaveMethodInfo
- *
- * PARAMETERS: None
- *
- * RETURN: None
- *
- * DESCRIPTION: Called from AcpiWalkNamespace. Expects each object to be a
- * control method under the _GPE portion of the namespace.
- * Extract the name and GPE type from the object, saving this
- * information for quick lookup during GPE dispatch
- *
- * The name of each GPE control method is of the form:
- * "_Lnn" or "_Enn"
- * Where:
- * L - means that the GPE is level triggered
- * E - means that the GPE is edge triggered
- * nn - is the GPE number [in HEX]
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiEvSaveMethodInfo (
- ACPI_HANDLE ObjHandle,
- UINT32 Level,
- void *ObjDesc,
- void **ReturnValue)
-{
- UINT32 GpeNumber;
- UINT32 GpeNumberIndex;
- NATIVE_CHAR Name[ACPI_NAME_SIZE + 1];
- UINT8 Type;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_NAME ("EvSaveMethodInfo");
-
-
- /* Extract the name from the object and convert to a string */
-
- ACPI_MOVE_UNALIGNED32_TO_32 (Name,
- &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Integer);
- Name[ACPI_NAME_SIZE] = 0;
-
- /*
- * Edge/Level determination is based on the 2nd character of the method name
- */
- switch (Name[1])
- {
- case 'L':
- Type = ACPI_EVENT_LEVEL_TRIGGERED;
- break;
-
- case 'E':
- Type = ACPI_EVENT_EDGE_TRIGGERED;
- break;
-
- default:
- /* Unknown method type, just ignore it! */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Unknown GPE method type: %s (name not of form _Lnn or _Enn)\n",
- Name));
- return (AE_OK);
- }
-
- /* Convert the last two characters of the name to the GPE Number */
-
- GpeNumber = ACPI_STRTOUL (&Name[2], NULL, 16);
- if (GpeNumber == ACPI_UINT32_MAX)
- {
- /* Conversion failed; invalid method, just ignore it */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Could not extract GPE number from name: %s (name not of form _Lnn or _Enn)\n",
- Name));
- return (AE_OK);
- }
-
- /* Get GPE index and ensure that we have a valid GPE number */
-
- GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
- if (GpeNumberIndex == ACPI_GPE_INVALID)
- {
- /* Not valid, all we can do here is ignore it */
-
- return (AE_OK);
- }
-
- /*
- * Now we can add this information to the GpeInfo block
- * for use during dispatch of this GPE.
- */
- AcpiGbl_GpeNumberInfo [GpeNumberIndex].Type = Type;
- AcpiGbl_GpeNumberInfo [GpeNumberIndex].MethodHandle = ObjHandle;
-
- /*
- * Enable the GPE (SCIs should be disabled at this point)
- */
- Status = AcpiHwEnableGpe (GpeNumber);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Registered GPE method %s as GPE number %X\n",
- Name, GpeNumber));
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvInitGpeControlMethods
- *
- * PARAMETERS: None
- *
- * RETURN: Status
- *
- * DESCRIPTION: Obtain the control methods associated with the GPEs.
- * NOTE: Must be called AFTER namespace initialization!
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiEvInitGpeControlMethods (void)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE ("EvInitGpeControlMethods");
-
-
- /* Get a permanent handle to the _GPE object */
-
- Status = AcpiGetHandle (NULL, "\\_GPE", &AcpiGbl_GpeObjHandle);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Traverse the namespace under \_GPE to find all methods there */
-
- Status = AcpiWalkNamespace (ACPI_TYPE_METHOD, AcpiGbl_GpeObjHandle,
- ACPI_UINT32_MAX, AcpiEvSaveMethodInfo,
- NULL, NULL);
-
- return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvGpeDetect
- *
- * PARAMETERS: None
- *
- * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
- *
- * DESCRIPTION: Detect if any GP events have occurred. This function is
- * executed at interrupt level.
- *
- ******************************************************************************/
-
-UINT32
-AcpiEvGpeDetect (void)
-{
- UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
- UINT32 i;
- UINT32 j;
- UINT8 EnabledStatusByte;
- UINT8 BitMask;
- ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
- UINT32 InValue;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_NAME ("EvGpeDetect");
-
-
- /*
- * Read all of the 8-bit GPE status and enable registers
- * in both of the register blocks, saving all of it.
- * Find all currently active GP events.
- */
- for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
- {
- GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
-
- Status = AcpiHwLowLevelRead (8, &InValue, &GpeRegisterInfo->StatusAddress, 0);
- GpeRegisterInfo->Status = (UINT8) InValue;
- if (ACPI_FAILURE (Status))
- {
- return (ACPI_INTERRUPT_NOT_HANDLED);
- }
-
- Status = AcpiHwLowLevelRead (8, &InValue, &GpeRegisterInfo->EnableAddress, 0);
- GpeRegisterInfo->Enable = (UINT8) InValue;
- if (ACPI_FAILURE (Status))
- {
- return (ACPI_INTERRUPT_NOT_HANDLED);
- }
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
- "GPE block at %8.8X%8.8X - Values: Enable %02X Status %02X\n",
- ACPI_HIDWORD (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)),
- ACPI_LODWORD (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)),
- GpeRegisterInfo->Enable,
- GpeRegisterInfo->Status));
-
- /* First check if there is anything active at all in this register */
-
- EnabledStatusByte = (UINT8) (GpeRegisterInfo->Status &
- GpeRegisterInfo->Enable);
- if (!EnabledStatusByte)
- {
- /* No active GPEs in this register, move on */
-
- continue;
- }
-
- /* Now look at the individual GPEs in this byte register */
-
- for (j = 0, BitMask = 1; j < 8; j++, BitMask <<= 1)
- {
- /* Examine one GPE bit */
-
- if (EnabledStatusByte & BitMask)
- {
- /*
- * Found an active GPE. Dispatch the event to a handler
- * or method.
- */
- IntStatus |= AcpiEvGpeDispatch (
- GpeRegisterInfo->BaseGpeNumber + j);
- }
- }
- }
-
- return (IntStatus);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvAsynchExecuteGpeMethod
- *
- * PARAMETERS: GpeNumber - The 0-based GPE number
- *
- * RETURN: None
- *
- * DESCRIPTION: Perform the actual execution of a GPE control method. This
- * function is called from an invocation of AcpiOsQueueForExecution
- * (and therefore does NOT execute at interrupt level) so that
- * the control method itself is not executed in the context of
- * the SCI interrupt handler.
- *
- ******************************************************************************/
-
-static void ACPI_SYSTEM_XFACE
-AcpiEvAsynchExecuteGpeMethod (
- void *Context)
-{
- UINT32 GpeNumber = (UINT32) ACPI_TO_INTEGER (Context);
- UINT32 GpeNumberIndex;
- ACPI_GPE_NUMBER_INFO GpeInfo;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE ("EvAsynchExecuteGpeMethod");
-
-
- GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
- if (GpeNumberIndex == ACPI_GPE_INVALID)
- {
- return_VOID;
- }
-
- /*
- * Take a snapshot of the GPE info for this level - we copy the
- * info to prevent a race condition with RemoveHandler.
- */
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_VOID;
- }
-
- GpeInfo = AcpiGbl_GpeNumberInfo [GpeNumberIndex];
- Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_VOID;
- }
-
- if (GpeInfo.MethodHandle)
- {
- /*
- * Invoke the GPE Method (_Lxx, _Exx):
- * (Evaluate the _Lxx/_Exx control method that corresponds to this GPE.)
- */
- Status = AcpiNsEvaluateByHandle (GpeInfo.MethodHandle, NULL, NULL);
- if (ACPI_FAILURE (Status))
- {
- ACPI_REPORT_ERROR (("%s while evaluating GPE%X method\n",
- AcpiFormatException (Status), GpeNumber));
- }
- }
-
- if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
- {
- /*
- * GPE is level-triggered, we clear the GPE status bit after handling
- * the event.
- */
- Status = AcpiHwClearGpe (GpeNumber);
- if (ACPI_FAILURE (Status))
- {
- return_VOID;
- }
- }
-
- /*
- * Enable the GPE.
- */
- (void) AcpiHwEnableGpe (GpeNumber);
- return_VOID;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvGpeDispatch
- *
- * PARAMETERS: GpeNumber - The 0-based GPE number
- *
- * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
- *
- * DESCRIPTION: Dispatch a General Purpose Event to either a function (e.g. EC)
- * or method (e.g. _Lxx/_Exx) handler. This function executes
- * at interrupt level.
- *
- ******************************************************************************/
-
-UINT32
-AcpiEvGpeDispatch (
- UINT32 GpeNumber)
-{
- UINT32 GpeNumberIndex;
- ACPI_GPE_NUMBER_INFO *GpeInfo;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE ("EvGpeDispatch");
-
-
- GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
- if (GpeNumberIndex == ACPI_GPE_INVALID)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "GPE[%X] is not a valid event\n", GpeNumber));
- return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
- }
-
- /*
- * We don't have to worry about mutex on GpeInfo because we are
- * executing at interrupt level.
- */
- GpeInfo = &AcpiGbl_GpeNumberInfo [GpeNumberIndex];
-
- /*
- * If edge-triggered, clear the GPE status bit now. Note that
- * level-triggered events are cleared after the GPE is serviced.
- */
- if (GpeInfo->Type & ACPI_EVENT_EDGE_TRIGGERED)
- {
- Status = AcpiHwClearGpe (GpeNumber);
- if (ACPI_FAILURE (Status))
- {
- ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to clear GPE[%X]\n", GpeNumber));
- return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
- }
- }
-
- /*
- * Dispatch the GPE to either an installed handler, or the control
- * method associated with this GPE (_Lxx or _Exx).
- * If a handler exists, we invoke it and do not attempt to run the method.
- * If there is neither a handler nor a method, we disable the level to
- * prevent further events from coming in here.
- */
- if (GpeInfo->Handler)
- {
- /* Invoke the installed handler (at interrupt level) */
-
- GpeInfo->Handler (GpeInfo->Context);
- }
- else if (GpeInfo->MethodHandle)
- {
- /*
- * Disable GPE, so it doesn't keep firing before the method has a
- * chance to run.
- */
- Status = AcpiHwDisableGpe (GpeNumber);
- if (ACPI_FAILURE (Status))
- {
- ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to disable GPE[%X]\n", GpeNumber));
- return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
- }
-
- /*
- * Execute the method associated with the GPE.
- */
- if (ACPI_FAILURE (AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
- AcpiEvAsynchExecuteGpeMethod,
- ACPI_TO_POINTER (GpeNumber))))
- {
- ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to queue handler for GPE[%X], event is disabled\n", GpeNumber));
- }
- }
- else
- {
- /* No handler or method to run! */
-
- ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: No handler or method for GPE[%X], disabling event\n", GpeNumber));
-
- /*
- * Disable the GPE. The GPE will remain disabled until the ACPI
- * Core Subsystem is restarted, or the handler is reinstalled.
- */
- Status = AcpiHwDisableGpe (GpeNumber);
- if (ACPI_FAILURE (Status))
- {
- ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to disable GPE[%X]\n", GpeNumber));
- return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
- }
- }
-
- /*
- * It is now safe to clear level-triggered evnets.
- */
- if (GpeInfo->Type & ACPI_EVENT_LEVEL_TRIGGERED)
- {
- Status = AcpiHwClearGpe (GpeNumber);
- if (ACPI_FAILURE (Status))
- {
- ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to clear GPE[%X]\n", GpeNumber));
- return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
- }
- }
-
- return_VALUE (ACPI_INTERRUPT_HANDLED);
-}
diff --git a/sys/contrib/dev/acpica/evmisc.c b/sys/contrib/dev/acpica/evmisc.c
index 7213611..cc4d9b1 100644
--- a/sys/contrib/dev/acpica/evmisc.c
+++ b/sys/contrib/dev/acpica/evmisc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evmisc - Miscellaneous event manager support functions
- * $Revision: 59 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -160,60 +160,6 @@ AcpiEvIsNotifyObject (
/*******************************************************************************
*
- * FUNCTION: AcpiEvGetGpeRegisterIndex
- *
- * PARAMETERS: GpeNumber - Raw GPE number
- *
- * RETURN: None.
- *
- * DESCRIPTION: Returns the register index (index into the GPE register info
- * table) associated with this GPE.
- *
- ******************************************************************************/
-
-UINT32
-AcpiEvGetGpeRegisterIndex (
- UINT32 GpeNumber)
-{
-
- if (GpeNumber > AcpiGbl_GpeNumberMax)
- {
- return (ACPI_GPE_INVALID);
- }
-
- return (ACPI_DIV_8 (AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex));
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvGetGpeNumberIndex
- *
- * PARAMETERS: GpeNumber - Raw GPE number
- *
- * RETURN: None.
- *
- * DESCRIPTION: Returns the number index (index into the GPE number info table)
- * associated with this GPE.
- *
- ******************************************************************************/
-
-UINT32
-AcpiEvGetGpeNumberIndex (
- UINT32 GpeNumber)
-{
-
- if (GpeNumber > AcpiGbl_GpeNumberMax)
- {
- return (ACPI_GPE_INVALID);
- }
-
- return (AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiEvQueueNotifyRequest
*
* PARAMETERS:
@@ -331,7 +277,7 @@ AcpiEvQueueNotifyRequest (
{
/* There is no per-device notify handler for this device */
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"No notify handler for [%4.4s] node %p\n", Node->Name.Ascii, Node));
}
@@ -675,8 +621,11 @@ AcpiEvReleaseGlobalLock (void)
void
AcpiEvTerminate (void)
{
- NATIVE_UINT_MAX32 i;
+ ACPI_NATIVE_UINT i;
ACPI_STATUS Status;
+ ACPI_GPE_BLOCK_INFO *GpeBlock;
+ ACPI_GPE_BLOCK_INFO *NextGpeBlock;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("EvTerminate");
@@ -694,32 +643,38 @@ AcpiEvTerminate (void)
*/
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{
- Status = AcpiDisableEvent(i, ACPI_EVENT_FIXED, 0);
+ Status = AcpiDisableEvent ((UINT32) i, ACPI_EVENT_FIXED, 0);
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", i));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", (UINT32) i));
}
}
/*
* Disable all GPEs
*/
- for (i = 0; i < AcpiGbl_GpeNumberMax; i++)
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
{
- if (AcpiEvGetGpeNumberIndex(i) != ACPI_GPE_INVALID)
+ GpeEventInfo = GpeBlock->EventInfo;
+ for (i = 0; i < (GpeBlock->RegisterCount * 8); i++)
{
- Status = AcpiHwDisableGpe(i);
+ Status = AcpiHwDisableGpe (GpeEventInfo);
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable GPE %d\n", i));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable GPE %d\n", (UINT32) i));
}
+
+ GpeEventInfo++;
}
+
+ GpeBlock = GpeBlock->Next;
}
/*
* Remove SCI handler
*/
- Status = AcpiEvRemoveSciHandler();
+ Status = AcpiEvRemoveSciHandler ();
if (ACPI_FAILURE(Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not remove SCI handler\n"));
@@ -739,24 +694,17 @@ AcpiEvTerminate (void)
}
/*
- * Free global tables, etc.
+ * Free global GPE blocks and related info structures
*/
- if (AcpiGbl_GpeRegisterInfo)
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
{
- ACPI_MEM_FREE (AcpiGbl_GpeRegisterInfo);
- AcpiGbl_GpeRegisterInfo = NULL;
- }
+ NextGpeBlock = GpeBlock->Next;
+ ACPI_MEM_FREE (GpeBlock->EventInfo);
+ ACPI_MEM_FREE (GpeBlock->RegisterInfo);
+ ACPI_MEM_FREE (GpeBlock);
- if (AcpiGbl_GpeNumberInfo)
- {
- ACPI_MEM_FREE (AcpiGbl_GpeNumberInfo);
- AcpiGbl_GpeNumberInfo = NULL;
- }
-
- if (AcpiGbl_GpeNumberToIndex)
- {
- ACPI_MEM_FREE (AcpiGbl_GpeNumberToIndex);
- AcpiGbl_GpeNumberToIndex = NULL;
+ GpeBlock = NextGpeBlock;
}
return_VOID;
diff --git a/sys/contrib/dev/acpica/evregion.c b/sys/contrib/dev/acpica/evregion.c
index 67ecc9f6..db1ab85 100644
--- a/sys/contrib/dev/acpica/evregion.c
+++ b/sys/contrib/dev/acpica/evregion.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
- * $Revision: 135 $
+ * $Revision: 137 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -273,7 +273,7 @@ AcpiEvExecuteRegMethod (
/*
* Execute the method, no return value
*/
- ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (RegionObj2->Extra.Method_REG, " [Method]"));
+ ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_METHOD, RegionObj2->Extra.Method_REG, NULL));
Status = AcpiNsEvaluateByHandle (RegionObj2->Extra.Method_REG, Params, NULL);
AcpiUtRemoveReference (Params[1]);
diff --git a/sys/contrib/dev/acpica/evrgnini.c b/sys/contrib/dev/acpica/evrgnini.c
index b9566d7..2a53764 100644
--- a/sys/contrib/dev/acpica/evrgnini.c
+++ b/sys/contrib/dev/acpica/evrgnini.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
- * $Revision: 63 $
+ * $Revision: 66 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -380,6 +380,11 @@ AcpiEvPciConfigRegionSetup (
PciId->Bus = ACPI_LOWORD (Temp);
}
+ /*
+ * Complete this device's PciId
+ */
+ AcpiOsDerivePciId (Node, RegionObj->Region.Node, &PciId);
+
*RegionContext = PciId;
return_ACPI_STATUS (AE_OK);
}
@@ -500,7 +505,7 @@ AcpiEvDefaultRegionSetup (
* Get the appropriate address space handler for a newly
* created region.
*
- * This also performs address space specific intialization. For
+ * This also performs address space specific initialization. For
* example, PCI regions must have an _ADR object that contains
* a PCI address in the scope of the definition. This address is
* required to perform an access to PCI config space.
diff --git a/sys/contrib/dev/acpica/evsci.c b/sys/contrib/dev/acpica/evsci.c
index 573ca07..d393387 100644
--- a/sys/contrib/dev/acpica/evsci.c
+++ b/sys/contrib/dev/acpica/evsci.c
@@ -2,7 +2,7 @@
*
* Module Name: evsci - System Control Interrupt configuration and
* legacy to ACPI mode state transition functions
- * $Revision: 86 $
+ * $Revision: 88 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -143,40 +143,24 @@ AcpiEvSciHandler (
void *Context)
{
UINT32 InterruptHandled = ACPI_INTERRUPT_NOT_HANDLED;
- UINT32 Value;
- ACPI_STATUS Status;
ACPI_FUNCTION_TRACE("EvSciHandler");
/*
- * Make sure that ACPI is enabled by checking SCI_EN. Note that we are
- * required to treat the SCI interrupt as sharable, level, active low.
+ * We are guaranteed by the ACPI CA initialization/shutdown code that
+ * if this interrupt handler is installed, ACPI is enabled.
*/
- Status = AcpiGetRegister (ACPI_BITREG_SCI_ENABLE, &Value, ACPI_MTX_DO_NOT_LOCK);
- if (ACPI_FAILURE (Status))
- {
- return (ACPI_INTERRUPT_NOT_HANDLED);
- }
-
- if (!Value)
- {
- /* ACPI is not enabled; this interrupt cannot be for us */
-
- return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
- }
/*
* Fixed AcpiEvents:
- * -------------
* Check for and dispatch any Fixed AcpiEvents that have occurred
*/
InterruptHandled |= AcpiEvFixedEventDetect ();
/*
* GPEs:
- * -----
* Check for and dispatch any GPEs that have occurred
*/
InterruptHandled |= AcpiEvGpeDetect ();
diff --git a/sys/contrib/dev/acpica/evxface.c b/sys/contrib/dev/acpica/evxface.c
index b50e19e..d566c95 100644
--- a/sys/contrib/dev/acpica/evxface.c
+++ b/sys/contrib/dev/acpica/evxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
- * $Revision: 132 $
+ * $Revision: 135 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -608,7 +608,7 @@ AcpiInstallGpeHandler (
void *Context)
{
ACPI_STATUS Status;
- UINT32 GpeNumberIndex;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("AcpiInstallGpeHandler");
@@ -623,8 +623,8 @@ AcpiInstallGpeHandler (
/* Ensure that we have a valid GPE number */
- GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
- if (GpeNumberIndex == ACPI_GPE_INVALID)
+ GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber);
+ if (!GpeEventInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
@@ -637,7 +637,7 @@ AcpiInstallGpeHandler (
/* Make sure that there isn't a handler there already */
- if (AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler)
+ if (GpeEventInfo->Handler)
{
Status = AE_ALREADY_EXISTS;
goto Cleanup;
@@ -645,19 +645,19 @@ AcpiInstallGpeHandler (
/* Install the handler */
- AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler = Handler;
- AcpiGbl_GpeNumberInfo[GpeNumberIndex].Context = Context;
- AcpiGbl_GpeNumberInfo[GpeNumberIndex].Type = (UINT8) Type;
+ GpeEventInfo->Handler = Handler;
+ GpeEventInfo->Context = Context;
+ GpeEventInfo->Type = (UINT8) Type;
/* Clear the GPE (of stale events), the enable it */
- Status = AcpiHwClearGpe (GpeNumber);
+ Status = AcpiHwClearGpe (GpeEventInfo);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
- Status = AcpiHwEnableGpe (GpeNumber);
+ Status = AcpiHwEnableGpe (GpeEventInfo);
Cleanup:
@@ -685,7 +685,7 @@ AcpiRemoveGpeHandler (
ACPI_GPE_HANDLER Handler)
{
ACPI_STATUS Status;
- UINT32 GpeNumberIndex;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("AcpiRemoveGpeHandler");
@@ -700,15 +700,15 @@ AcpiRemoveGpeHandler (
/* Ensure that we have a valid GPE number */
- GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
- if (GpeNumberIndex == ACPI_GPE_INVALID)
+ GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber);
+ if (!GpeEventInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Disable the GPE before removing the handler */
- Status = AcpiHwDisableGpe (GpeNumber);
+ Status = AcpiHwDisableGpe (GpeEventInfo);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -722,17 +722,17 @@ AcpiRemoveGpeHandler (
/* Make sure that the installed handler is the same */
- if (AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler != Handler)
+ if (GpeEventInfo->Handler != Handler)
{
- (void) AcpiHwEnableGpe (GpeNumber);
+ (void) AcpiHwEnableGpe (GpeEventInfo);
Status = AE_BAD_PARAMETER;
goto Cleanup;
}
/* Remove the handler */
- AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler = NULL;
- AcpiGbl_GpeNumberInfo[GpeNumberIndex].Context = NULL;
+ GpeEventInfo->Handler = NULL;
+ GpeEventInfo->Context = NULL;
Cleanup:
diff --git a/sys/contrib/dev/acpica/evxfevnt.c b/sys/contrib/dev/acpica/evxfevnt.c
index 9e70832..753c6d0 100644
--- a/sys/contrib/dev/acpica/evxfevnt.c
+++ b/sys/contrib/dev/acpica/evxfevnt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
- * $Revision: 57 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -155,7 +155,7 @@ AcpiEnable (void)
if (AcpiHwGetMode() == ACPI_SYS_MODE_ACPI)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Already in ACPI mode.\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in ACPI mode\n"));
}
else
{
@@ -164,11 +164,11 @@ AcpiEnable (void)
Status = AcpiHwSetMode (ACPI_SYS_MODE_ACPI);
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_FATAL, "Could not transition to ACPI mode.\n"));
+ ACPI_REPORT_ERROR (("Could not transition to ACPI mode.\n"));
return_ACPI_STATUS (Status);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Transition to ACPI mode successful\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Transition to ACPI mode successful\n"));
}
return_ACPI_STATUS (Status);
@@ -203,20 +203,21 @@ AcpiDisable (void)
if (AcpiHwGetMode() == ACPI_SYS_MODE_LEGACY)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Already in LEGACY mode.\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in legacy (non-ACPI) mode\n"));
}
else
{
/* Transition to LEGACY mode */
+
Status = AcpiHwSetMode (ACPI_SYS_MODE_LEGACY);
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not transition to LEGACY mode."));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not exit ACPI mode to legacy mode"));
return_ACPI_STATUS (Status);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Transition to LEGACY mode successful\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI mode disabled\n"));
}
return_ACPI_STATUS (Status);
@@ -245,6 +246,7 @@ AcpiEnableEvent (
{
ACPI_STATUS Status = AE_OK;
UINT32 Value;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("AcpiEnableEvent");
@@ -296,14 +298,15 @@ AcpiEnableEvent (
/* Ensure that we have a valid GPE number */
- if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
+ GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
+ if (!GpeEventInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Enable the requested GPE number */
- Status = AcpiHwEnableGpe (Event);
+ Status = AcpiHwEnableGpe (GpeEventInfo);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -311,7 +314,7 @@ AcpiEnableEvent (
if (Flags & ACPI_EVENT_WAKE_ENABLE)
{
- AcpiHwEnableGpeForWakeup (Event);
+ AcpiHwEnableGpeForWakeup (GpeEventInfo);
}
break;
@@ -347,6 +350,7 @@ AcpiDisableEvent (
{
ACPI_STATUS Status = AE_OK;
UINT32 Value;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("AcpiDisableEvent");
@@ -396,7 +400,8 @@ AcpiDisableEvent (
/* Ensure that we have a valid GPE number */
- if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
+ GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
+ if (!GpeEventInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
@@ -408,11 +413,11 @@ AcpiDisableEvent (
if (Flags & ACPI_EVENT_WAKE_DISABLE)
{
- AcpiHwDisableGpeForWakeup (Event);
+ AcpiHwDisableGpeForWakeup (GpeEventInfo);
}
else
{
- Status = AcpiHwDisableGpe (Event);
+ Status = AcpiHwDisableGpe (GpeEventInfo);
}
break;
@@ -444,6 +449,7 @@ AcpiClearEvent (
UINT32 Type)
{
ACPI_STATUS Status = AE_OK;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("AcpiClearEvent");
@@ -475,12 +481,13 @@ AcpiClearEvent (
/* Ensure that we have a valid GPE number */
- if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
+ GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
+ if (!GpeEventInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- Status = AcpiHwClearGpe (Event);
+ Status = AcpiHwClearGpe (GpeEventInfo);
break;
@@ -516,6 +523,7 @@ AcpiGetEventStatus (
ACPI_EVENT_STATUS *EventStatus)
{
ACPI_STATUS Status = AE_OK;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_FUNCTION_TRACE ("AcpiGetEventStatus");
@@ -551,7 +559,8 @@ AcpiGetEventStatus (
/* Ensure that we have a valid GPE number */
- if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
+ GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
+ if (!GpeEventInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
@@ -569,3 +578,4 @@ AcpiGetEventStatus (
return_ACPI_STATUS (Status);
}
+
diff --git a/sys/contrib/dev/acpica/evxfregn.c b/sys/contrib/dev/acpica/evxfregn.c
index 6f06b3a..6bd920c 100644
--- a/sys/contrib/dev/acpica/evxfregn.c
+++ b/sys/contrib/dev/acpica/evxfregn.c
@@ -2,7 +2,7 @@
*
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
* Address Spaces.
- * $Revision: 52 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exconfig.c b/sys/contrib/dev/acpica/exconfig.c
index 409f2d3..48190e9 100644
--- a/sys/contrib/dev/acpica/exconfig.c
+++ b/sys/contrib/dev/acpica/exconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 69 $
+ * $Revision: 71 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -428,7 +428,6 @@ AcpiExLoadOp (
break;
- case ACPI_TYPE_BUFFER_FIELD:
case ACPI_TYPE_LOCAL_REGION_FIELD:
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
diff --git a/sys/contrib/dev/acpica/exconvrt.c b/sys/contrib/dev/acpica/exconvrt.c
index f5937f1..3b175ae 100644
--- a/sys/contrib/dev/acpica/exconvrt.c
+++ b/sys/contrib/dev/acpica/exconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconvrt - Object conversion routines
- * $Revision: 44 $
+ * $Revision: 49 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -310,7 +310,7 @@ AcpiExConvertToBuffer (
/*
* Create a new Buffer object.
- * Need enough space for one integer
+ * Need enough space for one integer
*/
RetDesc = AcpiUtCreateBufferObject (AcpiGbl_IntegerByteWidth);
if (!RetDesc)
@@ -334,7 +334,7 @@ AcpiExConvertToBuffer (
* Create a new Buffer object
* Size will be the string length
*/
- RetDesc = AcpiUtCreateBufferObject (ObjDesc->String.Length);
+ RetDesc = AcpiUtCreateBufferObject ((ACPI_SIZE) ObjDesc->String.Length);
if (!RetDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -343,7 +343,7 @@ AcpiExConvertToBuffer (
/* Copy the string to the buffer */
NewBuf = RetDesc->Buffer.Pointer;
- ACPI_STRNCPY ((char *) NewBuf, (char *) ObjDesc->String.Pointer,
+ ACPI_STRNCPY ((char *) NewBuf, (char *) ObjDesc->String.Pointer,
ObjDesc->String.Length);
break;
@@ -381,6 +381,7 @@ AcpiExConvertToBuffer (
* PARAMETERS: Integer - Value to be converted
* Base - 10 or 16
* String - Where the string is returned
+ * DataWidth - Size of data item to be converted
*
* RETURN: Actual string length
*
@@ -392,7 +393,8 @@ UINT32
AcpiExConvertToAscii (
ACPI_INTEGER Integer,
UINT32 Base,
- UINT8 *String)
+ UINT8 *String,
+ UINT8 DataWidth)
{
UINT32 i;
UINT32 j;
@@ -400,12 +402,23 @@ AcpiExConvertToAscii (
char HexDigit;
ACPI_INTEGER Digit;
UINT32 Remainder;
- UINT32 Length = sizeof (ACPI_INTEGER);
- BOOLEAN LeadingZero = TRUE;
+ UINT32 Length;
+ BOOLEAN LeadingZero;
ACPI_FUNCTION_ENTRY ();
+ if (DataWidth < sizeof (ACPI_INTEGER))
+ {
+ LeadingZero = FALSE;
+ Length = DataWidth;
+ }
+ else
+ {
+ LeadingZero = TRUE;
+ Length = sizeof (ACPI_INTEGER);
+ }
+
switch (Base)
{
@@ -473,8 +486,8 @@ AcpiExConvertToAscii (
String [0] = ACPI_ASCII_ZERO;
k = 1;
}
- String [k] = 0;
+ String [k] = 0;
return (k);
}
@@ -503,7 +516,6 @@ AcpiExConvertToString (
{
ACPI_OPERAND_OBJECT *RetDesc;
UINT32 i;
- UINT32 Index;
UINT32 StringLength;
UINT8 *NewBuf;
UINT8 *Pointer;
@@ -559,7 +571,7 @@ AcpiExConvertToString (
/* Convert */
- i = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base, NewBuf);
+ i = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base, NewBuf, sizeof (ACPI_INTEGER));
/* Null terminate at the correct place */
@@ -580,10 +592,17 @@ AcpiExConvertToString (
case ACPI_TYPE_BUFFER:
- StringLength = ObjDesc->Buffer.Length * 3;
- if (Base == 10)
+ /* Find the string length */
+
+ Pointer = ObjDesc->Buffer.Pointer;
+ for (StringLength = 0; StringLength < ObjDesc->Buffer.Length; StringLength++)
{
- StringLength = ObjDesc->Buffer.Length * 4;
+ /* Exit on null terminator */
+
+ if (!Pointer[StringLength])
+ {
+ break;
+ }
}
if (MaxLength > ACPI_MAX_STRING_CONVERSION)
@@ -619,24 +638,15 @@ AcpiExConvertToString (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- /*
- * Convert each byte of the buffer to two ASCII characters plus a space.
- */
- Pointer = ObjDesc->Buffer.Pointer;
- Index = 0;
- for (i = 0, Index = 0; i < ObjDesc->Buffer.Length; i++)
- {
- Index = AcpiExConvertToAscii ((ACPI_INTEGER) Pointer[i], Base, &NewBuf[Index]);
+ /* Copy the appropriate number of buffer characters */
- NewBuf[Index] = ' ';
- Index++;
- }
+ ACPI_MEMCPY (NewBuf, Pointer, StringLength);
/* Null terminate */
- NewBuf [Index-1] = 0;
+ NewBuf [StringLength] = 0;
RetDesc->Buffer.Pointer = NewBuf;
- RetDesc->String.Length = (UINT32) ACPI_STRLEN ((char *) NewBuf);
+ RetDesc->String.Length = StringLength;
break;
diff --git a/sys/contrib/dev/acpica/excreate.c b/sys/contrib/dev/acpica/excreate.c
index 75fec44..f5bc176 100644
--- a/sys/contrib/dev/acpica/excreate.c
+++ b/sys/contrib/dev/acpica/excreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: excreate - Named object creation
- * $Revision: 97 $
+ * $Revision: 99 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -161,10 +161,10 @@ AcpiExCreateAlias (
if (TargetNode->Type == ACPI_TYPE_LOCAL_ALIAS)
{
- /*
+ /*
* Dereference an existing alias so that we don't create a chain
* of aliases. With this code, we guarantee that an alias is
- * always exactly one level of indirection away from the
+ * always exactly one level of indirection away from the
* actual aliased name.
*/
TargetNode = (ACPI_NAMESPACE_NODE *) TargetNode->Object;
diff --git a/sys/contrib/dev/acpica/exdump.c b/sys/contrib/dev/acpica/exdump.c
index 9e2be80..798b3c0 100644
--- a/sys/contrib/dev/acpica/exdump.c
+++ b/sys/contrib/dev/acpica/exdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exdump - Interpreter debug output routines
- * $Revision: 163 $
+ * $Revision: 166 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -496,13 +496,13 @@ void
AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **Operands,
ACPI_INTERPRETER_MODE InterpreterMode,
- NATIVE_CHAR *Ident,
+ char *Ident,
UINT32 NumLevels,
- NATIVE_CHAR *Note,
- NATIVE_CHAR *ModuleName,
+ char *Note,
+ char *ModuleName,
UINT32 LineNumber)
{
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
ACPI_OPERAND_OBJECT **ObjDesc;
diff --git a/sys/contrib/dev/acpica/exfield.c b/sys/contrib/dev/acpica/exfield.c
index 63a93f3..2b253f3 100644
--- a/sys/contrib/dev/acpica/exfield.c
+++ b/sys/contrib/dev/acpica/exfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 115 $
+ * $Revision: 118 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -149,7 +149,7 @@ AcpiExReadDataFromField (
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *BufferDesc;
- UINT32 Length;
+ ACPI_SIZE Length;
void *Buffer;
BOOLEAN Locked;
@@ -200,7 +200,7 @@ AcpiExReadDataFromField (
* Perform the read.
* Note: Smbus protocol value is passed in upper 16-bits of Function
*/
- Status = AcpiExAccessRegion (ObjDesc, 0,
+ Status = AcpiExAccessRegion (ObjDesc, 0,
ACPI_CAST_PTR (ACPI_INTEGER, BufferDesc->Buffer.Pointer),
ACPI_READ | (ObjDesc->Field.Attribute << 16));
AcpiExReleaseGlobalLock (Locked);
@@ -217,7 +217,7 @@ AcpiExReadDataFromField (
*
* Note: Field.length is in bits.
*/
- Length = ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
+ Length = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
if (Length > AcpiGbl_IntegerByteWidth)
{
/* Field is too large for an Integer, create a Buffer instead */
@@ -246,7 +246,7 @@ AcpiExReadDataFromField (
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"Obj=%p Type=%X Buf=%p Len=%X\n",
- ObjDesc, ACPI_GET_OBJECT_TYPE (ObjDesc), Buffer, Length));
+ ObjDesc, ACPI_GET_OBJECT_TYPE (ObjDesc), Buffer, (UINT32) Length));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldWrite: BitLen=%X BitOff=%X ByteOff=%X\n",
ObjDesc->CommonField.BitLength,
@@ -259,7 +259,7 @@ AcpiExReadDataFromField (
/* Read from the field */
- Status = AcpiExExtractFromField (ObjDesc, Buffer, Length);
+ Status = AcpiExExtractFromField (ObjDesc, Buffer, (UINT32) Length);
AcpiExReleaseGlobalLock (Locked);
@@ -366,11 +366,11 @@ AcpiExWriteDataToField (
Locked = AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
- /*
+ /*
* Perform the write (returns status and perhaps data in the same buffer)
* Note: SMBus protocol type is passed in upper 16-bits of Function.
*/
- Status = AcpiExAccessRegion (ObjDesc, 0,
+ Status = AcpiExAccessRegion (ObjDesc, 0,
(ACPI_INTEGER *) Buffer,
ACPI_WRITE | (ObjDesc->Field.Attribute << 16));
AcpiExReleaseGlobalLock (Locked);
diff --git a/sys/contrib/dev/acpica/exmisc.c b/sys/contrib/dev/acpica/exmisc.c
index 7343ac5..2479d2d 100644
--- a/sys/contrib/dev/acpica/exmisc.c
+++ b/sys/contrib/dev/acpica/exmisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 112 $
+ * $Revision: 115 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -324,7 +324,7 @@ AcpiExDoConcatenate (
UINT32 i;
ACPI_INTEGER ThisInteger;
ACPI_OPERAND_OBJECT *ReturnDesc;
- NATIVE_CHAR *NewBuf;
+ char *NewBuf;
ACPI_FUNCTION_ENTRY ();
@@ -350,14 +350,14 @@ AcpiExDoConcatenate (
return (AE_NO_MEMORY);
}
- NewBuf = (NATIVE_CHAR *) ReturnDesc->Buffer.Pointer;
+ NewBuf = (char *) ReturnDesc->Buffer.Pointer;
/* Convert the first integer */
ThisInteger = ObjDesc1->Integer.Value;
for (i = 0; i < AcpiGbl_IntegerByteWidth; i++)
{
- NewBuf[i] = (NATIVE_CHAR) ThisInteger;
+ NewBuf[i] = (char) ThisInteger;
ThisInteger >>= 8;
}
@@ -366,7 +366,7 @@ AcpiExDoConcatenate (
ThisInteger = ObjDesc2->Integer.Value;
for (; i < (ACPI_MUL_2 (AcpiGbl_IntegerByteWidth)); i++)
{
- NewBuf[i] = (NATIVE_CHAR) ThisInteger;
+ NewBuf[i] = (char) ThisInteger;
ThisInteger >>= 8;
}
@@ -385,8 +385,8 @@ AcpiExDoConcatenate (
/* Operand0 is string */
- NewBuf = ACPI_MEM_ALLOCATE ((ACPI_SIZE) ObjDesc1->String.Length +
- (ACPI_SIZE) ObjDesc2->String.Length + 1);
+ NewBuf = ACPI_MEM_CALLOCATE ((ACPI_SIZE) ObjDesc1->String.Length +
+ (ACPI_SIZE) ObjDesc2->String.Length + 1);
if (!NewBuf)
{
ACPI_REPORT_ERROR
@@ -421,7 +421,7 @@ AcpiExDoConcatenate (
return (AE_NO_MEMORY);
}
- NewBuf = (NATIVE_CHAR *) ReturnDesc->Buffer.Pointer;
+ NewBuf = (char *) ReturnDesc->Buffer.Pointer;
/* Concatenate the buffers */
diff --git a/sys/contrib/dev/acpica/exmutex.c b/sys/contrib/dev/acpica/exmutex.c
index 3f4c8f0..6b87cc5 100644
--- a/sys/contrib/dev/acpica/exmutex.c
+++ b/sys/contrib/dev/acpica/exmutex.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmutex - ASL Mutex Acquire/Release functions
- * $Revision: 16 $
+ * $Revision: 18 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -348,7 +348,7 @@ AcpiExReleaseMutex (
ACPI_REPORT_ERROR ((
"Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
WalkState->Thread->ThreadId,
- ObjDesc->Mutex.Node->Name.Ascii,
+ ObjDesc->Mutex.Node->Name.Ascii,
ObjDesc->Mutex.OwnerThread->ThreadId));
return_ACPI_STATUS (AE_AML_NOT_OWNER);
}
diff --git a/sys/contrib/dev/acpica/exnames.c b/sys/contrib/dev/acpica/exnames.c
index 8069189..7eb8e4f 100644
--- a/sys/contrib/dev/acpica/exnames.c
+++ b/sys/contrib/dev/acpica/exnames.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exnames - interpreter/scanner name load/execute
- * $Revision: 92 $
+ * $Revision: 94 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -149,13 +149,13 @@
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiExAllocateNameString (
UINT32 PrefixCount,
UINT32 NumNameSegs)
{
- NATIVE_CHAR *TempPtr;
- NATIVE_CHAR *NameString;
+ char *TempPtr;
+ char *NameString;
UINT32 SizeNeeded;
ACPI_FUNCTION_TRACE ("ExAllocateNameString");
@@ -245,7 +245,7 @@ AcpiExAllocateNameString (
ACPI_STATUS
AcpiExNameSegment (
UINT8 **InAmlAddress,
- NATIVE_CHAR *NameString)
+ char *NameString)
{
char *AmlAddress = (void *) *InAmlAddress;
ACPI_STATUS Status = AE_OK;
@@ -340,12 +340,12 @@ ACPI_STATUS
AcpiExGetNameString (
ACPI_OBJECT_TYPE DataType,
UINT8 *InAmlAddress,
- NATIVE_CHAR **OutNameString,
+ char **OutNameString,
UINT32 *OutNameLength)
{
ACPI_STATUS Status = AE_OK;
UINT8 *AmlAddress = InAmlAddress;
- NATIVE_CHAR *NameString = NULL;
+ char *NameString = NULL;
UINT32 NumSegments;
UINT32 PrefixCount = 0;
BOOLEAN HasPrefix = FALSE;
diff --git a/sys/contrib/dev/acpica/exoparg1.c b/sys/contrib/dev/acpica/exoparg1.c
index 1600e62..fae1ff8 100644
--- a/sys/contrib/dev/acpica/exoparg1.c
+++ b/sys/contrib/dev/acpica/exoparg1.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
- * $Revision: 146 $
+ * $Revision: 147 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exoparg2.c b/sys/contrib/dev/acpica/exoparg2.c
index 4d3acbd..624470a 100644
--- a/sys/contrib/dev/acpica/exoparg2.c
+++ b/sys/contrib/dev/acpica/exoparg2.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
- * $Revision: 115 $
+ * $Revision: 117 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -477,7 +477,7 @@ AcpiExOpcode_2A_1T_1R (
Status = AE_NO_MEMORY;
goto Cleanup;
}
-
+
/* Allocate a new string buffer (Length + 1 for null terminator) */
ReturnDesc->String.Pointer = ACPI_MEM_CALLOCATE (Length + 1);
diff --git a/sys/contrib/dev/acpica/exoparg3.c b/sys/contrib/dev/acpica/exoparg3.c
index baf9bfe..1953ec2 100644
--- a/sys/contrib/dev/acpica/exoparg3.c
+++ b/sys/contrib/dev/acpica/exoparg3.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
- * $Revision: 15 $
+ * $Revision: 17 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -240,7 +240,7 @@ AcpiExOpcode_3A_1T_1R (
ACPI_OPERAND_OBJECT *ReturnDesc = NULL;
char *Buffer;
ACPI_STATUS Status = AE_OK;
- NATIVE_UINT Index;
+ ACPI_NATIVE_UINT Index;
ACPI_SIZE Length;
@@ -264,7 +264,7 @@ AcpiExOpcode_3A_1T_1R (
/* Get the Integer values from the objects */
- Index = (NATIVE_UINT) Operand[1]->Integer.Value;
+ Index = (ACPI_NATIVE_UINT) Operand[1]->Integer.Value;
Length = (ACPI_SIZE) Operand[2]->Integer.Value;
/*
diff --git a/sys/contrib/dev/acpica/exoparg6.c b/sys/contrib/dev/acpica/exoparg6.c
index 894bee2..5676835 100644
--- a/sys/contrib/dev/acpica/exoparg6.c
+++ b/sys/contrib/dev/acpica/exoparg6.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg6 - AML execution - opcodes with 6 arguments
- * $Revision: 11 $
+ * $Revision: 12 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c
index e9ed816..6071e0d 100644
--- a/sys/contrib/dev/acpica/exprep.c
+++ b/sys/contrib/dev/acpica/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 121 $
+ * $Revision: 122 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exregion.c b/sys/contrib/dev/acpica/exregion.c
index c42e566..049f5c7 100644
--- a/sys/contrib/dev/acpica/exregion.c
+++ b/sys/contrib/dev/acpica/exregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exregion - ACPI default OpRegion (address space) handlers
- * $Revision: 80 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -230,9 +230,9 @@ AcpiExSystemMemorySpaceHandler (
* constrain the maximum mapping size to something reasonable.
*/
WindowSize = (ACPI_SIZE) ((MemInfo->Address + MemInfo->Length) - Address);
- if (WindowSize > SYSMEM_REGION_WINDOW_SIZE)
+ if (WindowSize > ACPI_SYSMEM_REGION_WINDOW_SIZE)
{
- WindowSize = SYSMEM_REGION_WINDOW_SIZE;
+ WindowSize = ACPI_SYSMEM_REGION_WINDOW_SIZE;
}
/* Create a new mapping starting at the address given */
diff --git a/sys/contrib/dev/acpica/exresnte.c b/sys/contrib/dev/acpica/exresnte.c
index c999b15..5e450dd 100644
--- a/sys/contrib/dev/acpica/exresnte.c
+++ b/sys/contrib/dev/acpica/exresnte.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresnte - AML Interpreter object resolution
- * $Revision: 61 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exresolv.c b/sys/contrib/dev/acpica/exresolv.c
index e5bc4f3..fb673e0 100644
--- a/sys/contrib/dev/acpica/exresolv.c
+++ b/sys/contrib/dev/acpica/exresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresolv - AML Interpreter object resolution
- * $Revision: 117 $
+ * $Revision: 119 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -417,8 +417,8 @@ AcpiExResolveMultiple (
/*
* For reference objects created via the RefOf or Index operators,
- * we need to get to the base object (as per the ACPI specification
- * of the ObjectType and SizeOf operators). This means traversing
+ * we need to get to the base object (as per the ACPI specification
+ * of the ObjectType and SizeOf operators). This means traversing
* the list of possibly many nested references.
*/
while (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_LOCAL_REFERENCE)
diff --git a/sys/contrib/dev/acpica/exresop.c b/sys/contrib/dev/acpica/exresop.c
index 7e46b7b..2245d7e 100644
--- a/sys/contrib/dev/acpica/exresop.c
+++ b/sys/contrib/dev/acpica/exresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresop - AML Interpreter operand/object resolution
- * $Revision: 60 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -459,13 +459,6 @@ AcpiExResolveOperands (
TypeNeeded = ACPI_TYPE_EVENT;
break;
- case ARGI_REGION:
-
- /* Need an operand of type ACPI_TYPE_REGION */
-
- TypeNeeded = ACPI_TYPE_REGION;
- break;
-
case ARGI_PACKAGE: /* Package */
/* Need an operand of type ACPI_TYPE_PACKAGE */
@@ -579,6 +572,39 @@ AcpiExResolveOperands (
goto NextOperand;
+ case ARGI_BUFFER_OR_STRING:
+
+ /* Need an operand of type STRING or BUFFER */
+
+ switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
+ {
+ case ACPI_TYPE_STRING:
+ case ACPI_TYPE_BUFFER:
+
+ /* Valid operand */
+ break;
+
+ case ACPI_TYPE_INTEGER:
+
+ /* Highest priority conversion is to type Buffer */
+
+ Status = AcpiExConvertToBuffer (ObjDesc, StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ break;
+
+ default:
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+ goto NextOperand;
+
+
case ARGI_DATAOBJECT:
/*
* ARGI_DATAOBJECT is only used by the SizeOf operator.
@@ -599,7 +625,7 @@ AcpiExResolveOperands (
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Needed [Buf/Str/Pkg], found [%s] %p\n",
+ "Needed [Buffer/String/Package/Reference], found [%s] %p\n",
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -622,7 +648,31 @@ AcpiExResolveOperands (
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Needed [Buf/Str/Pkg], found [%s] %p\n",
+ "Needed [Buffer/String/Package], found [%s] %p\n",
+ AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+ goto NextOperand;
+
+
+ case ARGI_REGION_OR_FIELD:
+
+ /* Need an operand of type ACPI_TYPE_REGION or a FIELD in a region */
+
+ switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
+ {
+ case ACPI_TYPE_REGION:
+ case ACPI_TYPE_LOCAL_REGION_FIELD:
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
+ case ACPI_TYPE_LOCAL_INDEX_FIELD:
+
+ /* Valid operand */
+ break;
+
+ default:
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Needed [Region/RegionField], found [%s] %p\n",
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
diff --git a/sys/contrib/dev/acpica/exstore.c b/sys/contrib/dev/acpica/exstore.c
index 237ccee..bcc926b 100644
--- a/sys/contrib/dev/acpica/exstore.c
+++ b/sys/contrib/dev/acpica/exstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstore - AML Interpreter object store support
- * $Revision: 174 $
+ * $Revision: 175 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exstoren.c b/sys/contrib/dev/acpica/exstoren.c
index 961d642..22c5d1f 100644
--- a/sys/contrib/dev/acpica/exstoren.c
+++ b/sys/contrib/dev/acpica/exstoren.c
@@ -3,7 +3,7 @@
*
* Module Name: exstoren - AML Interpreter object store support,
* Store to Node (namespace object)
- * $Revision: 52 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -277,7 +277,7 @@ AcpiExStoreObjectToObject (
ACPI_STATUS Status = AE_OK;
- ACPI_FUNCTION_TRACE_PTR ("AcpiExStoreObjectToObject", SourceDesc);
+ ACPI_FUNCTION_TRACE_PTR ("ExStoreObjectToObject", SourceDesc);
ActualSrcDesc = SourceDesc;
@@ -312,7 +312,7 @@ AcpiExStoreObjectToObject (
if (SourceDesc == ActualSrcDesc)
{
- /*
+ /*
* No conversion was performed. Return the SourceDesc as the
* new object.
*/
diff --git a/sys/contrib/dev/acpica/exstorob.c b/sys/contrib/dev/acpica/exstorob.c
index f9be073..360ab5c 100644
--- a/sys/contrib/dev/acpica/exstorob.c
+++ b/sys/contrib/dev/acpica/exstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstorob - AML Interpreter object store support, store to object
- * $Revision: 46 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -147,7 +147,7 @@ AcpiExStoreBufferToBuffer (
UINT8 *Buffer;
- ACPI_FUNCTION_NAME ("ExStoreBufferToBuffer");
+ ACPI_FUNCTION_TRACE_PTR ("ExStoreBufferToBuffer", SourceDesc);
/*
@@ -157,17 +157,19 @@ AcpiExStoreBufferToBuffer (
Length = SourceDesc->Buffer.Length;
/*
- * If target is a buffer of length zero, allocate a new
- * buffer of the proper length
+ * If target is a buffer of length zero or is a static buffer,
+ * allocate a new buffer of the proper length
*/
- if (TargetDesc->Buffer.Length == 0)
+ if ((TargetDesc->Buffer.Length == 0) ||
+ (TargetDesc->Common.Flags & AOPOBJ_STATIC_POINTER))
{
TargetDesc->Buffer.Pointer = ACPI_MEM_ALLOCATE (Length);
if (!TargetDesc->Buffer.Pointer)
{
- return (AE_NO_MEMORY);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
+ TargetDesc->Common.Flags &= ~AOPOBJ_STATIC_POINTER;
TargetDesc->Buffer.Length = Length;
}
@@ -197,7 +199,7 @@ AcpiExStoreBufferToBuffer (
/* Copy flags */
TargetDesc->Buffer.Flags = SourceDesc->Buffer.Flags;
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
@@ -223,7 +225,7 @@ AcpiExStoreStringToString (
UINT8 *Buffer;
- ACPI_FUNCTION_ENTRY ();
+ ACPI_FUNCTION_TRACE_PTR ("ExStoreStringToString", SourceDesc);
/*
@@ -233,13 +235,15 @@ AcpiExStoreStringToString (
Length = SourceDesc->String.Length;
/*
- * Setting a string value replaces the old string
+ * Replace existing string value if it will fit and the string
+ * pointer is not a static pointer (part of an ACPI table)
*/
- if (Length < TargetDesc->String.Length)
+ if ((Length < TargetDesc->String.Length) &&
+ (!(TargetDesc->Common.Flags & AOPOBJ_STATIC_POINTER)))
{
- /*
- * String will fit in existing buffer.
- * Clear old string and copy in the new one
+ /*
+ * String will fit in existing non-static buffer.
+ * Clear old string and copy in the new one
*/
ACPI_MEMSET (TargetDesc->String.Pointer, 0, (ACPI_SIZE) TargetDesc->String.Length + 1);
ACPI_MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
@@ -262,16 +266,17 @@ AcpiExStoreStringToString (
TargetDesc->String.Pointer = ACPI_MEM_CALLOCATE ((ACPI_SIZE) Length + 1);
if (!TargetDesc->String.Pointer)
{
- return (AE_NO_MEMORY);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
+ TargetDesc->Common.Flags &= ~AOPOBJ_STATIC_POINTER;
ACPI_MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
}
/* Set the new target length */
TargetDesc->String.Length = Length;
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/exutils.c b/sys/contrib/dev/acpica/exutils.c
index 599f0af..30760a89 100644
--- a/sys/contrib/dev/acpica/exutils.c
+++ b/sys/contrib/dev/acpica/exutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exutils - interpreter/scanner utilities
- * $Revision: 106 $
+ * $Revision: 108 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -400,7 +400,7 @@ AcpiExDigitsNeeded (
void
AcpiExEisaIdToString (
UINT32 NumericId,
- NATIVE_CHAR *OutString)
+ char *OutString)
{
UINT32 EisaId;
@@ -437,7 +437,7 @@ AcpiExEisaIdToString (
void
AcpiExUnsignedIntegerToString (
ACPI_INTEGER Value,
- NATIVE_CHAR *OutString)
+ char *OutString)
{
UINT32 Count;
UINT32 DigitsNeeded;
@@ -454,7 +454,7 @@ AcpiExUnsignedIntegerToString (
for (Count = DigitsNeeded; Count > 0; Count--)
{
(void) AcpiUtShortDivide (&Value, 10, &Quotient, &Remainder);
- OutString[Count-1] = (NATIVE_CHAR) ('0' + Remainder);\
+ OutString[Count-1] = (char) ('0' + Remainder);\
Value = Quotient;
}
}
diff --git a/sys/contrib/dev/acpica/hwacpi.c b/sys/contrib/dev/acpica/hwacpi.c
index 9dffda3..d0bb320 100644
--- a/sys/contrib/dev/acpica/hwacpi.c
+++ b/sys/contrib/dev/acpica/hwacpi.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
- * $Revision: 60 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -196,7 +196,7 @@ AcpiHwSetMode (
*/
if (!AcpiGbl_FADT->SmiCmd)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No SMI_CMD in FADT, mode transition failed.\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No SMI_CMD in FADT, mode transition failed.\n"));
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
}
diff --git a/sys/contrib/dev/acpica/hwgpe.c b/sys/contrib/dev/acpica/hwgpe.c
index cf822a5..29f8b04 100644
--- a/sys/contrib/dev/acpica/hwgpe.c
+++ b/sys/contrib/dev/acpica/hwgpe.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
- * $Revision: 42 $
+ * $Revision: 47 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -124,26 +124,6 @@
/******************************************************************************
*
- * FUNCTION: AcpiHwGetGpeBitMask
- *
- * PARAMETERS: GpeNumber - The GPE
- *
- * RETURN: Gpe register bitmask for this gpe level
- *
- * DESCRIPTION: Get the bitmask for this GPE
- *
- ******************************************************************************/
-
-UINT8
-AcpiHwGetGpeBitMask (
- UINT32 GpeNumber)
-{
- return (AcpiGbl_GpeNumberInfo [AcpiEvGetGpeNumberIndex (GpeNumber)].BitMask);
-}
-
-
-/******************************************************************************
- *
* FUNCTION: AcpiHwEnableGpe
*
* PARAMETERS: GpeNumber - The GPE
@@ -156,38 +136,30 @@ AcpiHwGetGpeBitMask (
ACPI_STATUS
AcpiHwEnableGpe (
- UINT32 GpeNumber)
+ ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
UINT32 InByte;
- UINT32 RegisterIndex;
- UINT8 BitMask;
ACPI_STATUS Status;
ACPI_FUNCTION_ENTRY ();
- /* Translate GPE number to index into global registers array. */
-
- RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
-
- /* Get the register bitmask for this GPE */
-
- BitMask = AcpiHwGetGpeBitMask (GpeNumber);
-
/*
* Read the current value of the register, set the appropriate bit
* to enable the GPE, and write out the new register.
*/
Status = AcpiHwLowLevelRead (8, &InByte,
- &AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
+ &GpeEventInfo->RegisterInfo->EnableAddress, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- Status = AcpiHwLowLevelWrite (8, (InByte | BitMask),
- &AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
+ /* Write with the new GPE bit enabled */
+
+ Status = AcpiHwLowLevelWrite (8, (InByte | GpeEventInfo->BitMask),
+ &GpeEventInfo->RegisterInfo->EnableAddress, 0);
return (Status);
}
@@ -208,27 +180,26 @@ AcpiHwEnableGpe (
void
AcpiHwEnableGpeForWakeup (
- UINT32 GpeNumber)
+ ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
- UINT32 RegisterIndex;
- UINT8 BitMask;
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_FUNCTION_ENTRY ();
- /* Translate GPE number to index into global registers array. */
-
- RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
+ /* Get the info block for the entire GPE register */
- /* Get the register bitmask for this GPE */
-
- BitMask = AcpiHwGetGpeBitMask (GpeNumber);
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ return;
+ }
/*
* Set the bit so we will not disable this when sleeping
*/
- AcpiGbl_GpeRegisterInfo[RegisterIndex].WakeEnable |= BitMask;
+ GpeRegisterInfo->WakeEnable |= GpeEventInfo->BitMask;
}
@@ -246,44 +217,45 @@ AcpiHwEnableGpeForWakeup (
ACPI_STATUS
AcpiHwDisableGpe (
- UINT32 GpeNumber)
+ ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
UINT32 InByte;
- UINT32 RegisterIndex;
- UINT8 BitMask;
ACPI_STATUS Status;
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_FUNCTION_ENTRY ();
- /* Translate GPE number to index into global registers array. */
-
- RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
-
- /* Get the register bitmask for this GPE */
+ /* Get the info block for the entire GPE register */
- BitMask = AcpiHwGetGpeBitMask (GpeNumber);
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ return (AE_BAD_PARAMETER);
+ }
/*
* Read the current value of the register, clear the appropriate bit,
* and write out the new register value to disable the GPE.
*/
Status = AcpiHwLowLevelRead (8, &InByte,
- &AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
+ &GpeRegisterInfo->EnableAddress, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- Status = AcpiHwLowLevelWrite (8, (InByte & ~BitMask),
- &AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
+ /* Write the byte with this GPE bit cleared */
+
+ Status = AcpiHwLowLevelWrite (8, (InByte & ~(GpeEventInfo->BitMask)),
+ &GpeRegisterInfo->EnableAddress, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- AcpiHwDisableGpeForWakeup(GpeNumber);
+ AcpiHwDisableGpeForWakeup (GpeEventInfo);
return (AE_OK);
}
@@ -303,27 +275,26 @@ AcpiHwDisableGpe (
void
AcpiHwDisableGpeForWakeup (
- UINT32 GpeNumber)
+ ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
- UINT32 RegisterIndex;
- UINT8 BitMask;
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_FUNCTION_ENTRY ();
- /* Translate GPE number to index into global registers array. */
+ /* Get the info block for the entire GPE register */
- RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
-
- /* Get the register bitmask for this GPE */
-
- BitMask = AcpiHwGetGpeBitMask (GpeNumber);
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ return;
+ }
/*
* Clear the bit so we will disable this when sleeping
*/
- AcpiGbl_GpeRegisterInfo[RegisterIndex].WakeEnable &= ~BitMask;
+ GpeRegisterInfo->WakeEnable &= ~(GpeEventInfo->BitMask);
}
@@ -341,30 +312,20 @@ AcpiHwDisableGpeForWakeup (
ACPI_STATUS
AcpiHwClearGpe (
- UINT32 GpeNumber)
+ ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
- UINT32 RegisterIndex;
- UINT8 BitMask;
ACPI_STATUS Status;
ACPI_FUNCTION_ENTRY ();
- /* Translate GPE number to index into global registers array. */
-
- RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
-
- /* Get the register bitmask for this GPE */
-
- BitMask = AcpiHwGetGpeBitMask (GpeNumber);
-
/*
* Write a one to the appropriate bit in the status register to
* clear this GPE.
*/
- Status = AcpiHwLowLevelWrite (8, BitMask,
- &AcpiGbl_GpeRegisterInfo[RegisterIndex].StatusAddress, 0);
+ Status = AcpiHwLowLevelWrite (8, GpeEventInfo->BitMask,
+ &GpeEventInfo->RegisterInfo->StatusAddress, 0);
return (Status);
}
@@ -387,11 +348,12 @@ AcpiHwGetGpeStatus (
UINT32 GpeNumber,
ACPI_EVENT_STATUS *EventStatus)
{
- UINT32 InByte = 0;
- UINT32 RegisterIndex = 0;
- UINT8 BitMask = 0;
+ UINT32 InByte;
+ UINT8 BitMask;
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_STATUS Status;
+ ACPI_EVENT_STATUS LocalEventStatus = 0;
ACPI_FUNCTION_ENTRY ();
@@ -402,16 +364,19 @@ AcpiHwGetGpeStatus (
return (AE_BAD_PARAMETER);
}
- (*EventStatus) = 0;
+ GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber);
+ if (!GpeEventInfo)
+ {
+ return (AE_BAD_PARAMETER);
+ }
- /* Translate GPE number to index into global registers array. */
+ /* Get the info block for the entire GPE register */
- RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
- GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[RegisterIndex];
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
/* Get the register bitmask for this GPE */
- BitMask = AcpiHwGetGpeBitMask (GpeNumber);
+ BitMask = GpeEventInfo->BitMask;
/* GPE Enabled? */
@@ -423,14 +388,14 @@ AcpiHwGetGpeStatus (
if (BitMask & InByte)
{
- (*EventStatus) |= ACPI_EVENT_FLAG_ENABLED;
+ LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
}
/* GPE Enabled for wake? */
if (BitMask & GpeRegisterInfo->WakeEnable)
{
- (*EventStatus) |= ACPI_EVENT_FLAG_WAKE_ENABLED;
+ LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;
}
/* GPE active (set)? */
@@ -443,8 +408,12 @@ AcpiHwGetGpeStatus (
if (BitMask & InByte)
{
- (*EventStatus) |= ACPI_EVENT_FLAG_SET;
+ LocalEventStatus |= ACPI_EVENT_FLAG_SET;
}
+
+ /* Set return value */
+
+ (*EventStatus) = LocalEventStatus;
return (AE_OK);
}
@@ -459,7 +428,7 @@ AcpiHwGetGpeStatus (
*
* DESCRIPTION: Disable all non-wakeup GPEs
* Call with interrupts disabled. The interrupt handler also
- * modifies AcpiGbl_GpeRegisterInfo[i].Enable, so it should not be
+ * modifies GpeRegisterInfo->Enable, so it should not be
* given the chance to run until after non-wake GPEs are
* re-enabled.
*
@@ -473,38 +442,54 @@ AcpiHwDisableNonWakeupGpes (
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
UINT32 InValue;
ACPI_STATUS Status;
+ ACPI_GPE_BLOCK_INFO *GpeBlock;
ACPI_FUNCTION_ENTRY ();
- for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
{
- GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
+ /* Get the register info for the entire GPE block */
- /*
- * Read the enabled status of all GPEs. We
- * will be using it to restore all the GPEs later.
- */
- Status = AcpiHwLowLevelRead (8, &InValue,
- &GpeRegisterInfo->EnableAddress, 0);
- if (ACPI_FAILURE (Status))
+ GpeRegisterInfo = GpeBlock->RegisterInfo;
+ if (!GpeRegisterInfo)
{
- return (Status);
+ return (AE_BAD_PARAMETER);
}
- GpeRegisterInfo->Enable = (UINT8) InValue;
-
- /*
- * Disable all GPEs except wakeup GPEs.
- */
- Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->WakeEnable,
- &GpeRegisterInfo->EnableAddress, 0);
- if (ACPI_FAILURE (Status))
+ for (i = 0; i < GpeBlock->RegisterCount; i++)
{
- return (Status);
+ /*
+ * Read the enabled status of all GPEs. We
+ * will be using it to restore all the GPEs later.
+ */
+ Status = AcpiHwLowLevelRead (8, &InValue,
+ &GpeRegisterInfo->EnableAddress, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ GpeRegisterInfo->Enable = (UINT8) InValue;
+
+ /*
+ * Disable all GPEs except wakeup GPEs.
+ */
+ Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->WakeEnable,
+ &GpeRegisterInfo->EnableAddress, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ GpeRegisterInfo++;
}
+
+ GpeBlock = GpeBlock->Next;
}
+
return (AE_OK);
}
@@ -528,25 +513,41 @@ AcpiHwEnableNonWakeupGpes (
UINT32 i;
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_STATUS Status;
+ ACPI_GPE_BLOCK_INFO *GpeBlock;
ACPI_FUNCTION_ENTRY ();
- for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
{
- GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
+ /* Get the register info for the entire GPE block */
- /*
- * We previously stored the enabled status of all GPEs.
- * Blast them back in.
- */
- Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->Enable,
- &GpeRegisterInfo->EnableAddress, 0);
- if (ACPI_FAILURE (Status))
+ GpeRegisterInfo = GpeBlock->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ return (AE_BAD_PARAMETER);
+ }
+
+ for (i = 0; i < GpeBlock->RegisterCount; i++)
{
- return (Status);
+ /*
+ * We previously stored the enabled status of all GPEs.
+ * Blast them back in.
+ */
+ Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->Enable,
+ &GpeRegisterInfo->EnableAddress, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ GpeRegisterInfo++;
}
+
+ GpeBlock = GpeBlock->Next;
}
+
return (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c
index 164a44f..8f3cd18 100644
--- a/sys/contrib/dev/acpica/hwregs.c
+++ b/sys/contrib/dev/acpica/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 134 $
+ * $Revision: 142 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -140,9 +140,9 @@
ACPI_STATUS
AcpiHwClearAcpiStatus (void)
{
- NATIVE_UINT_MAX32 i;
- NATIVE_UINT GpeBlock;
+ ACPI_NATIVE_UINT i;
ACPI_STATUS Status;
+ ACPI_GPE_BLOCK_INFO *GpeBlock;
ACPI_FUNCTION_TRACE ("HwClearAcpiStatus");
@@ -178,19 +178,22 @@ AcpiHwClearAcpiStatus (void)
}
}
- /* Clear the GPE Bits */
+ /* Clear the GPE Bits in all GPE registers in all GPE blocks */
- for (GpeBlock = 0; GpeBlock < ACPI_MAX_GPE_BLOCKS; GpeBlock++)
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
{
- for (i = 0; i < AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount; i++)
+ for (i = 0; i < GpeBlock->RegisterCount; i++)
{
Status = AcpiHwLowLevelWrite (8, 0xFF,
- AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress, i);
+ &GpeBlock->RegisterInfo[i].StatusAddress, (UINT32) i);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
}
}
+
+ GpeBlock = GpeBlock->Next;
}
UnlockAndExit:
@@ -239,10 +242,13 @@ AcpiGetSleepTypeData (
/*
* Evaluate the namespace object containing the values for this state
*/
- Status = AcpiNsEvaluateByName ((NATIVE_CHAR *) AcpiGbl_DbSleepStates[SleepState],
+ Status = AcpiNsEvaluateByName ((char *) AcpiGbl_DbSleepStates[SleepState],
NULL, &ObjDesc);
if (ACPI_FAILURE (Status))
{
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s while evaluating SleepState [%s]\n",
+ AcpiFormatException (Status), AcpiGbl_DbSleepStates[SleepState]));
+
return_ACPI_STATUS (Status);
}
@@ -291,8 +297,8 @@ AcpiGetSleepTypeData (
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Bad Sleep object %p type %s\n",
- ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "While evaluating SleepState [%s], bad Sleep object %p type %s\n",
+ AcpiGbl_DbSleepStates[SleepState], ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
}
AcpiUtRemoveReference (ObjDesc);
@@ -467,7 +473,7 @@ AcpiSetRegister (
/*
* Status Registers are different from the rest. Clear by
- * writing 1, writing 0 has no effect. So, the only relevent
+ * writing 1, writing 0 has no effect. So, the only relevant
* information is the single bit we're interested in, all others should
* be written as 0 so they will be left unchanged
*/
diff --git a/sys/contrib/dev/acpica/hwtimer.c b/sys/contrib/dev/acpica/hwtimer.c
index d7fe8e1..92267a6 100644
--- a/sys/contrib/dev/acpica/hwtimer.c
+++ b/sys/contrib/dev/acpica/hwtimer.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwtimer.c - ACPI Power Management Timer Interface
- * $Revision: 21 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -210,10 +210,13 @@ AcpiGetTimer (
* transitions (unlike many CPU timestamp counters) -- making it
* a versatile and accurate timer.
*
- * Note that this function accomodates only a single timer
+ * Note that this function accommodates only a single timer
* rollover. Thus for 24-bit timers, this function should only
* be used for calculating durations less than ~4.6 seconds
- * (~20 hours for 32-bit timers).
+ * (~20 minutes for 32-bit timers) -- calculations below
+ *
+ * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec
+ * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes
*
******************************************************************************/
diff --git a/sys/contrib/dev/acpica/nsaccess.c b/sys/contrib/dev/acpica/nsaccess.c
index 51e89ea..ca46558 100644
--- a/sys/contrib/dev/acpica/nsaccess.c
+++ b/sys/contrib/dev/acpica/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 165 $
+ * $Revision: 171 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -198,6 +198,20 @@ AcpiNsRootInitialize (void)
*/
if (InitVal->Val)
{
+ ACPI_STRING Val;
+
+ Status = AcpiOsPredefinedOverride(InitVal, &Val);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not override predefined %s\n",
+ InitVal->Name));
+ }
+
+ if (!Val)
+ {
+ Val = InitVal->Val;
+ }
+
/*
* Entry requests an initial value, allocate a
* descriptor for it.
@@ -218,7 +232,7 @@ AcpiNsRootInitialize (void)
{
case ACPI_TYPE_METHOD:
ObjDesc->Method.ParamCount =
- (UINT8) ACPI_STRTOUL (InitVal->Val, NULL, 10);
+ (UINT8) ACPI_STRTOUL (Val, NULL, 10);
ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID;
#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
@@ -232,7 +246,7 @@ AcpiNsRootInitialize (void)
case ACPI_TYPE_INTEGER:
ObjDesc->Integer.Value =
- (ACPI_INTEGER) ACPI_STRTOUL (InitVal->Val, NULL, 10);
+ (ACPI_INTEGER) ACPI_STRTOUL (Val, NULL, 10);
break;
@@ -241,8 +255,8 @@ AcpiNsRootInitialize (void)
/*
* Build an object around the static string
*/
- ObjDesc->String.Length = (UINT32) ACPI_STRLEN (InitVal->Val);
- ObjDesc->String.Pointer = InitVal->Val;
+ ObjDesc->String.Length = (UINT32) ACPI_STRLEN (Val);
+ ObjDesc->String.Pointer = Val;
ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
break;
@@ -251,7 +265,7 @@ AcpiNsRootInitialize (void)
ObjDesc->Mutex.Node = NewNode;
ObjDesc->Mutex.SyncLevel =
- (UINT16) ACPI_STRTOUL (InitVal->Val, NULL, 10);
+ (UINT16) ACPI_STRTOUL (Val, NULL, 10);
if (ACPI_STRCMP (InitVal->Name, "_GL_") == 0)
{
@@ -337,7 +351,7 @@ UnlockAndExit:
ACPI_STATUS
AcpiNsLookup (
ACPI_GENERIC_STATE *ScopeInfo,
- NATIVE_CHAR *Pathname,
+ char *Pathname,
ACPI_OBJECT_TYPE Type,
ACPI_INTERPRETER_MODE InterpreterMode,
UINT32 Flags,
@@ -345,7 +359,7 @@ AcpiNsLookup (
ACPI_NAMESPACE_NODE **ReturnNode)
{
ACPI_STATUS Status;
- NATIVE_CHAR *Path = Pathname;
+ char *Path = Pathname;
ACPI_NAMESPACE_NODE *PrefixNode;
ACPI_NAMESPACE_NODE *CurrentNode = NULL;
ACPI_NAMESPACE_NODE *ThisNode = NULL;
@@ -355,7 +369,7 @@ AcpiNsLookup (
ACPI_OBJECT_TYPE TypeToCheckFor;
ACPI_OBJECT_TYPE ThisSearchType;
UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT;
- UINT32 LocalFlags = Flags & ~(ACPI_NS_ERROR_IF_FOUND |
+ UINT32 LocalFlags = Flags & ~(ACPI_NS_ERROR_IF_FOUND |
ACPI_NS_SEARCH_PARENT);
@@ -393,17 +407,17 @@ AcpiNsLookup (
PrefixNode = ScopeInfo->Scope.Node;
if (ACPI_GET_DESCRIPTOR_TYPE (PrefixNode) != ACPI_DESC_TYPE_NAMED)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%p] Not a namespace node\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%p] Not a namespace node\n",
PrefixNode));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
/*
- * This node might not be a actual "scope" node (such as a
- * Device/Method, etc.) It could be a Package or other object node.
+ * This node might not be a actual "scope" node (such as a
+ * Device/Method, etc.) It could be a Package or other object node.
* Backup up the tree to find the containing scope node.
*/
- while (!AcpiNsOpensScope (PrefixNode->Type) &&
+ while (!AcpiNsOpensScope (PrefixNode->Type) &&
PrefixNode->Type != ACPI_TYPE_ANY)
{
PrefixNode = AcpiNsGetParentNode (PrefixNode);
@@ -454,7 +468,7 @@ AcpiNsLookup (
Path++;
- ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Path is absolute from root [%p]\n", ThisNode));
}
else
@@ -499,7 +513,7 @@ AcpiNsLookup (
if (SearchParentFlag == ACPI_NS_NO_UPSEARCH)
{
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
- "Search scope is [%4.4s], path has %d carat(s)\n",
+ "Search scope is [%4.4s], path has %d carat(s)\n",
ThisNode->Name.Ascii, NumCarats));
}
}
@@ -633,7 +647,7 @@ AcpiNsLookup (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name [%4.4s] not found in scope [%4.4s] %p\n",
- (char *) &SimpleName, (char *) &CurrentNode->Name,
+ (char *) &SimpleName, (char *) &CurrentNode->Name,
CurrentNode));
}
@@ -665,7 +679,7 @@ AcpiNsLookup (
ACPI_REPORT_WARNING (
("NsLookup: Type mismatch on %4.4s (%s), searching for (%s)\n",
- (char *) &SimpleName, AcpiUtGetTypeName (ThisNode->Type),
+ (char *) &SimpleName, AcpiUtGetTypeName (ThisNode->Type),
AcpiUtGetTypeName (TypeToCheckFor)));
}
diff --git a/sys/contrib/dev/acpica/nsalloc.c b/sys/contrib/dev/acpica/nsalloc.c
index 16160aa..74220f3 100644
--- a/sys/contrib/dev/acpica/nsalloc.c
+++ b/sys/contrib/dev/acpica/nsalloc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
- * $Revision: 77 $
+ * $Revision: 79 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -226,14 +226,14 @@ AcpiNsDeleteNode (
#ifdef ACPI_ALPHABETIC_NAMESPACE
/*******************************************************************************
*
- * FUNCTION: AcpiNsCompareNames
+ * FUNCTION: AcpiNsCompareNames
*
* PARAMETERS: Name1 - First name to compare
* Name2 - Second name to compare
*
* RETURN: value from strncmp
*
- * DESCRIPTION: Compare two ACPI names. Names that are prefixed with an
+ * DESCRIPTION: Compare two ACPI names. Names that are prefixed with an
* underscore are forced to be alphabetically first.
*
******************************************************************************/
@@ -372,7 +372,7 @@ AcpiNsInstallNode (
if (!(Node->Flags & ANOBJ_END_OF_PEER_LIST))
{
- /*
+ /*
* Loop above terminated without reaching the end-of-list.
* Insert the new node at the current location
*/
@@ -413,7 +413,7 @@ AcpiNsInstallNode (
Node->Type = (UINT8) Type;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s (%s) added to %4.4s (%s) %p at %p\n",
- Node->Name.Ascii, AcpiUtGetTypeName (Node->Type),
+ Node->Name.Ascii, AcpiUtGetTypeName (Node->Type),
ParentNode->Name.Ascii, AcpiUtGetTypeName (ParentNode->Type), ParentNode, Node));
/*
diff --git a/sys/contrib/dev/acpica/nsdump.c b/sys/contrib/dev/acpica/nsdump.c
index 88b135c..085565d 100644
--- a/sys/contrib/dev/acpica/nsdump.c
+++ b/sys/contrib/dev/acpica/nsdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 146 $
+ * $Revision: 151 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -186,16 +186,13 @@ AcpiNsPrintPathname (
*
******************************************************************************/
-ACPI_STATUS
+void
AcpiNsDumpPathname (
ACPI_HANDLE Handle,
- NATIVE_CHAR *Msg,
+ char *Msg,
UINT32 Level,
UINT32 Component)
{
- ACPI_BUFFER Buffer;
- ACPI_STATUS Status;
-
ACPI_FUNCTION_TRACE ("NsDumpPathname");
@@ -204,21 +201,14 @@ AcpiNsDumpPathname (
if (!(AcpiDbgLevel & Level) || !(AcpiDbgLayer & Component))
{
- return_ACPI_STATUS (AE_OK);
+ return_VOID;
}
/* Convert handle to a full pathname and print it (with supplied message) */
- Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
-
- Status = AcpiNsHandleToPathname (Handle, &Buffer);
- if (ACPI_SUCCESS (Status))
- {
- AcpiOsPrintf ("%s %s (Node %p)\n", Msg, (char *) Buffer.Pointer, Handle);
- ACPI_MEM_FREE (Buffer.Pointer);
- }
-
- return_ACPI_STATUS (Status);
+ AcpiNsPrintNodePathname (Handle, Msg);
+ AcpiOsPrintf ("\n");
+ return_VOID;
}
diff --git a/sys/contrib/dev/acpica/nsdumpdv.c b/sys/contrib/dev/acpica/nsdumpdv.c
index c1d010d..d8058ac6 100644
--- a/sys/contrib/dev/acpica/nsdumpdv.c
+++ b/sys/contrib/dev/acpica/nsdumpdv.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 4 $
+ * $Revision: 5 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nseval.c b/sys/contrib/dev/acpica/nseval.c
index be29617..e325a7b 100644
--- a/sys/contrib/dev/acpica/nseval.c
+++ b/sys/contrib/dev/acpica/nseval.c
@@ -2,7 +2,7 @@
*
* Module Name: nseval - Object evaluation interfaces -- includes control
* method lookup and execution.
- * $Revision: 119 $
+ * $Revision: 121 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -153,14 +153,14 @@
ACPI_STATUS
AcpiNsEvaluateRelative (
ACPI_NAMESPACE_NODE *Handle,
- NATIVE_CHAR *Pathname,
+ char *Pathname,
ACPI_OPERAND_OBJECT **Params,
ACPI_OPERAND_OBJECT **ReturnObject)
{
ACPI_NAMESPACE_NODE *PrefixNode;
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node = NULL;
- NATIVE_CHAR *InternalPath = NULL;
+ char *InternalPath = NULL;
ACPI_GENERIC_STATE ScopeInfo;
@@ -256,13 +256,13 @@ Cleanup:
ACPI_STATUS
AcpiNsEvaluateByName (
- NATIVE_CHAR *Pathname,
+ char *Pathname,
ACPI_OPERAND_OBJECT **Params,
ACPI_OPERAND_OBJECT **ReturnObject)
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node = NULL;
- NATIVE_CHAR *InternalPath = NULL;
+ char *InternalPath = NULL;
ACPI_FUNCTION_TRACE ("NsEvaluateByName");
diff --git a/sys/contrib/dev/acpica/nsinit.c b/sys/contrib/dev/acpica/nsinit.c
index 8babb3d..87cae8d 100644
--- a/sys/contrib/dev/acpica/nsinit.c
+++ b/sys/contrib/dev/acpica/nsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
- * $Revision: 50 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -152,7 +152,7 @@ AcpiNsInitializeObjects (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"**** Starting initialization of namespace objects ****\n"));
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Completing Region/Field/Buffer/Package initialization:"));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Completing Region/Field/Buffer/Package initialization:"));
/* Set all init info to zero */
@@ -169,12 +169,13 @@ AcpiNsInitializeObjects (
AcpiFormatException (Status)));
}
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
"\nInitialized %hd/%hd Regions %hd/%hd Fields %hd/%hd Buffers %hd/%hd Packages (%hd nodes)\n",
Info.OpRegionInit, Info.OpRegionCount,
Info.FieldInit, Info.FieldCount,
Info.BufferInit, Info.BufferCount,
Info.PackageInit, Info.PackageCount, Info.ObjectCount));
+
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"%hd Control Methods found\n", Info.MethodCount));
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@@ -217,7 +218,7 @@ AcpiNsInitializeDevices (
Info.Num_STA = 0;
Info.Num_INI = 0;
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Executing all Device _STA and_INI methods:"));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Executing all Device _STA and_INI methods:"));
/* Walk namespace for all objects of type Device */
@@ -230,7 +231,7 @@ AcpiNsInitializeDevices (
AcpiFormatException (Status)));
}
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
"\n%hd Devices found containing: %hd _STA, %hd _INI methods\n",
Info.DeviceCount, Info.Num_STA, Info.Num_INI));
@@ -375,9 +376,11 @@ AcpiNsInitOneObject (
Node->Name.Ascii, AcpiUtGetTypeName (Type), AcpiFormatException (Status)));
}
- if (!(AcpiDbgLevel & ACPI_LV_INIT))
+ /* Print a dot for each object unless we are going to print the entire pathname */
+
+ if (!(AcpiDbgLevel & ACPI_LV_INIT_NAMES))
{
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
}
/*
@@ -421,7 +424,7 @@ AcpiNsInitOneDevice (
if ((AcpiDbgLevel <= ACPI_LV_ALL_EXCEPTIONS) && (!(AcpiDbgLevel & ACPI_LV_INFO)))
{
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
}
Info->DeviceCount++;
@@ -448,7 +451,7 @@ AcpiNsInitOneDevice (
/*
* Run _STA to determine if we can run _INI on the device.
*/
- ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (Node, "_STA [Method]"));
+ ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_METHOD, Node, "_STA"));
Status = AcpiUtExecute_STA (Node, &Flags);
if (ACPI_FAILURE (Status))
{
@@ -469,7 +472,7 @@ AcpiNsInitOneDevice (
/*
* The device is present. Run _INI.
*/
- ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ObjHandle, "_INI [Method]"));
+ ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_METHOD, ObjHandle, "_INI"));
Status = AcpiNsEvaluateRelative (ObjHandle, "_INI", NULL, NULL);
if (ACPI_FAILURE (Status))
{
@@ -480,7 +483,7 @@ AcpiNsInitOneDevice (
/* Ignore error and move on to next device */
#ifdef ACPI_DEBUG_OUTPUT
- NATIVE_CHAR *ScopeName = AcpiNsGetExternalPathname (ObjHandle);
+ char *ScopeName = AcpiNsGetExternalPathname (ObjHandle);
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
ScopeName, AcpiFormatException (Status)));
diff --git a/sys/contrib/dev/acpica/nsload.c b/sys/contrib/dev/acpica/nsload.c
index 90e39f6..eb8cd5d 100644
--- a/sys/contrib/dev/acpica/nsload.c
+++ b/sys/contrib/dev/acpica/nsload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
- * $Revision: 59 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,7 +118,6 @@
#include "acpi.h"
#include "acnamesp.h"
-#include "acparser.h"
#include "acdispat.h"
@@ -126,127 +125,6 @@
ACPI_MODULE_NAME ("nsload")
-/*******************************************************************************
- *
- * FUNCTION: NsOneCompleteParse
- *
- * PARAMETERS: PassNumber - 1 or 2
- * TableDesc - The table to be parsed.
- *
- * RETURN: Status
- *
- * DESCRIPTION: Perform one complete parse of an ACPI/AML table.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiNsOneCompleteParse (
- UINT32 PassNumber,
- ACPI_TABLE_DESC *TableDesc)
-{
- ACPI_PARSE_OBJECT *ParseRoot;
- ACPI_STATUS Status;
- ACPI_WALK_STATE *WalkState;
-
-
- ACPI_FUNCTION_TRACE ("NsOneCompleteParse");
-
-
- /* Create and init a Root Node */
-
- ParseRoot = AcpiPsCreateScopeOp ();
- if (!ParseRoot)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
-
- /* Create and initialize a new walk state */
-
- WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT,
- NULL, NULL, NULL);
- if (!WalkState)
- {
- AcpiPsFreeOp (ParseRoot);
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- Status = AcpiDsInitAmlWalk (WalkState, ParseRoot, NULL, TableDesc->AmlStart,
- TableDesc->AmlLength, NULL, NULL, PassNumber);
- if (ACPI_FAILURE (Status))
- {
- AcpiDsDeleteWalkState (WalkState);
- return_ACPI_STATUS (Status);
- }
-
- /* Parse the AML */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "*PARSE* pass %d parse\n", PassNumber));
- Status = AcpiPsParseAml (WalkState);
-
- AcpiPsDeleteParseTree (ParseRoot);
- return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiNsParseTable
- *
- * PARAMETERS: TableDesc - An ACPI table descriptor for table to parse
- * StartNode - Where to enter the table into the namespace
- *
- * RETURN: Status
- *
- * DESCRIPTION: Parse AML within an ACPI table and return a tree of ops
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiNsParseTable (
- ACPI_TABLE_DESC *TableDesc,
- ACPI_NAMESPACE_NODE *StartNode)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE ("NsParseTable");
-
-
- /*
- * AML Parse, pass 1
- *
- * In this pass, we load most of the namespace. Control methods
- * are not parsed until later. A parse tree is not created. Instead,
- * each Parser Op subtree is deleted when it is finished. This saves
- * a great deal of memory, and allows a small cache of parse objects
- * to service the entire parse. The second pass of the parse then
- * performs another complete parse of the AML..
- */
- Status = AcpiNsOneCompleteParse (1, TableDesc);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /*
- * AML Parse, pass 2
- *
- * In this pass, we resolve forward references and other things
- * that could not be completed during the first pass.
- * Another complete parse of the AML is performed, but the
- * overhead of this is compensated for by the fact that the
- * parse objects are all cached.
- */
- Status = AcpiNsOneCompleteParse (2, TableDesc);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- return_ACPI_STATUS (Status);
-}
-
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
@@ -292,10 +170,12 @@ AcpiNsLoadTable (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AML block at %p\n", TableDesc->AmlStart));
+ /* Ignore table if there is no AML contained within */
+
if (!TableDesc->AmlLength)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Zero-length AML block\n"));
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ ACPI_REPORT_WARNING (("Zero-length AML block in table [%4.4s]\n", TableDesc->Pointer->Signature));
+ return_ACPI_STATUS (AE_OK);
}
/*
@@ -525,7 +405,7 @@ AcpiNsLoadNamespace (
(void) AcpiNsLoadTableByType (ACPI_TABLE_SSDT);
(void) AcpiNsLoadTableByType (ACPI_TABLE_PSDT);
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
"ACPI Namespace successfully loaded at root %p\n",
AcpiGbl_RootNode));
diff --git a/sys/contrib/dev/acpica/nsnames.c b/sys/contrib/dev/acpica/nsnames.c
index 09a51d2..f69239f 100644
--- a/sys/contrib/dev/acpica/nsnames.c
+++ b/sys/contrib/dev/acpica/nsnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsnames - Name manipulation and search
- * $Revision: 79 $
+ * $Revision: 82 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -144,7 +144,7 @@ void
AcpiNsBuildExternalPath (
ACPI_NAMESPACE_NODE *Node,
ACPI_SIZE Size,
- NATIVE_CHAR *NameBuffer)
+ char *NameBuffer)
{
ACPI_SIZE Index;
ACPI_NAMESPACE_NODE *ParentNode;
@@ -180,7 +180,7 @@ AcpiNsBuildExternalPath (
/* Prefix name with the path separator */
Index--;
- NameBuffer[Index] = PATH_SEPARATOR;
+ NameBuffer[Index] = ACPI_PATH_SEPARATOR;
}
/* Overwrite final separator with the root prefix character */
@@ -213,11 +213,11 @@ AcpiNsBuildExternalPath (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiNsGetExternalPathname (
ACPI_NAMESPACE_NODE *Node)
{
- NATIVE_CHAR *NameBuffer;
+ char *NameBuffer;
ACPI_SIZE Size;
@@ -277,7 +277,7 @@ AcpiNsGetPathnameLength (
while (NextNode && (NextNode != AcpiGbl_RootNode))
{
- Size += PATH_SEGMENT_LENGTH;
+ Size += ACPI_PATH_SEGMENT_LENGTH;
NextNode = AcpiNsGetParentNode (NextNode);
}
diff --git a/sys/contrib/dev/acpica/nsobject.c b/sys/contrib/dev/acpica/nsobject.c
index ec30880..6a6250d 100644
--- a/sys/contrib/dev/acpica/nsobject.c
+++ b/sys/contrib/dev/acpica/nsobject.c
@@ -2,7 +2,7 @@
*
* Module Name: nsobject - Utilities for objects attached to namespace
* table entries
- * $Revision: 85 $
+ * $Revision: 87 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -280,7 +280,7 @@ AcpiNsAttachObject (
*
* RETURN: None.
*
- * DESCRIPTION: Detach/delete an object associated with a namespace node.
+ * DESCRIPTION: Detach/delete an object associated with a namespace node.
* if the object is an allocated object, it is freed.
* Otherwise, the field is simply cleared.
*
diff --git a/sys/contrib/dev/acpica/nssearch.c b/sys/contrib/dev/acpica/nssearch.c
index 4b7819d..56763a5 100644
--- a/sys/contrib/dev/acpica/nssearch.c
+++ b/sys/contrib/dev/acpica/nssearch.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
- * $Revision: 92 $
+ * $Revision: 95 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -135,8 +135,8 @@
*
* RETURN: Status
*
- * DESCRIPTION: Search a single level of the namespace. Performs a
- * simple search of the specified level, and does not add
+ * DESCRIPTION: Search a single level of the namespace. Performs a
+ * simple search of the specified level, and does not add
* entries or search parents.
*
*
@@ -167,7 +167,7 @@ AcpiNsSearchNode (
#ifdef ACPI_DEBUG_OUTPUT
if (ACPI_LV_NAMES & AcpiDbgLevel)
{
- NATIVE_CHAR *ScopeName;
+ char *ScopeName;
ScopeName = AcpiNsGetExternalPathname (Node);
if (ScopeName)
@@ -181,7 +181,7 @@ AcpiNsSearchNode (
#endif
/*
- * Search for name at this namespace level, which is to say that we
+ * Search for name at this namespace level, which is to say that we
* must search for the name among the children of this object
*/
NextNode = Node->Child;
@@ -269,7 +269,7 @@ AcpiNsSearchParentTree (
ParentNode = AcpiNsGetParentNode (Node);
/*
- * If there is no parent (i.e., we are at the root) or
+ * If there is no parent (i.e., we are at the root) or
* type is "local", we won't be searching the parent tree.
*/
if (!ParentNode)
@@ -379,7 +379,7 @@ AcpiNsSearchAndEnter (
if (!AcpiUtValidAcpiName (TargetName))
{
- ACPI_REPORT_ERROR (("NsSearchAndEnter: Bad character in ACPI Name: %X\n",
+ ACPI_REPORT_ERROR (("NsSearchAndEnter: Bad character in ACPI Name: %X\n",
TargetName));
return_ACPI_STATUS (AE_BAD_CHARACTER);
}
diff --git a/sys/contrib/dev/acpica/nsutils.c b/sys/contrib/dev/acpica/nsutils.c
index 69ed423..321cb30 100644
--- a/sys/contrib/dev/acpica/nsutils.c
+++ b/sys/contrib/dev/acpica/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 116 $
+ * $Revision: 122 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -143,7 +143,7 @@
void
AcpiNsReportError (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
char *InternalName,
@@ -152,12 +152,12 @@ AcpiNsReportError (
ACPI_STATUS Status;
char *Name;
-
+
/* Convert path to external format */
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalName, NULL, &Name);
- AcpiOsPrintf ("%8s-%04d: *** Error: Looking up ",
+ AcpiOsPrintf ("%8s-%04d: *** Error: Looking up ",
ModuleName, LineNumber);
/* Print target name */
@@ -171,7 +171,7 @@ AcpiNsReportError (
AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]");
}
- AcpiOsPrintf (" in namespace, %s\n",
+ AcpiOsPrintf (" in namespace, %s\n",
AcpiFormatException (LookupStatus));
if (Name)
@@ -183,6 +183,85 @@ AcpiNsReportError (
/*******************************************************************************
*
+ * FUNCTION: AcpiNsReportMethodError
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * ComponentId - Caller's component ID (for error output)
+ * Message - Error message to use on failure
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print warning message with full pathname
+ *
+ ******************************************************************************/
+
+void
+AcpiNsReportMethodError (
+ char *ModuleName,
+ UINT32 LineNumber,
+ UINT32 ComponentId,
+ char *Message,
+ ACPI_NAMESPACE_NODE *PrefixNode,
+ char *Path,
+ ACPI_STATUS MethodStatus)
+{
+ ACPI_STATUS Status;
+ ACPI_NAMESPACE_NODE *Node = PrefixNode;
+
+
+ if (Path)
+ {
+ Status = AcpiNsGetNodeByPath (Path, PrefixNode, ACPI_NS_NO_UPSEARCH, &Node);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("ReportMethodError: Could not get node\n");
+ return;
+ }
+ }
+
+ AcpiOsPrintf ("%8s-%04d: *** Error: ", ModuleName, LineNumber);
+ AcpiNsPrintNodePathname (Node, Message);
+ AcpiOsPrintf (", %s\n", AcpiFormatException (MethodStatus));
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiNsPrintNodePathname
+ *
+ * PARAMETERS: Node - Object
+ * Msg - Prefix message
+ *
+ * DESCRIPTION: Print an object's full namespace pathname
+ * Manages allocation/freeing of a pathname buffer
+ *
+ ******************************************************************************/
+
+void
+AcpiNsPrintNodePathname (
+ ACPI_NAMESPACE_NODE *Node,
+ char *Msg)
+{
+ ACPI_BUFFER Buffer;
+ ACPI_STATUS Status;
+
+
+ /* Convert handle to a full pathname and print it (with supplied message) */
+
+ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+
+ Status = AcpiNsHandleToPathname (Node, &Buffer);
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiOsPrintf ("%s [%s] (Node %p)", Msg, (char *) Buffer.Pointer, Node);
+ ACPI_MEM_FREE (Buffer.Pointer);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiNsValidRootPrefix
*
* PARAMETERS: Prefix - Character to be checked
@@ -195,7 +274,7 @@ AcpiNsReportError (
BOOLEAN
AcpiNsValidRootPrefix (
- NATIVE_CHAR Prefix)
+ char Prefix)
{
return ((BOOLEAN) (Prefix == '\\'));
@@ -216,7 +295,7 @@ AcpiNsValidRootPrefix (
BOOLEAN
AcpiNsValidPathSeparator (
- NATIVE_CHAR Sep)
+ char Sep)
{
return ((BOOLEAN) (Sep == '.'));
@@ -298,7 +377,7 @@ void
AcpiNsGetInternalNameLength (
ACPI_NAMESTRING_INFO *Info)
{
- NATIVE_CHAR *NextExternalChar;
+ char *NextExternalChar;
UINT32 i;
@@ -379,10 +458,10 @@ AcpiNsBuildInternalName (
ACPI_NAMESTRING_INFO *Info)
{
UINT32 NumSegments = Info->NumSegments;
- NATIVE_CHAR *InternalName = Info->InternalName;
- NATIVE_CHAR *ExternalName = Info->NextExternalChar;
- NATIVE_CHAR *Result = NULL;
- NATIVE_UINT i;
+ char *InternalName = Info->InternalName;
+ char *ExternalName = Info->NextExternalChar;
+ char *Result = NULL;
+ ACPI_NATIVE_UINT i;
ACPI_FUNCTION_TRACE ("NsBuildInternalName");
@@ -432,13 +511,13 @@ AcpiNsBuildInternalName (
else if (NumSegments == 2)
{
InternalName[i] = AML_DUAL_NAME_PREFIX;
- Result = &InternalName[i+1];
+ Result = &InternalName[(ACPI_NATIVE_UINT) (i+1)];
}
else
{
InternalName[i] = AML_MULTI_NAME_PREFIX_OP;
- InternalName[i+1] = (char) NumSegments;
- Result = &InternalName[i+2];
+ InternalName[(ACPI_NATIVE_UINT) (i+1)] = (char) NumSegments;
+ Result = &InternalName[(ACPI_NATIVE_UINT) (i+2)];
}
}
@@ -514,10 +593,10 @@ AcpiNsBuildInternalName (
ACPI_STATUS
AcpiNsInternalizeName (
- NATIVE_CHAR *ExternalName,
- NATIVE_CHAR **ConvertedName)
+ char *ExternalName,
+ char **ConvertedName)
{
- NATIVE_CHAR *InternalName;
+ char *InternalName;
ACPI_NAMESTRING_INFO Info;
ACPI_STATUS Status;
@@ -582,12 +661,12 @@ AcpiNsExternalizeName (
UINT32 *ConvertedNameLength,
char **ConvertedName)
{
- NATIVE_UINT_MIN32 PrefixLength = 0;
- NATIVE_UINT_MIN32 NamesIndex = 0;
- NATIVE_UINT_MIN32 NumSegments = 0;
- NATIVE_UINT_MIN32 i = 0;
- NATIVE_UINT_MIN32 j = 0;
- NATIVE_UINT_MIN32 RequiredLength;
+ ACPI_NATIVE_UINT NamesIndex = 0;
+ ACPI_NATIVE_UINT NumSegments = 0;
+ ACPI_NATIVE_UINT RequiredLength;
+ ACPI_NATIVE_UINT PrefixLength = 0;
+ ACPI_NATIVE_UINT i = 0;
+ ACPI_NATIVE_UINT j = 0;
ACPI_FUNCTION_TRACE ("NsExternalizeName");
@@ -646,7 +725,7 @@ AcpiNsExternalizeName (
/* <count> 4-byte names */
NamesIndex = PrefixLength + 2;
- NumSegments = (UINT32) (UINT8) InternalName[PrefixLength + 1];
+ NumSegments = (UINT32) (UINT8) InternalName[(ACPI_NATIVE_UINT) (PrefixLength + 1)];
break;
case AML_DUAL_NAME_PREFIX:
@@ -932,30 +1011,28 @@ AcpiNsOpensScope (
ACPI_STATUS
AcpiNsGetNodeByPath (
- NATIVE_CHAR *Pathname,
+ char *Pathname,
ACPI_NAMESPACE_NODE *StartNode,
UINT32 Flags,
ACPI_NAMESPACE_NODE **ReturnNode)
{
ACPI_GENERIC_STATE ScopeInfo;
ACPI_STATUS Status;
- NATIVE_CHAR *InternalPath = NULL;
+ char *InternalPath = NULL;
ACPI_FUNCTION_TRACE_PTR ("NsGetNodeByPath", Pathname);
- if (!Pathname)
+ if (Pathname)
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
+ /* Convert path to internal representation */
- /* Convert path to internal representation */
-
- Status = AcpiNsInternalizeName (Pathname, &InternalPath);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
+ Status = AcpiNsInternalizeName (Pathname, &InternalPath);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
}
/* Must lock namespace during lookup */
@@ -985,7 +1062,11 @@ AcpiNsGetNodeByPath (
/* Cleanup */
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
- ACPI_MEM_FREE (InternalPath);
+
+ if (InternalPath)
+ {
+ ACPI_MEM_FREE (InternalPath);
+ }
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/nswalk.c b/sys/contrib/dev/acpica/nswalk.c
index 5e9014a..abe25a8 100644
--- a/sys/contrib/dev/acpica/nswalk.c
+++ b/sys/contrib/dev/acpica/nswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nswalk - Functions for walking the ACPI namespace
- * $Revision: 33 $
+ * $Revision: 34 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsxfeval.c b/sys/contrib/dev/acpica/nsxfeval.c
index 1926011..3e732b0 100644
--- a/sys/contrib/dev/acpica/nsxfeval.c
+++ b/sys/contrib/dev/acpica/nsxfeval.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfeval - Public interfaces to the ACPI subsystem
* ACPI Object evaluation interfaces
- * $Revision: 4 $
+ * $Revision: 7 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -653,7 +653,7 @@ AcpiNsGetDeviceCallback (
ACPI_STATUS
AcpiGetDevices (
- NATIVE_CHAR *HID,
+ char *HID,
ACPI_WALK_CALLBACK UserFunction,
void *Context,
void **ReturnValue)
@@ -707,7 +707,7 @@ AcpiGetDevices (
*
* FUNCTION: AcpiAttachData
*
- * PARAMETERS: ObjHandle - Namespace node
+ * PARAMETERS: ObjHandle - Namespace node
* Handler - Handler for this attachment
* Data - Pointer to data to be attached
*
diff --git a/sys/contrib/dev/acpica/nsxfname.c b/sys/contrib/dev/acpica/nsxfname.c
index b318233..ed33940 100644
--- a/sys/contrib/dev/acpica/nsxfname.c
+++ b/sys/contrib/dev/acpica/nsxfname.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
* ACPI Namespace oriented interfaces
- * $Revision: 91 $
+ * $Revision: 94 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -277,7 +277,7 @@ AcpiGetName (
/* Validate/Allocate/Clear caller buffer */
- Status = AcpiUtInitializeBuffer (Buffer, PATH_SEGMENT_LENGTH);
+ Status = AcpiUtInitializeBuffer (Buffer, ACPI_PATH_SEGMENT_LENGTH);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -287,7 +287,7 @@ AcpiGetName (
ACPI_STRNCPY (Buffer->Pointer, Node->Name.Ascii,
ACPI_NAME_SIZE);
- ((NATIVE_CHAR *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0;
+ ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0;
Status = AE_OK;
diff --git a/sys/contrib/dev/acpica/nsxfobj.c b/sys/contrib/dev/acpica/nsxfobj.c
index b6fe807..49310ca 100644
--- a/sys/contrib/dev/acpica/nsxfobj.c
+++ b/sys/contrib/dev/acpica/nsxfobj.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
* ACPI Object oriented interfaces
- * $Revision: 114 $
+ * $Revision: 116 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -242,7 +242,7 @@ AcpiGetParent (
*RetHandle =
AcpiNsConvertEntryToHandle (AcpiNsGetParentNode (Node));
- /* Return exeption if parent is null */
+ /* Return exception if parent is null */
if (!AcpiNsGetParentNode (Node))
{
diff --git a/sys/contrib/dev/acpica/psargs.c b/sys/contrib/dev/acpica/psargs.c
index 1b9e1a4..3db9b7a 100644
--- a/sys/contrib/dev/acpica/psargs.c
+++ b/sys/contrib/dev/acpica/psargs.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psargs - Parse AML opcode arguments
- * $Revision: 65 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -215,7 +215,7 @@ AcpiPsGetNextPackageEnd (
ACPI_PARSE_STATE *ParserState)
{
UINT8 *Start = ParserState->Aml;
- NATIVE_UINT Length;
+ ACPI_NATIVE_UINT Length;
ACPI_FUNCTION_TRACE ("PsGetNextPackageEnd");
@@ -223,7 +223,7 @@ AcpiPsGetNextPackageEnd (
/* Function below changes ParserState->Aml */
- Length = (NATIVE_UINT) AcpiPsGetNextPackageLength (ParserState);
+ Length = (ACPI_NATIVE_UINT) AcpiPsGetNextPackageLength (ParserState);
return_PTR (Start + Length); /* end of package */
}
@@ -244,7 +244,7 @@ AcpiPsGetNextPackageEnd (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiPsGetNextNamestring (
ACPI_PARSE_STATE *ParserState)
{
@@ -302,7 +302,7 @@ AcpiPsGetNextNamestring (
}
ParserState->Aml = (UINT8*) End;
- return_PTR ((NATIVE_CHAR *) Start);
+ return_PTR ((char *) Start);
}
@@ -334,7 +334,7 @@ AcpiPsGetNextNamepath (
ACPI_PARSE_OBJECT *Arg,
BOOLEAN MethodCall)
{
- NATIVE_CHAR *Path;
+ char *Path;
ACPI_PARSE_OBJECT *NameOp;
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *MethodDesc;
@@ -377,7 +377,7 @@ AcpiPsGetNextNamepath (
* This name is actually a control method invocation
*/
MethodDesc = AcpiNsGetAttachedObject (Node);
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"Control Method - %p Desc %p Path=%p\n",
Node, MethodDesc, Path));
@@ -399,13 +399,13 @@ AcpiPsGetNextNamepath (
if (!MethodDesc)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"Control Method - %p has no attached object\n",
Node));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"Control Method - %p Args %X\n",
Node, MethodDesc->Method.ParamCount));
@@ -424,13 +424,13 @@ AcpiPsGetNextNamepath (
if (ACPI_FAILURE (Status))
{
- /*
+ /*
* 1) Any error other than NOT_FOUND is always severe
* 2) NOT_FOUND is only important if we are executing a method.
* 3) If executing a CondRefOf opcode, NOT_FOUND is ok.
*/
- if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) &&
- (Status == AE_NOT_FOUND) &&
+ if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) &&
+ (Status == AE_NOT_FOUND) &&
(WalkState->Op->Common.AmlOpcode != AML_COND_REF_OF_OP)) ||
(Status != AE_NOT_FOUND))
@@ -442,7 +442,7 @@ AcpiPsGetNextNamepath (
/*
* We got a NOT_FOUND during table load or we encountered
* a CondRefOf(x) where the target does not exist.
- * -- either case is ok
+ * -- either case is ok
*/
Status = AE_OK;
}
@@ -450,7 +450,7 @@ AcpiPsGetNextNamepath (
}
/*
- * Regardless of success/failure above,
+ * Regardless of success/failure above,
* Just initialize the Op with the pathname.
*/
AcpiPsInitOp (Arg, AML_INT_NAMEPATH_OP);
@@ -773,7 +773,7 @@ AcpiPsGetNextArg (
/* Fill in bytelist data */
- Arg->Common.Value.Size = ACPI_PTR_DIFF (ParserState->PkgEnd,
+ Arg->Common.Value.Size = ACPI_PTR_DIFF (ParserState->PkgEnd,
ParserState->Aml);
Arg->Named.Data = ParserState->Aml;
diff --git a/sys/contrib/dev/acpica/psopcode.c b/sys/contrib/dev/acpica/psopcode.c
index ab2f137..4a94a3a 100644
--- a/sys/contrib/dev/acpica/psopcode.c
+++ b/sys/contrib/dev/acpica/psopcode.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psopcode - Parser/Interpreter opcode information table
- * $Revision: 73 $
+ * $Revision: 77 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -350,7 +350,7 @@
#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
-#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF)
+#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE)
#define ARGI_LOCAL0 ARG_NONE
#define ARGI_LOCAL1 ARG_NONE
@@ -364,7 +364,7 @@
#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE
-#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFERSTRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
@@ -823,11 +823,11 @@ AcpiPsGetOpcodeInfo (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiPsGetOpcodeName (
UINT16 Opcode)
{
-#ifdef ACPI_DISASSEMBLER
+#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
const ACPI_OPCODE_INFO *Op;
diff --git a/sys/contrib/dev/acpica/psscope.c b/sys/contrib/dev/acpica/psscope.c
index 3c20f7e..4c64aa6 100644
--- a/sys/contrib/dev/acpica/psscope.c
+++ b/sys/contrib/dev/acpica/psscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 35 $
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/pstree.c b/sys/contrib/dev/acpica/pstree.c
index d1729db..f4f1d48 100644
--- a/sys/contrib/dev/acpica/pstree.c
+++ b/sys/contrib/dev/acpica/pstree.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pstree - Parser op tree manipulation/traversal/search
- * $Revision: 40 $
+ * $Revision: 41 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psutils.c b/sys/contrib/dev/acpica/psutils.c
index ab9250d..78a005b 100644
--- a/sys/contrib/dev/acpica/psutils.c
+++ b/sys/contrib/dev/acpica/psutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
- * $Revision: 54 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/pswalk.c b/sys/contrib/dev/acpica/pswalk.c
index 835b910..9cb6a70 100644
--- a/sys/contrib/dev/acpica/pswalk.c
+++ b/sys/contrib/dev/acpica/pswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pswalk - Parser routines to walk parsed op tree(s)
- * $Revision: 67 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psxface.c b/sys/contrib/dev/acpica/psxface.c
index d566a4b..ef9addc 100644
--- a/sys/contrib/dev/acpica/psxface.c
+++ b/sys/contrib/dev/acpica/psxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psxface - Parser external interfaces
- * $Revision: 66 $
+ * $Revision: 67 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsaddr.c b/sys/contrib/dev/acpica/rsaddr.c
index 3dd4439..4787ffa 100644
--- a/sys/contrib/dev/acpica/rsaddr.c
+++ b/sys/contrib/dev/acpica/rsaddr.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsaddr - Address resource descriptors (16/32/64)
- * $Revision: 26 $
+ * $Revision: 29 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -227,6 +227,8 @@ AcpiRsAddress16Resource (
{
OutputStruct->Data.Address16.Attribute.Io.RangeAttribute =
(UINT16) (Temp8 & 0x03);
+ OutputStruct->Data.Address16.Attribute.Io.TranslationAttribute =
+ (UINT16) ((Temp8 >> 4) & 0x03);
}
else
{
@@ -296,7 +298,7 @@ AcpiRsAddress16Resource (
/* Point the String pointer to the end of this structure */
OutputStruct->Data.Address16.ResourceSource.StringPtr =
- (NATIVE_CHAR *)((UINT8 * )OutputStruct + StructSize);
+ (char *)((UINT8 * )OutputStruct + StructSize);
TempPtr = (UINT8 *) OutputStruct->Data.Address16.ResourceSource.StringPtr;
@@ -373,7 +375,7 @@ AcpiRsAddress16Stream (
UINT8 *Buffer = *OutputBuffer;
UINT8 *LengthField;
UINT8 Temp8;
- NATIVE_CHAR *TempPointer = NULL;
+ char *TempPointer = NULL;
ACPI_SIZE ActualBytes;
@@ -431,6 +433,9 @@ AcpiRsAddress16Stream (
Temp8 = (UINT8)
(LinkedList->Data.Address16.Attribute.Io.RangeAttribute &
0x03);
+ Temp8 |=
+ (LinkedList->Data.Address16.Attribute.Io.TranslationAttribute &
+ 0x03) << 4;
}
*Buffer = Temp8;
@@ -481,7 +486,7 @@ AcpiRsAddress16Stream (
*Buffer = Temp8;
Buffer += 1;
- TempPointer = (NATIVE_CHAR *) Buffer;
+ TempPointer = (char *) Buffer;
/*
* Copy the string
@@ -624,6 +629,8 @@ AcpiRsAddress32Resource (
{
OutputStruct->Data.Address32.Attribute.Io.RangeAttribute =
(UINT16) (Temp8 & 0x03);
+ OutputStruct->Data.Address32.Attribute.Io.TranslationAttribute =
+ (UINT16) ((Temp8 >> 4) & 0x03);
}
else
{
@@ -692,7 +699,7 @@ AcpiRsAddress32Resource (
/* Point the String pointer to the end of this structure */
OutputStruct->Data.Address32.ResourceSource.StringPtr =
- (NATIVE_CHAR *)((UINT8 *)OutputStruct + StructSize);
+ (char *)((UINT8 *)OutputStruct + StructSize);
TempPtr = (UINT8 *) OutputStruct->Data.Address32.ResourceSource.StringPtr;
@@ -767,7 +774,7 @@ AcpiRsAddress32Stream (
UINT8 *Buffer;
UINT16 *LengthField;
UINT8 Temp8;
- NATIVE_CHAR *TempPointer;
+ char *TempPointer;
ACPI_FUNCTION_TRACE ("RsAddress32Stream");
@@ -826,6 +833,9 @@ AcpiRsAddress32Stream (
Temp8 = (UINT8)
(LinkedList->Data.Address32.Attribute.Io.RangeAttribute &
0x03);
+ Temp8 |=
+ (LinkedList->Data.Address32.Attribute.Io.TranslationAttribute &
+ 0x03) << 4;
}
*Buffer = Temp8;
@@ -876,7 +886,7 @@ AcpiRsAddress32Stream (
*Buffer = Temp8;
Buffer += 1;
- TempPointer = (NATIVE_CHAR *) Buffer;
+ TempPointer = (char *) Buffer;
/*
* Copy the string
@@ -1018,6 +1028,8 @@ AcpiRsAddress64Resource (
{
OutputStruct->Data.Address64.Attribute.Io.RangeAttribute =
(UINT16) (Temp8 & 0x03);
+ OutputStruct->Data.Address64.Attribute.Io.TranslationAttribute =
+ (UINT16) ((Temp8 >> 4) & 0x03);
}
else
{
@@ -1088,7 +1100,7 @@ AcpiRsAddress64Resource (
/* Point the String pointer to the end of this structure */
OutputStruct->Data.Address64.ResourceSource.StringPtr =
- (NATIVE_CHAR *)((UINT8 *)OutputStruct + StructSize);
+ (char *)((UINT8 *)OutputStruct + StructSize);
TempPtr = (UINT8 *) OutputStruct->Data.Address64.ResourceSource.StringPtr;
@@ -1164,7 +1176,7 @@ AcpiRsAddress64Stream (
UINT8 *Buffer;
UINT16 *LengthField;
UINT8 Temp8;
- NATIVE_CHAR *TempPointer;
+ char *TempPointer;
ACPI_FUNCTION_TRACE ("RsAddress64Stream");
@@ -1224,6 +1236,9 @@ AcpiRsAddress64Stream (
Temp8 = (UINT8)
(LinkedList->Data.Address64.Attribute.Io.RangeAttribute &
0x03);
+ Temp8 |=
+ (LinkedList->Data.Address64.Attribute.Io.RangeAttribute &
+ 0x03) << 4;
}
*Buffer = Temp8;
@@ -1274,7 +1289,7 @@ AcpiRsAddress64Stream (
*Buffer = Temp8;
Buffer += 1;
- TempPointer = (NATIVE_CHAR *) Buffer;
+ TempPointer = (char *) Buffer;
/*
* Copy the string
diff --git a/sys/contrib/dev/acpica/rscalc.c b/sys/contrib/dev/acpica/rscalc.c
index b125ee5..5d2277a 100644
--- a/sys/contrib/dev/acpica/rscalc.c
+++ b/sys/contrib/dev/acpica/rscalc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rscalc - Calculate stream and list lengths
- * $Revision: 44 $
+ * $Revision: 47 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -915,10 +915,10 @@ AcpiRsGetPciRoutingTableLength (
if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_STRING)
{
/*
- * The length String.Length field includes the
- * terminating NULL
+ * The length String.Length field does not include the
+ * terminating NULL, add 1
*/
- TempSizeNeeded += (*SubObjectList)->String.Length;
+ TempSizeNeeded += ((ACPI_SIZE) (*SubObjectList)->String.Length + 1);
}
else
{
diff --git a/sys/contrib/dev/acpica/rsdump.c b/sys/contrib/dev/acpica/rsdump.c
index 38f52fc..23b9e49 100644
--- a/sys/contrib/dev/acpica/rsdump.c
+++ b/sys/contrib/dev/acpica/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions to display the resource structures.
- * $Revision: 34 $
+ * $Revision: 36 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -655,6 +655,11 @@ AcpiRsDumpAddress16 (
"Invalid range attribute\n");
break;
}
+
+ AcpiOsPrintf (" Type Specific: %s Translation\n",
+ ACPI_SPARSE_TRANSLATION ==
+ Address16Data->Attribute.Io.TranslationAttribute ?
+ "Sparse" : "Dense");
break;
case ACPI_BUS_NUMBER_RANGE:
@@ -780,27 +785,32 @@ AcpiRsDumpAddress32 (
AcpiOsPrintf (" Resource Type: Io Range\n");
switch (Address32Data->Attribute.Io.RangeAttribute)
- {
- case ACPI_NON_ISA_ONLY_RANGES:
- AcpiOsPrintf (" Type Specific: "
- "Non-ISA Io Addresses\n");
- break;
+ {
+ case ACPI_NON_ISA_ONLY_RANGES:
+ AcpiOsPrintf (" Type Specific: "
+ "Non-ISA Io Addresses\n");
+ break;
- case ACPI_ISA_ONLY_RANGES:
- AcpiOsPrintf (" Type Specific: "
- "ISA Io Addresses\n");
- break;
+ case ACPI_ISA_ONLY_RANGES:
+ AcpiOsPrintf (" Type Specific: "
+ "ISA Io Addresses\n");
+ break;
- case ACPI_ENTIRE_RANGE:
- AcpiOsPrintf (" Type Specific: "
- "ISA and non-ISA Io Addresses\n");
- break;
+ case ACPI_ENTIRE_RANGE:
+ AcpiOsPrintf (" Type Specific: "
+ "ISA and non-ISA Io Addresses\n");
+ break;
- default:
- AcpiOsPrintf (" Type Specific: "
- "Invalid Range attribute");
- break;
- }
+ default:
+ AcpiOsPrintf (" Type Specific: "
+ "Invalid Range attribute");
+ break;
+ }
+
+ AcpiOsPrintf (" Type Specific: %s Translation\n",
+ ACPI_SPARSE_TRANSLATION ==
+ Address32Data->Attribute.Io.TranslationAttribute ?
+ "Sparse" : "Dense");
break;
case ACPI_BUS_NUMBER_RANGE:
@@ -926,27 +936,32 @@ AcpiRsDumpAddress64 (
AcpiOsPrintf (" Resource Type: Io Range\n");
switch (Address64Data->Attribute.Io.RangeAttribute)
- {
- case ACPI_NON_ISA_ONLY_RANGES:
- AcpiOsPrintf (" Type Specific: "
- "Non-ISA Io Addresses\n");
- break;
+ {
+ case ACPI_NON_ISA_ONLY_RANGES:
+ AcpiOsPrintf (" Type Specific: "
+ "Non-ISA Io Addresses\n");
+ break;
- case ACPI_ISA_ONLY_RANGES:
- AcpiOsPrintf (" Type Specific: "
- "ISA Io Addresses\n");
- break;
+ case ACPI_ISA_ONLY_RANGES:
+ AcpiOsPrintf (" Type Specific: "
+ "ISA Io Addresses\n");
+ break;
- case ACPI_ENTIRE_RANGE:
- AcpiOsPrintf (" Type Specific: "
- "ISA and non-ISA Io Addresses\n");
- break;
+ case ACPI_ENTIRE_RANGE:
+ AcpiOsPrintf (" Type Specific: "
+ "ISA and non-ISA Io Addresses\n");
+ break;
- default:
- AcpiOsPrintf (" Type Specific: "
- "Invalid Range attribute");
- break;
- }
+ default:
+ AcpiOsPrintf (" Type Specific: "
+ "Invalid Range attribute");
+ break;
+ }
+
+ AcpiOsPrintf (" Type Specific: %s Translation\n",
+ ACPI_SPARSE_TRANSLATION ==
+ Address64Data->Attribute.Io.TranslationAttribute ?
+ "Sparse" : "Dense");
break;
case ACPI_BUS_NUMBER_RANGE:
diff --git a/sys/contrib/dev/acpica/rsio.c b/sys/contrib/dev/acpica/rsio.c
index 51cf965..fc63577 100644
--- a/sys/contrib/dev/acpica/rsio.c
+++ b/sys/contrib/dev/acpica/rsio.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsio - IO and DMA resource descriptors
- * $Revision: 22 $
+ * $Revision: 23 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsirq.c b/sys/contrib/dev/acpica/rsirq.c
index 12bc827..7da1fdc 100644
--- a/sys/contrib/dev/acpica/rsirq.c
+++ b/sys/contrib/dev/acpica/rsirq.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsirq - IRQ resource descriptors
- * $Revision: 30 $
+ * $Revision: 32 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -495,7 +495,7 @@ AcpiRsExtendedIrqResource (
* Point the String pointer to the end of this structure.
*/
OutputStruct->Data.ExtendedIrq.ResourceSource.StringPtr =
- (NATIVE_CHAR *)(OutputStruct + StructSize);
+ (char *)(OutputStruct + StructSize);
TempPtr = (UINT8 *) OutputStruct->Data.ExtendedIrq.ResourceSource.StringPtr;
@@ -571,7 +571,7 @@ AcpiRsExtendedIrqStream (
UINT16 *LengthField;
UINT8 Temp8 = 0;
UINT8 Index;
- NATIVE_CHAR *TempPointer = NULL;
+ char *TempPointer = NULL;
ACPI_FUNCTION_TRACE ("RsExtendedIrqStream");
@@ -641,7 +641,7 @@ AcpiRsExtendedIrqStream (
*Buffer = (UINT8) LinkedList->Data.ExtendedIrq.ResourceSource.Index;
Buffer += 1;
- TempPointer = (NATIVE_CHAR *) Buffer;
+ TempPointer = (char *) Buffer;
/*
* Copy the string
diff --git a/sys/contrib/dev/acpica/rslist.c b/sys/contrib/dev/acpica/rslist.c
index 196873e..fd802c0 100644
--- a/sys/contrib/dev/acpica/rslist.c
+++ b/sys/contrib/dev/acpica/rslist.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rslist - Linked list utilities
- * $Revision: 31 $
+ * $Revision: 32 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsmemory.c b/sys/contrib/dev/acpica/rsmemory.c
index eafd17f..d33e352 100644
--- a/sys/contrib/dev/acpica/rsmemory.c
+++ b/sys/contrib/dev/acpica/rsmemory.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsmem24 - Memory resource descriptors
- * $Revision: 20 $
+ * $Revision: 22 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -352,7 +352,7 @@ AcpiRsMemory32RangeResource (
/*
* Point to the place in the output buffer where the data portion will
* begin.
- * 1. Set the RESOURCE_DATA * Data to point to it's own address, then
+ * 1. Set the RESOURCE_DATA * Data to point to its own address, then
* 2. Set the pointer to the next address.
*
* NOTE: OutputStruct->Data is cast to UINT8, otherwise, this addition adds
diff --git a/sys/contrib/dev/acpica/rsmisc.c b/sys/contrib/dev/acpica/rsmisc.c
index e2d7d02..83b109f 100644
--- a/sys/contrib/dev/acpica/rsmisc.c
+++ b/sys/contrib/dev/acpica/rsmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsmisc - Miscellaneous resource descriptors
- * $Revision: 24 $
+ * $Revision: 25 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsutils.c b/sys/contrib/dev/acpica/rsutils.c
index 26274f9..e4e35a9 100644
--- a/sys/contrib/dev/acpica/rsutils.c
+++ b/sys/contrib/dev/acpica/rsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsutils - Utilities for the resource manager
- * $Revision: 33 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -159,35 +159,14 @@ AcpiRsGetPrtMethodData (
/* Parameters guaranteed valid by caller */
/*
- * Execute the method, no parameters
+ * Execute the method, no parameters
*/
- Status = AcpiNsEvaluateRelative (Handle, "_PRT", NULL, &ObjDesc);
+ Status = AcpiUtEvaluateObject (Handle, "_PRT", ACPI_BTYPE_PACKAGE, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- if (!ObjDesc)
- {
- /* Return object is required */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _PRT\n"));
- return_ACPI_STATUS (AE_TYPE);
- }
-
- /*
- * The return object must be a package, so check the parameters. If the
- * return object is not a package, then the underlying AML code is corrupt
- * or improperly written.
- */
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_PACKAGE)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "_PRT did not return a Package, returned %s\n",
- AcpiUtGetObjectTypeName (ObjDesc)));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
-
/*
* Create a resource linked list from the byte stream buffer that comes
* back from the _CRS method execution.
@@ -196,8 +175,6 @@ AcpiRsGetPrtMethodData (
/* On exit, we must delete the object returned by EvaluateObject */
-Cleanup:
-
AcpiUtRemoveReference (ObjDesc);
return_ACPI_STATUS (Status);
}
@@ -238,34 +215,12 @@ AcpiRsGetCrsMethodData (
/*
* Execute the method, no parameters
*/
- Status = AcpiNsEvaluateRelative (Handle, "_CRS", NULL, &ObjDesc);
+ Status = AcpiUtEvaluateObject (Handle, "_CRS", ACPI_BTYPE_BUFFER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- if (!ObjDesc)
- {
- /* Return object is required */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _CRS\n"));
- return_ACPI_STATUS (AE_TYPE);
- }
-
- /*
- * The return object will be a buffer, but check the
- * parameters. If the return object is not a buffer,
- * then the underlying AML code is corrupt or improperly
- * written.
- */
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_BUFFER)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "_CRS did not return a Buffer, returned %s\n",
- AcpiUtGetObjectTypeName (ObjDesc)));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
-
/*
* Make the call to create a resource linked list from the
* byte stream buffer that comes back from the _CRS method
@@ -275,8 +230,6 @@ AcpiRsGetCrsMethodData (
/* On exit, we must delete the object returned by evaluateObject */
-Cleanup:
-
AcpiUtRemoveReference (ObjDesc);
return_ACPI_STATUS (Status);
}
@@ -317,50 +270,80 @@ AcpiRsGetPrsMethodData (
/*
* Execute the method, no parameters
*/
- Status = AcpiNsEvaluateRelative (Handle, "_PRS", NULL, &ObjDesc);
+ Status = AcpiUtEvaluateObject (Handle, "_PRS", ACPI_BTYPE_BUFFER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- if (!ObjDesc)
- {
- /* Return object is required */
+ /*
+ * Make the call to create a resource linked list from the
+ * byte stream buffer that comes back from the _CRS method
+ * execution.
+ */
+ Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
+
+ /* On exit, we must delete the object returned by evaluateObject */
+
+ AcpiUtRemoveReference (ObjDesc);
+ return_ACPI_STATUS (Status);
+}
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _PRS\n"));
- return_ACPI_STATUS (AE_TYPE);
- }
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiRsGetMethodData
+ *
+ * PARAMETERS: Handle - a handle to the containing object
+ * RetBuffer - a pointer to a buffer structure for the
+ * results
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: This function is called to get the _CRS or _PRS value of an
+ * object contained in an object specified by the handle passed in
+ *
+ * If the function fails an appropriate status will be returned
+ * and the contents of the callers buffer is undefined.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiRsGetMethodData (
+ ACPI_HANDLE Handle,
+ char *Path,
+ ACPI_BUFFER *RetBuffer)
+{
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE ("RsGetMethodData");
+
+
+ /* Parameters guaranteed valid by caller */
/*
- * The return object will be a buffer, but check the
- * parameters. If the return object is not a buffer,
- * then the underlying AML code is corrupt or improperly
- * written..
+ * Execute the method, no parameters
*/
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_BUFFER)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "_PRS did not return a Buffer, returned %s\n",
- AcpiUtGetObjectTypeName (ObjDesc)));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ Status = AcpiUtEvaluateObject (Handle, Path, ACPI_BTYPE_BUFFER, &ObjDesc);
+ if (ACPI_FAILURE (Status)) {
+ return_ACPI_STATUS (Status);
}
/*
* Make the call to create a resource linked list from the
- * byte stream buffer that comes back from the _CRS method
+ * byte stream buffer that comes back from the method
* execution.
*/
Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
- /* On exit, we must delete the object returned by evaluateObject */
-
-Cleanup:
+ /* On exit, we must delete the object returned by EvaluateObject */
AcpiUtRemoveReference (ObjDesc);
return_ACPI_STATUS (Status);
}
-
/*******************************************************************************
*
* FUNCTION: AcpiRsSetSrsMethodData
diff --git a/sys/contrib/dev/acpica/rsxface.c b/sys/contrib/dev/acpica/rsxface.c
index 11e6d51..5ec7c337 100644
--- a/sys/contrib/dev/acpica/rsxface.c
+++ b/sys/contrib/dev/acpica/rsxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsxface - Public interfaces to the resource manager
- * $Revision: 19 $
+ * $Revision: 24 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -293,6 +293,96 @@ AcpiGetPossibleResources (
/*******************************************************************************
*
+ * FUNCTION: AcpiWalkResources
+ *
+ * PARAMETERS: DeviceHandle - a handle to the device object for the
+ * device we are querying
+ * Path - method name of the resources we want
+ * (METHOD_NAME__CRS or METHOD_NAME__PRS)
+ * UserFunction - called for each resource
+ * Context - passed to UserFunction
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Retrieves the current or possible resource list for the
+ * specified device. The UserFunction is called once for
+ * each resource in the list.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiWalkResources (
+ ACPI_HANDLE DeviceHandle,
+ char *Path,
+ ACPI_WALK_RESOURCE_CALLBACK UserFunction,
+ void *Context)
+{
+ ACPI_STATUS Status;
+ ACPI_BUFFER Buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ ACPI_RESOURCE *Resource;
+
+
+ ACPI_FUNCTION_TRACE ("AcpiWalkResources");
+
+
+ if (!DeviceHandle ||
+ (ACPI_STRNCMP (Path, METHOD_NAME__CRS, sizeof (METHOD_NAME__CRS)) &&
+ ACPI_STRNCMP (Path, METHOD_NAME__PRS, sizeof (METHOD_NAME__PRS))))
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiRsGetMethodData (DeviceHandle, Path, &Buffer);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Resource = (ACPI_RESOURCE *) Buffer.Pointer;
+ for (;;)
+ {
+ if (!Resource || Resource->Id == ACPI_RSTYPE_END_TAG)
+ {
+ break;
+ }
+
+ Status = UserFunction (Resource, Context);
+
+ switch (Status)
+ {
+ case AE_OK:
+ case AE_CTRL_DEPTH:
+
+ /* Just keep going */
+ Status = AE_OK;
+ break;
+
+ case AE_CTRL_TERMINATE:
+
+ /* Exit now, with OK stats */
+
+ Status = AE_OK;
+ goto Cleanup;
+
+ default:
+
+ /* All others are valid exceptions */
+
+ goto Cleanup;
+ }
+
+ Resource = ACPI_NEXT_RESOURCE (Resource);
+ }
+
+Cleanup:
+
+ AcpiOsFree (Buffer.Pointer);
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiSetCurrentResources
*
* PARAMETERS: DeviceHandle - a handle to the device object for the
@@ -334,3 +424,71 @@ AcpiSetCurrentResources (
Status = AcpiRsSetSrsMethodData (DeviceHandle, InBuffer);
return_ACPI_STATUS (Status);
}
+
+
+
+#define COPY_FIELD(Out, In, Field) Out->Field = In->Field
+#define COPY_ADDRESS(Out, In) \
+ COPY_FIELD(Out, In, ResourceType); \
+ COPY_FIELD(Out, In, ProducerConsumer); \
+ COPY_FIELD(Out, In, Decode); \
+ COPY_FIELD(Out, In, MinAddressFixed); \
+ COPY_FIELD(Out, In, MaxAddressFixed); \
+ COPY_FIELD(Out, In, Attribute); \
+ COPY_FIELD(Out, In, Granularity); \
+ COPY_FIELD(Out, In, MinAddressRange); \
+ COPY_FIELD(Out, In, MaxAddressRange); \
+ COPY_FIELD(Out, In, AddressTranslationOffset); \
+ COPY_FIELD(Out, In, AddressLength); \
+ COPY_FIELD(Out, In, ResourceSource);
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiResourceToAddress64
+ *
+ * PARAMETERS: resource - Pointer to a resource
+ * out - Pointer to the users's return
+ * buffer (a struct
+ * acpi_resource_address64)
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: If the resource is an address16, address32, or address64,
+ * copy it to the address64 return buffer. This saves the
+ * caller from having to duplicate code for different-sized
+ * addresses.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiResourceToAddress64 (
+ ACPI_RESOURCE *Resource,
+ ACPI_RESOURCE_ADDRESS64 *Out)
+{
+ ACPI_RESOURCE_ADDRESS16 *Address16;
+ ACPI_RESOURCE_ADDRESS32 *Address32;
+ ACPI_RESOURCE_ADDRESS64 *Address64;
+
+
+ switch (Resource->Id) {
+ case ACPI_RSTYPE_ADDRESS16:
+ Address16 = (ACPI_RESOURCE_ADDRESS16 *) &Resource->Data;
+ COPY_ADDRESS(Out, Address16);
+ break;
+
+ case ACPI_RSTYPE_ADDRESS32:
+ Address32 = (ACPI_RESOURCE_ADDRESS32 *) &Resource->Data;
+ COPY_ADDRESS(Out, Address32);
+ break;
+
+ case ACPI_RSTYPE_ADDRESS64:
+ Address64 = (ACPI_RESOURCE_ADDRESS64 *) &Resource->Data;
+ COPY_ADDRESS(Out, Address64);
+ break;
+
+ default:
+ return (AE_BAD_PARAMETER);
+ }
+
+ return (AE_OK);
+}
diff --git a/sys/contrib/dev/acpica/tbconvrt.c b/sys/contrib/dev/acpica/tbconvrt.c
index 0490767..1bf7535 100644
--- a/sys/contrib/dev/acpica/tbconvrt.c
+++ b/sys/contrib/dev/acpica/tbconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
- * $Revision: 45 $
+ * $Revision: 47 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -318,9 +318,8 @@ AcpiTbConvertFadt1 (
ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XPm1bCntBlk, LocalFadt->Pm1CntLen, LocalFadt->V1_Pm1bCntBlk);
ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XPm2CntBlk, LocalFadt->Pm2CntLen, LocalFadt->V1_Pm2CntBlk);
ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XPmTmrBlk, LocalFadt->PmTmLen, LocalFadt->V1_PmTmrBlk);
- ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XGpe0Blk, LocalFadt->Gpe0BlkLen, LocalFadt->V1_Gpe0Blk);
- ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XGpe1Blk, LocalFadt->Gpe1BlkLen, LocalFadt->V1_Gpe1Blk);
-
+ ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XGpe0Blk, 0, LocalFadt->V1_Gpe0Blk);
+ ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XGpe1Blk, 0, LocalFadt->V1_Gpe1Blk);
}
@@ -402,16 +401,17 @@ AcpiTbConvertFadt2 (
if (!(ACPI_GET_ADDRESS (LocalFadt->XGpe0Blk.Address)))
{
ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XGpe0Blk,
- LocalFadt->Gpe0BlkLen, LocalFadt->V1_Gpe0Blk);
+ 0, LocalFadt->V1_Gpe0Blk);
}
if (!(ACPI_GET_ADDRESS (LocalFadt->XGpe1Blk.Address)))
{
ASL_BUILD_GAS_FROM_V1_ENTRY (LocalFadt->XGpe1Blk,
- LocalFadt->Gpe1BlkLen, LocalFadt->V1_Gpe1Blk);
+ 0, LocalFadt->V1_Gpe1Blk);
}
}
+
/*******************************************************************************
*
* FUNCTION: AcpiTbConvertTableFadt
diff --git a/sys/contrib/dev/acpica/tbgetall.c b/sys/contrib/dev/acpica/tbgetall.c
index fd7184d..3e7989a 100644
--- a/sys/contrib/dev/acpica/tbgetall.c
+++ b/sys/contrib/dev/acpica/tbgetall.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbgetall - Get all required ACPI tables
- * $Revision: 3 $
+ * $Revision: 5 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -322,8 +322,8 @@ AcpiTbGetRequiredTables (
Status = AcpiTbGetPrimaryTable (&Address, &TableInfo);
if ((Status != AE_OK) && (Status != AE_TABLE_NOT_SUPPORTED))
{
- ACPI_REPORT_WARNING (("%s, while getting table at %8.8X%8.8X\n",
- AcpiFormatException (Status),
+ ACPI_REPORT_WARNING (("%s, while getting table at %8.8X%8.8X\n",
+ AcpiFormatException (Status),
ACPI_HIDWORD (Address.Pointer.Value),
ACPI_LODWORD (Address.Pointer.Value)));
}
diff --git a/sys/contrib/dev/acpica/tbinstal.c b/sys/contrib/dev/acpica/tbinstal.c
index d4a28d1..5e5f017 100644
--- a/sys/contrib/dev/acpica/tbinstal.c
+++ b/sys/contrib/dev/acpica/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 64 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -141,11 +141,11 @@
ACPI_STATUS
AcpiTbMatchSignature (
- NATIVE_CHAR *Signature,
+ char *Signature,
ACPI_TABLE_DESC *TableInfo,
UINT8 SearchType)
{
- NATIVE_UINT i;
+ ACPI_NATIVE_UINT i;
ACPI_FUNCTION_TRACE ("TbMatchSignature");
@@ -156,7 +156,7 @@ AcpiTbMatchSignature (
*/
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
- if ((AcpiGbl_AcpiTableData[i].Flags & ACPI_TABLE_TYPE_MASK) != SearchType)
+ if (!(AcpiGbl_AcpiTableData[i].Flags & SearchType))
{
continue;
}
@@ -172,7 +172,7 @@ AcpiTbMatchSignature (
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Table [%4.4s] matched and is a required ACPI table\n",
+ "Table [%4.4s] is an ACPI table consumed by the core subsystem\n",
(char *) AcpiGbl_AcpiTableData[i].Signature));
return_ACPI_STATUS (AE_OK);
@@ -180,7 +180,7 @@ AcpiTbMatchSignature (
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Table [%4.4s] is not a required ACPI table - ignored\n",
+ "Table [%4.4s] is not an ACPI table consumed by the core subsystem - ignored\n",
(char *) Signature));
return_ACPI_STATUS (AE_TABLE_NOT_SUPPORTED);
@@ -225,7 +225,7 @@ AcpiTbInstallTable (
Status = AcpiTbInitTableDescriptor (TableInfo->Type, TableInfo);
if (ACPI_FAILURE (Status))
{
- ACPI_REPORT_ERROR (("Could not install ACPI table [%s], %s\n",
+ ACPI_REPORT_ERROR (("Could not install ACPI table [%4.4s], %s\n",
TableInfo->Pointer->Signature, AcpiFormatException (Status)));
}
diff --git a/sys/contrib/dev/acpica/tbrsdt.c b/sys/contrib/dev/acpica/tbrsdt.c
index 9876f61..c93684c 100644
--- a/sys/contrib/dev/acpica/tbrsdt.c
+++ b/sys/contrib/dev/acpica/tbrsdt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbrsdt - ACPI RSDT table utilities
- * $Revision: 4 $
+ * $Revision: 7 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -174,7 +174,7 @@ AcpiTbVerifyRsdp (
/*
* The signature and checksum must both be correct
*/
- if (ACPI_STRNCMP ((NATIVE_CHAR *) Rsdp, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0)
+ if (ACPI_STRNCMP ((char *) Rsdp, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0)
{
/* Nope, BAD Signature */
@@ -318,7 +318,7 @@ AcpiTbValidateRsdt (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR,
"RSDT/XSDT signature at %X (%p) is invalid\n",
AcpiGbl_RSDP->RsdtPhysicalAddress,
- (void *) (NATIVE_UINT) AcpiGbl_RSDP->RsdtPhysicalAddress));
+ (void *) (ACPI_NATIVE_UINT) AcpiGbl_RSDP->RsdtPhysicalAddress));
return (AE_BAD_SIGNATURE);
}
diff --git a/sys/contrib/dev/acpica/tbutils.c b/sys/contrib/dev/acpica/tbutils.c
index 773bd19..d3cb75b 100644
--- a/sys/contrib/dev/acpica/tbutils.c
+++ b/sys/contrib/dev/acpica/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 57 $
+ * $Revision: 58 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/tbxface.c b/sys/contrib/dev/acpica/tbxface.c
index d83f2c1..6a345dc 100644
--- a/sys/contrib/dev/acpica/tbxface.c
+++ b/sys/contrib/dev/acpica/tbxface.c
@@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
- * $Revision: 59 $
+ * $Revision: 61 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -192,7 +192,7 @@ AcpiLoadTables (void)
goto ErrorExit;
}
- ACPI_DEBUG_PRINT ((ACPI_DB_OK, "ACPI Tables successfully acquired\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
/* Load the namespace from the tables */
diff --git a/sys/contrib/dev/acpica/tbxfroot.c b/sys/contrib/dev/acpica/tbxfroot.c
index f6ba0ea..42c39bc 100644
--- a/sys/contrib/dev/acpica/tbxfroot.c
+++ b/sys/contrib/dev/acpica/tbxfroot.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
- * $Revision: 65 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -141,9 +141,9 @@
ACPI_STATUS
AcpiTbFindTable (
- NATIVE_CHAR *Signature,
- NATIVE_CHAR *OemId,
- NATIVE_CHAR *OemTableId,
+ char *Signature,
+ char *OemId,
+ char *OemTableId,
ACPI_TABLE_HEADER **TablePtr)
{
ACPI_STATUS Status;
@@ -274,7 +274,7 @@ AcpiGetFirmwareTable (
/*
* The signature and checksum must both be correct
*/
- if (ACPI_STRNCMP ((NATIVE_CHAR *) AcpiGbl_RSDP, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0)
+ if (ACPI_STRNCMP ((char *) AcpiGbl_RSDP, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0)
{
/* Nope, BAD Signature */
@@ -455,12 +455,12 @@ AcpiTbScanMemoryForRsdp (
for (Offset = 0, MemRover = StartAddress;
Offset < Length;
- Offset += RSDP_SCAN_STEP, MemRover += RSDP_SCAN_STEP)
+ Offset += ACPI_RSDP_SCAN_STEP, MemRover += ACPI_RSDP_SCAN_STEP)
{
/* The signature and checksum must both be correct */
- if (ACPI_STRNCMP ((NATIVE_CHAR *) MemRover,
+ if (ACPI_STRNCMP ((char *) MemRover,
RSDP_SIG, sizeof (RSDP_SIG)-1) == 0 &&
AcpiTbChecksum (MemRover, ACPI_RSDP_CHECKSUM_LENGTH) == 0)
{
@@ -520,23 +520,23 @@ AcpiTbFindRsdp (
/*
* 1) Search EBDA (low memory) paragraphs
*/
- Status = AcpiOsMapMemory ((UINT64) LO_RSDP_WINDOW_BASE, LO_RSDP_WINDOW_SIZE,
+ Status = AcpiOsMapMemory ((UINT64) ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE,
(void **) &TablePtr);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
- LO_RSDP_WINDOW_BASE, LO_RSDP_WINDOW_SIZE));
+ ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE));
return_ACPI_STATUS (Status);
}
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, LO_RSDP_WINDOW_SIZE);
- AcpiOsUnmapMemory (TablePtr, LO_RSDP_WINDOW_SIZE);
+ MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_LO_RSDP_WINDOW_SIZE);
+ AcpiOsUnmapMemory (TablePtr, ACPI_LO_RSDP_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return the physical address */
- PhysAddr = LO_RSDP_WINDOW_BASE;
+ PhysAddr = ACPI_LO_RSDP_WINDOW_BASE;
PhysAddr += ACPI_PTR_DIFF (MemRover,TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
@@ -546,23 +546,23 @@ AcpiTbFindRsdp (
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
*/
- Status = AcpiOsMapMemory ((UINT64) HI_RSDP_WINDOW_BASE, HI_RSDP_WINDOW_SIZE,
+ Status = AcpiOsMapMemory ((UINT64) ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE,
(void **) &TablePtr);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
- HI_RSDP_WINDOW_BASE, HI_RSDP_WINDOW_SIZE));
+ ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
return_ACPI_STATUS (Status);
}
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, HI_RSDP_WINDOW_SIZE);
- AcpiOsUnmapMemory (TablePtr, HI_RSDP_WINDOW_SIZE);
+ MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
+ AcpiOsUnmapMemory (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return the physical address */
- PhysAddr = HI_RSDP_WINDOW_BASE;
+ PhysAddr = ACPI_HI_RSDP_WINDOW_BASE;
PhysAddr += ACPI_PTR_DIFF (MemRover, TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
@@ -578,8 +578,8 @@ AcpiTbFindRsdp (
/*
* 1) Search EBDA (low memory) paragraphs
*/
- MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (LO_RSDP_WINDOW_BASE),
- LO_RSDP_WINDOW_SIZE);
+ MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (ACPI_LO_RSDP_WINDOW_BASE),
+ ACPI_LO_RSDP_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return the physical address */
@@ -591,8 +591,8 @@ AcpiTbFindRsdp (
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
*/
- MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (HI_RSDP_WINDOW_BASE),
- HI_RSDP_WINDOW_SIZE);
+ MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (ACPI_HI_RSDP_WINDOW_BASE),
+ ACPI_HI_RSDP_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return the physical address */
diff --git a/sys/contrib/dev/acpica/utalloc.c b/sys/contrib/dev/acpica/utalloc.c
index 6e4c5ac..a05795d 100644
--- a/sys/contrib/dev/acpica/utalloc.c
+++ b/sys/contrib/dev/acpica/utalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utalloc - local cache and memory allocation routines
- * $Revision: 127 $
+ * $Revision: 131 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -413,10 +413,6 @@ AcpiUtInitializeBuffer (
{
Status = AE_BUFFER_OVERFLOW;
}
-
- /* Clear the buffer */
-
- ACPI_MEMSET (Buffer->Pointer, 0, RequiredLength);
break;
}
@@ -444,7 +440,7 @@ void *
AcpiUtAllocate (
ACPI_SIZE Size,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
void *Allocation;
@@ -496,7 +492,7 @@ void *
AcpiUtCallocate (
ACPI_SIZE Size,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
void *Allocation;
@@ -563,7 +559,7 @@ void *
AcpiUtAllocateAndTrack (
ACPI_SIZE Size,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *Allocation;
@@ -611,7 +607,7 @@ void *
AcpiUtCallocateAndTrack (
ACPI_SIZE Size,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *Allocation;
@@ -663,7 +659,7 @@ void
AcpiUtFreeAndTrack (
void *Allocation,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *DebugBlock;
@@ -773,7 +769,7 @@ AcpiUtTrackAllocation (
ACPI_SIZE Size,
UINT8 AllocType,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
ACPI_MEMORY_LIST *MemList;
@@ -860,7 +856,7 @@ AcpiUtRemoveAllocation (
UINT32 ListId,
ACPI_DEBUG_MEM_BLOCK *Allocation,
UINT32 Component,
- NATIVE_CHAR *Module,
+ char *Module,
UINT32 Line)
{
ACPI_MEMORY_LIST *MemList;
@@ -994,7 +990,7 @@ AcpiUtDumpAllocationInfo (
void
AcpiUtDumpAllocations (
UINT32 Component,
- NATIVE_CHAR *Module)
+ char *Module)
{
ACPI_DEBUG_MEM_BLOCK *Element;
ACPI_DESCRIPTOR *Descriptor;
@@ -1105,12 +1101,12 @@ AcpiUtDumpAllocations (
if (!NumOutstanding)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_OK,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"No outstanding allocations.\n"));
}
else
{
- ACPI_DEBUG_PRINT ((ACPI_DB_OK,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"%d(%X) Outstanding allocations\n",
NumOutstanding, NumOutstanding));
}
diff --git a/sys/contrib/dev/acpica/utclib.c b/sys/contrib/dev/acpica/utclib.c
index b404912..42b6422 100644
--- a/sys/contrib/dev/acpica/utclib.c
+++ b/sys/contrib/dev/acpica/utclib.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmclib - Local implementation of C library functions
- * $Revision: 47 $
+ * $Revision: 51 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -146,7 +146,7 @@
ACPI_SIZE
AcpiUtStrlen (
- const NATIVE_CHAR *String)
+ const char *String)
{
UINT32 Length = 0;
@@ -176,12 +176,12 @@ AcpiUtStrlen (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiUtStrcpy (
- NATIVE_CHAR *DstString,
- const NATIVE_CHAR *SrcString)
+ char *DstString,
+ const char *SrcString)
{
- NATIVE_CHAR *String = DstString;
+ char *String = DstString;
/* Move bytes brute force */
@@ -215,13 +215,13 @@ AcpiUtStrcpy (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiUtStrncpy (
- NATIVE_CHAR *DstString,
- const NATIVE_CHAR *SrcString,
+ char *DstString,
+ const char *SrcString,
ACPI_SIZE Count)
{
- NATIVE_CHAR *String = DstString;
+ char *String = DstString;
/* Copy the string */
@@ -259,8 +259,8 @@ AcpiUtStrncpy (
int
AcpiUtStrcmp (
- const NATIVE_CHAR *String1,
- const NATIVE_CHAR *String2)
+ const char *String1,
+ const char *String2)
{
@@ -292,8 +292,8 @@ AcpiUtStrcmp (
int
AcpiUtStrncmp (
- const NATIVE_CHAR *String1,
- const NATIVE_CHAR *String2,
+ const char *String1,
+ const char *String2,
ACPI_SIZE Count)
{
@@ -324,12 +324,12 @@ AcpiUtStrncmp (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiUtStrcat (
- NATIVE_CHAR *DstString,
- const NATIVE_CHAR *SrcString)
+ char *DstString,
+ const char *SrcString)
{
- NATIVE_CHAR *String;
+ char *String;
/* Find end of the destination string */
@@ -361,13 +361,13 @@ AcpiUtStrcat (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiUtStrncat (
- NATIVE_CHAR *DstString,
- const NATIVE_CHAR *SrcString,
+ char *DstString,
+ const char *SrcString,
ACPI_SIZE Count)
{
- NATIVE_CHAR *String;
+ char *String;
if (Count)
@@ -414,8 +414,8 @@ AcpiUtMemcpy (
const void *Src,
ACPI_SIZE Count)
{
- NATIVE_CHAR *New = (NATIVE_CHAR *) Dest;
- NATIVE_CHAR *Old = (NATIVE_CHAR *) Src;
+ char *New = (char *) Dest;
+ char *Old = (char *) Src;
while (Count)
@@ -447,10 +447,10 @@ AcpiUtMemcpy (
void *
AcpiUtMemset (
void *Dest,
- NATIVE_UINT Value,
+ ACPI_NATIVE_UINT Value,
ACPI_SIZE Count)
{
- NATIVE_CHAR *New = (NATIVE_CHAR *) Dest;
+ char *New = (char *) Dest;
while (Count)
@@ -671,12 +671,12 @@ AcpiUtToLower (
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiUtStrstr (
- NATIVE_CHAR *String1,
- NATIVE_CHAR *String2)
+ char *String1,
+ char *String2)
{
- NATIVE_CHAR *String;
+ char *String;
if (AcpiUtStrlen (String2) > AcpiUtStrlen (String1))
@@ -717,14 +717,14 @@ AcpiUtStrstr (
UINT32
AcpiUtStrtoul (
- const NATIVE_CHAR *String,
- NATIVE_CHAR **Terminator,
+ const char *String,
+ char **Terminator,
UINT32 Base)
{
UINT32 converted = 0;
UINT32 index;
UINT32 sign;
- const NATIVE_CHAR *StringStart;
+ const char *StringStart;
UINT32 ReturnValue = 0;
ACPI_STATUS Status = AE_OK;
@@ -843,7 +843,7 @@ AcpiUtStrtoul (
(UINT32) Base))
{
Status = AE_ERROR;
- ReturnValue = 0L; /* reset */
+ ReturnValue = 0; /* reset */
}
else
{
@@ -862,13 +862,13 @@ done:
*/
if (Terminator)
{
- if (converted == 0 && ReturnValue == 0L && String != NULL)
+ if (converted == 0 && ReturnValue == 0 && String != NULL)
{
- *Terminator = (NATIVE_CHAR *) StringStart;
+ *Terminator = (char *) StringStart;
}
else
{
- *Terminator = (NATIVE_CHAR *) String;
+ *Terminator = (char *) String;
}
}
diff --git a/sys/contrib/dev/acpica/utcopy.c b/sys/contrib/dev/acpica/utcopy.c
index c1bb6d5..2153f17 100644
--- a/sys/contrib/dev/acpica/utcopy.c
+++ b/sys/contrib/dev/acpica/utcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utcopy - Internal to external object translation utilities
- * $Revision: 105 $
+ * $Revision: 112 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -181,7 +181,7 @@ AcpiUtCopyIsimpleToEsimple (
{
case ACPI_TYPE_STRING:
- ExternalObject->String.Pointer = (NATIVE_CHAR *) DataSpace;
+ ExternalObject->String.Pointer = (char *) DataSpace;
ExternalObject->String.Length = InternalObject->String.Length;
*BufferSpaceUsed = ACPI_ROUND_UP_TO_NATIVE_WORD ((ACPI_SIZE) InternalObject->String.Length + 1);
@@ -521,7 +521,8 @@ AcpiUtCopyEsimpleToIsimple (
case ACPI_TYPE_STRING:
- InternalObject->String.Pointer = ACPI_MEM_CALLOCATE ((ACPI_SIZE) ExternalObject->String.Length + 1);
+ InternalObject->String.Pointer =
+ ACPI_MEM_CALLOCATE ((ACPI_SIZE) ExternalObject->String.Length + 1);
if (!InternalObject->String.Pointer)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -537,7 +538,8 @@ AcpiUtCopyEsimpleToIsimple (
case ACPI_TYPE_BUFFER:
- InternalObject->Buffer.Pointer = ACPI_MEM_CALLOCATE (ExternalObject->Buffer.Length);
+ InternalObject->Buffer.Pointer =
+ ACPI_MEM_CALLOCATE (ExternalObject->Buffer.Length);
if (!InternalObject->Buffer.Pointer)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -575,10 +577,10 @@ AcpiUtCopyEsimpleToIsimple (
* FUNCTION: AcpiUtCopyEpackageToIpackage
*
* PARAMETERS: *InternalObject - Pointer to the object we are returning
- * *Buffer - Where the object is returned
- * *SpaceUsed - Where the length of the object is returned
+ * *Buffer - Where the object is returned
+ * *SpaceUsed - Where the length of the object is returned
*
- * RETURN: Status - the status of the call
+ * RETURN: Status
*
* DESCRIPTION: This function is called to place a package object in a user
* buffer. A package object by definition contains other objects.
@@ -713,7 +715,8 @@ AcpiUtCopySimpleObject (
/* Copy the entire source object over the destination object*/
- ACPI_MEMCPY ((char *) DestDesc, (char *) SourceDesc, sizeof (ACPI_OPERAND_OBJECT));
+ ACPI_MEMCPY ((char *) DestDesc, (char *) SourceDesc,
+ sizeof (ACPI_OPERAND_OBJECT));
/* Restore the saved fields */
@@ -729,28 +732,45 @@ AcpiUtCopySimpleObject (
DestDesc->Buffer.Node = NULL;
DestDesc->Common.Flags = SourceDesc->Common.Flags;
- /* Fall through to common string/buffer case */
- /*lint -fallthrough */
+ /*
+ * Allocate and copy the actual buffer if and only if:
+ * 1) There is a valid buffer pointer
+ * 2) The buffer is not static (not in an ACPI table) (in this case,
+ * the actual pointer was already copied above)
+ */
+ if ((SourceDesc->Buffer.Pointer) &&
+ (!(SourceDesc->Common.Flags & AOPOBJ_STATIC_POINTER)))
+ {
+ DestDesc->Buffer.Pointer = ACPI_MEM_ALLOCATE (SourceDesc->Buffer.Length);
+ if (!DestDesc->Buffer.Pointer)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ ACPI_MEMCPY (DestDesc->Buffer.Pointer, SourceDesc->Buffer.Pointer,
+ SourceDesc->Buffer.Length);
+ }
+ break;
case ACPI_TYPE_STRING:
/*
* Allocate and copy the actual string if and only if:
- * 1) There is a valid string (length > 0)
+ * 1) There is a valid string pointer
* 2) The string is not static (not in an ACPI table) (in this case,
* the actual pointer was already copied above)
*/
- if ((SourceDesc->String.Length) &&
+ if ((SourceDesc->String.Pointer) &&
(!(SourceDesc->Common.Flags & AOPOBJ_STATIC_POINTER)))
{
- DestDesc->String.Pointer = ACPI_MEM_ALLOCATE (SourceDesc->String.Length);
+ DestDesc->String.Pointer = ACPI_MEM_ALLOCATE ((ACPI_SIZE) SourceDesc->String.Length + 1);
if (!DestDesc->String.Pointer)
{
return (AE_NO_MEMORY);
}
ACPI_MEMCPY (DestDesc->String.Pointer, SourceDesc->String.Pointer,
- SourceDesc->String.Length);
+ (ACPI_SIZE) SourceDesc->String.Length + 1);
}
break;
@@ -797,28 +817,40 @@ AcpiUtCopyIelementToIelement (
switch (ObjectType)
{
- case 0:
+ case ACPI_COPY_TYPE_SIMPLE:
- /*
- * This is a simple object, just copy it
- */
- TargetObject = AcpiUtCreateInternalObject (ACPI_GET_OBJECT_TYPE (SourceObject));
- if (!TargetObject)
- {
- return (AE_NO_MEMORY);
- }
+ /* A null source object indicates a (legal) null package element */
- Status = AcpiUtCopySimpleObject (SourceObject, TargetObject);
- if (ACPI_FAILURE (Status))
+ if (SourceObject)
{
- return (Status);
+ /*
+ * This is a simple object, just copy it
+ */
+ TargetObject = AcpiUtCreateInternalObject (
+ ACPI_GET_OBJECT_TYPE (SourceObject));
+ if (!TargetObject)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ Status = AcpiUtCopySimpleObject (SourceObject, TargetObject);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ *ThisTargetPtr = TargetObject;
}
+ else
+ {
+ /* Pass through a null element */
- *ThisTargetPtr = TargetObject;
+ *ThisTargetPtr = NULL;
+ }
break;
- case 1:
+ case ACPI_COPY_TYPE_PACKAGE:
/*
* This object is a package - go down another nesting level
@@ -834,6 +866,18 @@ AcpiUtCopyIelementToIelement (
TargetObject->Common.Flags = SourceObject->Common.Flags;
/*
+ * Create the object array
+ */
+ TargetObject->Package.Elements =
+ ACPI_MEM_CALLOCATE (((ACPI_SIZE) SourceObject->Package.Count + 1) *
+ sizeof (void *));
+ if (!TargetObject->Package.Elements)
+ {
+ ACPI_MEM_FREE (TargetObject);
+ return (AE_NO_MEMORY);
+ }
+
+ /*
* Pass the new package object back to the package walk routine
*/
State->Pkg.ThisTargetObj = TargetObject;
diff --git a/sys/contrib/dev/acpica/utdebug.c b/sys/contrib/dev/acpica/utdebug.c
index b791d24..842c7d6 100644
--- a/sys/contrib/dev/acpica/utdebug.c
+++ b/sys/contrib/dev/acpica/utdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utdebug - Debug print routines
- * $Revision: 105 $
+ * $Revision: 108 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -387,7 +387,7 @@ void
AcpiUtTraceStr (
UINT32 LineNumber,
ACPI_DEBUG_PRINT_INFO *DbgInfo,
- NATIVE_CHAR *String)
+ char *String)
{
AcpiGbl_NestingLevel++;
@@ -592,8 +592,8 @@ AcpiUtDumpBuffer (
UINT32 Display,
UINT32 ComponentId)
{
- NATIVE_UINT i = 0;
- NATIVE_UINT j;
+ ACPI_NATIVE_UINT i = 0;
+ ACPI_NATIVE_UINT j;
UINT32 Temp32;
UINT8 BufChar;
diff --git a/sys/contrib/dev/acpica/utdelete.c b/sys/contrib/dev/acpica/utdelete.c
index 40d58ba..890973e 100644
--- a/sys/contrib/dev/acpica/utdelete.c
+++ b/sys/contrib/dev/acpica/utdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utdelete - object deletion and reference count utilities
- * $Revision: 92 $
+ * $Revision: 95 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -169,6 +169,8 @@ AcpiUtDeleteInternalObj (
if (!(Object->Common.Flags & AOPOBJ_STATIC_POINTER))
{
+ /* But only if it is NOT a pointer into an ACPI table */
+
ObjPointer = Object->String.Pointer;
}
break;
@@ -181,7 +183,12 @@ AcpiUtDeleteInternalObj (
/* Free the actual buffer */
- ObjPointer = Object->Buffer.Pointer;
+ if (!(Object->Common.Flags & AOPOBJ_STATIC_POINTER))
+ {
+ /* But only if it is NOT a pointer into an ACPI table */
+
+ ObjPointer = Object->Buffer.Pointer;
+ }
break;
@@ -436,7 +443,7 @@ AcpiUtUpdateRefCount (
* Sanity check the reference count, for debug purposes only.
* (A deleted object will have a huge reference count)
*/
- if (Count > MAX_REFERENCE_COUNT)
+ if (Count > ACPI_MAX_REFERENCE_COUNT)
{
ACPI_DEBUG_PRINT ((ACPI_DB_WARN,
diff --git a/sys/contrib/dev/acpica/uteval.c b/sys/contrib/dev/acpica/uteval.c
index aaca246..6d69728 100644
--- a/sys/contrib/dev/acpica/uteval.c
+++ b/sys/contrib/dev/acpica/uteval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: uteval - Object evaluation
- * $Revision: 41 $
+ * $Revision: 45 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -127,86 +127,165 @@
/*******************************************************************************
*
- * FUNCTION: AcpiUtEvaluateNumericObject
+ * FUNCTION: AcpiUtEvaluateObject
*
- * PARAMETERS: *ObjectName - Object name to be evaluated
- * DeviceNode - Node for the device
- * *Address - Where the value is returned
+ * PARAMETERS: PrefixNode - Starting node
+ * Path - Path to object from starting node
+ * ExpectedReturnTypes - Bitmap of allowed return types
+ * ReturnDesc - Where a return value is stored
*
* RETURN: Status
*
- * DESCRIPTION: evaluates a numeric namespace object for a selected device
- * and stores results in *Address.
+ * DESCRIPTION: Evaluates a namespace object and verifies the type of the
+ * return object. Common code that simplifies accessing objects
+ * that have required return objects of fixed types.
*
* NOTE: Internal function, no parameter validation
*
******************************************************************************/
ACPI_STATUS
-AcpiUtEvaluateNumericObject (
- NATIVE_CHAR *ObjectName,
- ACPI_NAMESPACE_NODE *DeviceNode,
- ACPI_INTEGER *Address)
+AcpiUtEvaluateObject (
+ ACPI_NAMESPACE_NODE *PrefixNode,
+ char *Path,
+ UINT32 ExpectedReturnBtypes,
+ ACPI_OPERAND_OBJECT **ReturnDesc)
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STATUS Status;
+ UINT32 ReturnBtype;
- ACPI_FUNCTION_TRACE ("UtEvaluateNumericObject");
+ ACPI_FUNCTION_TRACE ("UtEvaluateObject");
- /* Execute the method */
+ /* Evaluate the object/method */
- Status = AcpiNsEvaluateRelative (DeviceNode, ObjectName, NULL, &ObjDesc);
+ Status = AcpiNsEvaluateRelative (PrefixNode, Path, NULL, &ObjDesc);
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s on %4.4s was not found\n",
- ObjectName, DeviceNode->Name.Ascii));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s.%s] was not found\n",
+ PrefixNode->Name.Ascii, Path));
}
else
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%s on %4.4s failed with status %s\n",
- ObjectName, DeviceNode->Name.Ascii,
- AcpiFormatException (Status)));
+ ACPI_REPORT_METHOD_ERROR ("Method execution failed",
+ PrefixNode, Path, Status);
}
return_ACPI_STATUS (Status);
}
-
/* Did we get a return object? */
if (!ObjDesc)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from %s\n",
- ObjectName));
- return_ACPI_STATUS (AE_TYPE);
+ if (ExpectedReturnBtypes)
+ {
+ ACPI_REPORT_METHOD_ERROR ("No object was returned from",
+ PrefixNode, Path, AE_NOT_EXIST);
+
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ return_ACPI_STATUS (AE_OK);
}
- /* Is the return object of the correct type? */
+ /* Map the return object type to the bitmapped type */
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER)
+ switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
- Status = AE_TYPE;
+ case ACPI_TYPE_INTEGER:
+ ReturnBtype = ACPI_BTYPE_INTEGER;
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ ReturnBtype = ACPI_BTYPE_BUFFER;
+ break;
+
+ case ACPI_TYPE_STRING:
+ ReturnBtype = ACPI_BTYPE_STRING;
+ break;
+
+ case ACPI_TYPE_PACKAGE:
+ ReturnBtype = ACPI_BTYPE_PACKAGE;
+ break;
+
+ default:
+ ReturnBtype = 0;
+ break;
+ }
+
+ /* Is the return object one of the expected types? */
+
+ if (!(ExpectedReturnBtypes & ReturnBtype))
+ {
+ ACPI_REPORT_METHOD_ERROR ("Return object type is incorrect",
+ PrefixNode, Path, AE_TYPE);
+
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Type returned from %s was not an Integer: %X \n",
- ObjectName, ACPI_GET_OBJECT_TYPE (ObjDesc)));
+ "Type returned from %s was incorrect: %X\n",
+ Path, ACPI_GET_OBJECT_TYPE (ObjDesc)));
+
+ /* On error exit, we must delete the return object */
+
+ AcpiUtRemoveReference (ObjDesc);
+ return_ACPI_STATUS (AE_TYPE);
}
- else
+
+ /* Object type is OK, return it */
+
+ *ReturnDesc = ObjDesc;
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtEvaluateNumericObject
+ *
+ * PARAMETERS: *ObjectName - Object name to be evaluated
+ * DeviceNode - Node for the device
+ * *Address - Where the value is returned
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Evaluates a numeric namespace object for a selected device
+ * and stores result in *Address.
+ *
+ * NOTE: Internal function, no parameter validation
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtEvaluateNumericObject (
+ char *ObjectName,
+ ACPI_NAMESPACE_NODE *DeviceNode,
+ ACPI_INTEGER *Address)
+{
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE ("UtEvaluateNumericObject");
+
+
+ Status = AcpiUtEvaluateObject (DeviceNode, ObjectName,
+ ACPI_BTYPE_INTEGER, &ObjDesc);
+ if (ACPI_FAILURE (Status))
{
- /*
- * Since the structure is a union, setting any field will set all
- * of the variables in the union
- */
- *Address = ObjDesc->Integer.Value;
+ return_ACPI_STATUS (Status);
}
+ /* Get the returned Integer */
+
+ *Address = ObjDesc->Integer.Value;
+
/* On exit, we must delete the return object */
AcpiUtRemoveReference (ObjDesc);
-
return_ACPI_STATUS (Status);
}
@@ -239,67 +318,29 @@ AcpiUtExecute_HID (
ACPI_FUNCTION_TRACE ("UtExecute_HID");
- /* Execute the method */
-
- Status = AcpiNsEvaluateRelative (DeviceNode,
- METHOD_NAME__HID, NULL, &ObjDesc);
+ Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__HID,
+ ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &ObjDesc);
if (ACPI_FAILURE (Status))
{
- if (Status == AE_NOT_FOUND)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_HID on %4.4s was not found\n",
- DeviceNode->Name.Ascii));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "_HID on %4.4s failed %s\n",
- DeviceNode->Name.Ascii, AcpiFormatException (Status)));
- }
-
return_ACPI_STATUS (Status);
}
- /* Did we get a return object? */
-
- if (!ObjDesc)
+ if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _HID\n"));
- return_ACPI_STATUS (AE_TYPE);
- }
+ /* Convert the Numeric HID to string */
- /*
- * A _HID can return either a Number (32 bit compressed EISA ID) or
- * a string
- */
- if ((ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER) &&
- (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_STRING))
- {
- Status = AE_TYPE;
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Type returned from _HID not a number or string: %s(%X) \n",
- AcpiUtGetObjectTypeName (ObjDesc),
- ACPI_GET_OBJECT_TYPE (ObjDesc)));
+ AcpiExEisaIdToString ((UINT32) ObjDesc->Integer.Value, Hid->Buffer);
}
else
{
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
- {
- /* Convert the Numeric HID to string */
-
- AcpiExEisaIdToString ((UINT32) ObjDesc->Integer.Value, Hid->Buffer);
- }
- else
- {
- /* Copy the String HID from the returned object */
+ /* Copy the String HID from the returned object */
- ACPI_STRNCPY (Hid->Buffer, ObjDesc->String.Pointer, sizeof(Hid->Buffer));
- }
+ ACPI_STRNCPY (Hid->Buffer, ObjDesc->String.Pointer, sizeof(Hid->Buffer));
}
/* On exit, we must delete the return object */
AcpiUtRemoveReference (ObjDesc);
-
return_ACPI_STATUS (Status);
}
@@ -331,34 +372,14 @@ AcpiUtExecute_CID (
ACPI_FUNCTION_TRACE ("UtExecute_CID");
- /* Execute the method */
- Status = AcpiNsEvaluateRelative (DeviceNode,
- METHOD_NAME__CID, NULL, &ObjDesc);
+ Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__CID,
+ ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_PACKAGE, &ObjDesc);
if (ACPI_FAILURE (Status))
{
- if (Status == AE_NOT_FOUND)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_CID on %4.4s was not found\n",
- DeviceNode->Name.Ascii));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "_CID on %4.4s failed %s\n",
- DeviceNode->Name.Ascii, AcpiFormatException (Status)));
- }
-
return_ACPI_STATUS (Status);
}
- /* Did we get a return object? */
-
- if (!ObjDesc)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _CID\n"));
- return_ACPI_STATUS (AE_TYPE);
- }
-
/*
* A _CID can return either a single compatible ID or a package of compatible
* IDs. Each compatible ID can be a Number (32 bit compressed EISA ID) or
@@ -377,28 +398,25 @@ AcpiUtExecute_CID (
/* Copy the String CID from the returned object */
- ACPI_STRNCPY (Cid->Buffer, ObjDesc->String.Pointer, sizeof(Cid->Buffer));
+ ACPI_STRNCPY (Cid->Buffer, ObjDesc->String.Pointer, sizeof (Cid->Buffer));
break;
case ACPI_TYPE_PACKAGE:
/* TBD: Parse package elements; need different return struct, etc. */
+
+ Status = AE_SUPPORT;
break;
default:
Status = AE_TYPE;
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Type returned from _CID not a number, string, or package: %s(%X) \n",
- AcpiUtGetObjectTypeName (ObjDesc),
- ACPI_GET_OBJECT_TYPE (ObjDesc)));
break;
}
/* On exit, we must delete the return object */
AcpiUtRemoveReference (ObjDesc);
-
return_ACPI_STATUS (Status);
}
@@ -428,72 +446,33 @@ AcpiUtExecute_UID (
ACPI_STATUS Status;
- ACPI_FUNCTION_NAME ("UtExecute_UID");
-
+ ACPI_FUNCTION_TRACE ("UtExecute_UID");
- /* Execute the method */
- Status = AcpiNsEvaluateRelative (DeviceNode,
- METHOD_NAME__UID, NULL, &ObjDesc);
+ Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__UID,
+ ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &ObjDesc);
if (ACPI_FAILURE (Status))
{
- if (Status == AE_NOT_FOUND)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_UID on %4.4s was not found\n",
- DeviceNode->Name.Ascii));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "_UID on %4.4s failed %s\n",
- DeviceNode->Name.Ascii, AcpiFormatException (Status)));
- }
-
- return (Status);
+ return_ACPI_STATUS (Status);
}
- /* Did we get a return object? */
-
- if (!ObjDesc)
+ if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _UID\n"));
- return (AE_TYPE);
- }
+ /* Convert the Numeric UID to string */
- /*
- * A _UID can return either a Number (32 bit compressed EISA ID) or
- * a string
- */
- if ((ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER) &&
- (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_STRING))
- {
- Status = AE_TYPE;
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Type returned from _UID was not a number or string: %X \n",
- ACPI_GET_OBJECT_TYPE (ObjDesc)));
+ AcpiExUnsignedIntegerToString (ObjDesc->Integer.Value, Uid->Buffer);
}
else
{
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
- {
- /* Convert the Numeric UID to string */
+ /* Copy the String UID from the returned object */
- AcpiExUnsignedIntegerToString (ObjDesc->Integer.Value, Uid->Buffer);
- }
- else
- {
- /* Copy the String UID from the returned object */
-
- ACPI_STRNCPY (Uid->Buffer, ObjDesc->String.Pointer, sizeof(Uid->Buffer));
- }
+ ACPI_STRNCPY (Uid->Buffer, ObjDesc->String.Pointer, sizeof (Uid->Buffer));
}
-
/* On exit, we must delete the return object */
AcpiUtRemoveReference (ObjDesc);
-
- return (Status);
+ return_ACPI_STATUS (Status);
}
@@ -525,57 +504,29 @@ AcpiUtExecute_STA (
ACPI_FUNCTION_TRACE ("UtExecute_STA");
- /* Execute the method */
-
- Status = AcpiNsEvaluateRelative (DeviceNode,
- METHOD_NAME__STA, NULL, &ObjDesc);
- if (AE_NOT_FOUND == Status)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "_STA on %4.4s was not found, assuming present.\n",
- DeviceNode->Name.Ascii));
-
- *Flags = 0x0F;
- Status = AE_OK;
- }
-
- else if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "_STA on %4.4s failed %s\n",
- DeviceNode->Name.Ascii,
- AcpiFormatException (Status)));
- }
-
- else /* success */
+ Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__STA,
+ ACPI_BTYPE_INTEGER, &ObjDesc);
+ if (ACPI_FAILURE (Status))
{
- /* Did we get a return object? */
-
- if (!ObjDesc)
+ if (AE_NOT_FOUND == Status)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from _STA\n"));
- return_ACPI_STATUS (AE_TYPE);
- }
-
- /* Is the return object of the correct type? */
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "_STA on %4.4s was not found, assuming device is present\n",
+ DeviceNode->Name.Ascii));
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER)
- {
- Status = AE_TYPE;
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Type returned from _STA was not a number: %X \n",
- ACPI_GET_OBJECT_TYPE (ObjDesc)));
+ *Flags = 0x0F;
+ Status = AE_OK;
}
- else
- {
- /* Extract the status flags */
- *Flags = (UINT32) ObjDesc->Integer.Value;
- }
+ return_ACPI_STATUS (Status);
+ }
- /* On exit, we must delete the return object */
+ /* Extract the status flags */
- AcpiUtRemoveReference (ObjDesc);
- }
+ *Flags = (UINT32) ObjDesc->Integer.Value;
+ /* On exit, we must delete the return object */
+
+ AcpiUtRemoveReference (ObjDesc);
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/utinit.c b/sys/contrib/dev/acpica/utinit.c
index 181512a..10e52eb 100644
--- a/sys/contrib/dev/acpica/utinit.c
+++ b/sys/contrib/dev/acpica/utinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utinit - Common ACPI subsystem initialization
- * $Revision: 114 $
+ * $Revision: 116 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -142,7 +142,7 @@
static void
AcpiUtFadtRegisterError (
- NATIVE_CHAR *RegisterName,
+ char *RegisterName,
UINT32 Value,
ACPI_SIZE Offset)
{
diff --git a/sys/contrib/dev/acpica/utmath.c b/sys/contrib/dev/acpica/utmath.c
index cd77944..f519cd2 100644
--- a/sys/contrib/dev/acpica/utmath.c
+++ b/sys/contrib/dev/acpica/utmath.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utmath - Integer math support routines
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/utmisc.c b/sys/contrib/dev/acpica/utmisc.c
index 4862b7d..91b2382 100644
--- a/sys/contrib/dev/acpica/utmisc.c
+++ b/sys/contrib/dev/acpica/utmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utmisc - common utility procedures
- * $Revision: 86 $
+ * $Revision: 93 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -301,42 +301,70 @@ AcpiUtSetIntegerWidth (
* FUNCTION: AcpiUtDisplayInitPathname
*
* PARAMETERS: ObjHandle - Handle whose pathname will be displayed
- * Path - Additional path string to be appended
+ * Path - Additional path string to be appended.
+ * (NULL if no extra path)
*
* RETURN: ACPI_STATUS
*
- * DESCRIPTION: Display full pathnbame of an object, DEBUG ONLY
+ * DESCRIPTION: Display full pathname of an object, DEBUG ONLY
*
******************************************************************************/
void
AcpiUtDisplayInitPathname (
- ACPI_HANDLE ObjHandle,
+ UINT8 Type,
+ ACPI_NAMESPACE_NODE *ObjHandle,
char *Path)
{
ACPI_STATUS Status;
ACPI_BUFFER Buffer;
- ACPI_FUNCTION_NAME ("UtDisplayInitPathname");
+ ACPI_FUNCTION_ENTRY ();
- Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+ /* Only print the path if the appropriate debug level is enabled */
+
+ if (!(AcpiDbgLevel & ACPI_LV_INIT_NAMES))
+ {
+ return;
+ }
+ /* Get the full pathname to the node */
+
+ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
Status = AcpiNsHandleToPathname (ObjHandle, &Buffer);
- if (ACPI_SUCCESS (Status))
+ if (ACPI_FAILURE (Status))
{
- if (Path)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "%s.%s\n", (char *) Buffer.Pointer, Path));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "%s\n", (char *) Buffer.Pointer));
- }
+ return;
+ }
+
+ /* Print what we're doing */
+
+ switch (Type)
+ {
+ case ACPI_TYPE_METHOD:
+ AcpiOsPrintf ("Executing ");
+ break;
+
+ default:
+ AcpiOsPrintf ("Initializing ");
+ break;
+ }
+
+ /* Print the object type and pathname */
- ACPI_MEM_FREE (Buffer.Pointer);
+ AcpiOsPrintf ("%-12s %s", AcpiUtGetTypeName (Type), (char *) Buffer.Pointer);
+
+ /* Extra path is used to append names like _STA, _INI, etc. */
+
+ if (Path)
+ {
+ AcpiOsPrintf (".%s", Path);
}
+ AcpiOsPrintf ("\n");
+
+ ACPI_MEM_FREE (Buffer.Pointer);
}
#endif
@@ -360,7 +388,7 @@ BOOLEAN
AcpiUtValidAcpiName (
UINT32 Name)
{
- NATIVE_CHAR *NamePtr = (NATIVE_CHAR *) &Name;
+ char *NamePtr = (char *) &Name;
UINT32 i;
@@ -395,7 +423,7 @@ AcpiUtValidAcpiName (
BOOLEAN
AcpiUtValidAcpiCharacter (
- NATIVE_CHAR Character)
+ char Character)
{
ACPI_FUNCTION_ENTRY ();
@@ -424,7 +452,7 @@ AcpiUtValidAcpiCharacter (
ACPI_STATUS
AcpiUtStrtoul64 (
- NATIVE_CHAR *String,
+ char *String,
UINT32 Base,
ACPI_INTEGER *RetInteger)
{
@@ -581,11 +609,11 @@ ErrorExit:
*
******************************************************************************/
-NATIVE_CHAR *
+char *
AcpiUtStrupr (
- NATIVE_CHAR *SrcString)
+ char *SrcString)
{
- NATIVE_CHAR *String;
+ char *String;
ACPI_FUNCTION_ENTRY ();
@@ -599,7 +627,6 @@ AcpiUtStrupr (
String++;
}
-
return (SrcString);
}
@@ -703,7 +730,6 @@ AcpiUtCreateMutex (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
-
if (!AcpiGbl_AcpiMutexInfo[MutexId].Mutex)
{
Status = AcpiOsCreateSemaphore (1, 1,
@@ -743,7 +769,6 @@ AcpiUtDeleteMutex (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
-
Status = AcpiOsDeleteSemaphore (AcpiGbl_AcpiMutexInfo[MutexId].Mutex);
AcpiGbl_AcpiMutexInfo[MutexId].Mutex = NULL;
@@ -782,7 +807,6 @@ AcpiUtAcquireMutex (
return (AE_BAD_PARAMETER);
}
-
ThisThreadId = AcpiOsGetThreadId ();
/*
@@ -813,7 +837,6 @@ AcpiUtAcquireMutex (
}
}
-
ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX,
"Thread %X attempting to acquire Mutex [%s]\n",
ThisThreadId, AcpiUtGetMutexName (MutexId)));
@@ -828,7 +851,6 @@ AcpiUtAcquireMutex (
AcpiGbl_AcpiMutexInfo[MutexId].UseCount++;
AcpiGbl_AcpiMutexInfo[MutexId].OwnerId = ThisThreadId;
}
-
else
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Thread %X could not acquire Mutex [%s] %s\n",
@@ -874,7 +896,6 @@ AcpiUtReleaseMutex (
return (AE_BAD_PARAMETER);
}
-
/*
* Mutex must be acquired in order to release it!
*/
@@ -887,7 +908,6 @@ AcpiUtReleaseMutex (
return (AE_NOT_ACQUIRED);
}
-
/*
* Deadlock prevention. Check if this thread owns any mutexes of value
* greater than this one. If so, the thread has violated the mutex
@@ -911,7 +931,6 @@ AcpiUtReleaseMutex (
}
}
-
/* Mark unlocked FIRST */
AcpiGbl_AcpiMutexInfo[MutexId].OwnerId = ACPI_MUTEX_NOT_ACQUIRED;
@@ -973,7 +992,6 @@ AcpiUtCreateUpdateStateAndPush (
return (AE_NO_MEMORY);
}
-
AcpiUtPushGenericState (StateList, State);
return (AE_OK);
}
@@ -1012,7 +1030,6 @@ AcpiUtCreatePkgStateAndPush (
return (AE_NO_MEMORY);
}
-
AcpiUtPushGenericState (StateList, State);
return (AE_OK);
}
@@ -1281,7 +1298,6 @@ AcpiUtCreateControlState (
return_PTR (NULL);
}
-
/* Init fields specific to the control struct */
State->Common.DataType = ACPI_DESC_TYPE_STATE_CONTROL;
@@ -1378,6 +1394,8 @@ AcpiUtWalkPackageTree (
while (State)
{
+ /* Get one element of the package */
+
ThisIndex = State->Pkg.Index;
ThisSourceObj = (ACPI_OPERAND_OBJECT *)
State->Pkg.SourceObject->Package.Elements[ThisIndex];
@@ -1485,6 +1503,7 @@ AcpiUtGenerateChecksum (
UINT32 i;
signed char Sum = 0;
+
for (i = 0; i < Length; i++)
{
Sum = (signed char) (Sum + Buffer[i]);
@@ -1568,7 +1587,7 @@ AcpiUtGetResourceEndTag (
void
AcpiUtReportError (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
{
@@ -1595,7 +1614,7 @@ AcpiUtReportError (
void
AcpiUtReportWarning (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
{
@@ -1621,7 +1640,7 @@ AcpiUtReportWarning (
void
AcpiUtReportInfo (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
{
@@ -1630,4 +1649,3 @@ AcpiUtReportInfo (
}
-
diff --git a/sys/contrib/dev/acpica/utobject.c b/sys/contrib/dev/acpica/utobject.c
index 67283a0..babdcf6 100644
--- a/sys/contrib/dev/acpica/utobject.c
+++ b/sys/contrib/dev/acpica/utobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utobject - ACPI object create/delete/size/cache routines
- * $Revision: 79 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -148,7 +148,7 @@
ACPI_OPERAND_OBJECT *
AcpiUtCreateInternalObjectDbg (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
ACPI_OBJECT_TYPE Type)
@@ -246,7 +246,7 @@ AcpiUtCreateBufferObject (
Buffer = ACPI_MEM_CALLOCATE (BufferSize);
if (!Buffer)
{
- ACPI_REPORT_ERROR (("CreateBuffer: could not allocate size %X\n",
+ ACPI_REPORT_ERROR (("CreateBuffer: could not allocate size %X\n",
(UINT32) BufferSize));
AcpiUtRemoveReference (BufferDesc);
return_PTR (NULL);
@@ -347,7 +347,7 @@ AcpiUtValidInternalObject (
void *
AcpiUtAllocateObjectDescDbg (
- NATIVE_CHAR *ModuleName,
+ char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
{
diff --git a/sys/contrib/dev/acpica/utxface.c b/sys/contrib/dev/acpica/utxface.c
index 99c312c..6a99631 100644
--- a/sys/contrib/dev/acpica/utxface.c
+++ b/sys/contrib/dev/acpica/utxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utxface - External interfaces for "global" ACPI functions
- * $Revision: 100 $
+ * $Revision: 101 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
OpenPOWER on IntegriCloud