Import ACPICA 20221020 sources
Imports a subset of the ACPICA version 20221020 files under the BSD license.
Procedure:
- Determine last import revision: d64c6652f263a2d91f33657aa07867c555733182.
- $ git diff d64c6652f263a2d91f33657aa07867c555733182 -- source > fuchsia.patch
- $ rm -r source
- $ curl -sfSL https://acpica.org/sites/acpica/files/acpica-unix2-20221020.tar_0.gz | \
tar -xz \
--wildcards \
'*/source/*' \
'*/changes.txt' \
--strip-components=1
- $ git add include source changes.txt
- $ git apply --reject --whitespace=fix fuchsia.patch
- Resolve failed chunks.
- Remove failed chunks.
+ $ rm '*.rej'
- $ rm fuchsia.patch
- Check for added/deleted files that need to be added to BUILD.gn:
+ git diff --diff-filter=AD --stat
Add `-Wno-extern-c-compat` because acpica now includes zero-sized struct
definitions which have size 1 in C++.
Change-Id: I76c7a260b9f17141c7c175770aee61c336732b0f
diff --git a/BUILD.gn b/BUILD.gn
index e306452..b508081 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -28,6 +28,7 @@
visibility = [ ":*" ]
cflags = [
+ "-Wno-extern-c-compat",
"-Wno-implicit-fallthrough",
"-Wno-incompatible-pointer-types-discards-qualifiers",
"-Wno-null-pointer-arithmetic",
@@ -77,8 +78,6 @@
"source/common/ahpredef.c",
"source/common/ahtable.c",
"source/common/dmtbdump.c",
- "source/common/dmtbdump1.c",
- "source/common/dmtbdump2.c",
"source/common/dmtbdump3.c",
"source/common/dmtbinfo.c",
"source/common/dmtbinfo1.c",
@@ -212,6 +211,7 @@
"source/components/utilities/utascii.c",
"source/components/utilities/utbuffer.c",
"source/components/utilities/utcache.c",
+ "source/components/utilities/utcksum.c",
"source/components/utilities/utclib.c",
"source/components/utilities/utcopy.c",
"source/components/utilities/utdebug.c",
diff --git a/changes.txt b/changes.txt
index dc02d24..cf3c218 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,877 @@
----------------------------------------
+31 March 2022. Summary of changes for version 20220331:
+
+0) Global changes:
+
+Update all copyright notices to the year 2022. This effects all source
+modules, as well as utility signons.
+
+
+1) ACPICA kernel-resident subsystem:
+
+For the ASL Sleep() operator, issue a warning if the sleep value is
+greater than 10 Milliseconds. Quick boottime is important, so warn about
+sleeps greater than 10 ms. Distribution Linux kernels reach initrd in 350
+ms, so excessive delays should be called out. 10 ms is chosen randomly,
+but three of such delays would already make up ten percent of the
+boottime.
+
+Namespace: Avoid attempting to walk the Namespace if the Namespace does
+not exist.
+
+AML interpreter/iASL compiler: Add new Acpi 6.4 semantics for the
+LoadTable and Load operators. DDB_HANDLE is gone, now loadtable returns a
+pass/fail integer. Now load returns a pass/fail integer, as well as
+storing the return value in an optional 2nd argument.
+
+Headers: Use uintptr_t and offsetof() in Linux kernel builds. To avoid
+"performing pointer subtraction with a null pointer has undefined
+behavior" compiler warnings, use uintptr_t and offsetof() that are always
+available during Linux kernel builds to define ACPI_UINTPTR_T and the
+ACPI_TO_INTEGER() and ACPI_OFFSET() macros when building the ACPICA code
+in the Linux kernel.
+
+Added support for the Windows 11 _OSI string ("Windows 2021"). Submitted
+by superm1.
+
+executer/exsystem: Inform users about ACPI spec violation for the Stall()
+operator. Values greater than 100 microseconds violate the ACPI
+specification, so warn users about it. From the ACPI Specification
+version 6.2 Errata A, 19.6.128 *Stall (Stall for a Short Time)*:
+> The implementation of Stall is OS-specific, but must not relinquish
+> control of the processor. Because of this, delays longer than 100
+> microseconds must use Sleep instead of Stall.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+Data Table Compiler/Disassembler: Add support for the APMT table - ARM
+Performance Monitoring Unit table. Submitted by @bwicaksononv.
+
+Data Table Compiler/Disassembler: For MADT, add support for the OEM-
+defined subtables (Types 0x80-0x7F).
+
+Data Table Compiler: Fixed a problem with support for the SDEV table,
+where a subtable Length was not computed correctly.
+
+Data Table Compiler/Disassembler: Add/fix the CFMWS subtable to the CEDT
+Acpi table support.
+
+Data Table Compiler/Disassembler: Fix a compile issue with the CEDT and
+add template. Submitted by MasterDrogo.
+
+Data Table Compiler/Disassembler: NHLT Changes provided by Piotr Maziarz:
+iASL/NHLT: Rename linux specific structures to DeviceInfo to improve
+readability of the code.
+iASL/NHLT: Fix parsing undocumented bytes at the end of Endpoint.
+Undocumented bytes at the end of Endpoint Descriptor can be present
+independently of Linux-specific structures. Their size can also vary.
+iASL/NHLT: Treat TableTerminator as SpecificConfig. SpecificConfig has 4
+bytes of size and then an amount of bytes specified by size. All of the
+terminators that I've seen had a size equal to 4, but theoretically it
+can vary.
+
+iASL/AcpiExec: Use _exit instead of exit in signal handers (ctrl-C).
+
+iASL: Remove a remark due to excessive output. Removed a remark for
+duplicate Offset() operators, due to a user complaint.
+
+----------------------------------------
+17 December 2021. Summary of changes for version 20211217:
+
+1) ACPICA kernel-resident subsystem:
+
+Hardware: Do not flush CPU cache when entering S4 and S5. According to
+ACPI 6.4, Section 16.2, the CPU cache flushing is required on entering to
+S1, S2, and S3, but the ACPICA code flushes the CPU cache regardless of
+the sleep state. Blind cache flush on entering S5 causes problems for
+TDX.
+
+Avoid subobject buffer overflow when validating RSDP signature. Since the
+Signature member is accessed through an ACPI_TABLE_HEADER, the pointer to
+it is only to a 4-char array, and so trying to read past the 4th
+character, as will be done when it is an RSDP, reads beyond the bounds of
+the accessed member. Contributed by jrtc27.
+
+Add support for PCC Opregion special context data. PCC Opregion added in
+ACPIC 6.3 requires special context data similar to GPIO and Generic
+Serial Bus as it needs to know the internal PCC buffer and its length as
+well as the PCC channel index when the opregion handler is being executed
+by the OSPM. Adds support for the special context data needed by PCC
+Opregion. Submitted by Sudeep Holla <[email protected]>
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: Completed compiler support for the NHLT ACPI table.
+
+iASL/NHLT table: Fixed a reported problem where a fault would occur
+during disassembly of a "Linux-Specific" section if the "Specific Data"
+part was not present.
+
+iASL: Added full support (compiler and disassembler) for the AGDI ACPI
+table. Contributed by: Ilkka Koskinen <[email protected]>.
+
+iASL: Added full support for the TDEL ACPI table.
+
+iASL table compiler: FADT support updates:
+1) Allow the 32-bit DSDT address to be zero.
+2) Issue error if both the 32-bit and 64-bit DSDT addresses are zero.
+
+iASL: Fix unaligned accesses to local cache allocations. Contributed by
+jrtc27.
+
+iASL: Open binary input files in binary mode, not text mode Affects
+binary input AML files, as well as binary data table files, for
+disassembly.
+
+----------------------------------------
+30 September 2021. Summary of changes for version 20210930:
+
+This release is available at https://acpica.org/downloads
+
+1) ACPICA kernel-resident subsystem:
+
+Hardware: Avoid evaluating methods too early during system resume. During
+wakeup from system-wide sleep states, AcpiGetSleepTypeData() is called
+and it tries to get memory from the OS in order to evaluate a control
+method, but if KFENCE is enabled in the Linux kernel, the memory
+allocation attempt causes an IRQ work to be queued and a self-IPI to be
+sent to the CPU running the code which requires the memory controller to
+be ready, so if that happens too early in the wakeup path, it doesn't
+work.
+
+Prevent that from taking place by calling AcpiGetSleepTypeData() for S0
+upfront, when preparing to enter a given sleep state, and saving the data
+obtained by it for later use during system wakeup.
+
+Added a new _OSI string, "Windows 2020". Posted by superm1.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL compiler: Updated the check for usage of _CRS, _DIS, _PRS, and _SRS
+objects:
+New/latest rules: Under a Device Object:
+ 1) If _PRS is present, must have _CRS and _SRS
+ 2) If _SRS is present, must have _PRS (_PRS requires _CRS and
+_SRS)
+ 3) If _DIS is present, must have _SRS (_SRS requires _PRS, _PRS
+requires _CRS and _SRS)
+ 4) If _SRS is present, probably should have a _DIS (Remark only)
+
+iASL table disassembler: Added disassembly support for the NHLT ACPI
+table. Note: support for Vendor-defined microphone arrays and SNR
+extensions are not supported at this time -- mostly due to a lack of
+example tables. Actual compiler support for NHLT is forthcoming.
+
+Added a new subtable type for ACPI 6.4 SRAT Generic Port Affinity. It
+uses the same subtable structure as the existing Generic Initiator
+Affinity type.
+
+Added the flag for online capable in the MADT, introduced in ACPI 6.3.
+Posted by superm1.
+
+3) ACPICA documentation: Updated the legal info (that appears at the
+start of the Documents) to clarify distribution rights that are granted.
+
+
+----------------------------------------
+30 July 2021. Summary of changes for version 20210730:
+
+This release is available at https://acpica.org/downloads
+
+1) ACPICA kernel-resident subsystem:
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iasl: Check usage of _CRS, _DIS, _PRS, and _SRS objects (July 2021).
+ Under the Device Object:
+ 1) If _DIS is present, must have a _CRS and _SRS
+ 2) If _PRS is present, must have a _CRS, _DIS, and _SRS
+ 3) If _SRS is present, must have a _CRS and _DIS
+A warning will be issued for each of these cases.
+Note: For existing ASL/projects, these warnings may be disabled by
+specifying this on the command line:
+"-vw 3141"
+
+iASL Table Disassembler/Table compiler: Fix for WPBT table with no
+command-line arguments. Handle the case where the Command-line
+Arguments table field does not exist (zero).
+
+Headers: Add new DBG2 Serial Port Subtypes
+The Microsoft Debug Port Table 2 (DBG2) specification revision
+September 21, 2020 comprises additional Serial Port Subtypes [1].
+Reflect that in the actbl1.h header file. Submitted by:
+semihalf-wojtas-marcin
+
+iASL: Add full support for the AEST table (data compiler)
+Includes support in the table compiler and the disassembler.
+
+Add PRMT module header to facilitate parsing.
+This structure is used in to parse PRMT in other Operating Systems
+that relies on using subtable headers in order to parse ACPI tables.
+Although the PRMT doesn't have "subtables" it has a list of module
+information structures that act as subtables.
+
+iASL: Table disassembler: Add missing strings to decode subtable types.
+Includes the MADT and CEDT tables.
+
+
+----------------------------------------
+04 June 2021. Summary of changes for version 20210604:
+
+1) ACPICA kernel-resident subsystem:
+
+Cleaned up (delete) the context mutex during local address handler object
+deletion.
+
+Fixed a memory leak caused by the _CID repair function.
+
+Added support for PlatformRtMechanism OperationRegion handler. Adds a new
+utility function, AcpiUtConvertUuidToString. Writing a buffer to a
+PlatformRtMechanism fieldunit invokes a bidirectional transaction. The
+input buffer contains 26 bytes containing 9 bytes of status, a command
+byte and a 16-byte UUID. This change will simply pass this incoming
+buffer to a handler registered by the OS.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+Added full support for the PRMT ACPI table (Platform Runtime Mechanism
+Table). Includes support in the iASL compiler, the disassembler, and the
+template generator.
+
+Added full support for the BDAT (BIOS Data ACPI Table) ACPI table.
+
+Added full support for the RGRT (Regulatory Graphics Resource Table) ACPI
+table.
+
+Added full support for the SVKL (Storage Volume Key Location Table) ACPI
+table. Header file support from Kuppuswamy Sathyanarayanan
+<[email protected]>.
+
+Completed full support for the IVRS (I/O Virtualization Reporting
+Structure) ACPI table. Added compiler support for IVRS, updated
+disassembler support. Adds a new utility, UtIsIdInteger, to determine if
+a HID/CID is an integer or a string.
+
+Headers: Added more structs to the CEDT table: CXL fixed memory window
+structure.
+
+ACPI 6.4: MADT: added Multiprocessor Wakeup Mailbox Structure.
+
+----------------------------------------
+31 March 2021. Summary of changes for version 20210331:
+
+This release is available at https://acpica.org/downloads, and includes
+all ACPI 6.4 support
+
+1) ACPICA kernel-resident subsystem:
+ACPI 6.4: iASL: deprecate DDBHandleObj keyword
+Always create namespace nodes using AcpiNsCreateNode(). ACPICA is
+allocating an object using kmalloc(), but then frees it
+using kmem_cache_free(<"Acpi-Namespace" kmem_cache>). This is wrong.
+Fixed a race condition in generic serial bus operation region handler.
+Fixed by Hans de Goede.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+ACPI 6.4: NFIT: add Location Cookie field
+ACPI 6.4: HMAT: add new fields/flags
+ACPI 6.4: Add new flags in SRAT
+ACPI 6.4: add SDEV secure access components
+ACPI 6.4: add Csi2Bus resource template
+ACPI 6.4: add support for PHAT table
+ACPI 6.4: add support for PMTT table
+Add disassembly support for the IVRS table. Compilation of the table is
+not yet complete.
+Fixed a potential infinite loop due to type mismatch. The for-loop is
+using a UINT8 counter and comparing the upper
+limit against a UINT32 AslGbl_ExpectedMessagesIndex maximum. In
+the case where AslGbl_ExpectedMessagesIndex is > 255 the counter i
+will wrap around to zero and the loop will never exit. I suspect
+the AslGbl_ExpectedMessagesIndex is never that high, but fixing
+this does future proof the code and cleans up static analysis
+warnings.Colin King.
+iASL/TableCompiler: update it with IORT table E.b revision changes. From
+shamiali2008.
+iASL/TableCompiler: Add compilation support for the VIOT table. Signed-
+off-by: Jean-Philippe Brucker.
+iASL/TableCompiler: Add compilation support for CEDT table. Also, update
+the CEDT template.
+
+----------------------------------------
+05 January 2021. Summary of changes for version 20210105:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Updated all copyrights to 2021. This affects all ACPICA source code
+modules.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+ASL test suite (ASLTS): Updated all copyrights to 2021.
+
+Tools and utilities: Updated all signon copyrights to 2021.
+
+iASL Table Compiler: Removed support for obsolete ACPI tables: VRTC,
+MTMR. Al Stone.
+
+
+----------------------------------------
+17 December 2020. Summary of changes for version 20201217:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Note: The implementation of ACPI 6.4 is underway, and is expected to be
+mostly finished next month, when ACPI 6.4 is released.
+
+From qzed:- fixed-ae-class-macros. Fix exception code class checks. Added
+several new macros, such as ACPI_CNTL_EXCEPTION(Status) in order to
+enable this.
+
+AcpiExec/iASL/AcpiHelp: Added a few changes for support of GCC 10.2.0.
+These included a few casts, as well as a null pointer check.
+
+Fix -Wfallthrough: GCC 7.1 gained -Wimplicit-fallthrough to warn on
+implicit fallthrough, as well as __attribute__((__fallthrough__)) and
+comments to explicitly denote that cases of fallthrough were intentional.
+Clang also supports this warning and statement attribute, but not the
+comment form. Added a new macro, ACPI_FALLTHROUGH to support this feature
+of GCC. With assistance from @nickdesaulniers.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+Added improvement to method call analysis by saving the return type and
+relaxing certain cases of type checking.
+
+iASL Table Compiler: Improved info messages. Added a message to the -T
+option for when the default template (DSDT) is used.
+Also added a note for when multiple SSDTs are created with a DSDT that
+the SSDTs are created in the same file as the DSDT.
+
+
+----------------------------------------
+
+13 November 2020. Summary of changes for version 20201113:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Interpreter: fixed a memory leak by using use existing buffer in _HID
+repair. There was a memory leak that occurred when a _CID object is
+defined as a package containing string objects. When _CID is checked for
+any possible repairs, it calls a helper function to repair _HID (because
+_CID basically contains multiple _HID entries). The _HID repair function
+assumes that string objects are standalone objects that are not contained
+inside of any packages. The _HID repair function replaced the string
+object with a brand new object and attempted to delete the old object by
+decrementing the reference count of the old object. Strings inside of
+packages have a reference count of 2 so the _HID repair function leaves
+this object in a dangling state and causes a memory leak. Instead of
+allocating a brand new object and removing the old object, use the
+existing object when repairing the _HID object.
+
+Added function trace macros to improve namespace debugging. The namespace
+repair mechanism does not have function tracing macros. Add several trace
+macros to improve debuggability.
+
+Handle "orphan" _REG methods for GPIO OpRegions. Before this change
+AcpiEvExecuteRegMethods() had special handling to handle "orphan" (no
+matching OpRegion declared) _REG methods for EC nodes. On Intel Cherry
+Trail devices there are 2 possible ACPI OpRegions for accessing GPIOs.
+The standard GeneralPurposeIo OpRegion and the Cherry Trail - specific
+UserDefined 0x9X OpRegions. Having 2 different types of OpRegions leads
+to potential issues with checks for OpRegion availability, or in other
+words checks if _REG has been called for the OpRegion which the ACPI code
+wants to use. Except for the "orphan" EC handling, ACPICA core does not
+call _REG on an ACPI node which does not define an OpRegion matching the
+type being registered; and the reference design DSDT, from which most
+Cherry Trail DSDTs are derived, does not define GeneralPurposeIo, nor
+UserDefined(0x93) OpRegions for the GPO2 (UID 3) device, because no pins
+were assigned ACPI controlled functions in the reference design. Together
+this leads to the perfect storm, at least on the Cherry Trail based
+Medion Akayo E1239T. This design does use a GPO2 pin from its ACPI code
+and has added the Cherry Trail specific UserDefined(0x93) opregion to its
+GPO2 ACPI node to access this pin. But it uses a "has _REG been called"
+availability check for the standard GeneralPurposeIo OpRegion. This
+clearly is a bug in the DSDT, but this does work under Windows. This
+issue leads to the intel vbtn driver reporting the device always being in
+tablet-mode at boot, even if it is in laptop mode. Which in turn causes
+userspace to ignore touchpad events. So in other words, this issue causes
+the touchpad to not work at boot. This change fixes this by extending the
+"orphan" _REG method handling to also apply to GPIO address-space
+handlers.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: Added more info to namespace dump file (-ln option). In a separate
+section of the dump file (after the main namespace dump), emit the full
+pathname for each namespace node, its type, and the ASL filename and line
+number where it is declared.
+
+AcpiHelp: Added an option to display/decode iASL exceptions. Option is: -
+x [Hex Value] where "Hex Value" is the iASL exception code. If Hex Value
+is omitted, all iASL exceptions are displayed.
+
+iASL: Use StringLiteral instead of StringData for some ASL macros. The
+use of the stringData rule allows for some "string" oriented opcodes
+(Such as ToString, ToHexString, etc.) None of which make sense with the
+macros in question. This change modifies the StringData part of the rule
+for these macros to a simple string literal - thus disallowing the use
+of ToString, ToHexString, etc.
+The following ASL operators (macros) are affected:
+EisaId
+Fprintf
+Printf
+ToUuid
+Unicode
+Note: The MS compiler requires the use of string literals for these
+operators also.
+
+iASL: Added a remark for an unknown UUID: ASL_MSG_UUID_NOT_FOUND. Search
+the list of "known" UUIDs for the input to the ToUUID macro.
+
+Added 5 new UUIDs to the known UUID table. All related to NVDIMM and the
+NFIT table.
+
+
+----------------------------------------
+
+25 September 2020. Summary of changes for version 20200925:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Preserve memory opregion mappings. The ACPICA's strategy with respect to
+the handling of memory mappings associated with memory operation regions
+is to avoid mapping the entire region at once which may be problematic at
+least in principle (for example, it may lead to conflicts with
+overlapping mappings having different attributes created by drivers). It
+may also be wasteful, because memory opregions on some systems take up
+vastchunks of address space while the fields in those regions actually
+accessed by AML are sparsely distributed.
+
+For this reason, a one-page "window" is mapped for a given opregion on
+the first memory access through it and if that "window" does not cover an
+address range accessed through that opregion subsequently, it is unmapped
+and a new "window" is mapped to replace it. Next, if the new "window" is
+not sufficient to access memory through the opregion in question in the
+future, it will be replaced with yet another "window" and so on. That
+may lead to a suboptimal sequence of memory mapping and unmapping
+operations, for example if two fields in one opregion separated from each
+other by a sufficiently wide chunk of unused address space are accessed
+in an alternating pattern.
+
+Added support for 64 bit risc-v compilation. Useful for acpica tools and
+incorporating ACPICA into the Firmware Test Suite. Colin Ian King
+<[email protected]>.
+
+Added support for SMBus predefined names (from SMBus Control Method
+Interface Specification, Version 1.0, December 10, 1999. New predefined
+names:
+ _SBA
+ _SBI
+ _SBR
+ _SBT
+ _SBW
+
+AML Disassembler: Added a new command, "All <NameSeg>". This command will
+evaluate all objects in the current namespace whose NameString contains
+the input NameSeg as the last element of the NameString. Useful for
+debugging.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: fixed a crash that occurred when predefined objects return packages
+with lengths that exceed the initializer list.
+
+iASL: added more detail to external resolution error message when
+compiling multiple definition blocks.
+
+iASL: added a remark for an attempt to create a nameseg or namestring
+containing lower-case letters. This should prevent declaring multiple
+namesegs or namestrings in an attempt to refer to different objects (with
+different cases), but actually refer to the same object(s).
+
+iASL: improve alias analysis by saving object type. If the alias is a
+method type, the parameter count is also recorded.
+
+AcpiExec: Increase the default loop timeout value. Was 1 second, is now
+10 seconds. Prevents unnecessary timeouts when executing control methods
+from the command line.
+
+AcpiHelp/disassembler: Added a bunch of "known" UUIDs to the internal
+list. Includes:
+ Memory Device
+ Generic Buttons Device
+ NVDIMM Root Device
+ Control Method Battery
+ Device Graphs for _DSD method
+ Hierarchical Data Extension
+....ARM CoreSight Graph
+
+----------------------------------------
+
+
+17 July 2020. Summary of changes for version 20200717:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Do not increment OperationRegion reference counts for field units. Recent
+server firmware has revealed that this reference count can overflow on
+large servers that declare many field units (thousands) under the same
+OperationRegion. This occurs because each field unit declaration will add
+a reference count to the source OperationRegion. This release solves the
+reference count overflow for OperationRegion objects by preventing
+fieldUnits from incrementing their parent OperationRegion's reference
+count.
+
+Replaced one-element arrays with flexible-arrays, which were introduced
+in C99.
+
+Restored the readme file containing the directions for generation of
+ACPICA from source on MSVC 2017. Updated the file for MSVC 2017. File is
+located at: generate/msvc2017/readme.txt
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: Fixed a regression found in version 20200214. Prevent iASL from
+emitting an extra byte of garbage data when control methods declared a
+single parameter type without using braces. This extra byte is known to
+cause a blue screen on the Windows AML interpreter.
+
+iASL: Made a change to allow external declarations to specify the type of
+a named object even when some name segments are not defined.
+This change allows the following ASL code to compile (When DEV0 is not
+defined or not defined yet):
+
+ External (\_SB.DEV0.OBJ1, IntObj)
+ External (\_SB.DEV0, DeviceObj)
+
+iASL: Fixed a problem where method names in "Alias ()" statement could be
+misinterpreted. They are now interpreted correctly as method invocations.
+
+iASL: capture a method parameter count (Within the Method info segment,
+as well as the argument node) when using parameter type lists.
+
+----------------------------------------
+
+
+28 May 2020. Summary of changes for version 20200528:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Removed old/obsolete Visual Studio files which were used to build the
+Windows versions of the ACPICA tools. Since we have moved to Visual
+Studio 2017, we are no longer supporting Visual Studio 2006 and 2009
+project files. The new subdirectory and solution file are located at:
+
+ acpica/generate/msvc2017/AcpiComponents.sln
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: added support for a new OperationRegion Address Space (subtype):
+PlatformRtMechanism. Support for this new keyword is being released for
+early prototyping. It will appear in the next release of the ACPI
+specification.
+
+iASL: do not optimize the NameString parameter of the CondRefOf operator.
+In the previous iASL compiler release, the NameString parameter of the
+CondRefOf was optimized. There is evidence that some implementations of
+the AML interpreter do not perform the recursive search-to-parent search
+during the execution of the CondRefOf operator. Therefore, the CondRefOf
+operator behaves differently when the NameString parameter is a single
+name segment (a NameSeg) as opposed to a full NamePath (starting at the
+root scope) or a NameString containing parent prefixes.
+
+iASL: Prevent an inadvertent remark message. This change prevents a
+remark if within a control method the following exist:
+1) An Operation Region is defined, and
+2) A Field operator is defined that refers to the region.
+This happens because at the top level, the Field operator does not
+actually create a new named object, it simply references the operation
+region.
+
+Removed support for the acpinames utility. The acpinames was a simple
+utility used to populate and display the ACPI namespace without executing
+any AML code. However, ACPICA now supports executable opcodes outside of
+control methods. This means that executable AML opcodes such as If and
+Store opcodes need to be executed during table load. Therefore, acpinames
+would need to be updated to match the same behavior as the acpiexec
+utility and since acpiexec can already dump the entire namespace (via the
+'namespace' command), we no longer have the need to maintain acpinames.
+
+ In order to dump the contents of the ACPI namespace using acpiexec,
+execute the following command from the command line:
+
+ acpiexec -b "n" [aml files]
+
+----------------------------------------
+
+
+30 April 2020. Summary of changes for version 20200430:
+
+1) ACPICA kernel-resident subsystem:
+
+Cleaned up the coding style of a couple of global variables
+(AcpiGbl_NextCmdNum and AcpiProtocolLengths) caught by static analyzers.
+AcpiProtocolLengths was made static, and the definition of
+AcpiGbl_NextCmdNum was moved to acglobal.h.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL DataTable Compiler: Fixed a segfault on errors that aren't directly
+associated with a field.
+
+Disassembler: has been made more resilient so that it will continue to
+parse AML even if the AML generates ACPI namespace errors. This enables
+iASL to disassemble some AML that may have been compiled using older
+versions of iASL that no longer compile with newer versions of iASL.
+
+iASL: Fixed the required parameters for _NIH and _NIG. Previously, there
+was a mixup where _NIG required one parameter and _NIH required zero
+parameters. This change swaps these parameter requirements. Now it is
+required that _NIH must be called with one parameter and _NIG requires
+zero parameters.
+
+iASL: Allow use of undefined externals as long as they are protected by
+an if (CondRefOf (...)) block when compiling multiple definition blocks.
+
+iASL: Fixed the type override behavior of named objects that are declared
+as External. External declarations will no longer override the type of
+the actual definition if it already exists.
+
+AcpiNames: Added setargv.obj to the MSVC 2017 link sequence to enable
+command line wildcard support on Windows. Note: the AcpiNames utility is
+essentially redundant with the AcpiExec utility (using the "namespace"
+command) and is therefore deprecated. It will be removed in future
+releases of ACPICA.
+
+Disassembler: ignore AE_ALREADY_EXISTS status when parsing create*
+operators. The disassembler is intended to emit existing ASL code as-is.
+Therefore, error messages emitted during disassembly should be ignored or
+handled in a way such that the disassembler can continue to parse the
+AML. This change ignores AE_ALREADY_EXISTS errors during the deferred Op
+parsing for create operators in order to complete parsing ASL termlists.
+
+iASL DataTable Compiler: IVRS table: fix potentially uninitialized
+variable warning. Some compilers catch potential uninitialized variables.
+This is done by examining branches of if/else statements. This change
+replaces an "else if" with an "else" to fix the uninitialized variable
+warning.
+
+
+----------------------------------------
+26 March 2020. Summary of changes for version 20200326:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Performed a code clean-up to prevent build errors on early versions of
+GCC-10.
+
+Added the NHLT table signature. iASL data table compiler/disassembler
+support for this table is coming soon.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+AcpiExec: Fixed several problems with the namespace initialization file
+(-fi<filename> option). Includes fixes to prevent AE_ALREADY_EXISTS
+errors, several seg faults, and enhancements to line parsing within the
+init file. In addition, each object found in the init file and it's new
+value is displayed, as well as any such entries that do not have a
+corresponding name in the namespace. For reference, the syntax for the
+various supported data types are presented below:
+ PCHG 0x777788889999BBBB // Integer
+ \DEV1.STR1 "XYZ" // String
+ BUF1 (88 99 AA) // Buffer
+ PKG1 [0x1111 0x2222] // Package
+ \BF1 0x7980 // BufferField
+ RCRV 0x0123456789ABCDEF // Field Unit
+
+iASL: Added a custom iASL macro __EXPECT__(iASL-Error-Code). This macro
+can be used anywhere in a given ASL file to configure iASL to expect an
+iASL compiler error code on the line where this macro was placed. If the
+error code does not exist, an error is generated. This is intended to be
+used for ACPICA's ASL test suite, but can be used by ASL developers as
+well.
+
+iASL: table compiler: Implemented IVRS IVHD type 11h parsing. The AMD
+IVRS table parsing supported only IVHD type 10h structures. Parsing an
+IVHD type 11h caused the iasl to report unknown subtable type. Add
+necessary structure definition for IVHD type 11h and apply correct
+parsing method based on subtable type. Micha? ?ygowski.
+
+iASL: table compiler: Fixed IVRS table IVHD type 10h reserved field name
+According to AMD IOMMU Specification Revision 3.05 the reserved field
+should be IOMMU Feature Reporting. Change the name of the field to the
+correct one. Micha? ?ygowski.
+
+acpiexec: removed redeclaration of AcpiGbl_DbOpt_NoRegionSupport. Patch
+based on suggestions by David Seifert and Benjamin Berg.
+
+iASL: table compiler: removed an unused variable (DtCompilerParserResult)
+causing linking errors. Patch based on suggestions by David Seifert and
+Benjamin Berg.
+
+iASL: table compiler: make LexBuffer static to avoid linking errors in
+newer compilers. Patch based on suggestions by David Seifert and Benjamin
+Berg.
+
+iASL: fixed type matching between External and Named objects. External
+object types can only be expressed with ACPI object type values that are
+defined in the ACPI spec. However, iASL uses ACPI object type values that
+are local to ACPICA in addition to the values defined in the ACPI spec.
+This change implements type matching to map some object type values
+specific to ACPICA to ones that are defined in the ACPI spec.
+
+iASL: Dropped the type mismatch compiler error that can arise from
+External declarations to a warning. This warning can occur when there is
+a type difference between the external declaration and the actual object
+declaration (when compiling multiple files/modules simultaneously).
+
+iASL: removed an incorrect error message regarding externals. This change
+removes an incorrect error that is emitted when a duplicate external
+declaration does not contain a type that opens a scope. This is incorrect
+because the duplicate external with conflicting types are already caught
+by iASL and it doesn't make any sense to enforce what this conflicting
+type should be.
+
+AcpiXtract: fix AX_IS_TABLE_BLOCK_HEADER macro. This macro needs to be
+surrounded by parens. Otherwise, a logical statement that applies a
+logical not operator to this macro could result in a computation that
+applies the operator to the left side of the logical and but not the
+right. Reported-by: John Levon <[email protected]>
+
+Fixed a problem with the local version of sprint(): On 32-bit, the
+provided sprintf() is non-functional: with a size of ACPI_UINT32_MAX,
+String + Size will wrap, meaning End < Start, and
+AcpiUtBoundStringOutput() will never output anything as a result. The
+symptom seen of this was acpixtract failing to output anything -- with a
+custom build that included utprint.c. Signed-off-by: John Levon
+<[email protected]>
+
+iASL: Changed the "PlatformCommChannel" ASL keyword to "PCC", as per the
+ACPI specification.
+
+
+----------------------------------------
+14 February 2020. Summary of changes for version 20200214:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Enable sleep button on ACPI legacy wake: Hibernation (S4) is triggered
+in a guest when it receives a sleep trigger from the hypervisor. When the
+guest resumes from this power state, it does not see the SleepEnabled
+bit. In other words, the sleepHibernation (S4) is triggered in a guest
+when it receives a sleep trigger from the hypervisor. When the guest
+resumes from this power state, it does not see the SleepEnabled bit. In
+other words, the sleep button is not enabled on waking from an S4 state.
+This causes subsequent invocation of sleep state to fail since the
+guest.button is not enabled on waking from an S4 state. This causes
+subsequent invocation of sleep state to fail in the guest. Fix this
+problem by enabling the sleep button in ACPI legacy wake. From Anchal
+Agarwal <[email protected]>.
+
+Implemented a new external interface, AcpiAnyGpeStatusSet (). To be used
+for checking the status bits of all enabled GPEs in one go. It is needed
+to distinguish spurious SCIs from genuine ones when deciding whether or
+not to wake up the system from suspend-to-idle.
+
+Generic Makefiles: replace HOST name with ACPI_HOST: Some machines may be
+using HOST in their environment to represent the host name for their
+machines. Avoid this problem by renaming this variable from HOST to
+ACPI_HOST.
+
+MSVC 2017 project files: Enable multiprocessor generation to improve
+build performance.
+
+Added a macro to get the byte width of a Generic Address structure. New
+ACPI_ACCESS_BYTE_WIDTH is in addition to the existing
+ACPI_ACCESS_BIT_WIDTH. From Mika Westerberg.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: Implemented full support for the (optional, rarely used) ReturnType
+and ParameterTypesList for the Method, Function, and External operators.
+For Method declarations, the number of individual ParameterTypes must
+match the declaration of the number of arguments (NumArgs). This also
+Fixes a problem with the External operator where extra/extraneous bytes
+were emitted in the AML code if the optional ReturnType/ParameterTypes
+were specified for a MethodObj declaration.
+New error message:
+1) Method NumArgs count does not match length of ParameterTypes list
+
+iASL: Implemented detection of type mismatches between External
+declarations and named object declarations. Also, detect type mismatches
+between multiple External declarations of the same Name.
+New error messages:
+1) Type mismatch between external declaration and actual object
+declaration detected
+2) Type mismatch between multiple external declarations detected
+
+iASL: Implemented new error messages for External operators that specify
+a ReturnType and/or ParameterTypesList for any object type other than
+control methods (MethodObj).
+New error messages:
+1) Return type is only allowed for Externals declared as MethodObj
+2) Parameter type is only allowed for Externals declared as MethodObj
+
+iASL: Implemented two new remark/warning messages for ASL code that
+creates named objects from within a control method. This is very
+inefficient since the named object must be created and deleted each time
+the method is executed.
+New messages:
+1) Creation of named objects within a method is highly inefficient, use
+globals or method local variables instead (remark)
+2) Static OperationRegion should be declared outside control method
+(warning)
+
+iASL: Improved illegal forward reference detection by adding support to
+detect forward-reference method invocations.
+
+iASL: Detect and issue an error message for NameStrings that contain too
+many individual NameSegs (>255). This is an AML limitation that is
+defined in the ACPI specification.
+New message:
+1) NameString contains too many NameSegs (>255)
+
+acpidump: windows: use GetSystemFirmwareTable API for all tables except
+SSDT. By using this API, acpidump is able to get all tables in the XSDT
+
+iASL: Removed unused parser file and updated msvc2017 project files.
+Removed the obsolete AslCompiler.y from the repository.
+
+iASL: msvc2017: Fixed macros in the file dependency list to prevent
+unnecessary rebuilds. Replace %(Directory) with %(RelativeDir).
+
+Disassembler: Prevent spilling error messages to the output file. All
+errors are directed to the console instead. These error messages
+prevented re-compilation of the resulting disassembled ASL output file
+(.DSL).
+
+
+----------------------------------------
10 January 2020. Summary of changes for version 20200110:
@@ -481,7 +1354,7 @@
iASL: Emit error for creation of a zero-length operation region. Such a
region is rather pointless. If encountered, a runtime error is also
-implemented in the interpeter.
+implemented in the interpreter.
Debugger: Fix a possible fault with the "test objects" command.
@@ -3278,7 +4151,7 @@
Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix GPE storm issues.
A raw gpe handling mechanism was created to allow better handling of GPE
storms that aren't easily managed by the normal handler. The raw handler
-allows disabling/renabling of the the GPE so that interrupt storms can be
+allows disabling/renabling of the GPE so that interrupt storms can be
avoided in cases where events cannot be timely serviced. In this
scenario, handlers should use the AcpiSetGpe() API to disable/enable the
GPE. This API will leave the reference counts undisturbed, thereby
@@ -8845,8 +9718,8 @@
Fix build error under Bison-2.4.
-Dissasembler: Enhanced FADT support. Added decoding of the Boot
-Architecture
+Disassembler: Enhanced FADT support. Added decoding of the Boot
+Architecture
flags. Now decode all flags, regardless of the FADT version. Flag output
includes the FADT version which first defined each flag.
@@ -17256,7 +18129,7 @@
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
+the 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
diff --git a/source/common/acfileio.c b/source/common/acfileio.c
index 6d2593f..ed2eb25 100644
--- a/source/common/acfileio.c
+++ b/source/common/acfileio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -275,16 +279,36 @@
ACPI_TABLE_HEADER TableHeader;
ACPI_TABLE_HEADER *Table;
INT32 Count;
- long TableOffset;
-
+ UINT32 TableLength;
+ UINT32 HeaderLength;
+ long TableOffset = 0;
*ReturnTable = NULL;
/* Get the table header to examine signature and length */
+ /*
+ * Special handling for the CDAT table (both the Length field
+ * and the Checksum field are not in the standard positions).
+ * (The table header is non-standard).
+ */
+ if (AcpiGbl_CDAT)
+ {
+ HeaderLength = sizeof (ACPI_TABLE_CDAT);
+ }
+ else
+ {
+ HeaderLength = sizeof (ACPI_TABLE_HEADER);
+ }
+
+ Status = AcValidateTableHeader (File, TableOffset);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
TableOffset = ftell (File);
- Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File);
- if (Count != sizeof (ACPI_TABLE_HEADER))
+ Count = fread (&TableHeader, 1, HeaderLength, File);
+ if (Count != (INT32) HeaderLength)
{
return (AE_CTRL_TERMINATE);
}
@@ -293,12 +317,6 @@
{
/* Validate the table signature/header (limited ASCII chars) */
- Status = AcValidateTableHeader (File, TableOffset);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
/*
* Table must be an AML table (DSDT/SSDT).
* Used for iASL -e option only.
@@ -313,9 +331,22 @@
}
}
+ /*
+ * Special handling for the CDAT table (both the Length field
+ * and the Checksum field are not in the standard positions).
+ */
+ if (AcpiGbl_CDAT)
+ {
+ TableLength = ACPI_CAST_PTR (ACPI_TABLE_CDAT, &TableHeader)->Length;
+ }
+ else
+ {
+ TableLength = TableHeader.Length;
+ }
+
/* Allocate a buffer for the entire table */
- Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length);
+ Table = AcpiOsAllocate ((ACPI_SIZE) TableLength);
if (!Table)
{
return (AE_NO_MEMORY);
@@ -324,22 +355,31 @@
/* Read the entire ACPI table, including header */
fseek (File, TableOffset, SEEK_SET);
-
- Count = fread (Table, 1, TableHeader.Length, File);
+ Count = fread (Table, 1, TableLength, File);
/*
* Checks for data table headers happen later in the execution. Only verify
* for Aml tables at this point in the code.
*/
- if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length)
+ if (GetOnlyAmlTables && Count != (INT32) TableLength)
{
Status = AE_ERROR;
goto ErrorExit;
}
- /* Validate the checksum (just issue a warning) */
+ /*
+ * Validate the checksum (just issue a warning if incorrect).
+ * Note: CDAT is special cased here because the table does
+ * not have the checksum field in the standard position.
+ */
+ if (AcpiGbl_CDAT)
+ {
+ Status = AcpiUtVerifyCdatChecksum ((ACPI_TABLE_CDAT *) Table, TableLength);
+ } else
+ {
+ Status = AcpiUtVerifyChecksum (Table, TableLength);
+ }
- Status = AcpiTbVerifyChecksum (Table, TableHeader.Length);
if (ACPI_FAILURE (Status))
{
Status = AcCheckTextModeCorruption (Table);
@@ -428,6 +468,8 @@
long TableOffset)
{
ACPI_TABLE_HEADER TableHeader;
+ ACPI_TABLE_CDAT *CdatTableHeader = ACPI_CAST_PTR (ACPI_TABLE_CDAT, &TableHeader);
+ UINT32 HeaderLength;
ACPI_SIZE Actual;
long OriginalOffset;
UINT32 FileSize;
@@ -436,41 +478,94 @@
ACPI_FUNCTION_TRACE (AcValidateTableHeader);
+ /* Determine the type of table header */
+
+ if (AcpiGbl_CDAT)
+ {
+ HeaderLength = sizeof (ACPI_TABLE_CDAT);
+ }
+ else
+ {
+ HeaderLength = sizeof (ACPI_TABLE_HEADER);
+ }
/* Read a potential table header */
OriginalOffset = ftell (File);
- fseek (File, TableOffset, SEEK_SET);
-
- Actual = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File);
- fseek (File, OriginalOffset, SEEK_SET);
-
- if (Actual < sizeof (ACPI_TABLE_HEADER))
+ if (fseek (File, TableOffset, SEEK_SET))
{
+ fprintf (stderr, "SEEK error\n");
+ }
+ Actual = fread (&TableHeader, 1, HeaderLength, File);
+ if (fseek (File, OriginalOffset, SEEK_SET))
+ {
+ fprintf (stderr, "SEEK error\n");
+ }
+
+ if (Actual < HeaderLength)
+ {
+ fprintf (stderr,
+ "Could not read entire table header: Actual %u, Requested %u\n",
+ (UINT32) Actual, HeaderLength);
return (AE_ERROR);
}
/* Validate the signature (limited ASCII chars) */
- if (!AcpiUtValidNameseg (TableHeader.Signature))
+ if (!AcpiGbl_CDAT && !AcpiUtValidNameseg (TableHeader.Signature))
{
+ /*
+ * The "-ds cdat" option was not used, and the signature is not valid.
+ *
+ * For CDAT we are assuming that there should be at least one non-ASCII
+ * byte in the (normally) 4-character Signature field (at least the
+ * high-order byte should be zero). Otherwise, this is OK.
+ */
+ fprintf (stderr,
+ "\nTable appears to be a CDAT table, which has no signature.\n"
+ "If this is in fact a CDAT table, use the -ds option on the\n"
+ "command line to specify the table type (signature):\n"
+ "\"iasl -d -ds CDAT <file>\" or \"iasl -ds CDAT -T CDAT\"\n\n");
+
return (AE_BAD_SIGNATURE);
}
/* Validate table length against bytes remaining in the file */
FileSize = CmGetFileSize (File);
- if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
+ if (!AcpiGbl_CDAT)
{
- fprintf (stderr, "Table [%4.4s] is too long for file - "
+ /* Standard ACPI table header */
+
+ if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
+ {
+ fprintf (stderr, "Table [%4.4s] is too long for file - "
+ "needs: 0x%.2X, remaining in file: 0x%.2X\n",
+ TableHeader.Signature, TableHeader.Length,
+ (UINT32) (FileSize - TableOffset));
+ return (AE_BAD_HEADER);
+ }
+ }
+ else if (CdatTableHeader->Length > (UINT32) (FileSize - TableOffset))
+ {
+ /* Special header for CDAT table */
+
+ fprintf (stderr, "Table [CDAT] is too long for file - "
"needs: 0x%.2X, remaining in file: 0x%.2X\n",
- TableHeader.Signature, TableHeader.Length,
+ CdatTableHeader->Length,
(UINT32) (FileSize - TableOffset));
return (AE_BAD_HEADER);
}
+ /* For CDAT table, there are no ASCII fields in the header, we are done */
+
+ if (AcpiGbl_CDAT)
+ {
+ return (AE_OK);
+ }
+
/*
- * These fields must be ASCII: OemId, OemTableId, AslCompilerId.
+ * These standard fields must be ASCII: OemId, OemTableId, AslCompilerId.
* We allow a NULL terminator in OemId and OemTableId.
*/
for (i = 0; i < ACPI_NAMESEG_SIZE; i++)
diff --git a/source/common/acgetline.c b/source/common/acgetline.c
index bd81c69..2759857 100644
--- a/source/common/acgetline.c
+++ b/source/common/acgetline.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -77,8 +81,6 @@
#define _ASCII_LEFT_ARROW 'D'
#define _ASCII_NEWLINE '\n'
-extern UINT32 AcpiGbl_NextCmdNum;
-
/* Erase a single character on the input command line */
#define ACPI_CLEAR_CHAR() \
diff --git a/source/common/adfile.c b/source/common/adfile.c
index 7859a7a..c2954c2 100644
--- a/source/common/adfile.c
+++ b/source/common/adfile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/common/adisasm.c b/source/common/adisasm.c
index 3c4db74..a899bcf 100644
--- a/source/common/adisasm.c
+++ b/source/common/adisasm.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -44,6 +48,7 @@
#include "acnamesp.h"
#include "acparser.h"
#include "acapps.h"
+#include "acconvert.h"
#define _COMPONENT ACPI_TOOLS
@@ -267,8 +272,6 @@
Status = AE_ERROR;
goto Cleanup;
}
-
- AcpiOsRedirectOutput (File);
}
*OutFilename = DisasmFilename;
@@ -355,18 +358,23 @@
if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table))
{
+ if (File)
+ {
+ AcpiOsRedirectOutput (File);
+ }
+
AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE);
/* This is a "Data Table" (non-AML table) */
AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
- Table->Signature);
+ AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature);
AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] "
- "FieldName : FieldValue\n */\n\n");
+ "FieldName : FieldValue (in hex)\n */\n\n");
AcpiDmDumpDataTable (Table);
fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n",
- Table->Signature);
+ AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature);
if (File)
{
@@ -377,6 +385,10 @@
return (AE_OK);
}
+ /* Initialize the converter output file */
+
+ ASL_CV_INIT_FILETREE(Table, File);
+
/*
* This is an AML table (DSDT or SSDT).
* Always parse the tables, only option is what to display
@@ -389,6 +401,13 @@
return (Status);
}
+ /* Redirect output for code generation and debugging output */
+
+ if (File)
+ {
+ AcpiOsRedirectOutput (File);
+ }
+
/* Debug output, namespace and parse tree */
if (AslCompilerdebug && File)
diff --git a/source/common/adwalk.c b/source/common/adwalk.c
index d7140f8..2ec811a 100644
--- a/source/common/adwalk.c
+++ b/source/common/adwalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/common/ahids.c b/source/common/ahids.c
index 0e8d90c..8d61c52 100644
--- a/source/common/ahids.c
+++ b/source/common/ahids.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -76,6 +80,8 @@
{"ACPI0012", "NVDIMM Root Device"},
{"ACPI0013", "Generic Event Device"},
{"ACPI0014", "Wireless Power Calibration Device"},
+ {"ACPI0015", "USB4 host interface device"},
+ {"ACPI0016", "Compute Express Link Host Bridge"},
{"ADMA0F28", "Intel Audio DMA"},
{"AMCR0F28", "Intel Audio Machine Driver"},
{"ATK4001", "Asus Radio Control Button"},
diff --git a/source/common/ahpredef.c b/source/common/ahpredef.c
index d4b4006..76d28d2 100644
--- a/source/common/ahpredef.c
+++ b/source/common/ahpredef.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -88,12 +92,16 @@
AH_PREDEF ("_BMC", "Battery Maintenance Control", "Sets battery maintenance and control features"),
AH_PREDEF ("_BMD", "Battery Maintenance Data", "Returns battery maintenance, control, and state data"),
AH_PREDEF ("_BMS", "Battery Measurement Sampling Time", "Sets the battery measurement sampling time"),
+ AH_PREDEF ("_BPC", "Battery Power Characteristics", "Returns static values used to configure power threshold support in the platform firmware"),
+ AH_PREDEF ("_BPS", "Battery Power State", "Returns the power delivery capabilities of the battery at the present time"),
+ AH_PREDEF ("_BPT", "Battery Power Threshold", "Set a relative battery peak power capability change threshold"),
AH_PREDEF ("_BQC", "Brightness Query Current", "Returns the current display brightness level"),
AH_PREDEF ("_BST", "Battery Status", "Returns a Control Method Battery status block"),
AH_PREDEF ("_BTH", "Battery Throttle Limit", "Thermal limit for charging and discharging"),
AH_PREDEF ("_BTM", "Battery Time", "Returns the battery runtime"),
AH_PREDEF ("_BTP", "Battery Trip Point", "Sets a Control Method Battery trip point"),
AH_PREDEF ("_CBA", "Configuration Base Address", "Sets the base address for a PCI Express host bridge"),
+ AH_PREDEF ("_CBR", "CXL Host Bridge Register Info", "Get the memory location of CXL Host Bridge Registers"),
AH_PREDEF ("_CCA", "Cache Coherency Attribute", "Returns a device's support level for cache coherency"),
AH_PREDEF ("_CDM", "Clock Domain", "Returns a logical processor's clock domain identifier"),
AH_PREDEF ("_CID", "Compatible ID", "Returns a device's Plug and Play Compatible ID list"),
@@ -281,6 +289,11 @@
AH_PREDEF ("_S3W", "S3 Device Wake State", "Returns the lowest D-state for this device that can wake the system from S3"),
AH_PREDEF ("_S4W", "S4 Device Wake State", "Returns the lowest D-state for this device that can wake the system from S4"),
AH_PREDEF ("_SB_", "System Bus", "Predefined scope for device and bus objects"),
+ AH_PREDEF ("_SBA", "SM Bus Alert information", "Returns info on an SMBus alert"),
+ AH_PREDEF ("_SBI", "SM Bus General information", "Returns info on an SMBus segment"),
+ AH_PREDEF ("_SBR", "SM Bus Data read", "Reads Byte, Word, or Block data from an SMBus segment"),
+ AH_PREDEF ("_SBT", "SM Bus Data transfer", "Performs data transfer to/from an SMBus segment. Implements ProcessCall protocol"),
+ AH_PREDEF ("_SBW", "SM Bus Data write", "Writes Byte, Word, or Block data to an SMBus segment"),
AH_PREDEF ("_SBS", "Smart Battery Subsystem", "Returns the subsystem configuration"),
AH_PREDEF ("_SCP", "Set Cooling Policy", "Sets the cooling policy (active or passive)"),
AH_PREDEF ("_SDD", "Set Device Data", "Sets data for a SATA device"),
diff --git a/source/common/ahtable.c b/source/common/ahtable.c
index 71f61b2..5667f78 100644
--- a/source/common/ahtable.c
+++ b/source/common/ahtable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -87,19 +91,25 @@
*/
const AH_TABLE AcpiGbl_SupportedTables[] =
{
- {ACPI_SIG_ASF, "Alert Standard Format table"},
+ {ACPI_SIG_AEST, "Arm Error Source Table"},
+ {ACPI_SIG_AGDI, "Arm Generic Diagnostic Dump and Reset Device Interface Table"},
+ {ACPI_SIG_ASF, "Alert Standard Format Table"},
+ {ACPI_SIG_BDAT, "BIOS Data ACPI Table"},
{ACPI_SIG_BERT, "Boot Error Record Table"},
{ACPI_SIG_BGRT, "Boot Graphics Resource Table"},
{ACPI_SIG_BOOT, "Simple Boot Flag Table"},
- {ACPI_SIG_CPEP, "Corrected Platform Error Polling table"},
+ {ACPI_SIG_CCEL, "CC-Event Log Table"},
+ {ACPI_SIG_CDAT, "Coherent Device Attribute Table"},
+ {ACPI_SIG_CEDT, "CXL Early Discovery Table"},
+ {ACPI_SIG_CPEP, "Corrected Platform Error Polling Table"},
{ACPI_SIG_CSRT, "Core System Resource Table"},
- {ACPI_SIG_DBG2, "Debug Port table type 2"},
- {ACPI_SIG_DBGP, "Debug Port table"},
- {ACPI_SIG_DMAR, "DMA Remapping table"},
- {ACPI_SIG_DRTM, "Dynamic Root of Trust for Measurement table"},
+ {ACPI_SIG_DBG2, "Debug Port Table type 2"},
+ {ACPI_SIG_DBGP, "Debug Port Table"},
+ {ACPI_SIG_DMAR, "DMA Remapping Table"},
+ {ACPI_SIG_DRTM, "Dynamic Root of Trust for Measurement Table"},
{ACPI_SIG_DSDT, "Differentiated System Description Table (AML table)"},
{ACPI_SIG_ECDT, "Embedded Controller Boot Resources Table"},
- {ACPI_SIG_EINJ, "Error Injection table"},
+ {ACPI_SIG_EINJ, "Error Injection Table"},
{ACPI_SIG_ERST, "Error Record Serialization Table"},
{ACPI_SIG_FACS, "Firmware ACPI Control Structure"},
{ACPI_SIG_FADT, "Fixed ACPI Description Table (FADT)"},
@@ -107,47 +117,52 @@
{ACPI_SIG_GTDT, "Generic Timer Description Table"},
{ACPI_SIG_HEST, "Hardware Error Source Table"},
{ACPI_SIG_HMAT, "Heterogeneous Memory Attributes Table"},
- {ACPI_SIG_HPET, "High Precision Event Timer table"},
+ {ACPI_SIG_HPET, "High Precision Event Timer Table"},
{ACPI_SIG_IORT, "IO Remapping Table"},
{ACPI_SIG_IVRS, "I/O Virtualization Reporting Structure"},
{ACPI_SIG_LPIT, "Low Power Idle Table"},
{ACPI_SIG_MADT, "Multiple APIC Description Table (MADT)"},
- {ACPI_SIG_MCFG, "Memory Mapped Configuration table"},
- {ACPI_SIG_MCHI, "Management Controller Host Interface table"},
+ {ACPI_SIG_MCFG, "Memory Mapped Configuration Table"},
+ {ACPI_SIG_MCHI, "Management Controller Host Interface Table"},
{ACPI_SIG_MPST, "Memory Power State Table"},
{ACPI_SIG_MSCT, "Maximum System Characteristics Table"},
- {ACPI_SIG_MSDM, "Microsoft Data Management table"},
- {ACPI_SIG_MTMR, "MID Timer Table"},
+ {ACPI_SIG_MSDM, "Microsoft Data Management Table"},
{ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"},
+ {ACPI_SIG_NHLT, "Non HD Audio Link Table"},
{ACPI_SIG_PCCT, "Platform Communications Channel Table"},
{ACPI_SIG_PDTT, "Platform Debug Trigger Table"},
+ {ACPI_SIG_PHAT, "Platform Health Assessment Table"},
{ACPI_SIG_PMTT, "Platform Memory Topology Table"},
{ACPI_SIG_PPTT, "Processor Properties Topology Table"},
+ {ACPI_SIG_PRMT, "Platform Runtime Mechanism Table"},
{ACPI_SIG_RASF, "RAS Features Table"},
+ {ACPI_SIG_RGRT, "Regulatory Graphics Resource Table"},
{ACPI_RSDP_NAME,"Root System Description Pointer"},
{ACPI_SIG_RSDT, "Root System Description Table"},
{ACPI_SIG_S3PT, "S3 Performance Table"},
{ACPI_SIG_SBST, "Smart Battery Specification Table"},
{ACPI_SIG_SDEI, "Software Delegated Exception Interface Table"},
- {ACPI_SIG_SDEV, "Secure Devices table"},
+ {ACPI_SIG_SDEV, "Secure Devices Table"},
{ACPI_SIG_SLIC, "Software Licensing Description Table"},
{ACPI_SIG_SLIT, "System Locality Information Table"},
- {ACPI_SIG_SPCR, "Serial Port Console Redirection table"},
- {ACPI_SIG_SPMI, "Server Platform Management Interface table"},
+ {ACPI_SIG_SPCR, "Serial Port Console Redirection Table"},
+ {ACPI_SIG_SPMI, "Server Platform Management Interface Table"},
{ACPI_SIG_SRAT, "System Resource Affinity Table"},
{ACPI_SIG_SSDT, "Secondary System Description Table (AML table)"},
- {ACPI_SIG_STAO, "Status Override table"},
- {ACPI_SIG_TCPA, "Trusted Computing Platform Alliance table"},
- {ACPI_SIG_TPM2, "Trusted Platform Module hardware interface table"},
+ {ACPI_SIG_STAO, "Status Override Table"},
+ {ACPI_SIG_SVKL, "Storage Volume Key Location Table"},
+ {ACPI_SIG_TCPA, "Trusted Computing Platform Alliance Table"},
+ {ACPI_SIG_TDEL, "TD-Event Log Table"},
+ {ACPI_SIG_TPM2, "Trusted Platform Module hardware interface Table"},
{ACPI_SIG_UEFI, "UEFI Boot Optimization Table"},
- {ACPI_SIG_VRTC, "Virtual Real-Time Clock Table"},
+ {ACPI_SIG_VIOT, "Virtual I/O Translation Table"},
{ACPI_SIG_WAET, "Windows ACPI Emulated Devices Table"},
{ACPI_SIG_WDAT, "Watchdog Action Table"},
{ACPI_SIG_WDDT, "Watchdog Description Table"},
{ACPI_SIG_WDRT, "Watchdog Resource Table"},
{ACPI_SIG_WPBT, "Windows Platform Binary Table"},
- {ACPI_SIG_WSMT, "Windows SMM Security Migrations Table"},
- {ACPI_SIG_XENV, "Xen Environment table"},
+ {ACPI_SIG_WSMT, "Windows SMM Security Mitigations Table"},
+ {ACPI_SIG_XENV, "Xen Environment Table"},
{ACPI_SIG_XSDT, "Extended System Description Table"},
{NULL, NULL}
};
diff --git a/source/common/ahuuids.c b/source/common/ahuuids.c
index 5da1b3a..d1b15ff 100644
--- a/source/common/ahuuids.c
+++ b/source/common/ahuuids.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -59,12 +63,17 @@
{"PCI Host Bridge Device", UUID_PCI_HOST_BRIDGE},
{"HID I2C Device", UUID_I2C_DEVICE},
{"Power Button Device", UUID_POWER_BUTTON},
+ {"Memory Device", UUID_MEMORY_DEVICE},
+ {"Generic Buttons Device", UUID_GENERIC_BUTTONS_DEVICE},
+ {"NVDIMM Root Device", UUID_NVDIMM_ROOT_DEVICE},
+ {"Control Method Battery", UUID_CONTROL_METHOD_BATTERY},
{"[Interfaces]", NULL},
{"Device Labeling Interface", UUID_DEVICE_LABELING},
{"Physical Presence Interface", UUID_PHYSICAL_PRESENCE},
{"[Non-volatile DIMM and NFIT table]", NULL},
+ {"NVDIMM Device", UUID_NFIT_DIMM},
{"Volatile Memory Region", UUID_VOLATILE_MEMORY},
{"Persistent Memory Region", UUID_PERSISTENT_MEMORY},
{"NVDIMM Control Region", UUID_CONTROL_REGION},
@@ -73,6 +82,10 @@
{"Volatile Virtual CD", UUID_VOLATILE_VIRTUAL_CD},
{"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK},
{"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD},
+ {"Microsoft NVDIMM Command set",UUID_NFIT_DIMM_N_MSFT},
+ {"HP NDIMM HPE1", UUID_NFIT_DIMM_N_HPE1},
+ {"HP NDIMM HPE2", UUID_NFIT_DIMM_N_HPE2},
+ {"Virtual NVDIMM", UUID_NFIT_DIMM_N_HYPERV},
{"[Processor Properties]", NULL},
{"Cache Properties", UUID_CACHE_PROPERTIES},
@@ -84,6 +97,12 @@
{"Battery Thermal Limit", UUID_BATTERY_THERMAL_LIMIT},
{"Thermal Extensions", UUID_THERMAL_EXTENSIONS},
{"Device Properties for _DSD", UUID_DEVICE_PROPERTIES},
+ {"Device Graphs for _DSD", UUID_DEVICE_GRAPHS},
+ {"Hierarchical Data Extension", UUID_HIERARCHICAL_DATA_EXTENSION},
+ {"ARM Coresight Graph", UUID_CORESIGHT_GRAPH},
+ {"USB4 Capabilities", UUID_USB4_CAPABILITIES},
+ {"First Function ID for _DSM", UUID_1ST_FUNCTION_ID},
+ {"Second Function ID for _DSM", UUID_2ND_FUNCTION_ID},
{NULL, NULL}
};
diff --git a/source/common/cmfsize.c b/source/common/cmfsize.c
index 2cbbef4..5687b17 100644
--- a/source/common/cmfsize.c
+++ b/source/common/cmfsize.c
@@ -1,11 +1,11 @@
/******************************************************************************
*
- * Module Name: cfsize - Common get file size function
+ * Module Name: cmfsize - Common get file size function
*
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/common/dmextern.c b/source/common/dmextern.c
index c753822..62949f4 100644
--- a/source/common/dmextern.c
+++ b/source/common/dmextern.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/common/dmrestag.c b/source/common/dmrestag.c
index c5dfce2..c37453f 100644
--- a/source/common/dmrestag.c
+++ b/source/common/dmrestag.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -272,6 +276,14 @@
/* Subtype tables for SerialBus descriptors */
+static const ACPI_RESOURCE_TAG AcpiDmCsi2SerialBusTags[] = /* ACPI 6.4 */
+{
+ {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
+ {( 7 * 8) + 0, ACPI_RESTAG_PHYTYPE},
+ {( 7 * 8) + 2, ACPI_RESTAG_LOCALPORT},
+ {0, NULL}
+};
+
static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] =
{
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
@@ -312,6 +324,7 @@
{0, NULL}
};
+
/* Subtype tables for PinFunction descriptor */
static const ACPI_RESOURCE_TAG AcpiDmPinFunctionTags[] =
@@ -427,7 +440,8 @@
NULL, /* 0x00 Reserved */
AcpiDmI2cSerialBusTags, /* 0x01 I2C SerialBus */
AcpiDmSpiSerialBusTags, /* 0x02 SPI SerialBus */
- AcpiDmUartSerialBusTags /* 0x03 UART SerialBus */
+ AcpiDmUartSerialBusTags, /* 0x03 UART SerialBus */
+ AcpiDmCsi2SerialBusTags /* 0x04 CSI2 SerialBus */
};
/*
@@ -875,7 +889,7 @@
case ACPI_RESOURCE_NAME_SERIAL_BUS:
- /* SerialBus has 3 subtypes: I2C, SPI, and UART */
+ /* SerialBus has 4 subtypes: I2C, SPI, UART, and CSI2 */
if ((Resource->CommonSerialBus.Type == 0) ||
(Resource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE))
diff --git a/source/common/dmswitch.c b/source/common/dmswitch.c
index 77eea59..18c421b 100644
--- a/source/common/dmswitch.c
+++ b/source/common/dmswitch.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
index d58d104..b9c94b4 100644
--- a/source/common/dmtable.c
+++ b/source/common/dmtable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -55,13 +59,63 @@
/* Common format strings for commented values */
-#define UINT8_FORMAT "%2.2X [%s]\n"
-#define UINT16_FORMAT "%4.4X [%s]\n"
-#define UINT32_FORMAT "%8.8X [%s]\n"
-#define STRING_FORMAT "[%s]\n"
+#define UINT8_FORMAT "%2.2X [%s]\n"
+#define UINT8_FORMAT_NO_NEWLINE "%2.2X [%s]"
+#define UINT16_FORMAT "%4.4X [%s]\n"
+#define UINT32_FORMAT "%8.8X [%s]\n"
+#define STRING_FORMAT "[%s]\n"
/* These tables map a subtable type to a description string */
+static const char *AcpiDmAestResourceNames[] =
+{
+ "Cache Resource",
+ "TLB Resource",
+ "Generic Resource",
+ "Unknown Resource Type" /* Reserved */
+};
+
+static const char *AcpiDmAestSubnames[] =
+{
+ "Processor Error Node",
+ "Memory Error Node",
+ "SMMU Error Node",
+ "Vendor-defined Error Node",
+ "GIC Error Node",
+ "Unknown Subtable Type" /* Reserved */
+};
+
+static const char *AcpiDmAestCacheNames[] =
+{
+ "Data Cache",
+ "Instruction Cache",
+ "Unified Cache",
+ "Unknown Cache Type" /* Reserved */
+};
+
+static const char *AcpiDmAestGicNames[] =
+{
+ "GIC CPU",
+ "GIC Distributor",
+ "GIC Redistributor",
+ "GIC ITS",
+ "Unknown GIC Interface Type" /* Reserved */
+};
+
+static const char *AcpiDmAestXfaceNames[] =
+{
+ "System Register Interface",
+ "Memory Mapped Interface",
+ "Unknown Interface Type" /* Reserved */
+};
+
+static const char *AcpiDmAestXruptNames[] =
+{
+ "Fault Handling Interrupt",
+ "Error Recovery Interrupt",
+ "Unknown Interrupt Type" /* Reserved */
+};
+
static const char *AcpiDmAsfSubnames[] =
{
"ASF Information",
@@ -72,6 +126,24 @@
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmCdatSubnames[] =
+{
+ "Device Scoped Memory Affinity Structure (DSMAS)",
+ "Device scoped Latency and Bandwidth Information Structure (DSLBIS)",
+ "Device Scoped Memory Side Cache Information Structure (DSMSCIS)",
+ "Device Scoped Initiator Structure (DSIS)",
+ "Device Scoped EFI Memory Type Structure (DSEMTS)",
+ "Switch Scoped Latency and Bandwidth Information Structure (SSLBIS)",
+ "Unknown Subtable Type" /* Reserved */
+};
+
+static const char *AcpiDmCedtSubnames[] =
+{
+ "CXL Host Bridge Structure",
+ "CXL Fixed Memory Window Structure",
+ "Unknown Subtable Type" /* Reserved */
+};
+
static const char *AcpiDmDmarSubnames[] =
{
"Hardware Unit Definition",
@@ -79,6 +151,7 @@
"Root Port ATS Capability",
"Remapping Hardware Static Affinity",
"ACPI Namespace Device Declaration",
+ "SoC Integrated Address Translation Cache",
"Unknown Subtable Type" /* Reserved */
};
@@ -232,7 +305,16 @@
"Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
"Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
"Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
- "Unknown Subtable Type" /* Reserved */
+ "Mutiprocessor Wakeup", /* ACPI_MADT_TYPE_MULTIPROC_WAKEUP */
+ "CPU Core Interrupt Controller", /* ACPI_MADT_TYPE_CORE_PIC */
+ "Legacy I/O Interrupt Controller", /* ACPI_MADT_TYPE_LIO_PIC */
+ "HT Interrupt Controller", /* ACPI_MADT_TYPE_HT_PIC */
+ "Extend I/O Interrupt Controller", /* ACPI_MADT_TYPE_EIO_PIC */
+ "MSI Interrupt Controller", /* ACPI_MADT_TYPE_MSI_PIC */
+ "Bridge I/O Interrupt Controller", /* ACPI_MADT_TYPE_BIO_PIC */
+ "LPC Interrupt Controller", /* ACPI_MADT_TYPE_LPC_PIC */
+ "Unknown Subtable Type", /* Reserved */
+ "Types 80-FF are used for OEM data" /* Reserved for OEM data */
};
static const char *AcpiDmNfitSubnames[] =
@@ -248,6 +330,70 @@
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmNhltLinkTypeNames[] =
+{
+ "Reserved for HD-Audio", /* ACPI_NHLT_RESERVED_HD_AUDIO */
+ "Reserved for DSP", /* ACPI_NHLT_RESERVED_DSP */
+ "Type PDM", /* ACPI_NHLT_PDM */
+ "Type SSP", /* ACPI_NHLT_SSP */
+ "Reserved for SlimBus", /* ACPI_NHLT_RESERVED_SLIMBUS */
+ "Reserved for SoundWire", /* ACPI_NHLT_RESERVED_SOUNDWIRE */
+ "Unknown Link Type" /* Reserved */
+};
+
+static const char *AcpiDmNhltDirectionNames[] =
+{
+ "Render", /* ACPI_NHLT_DIR_RENDER */
+ "Capture", /* ACPI_NHLT_DIR_CAPTURE */
+ "Render with Loopback", /* ACPI_NHLT_DIR_RENDER_LOOPBACK */
+ "Feedback for Render", /* ACPI_NHLT_DIR_RENDER_FEEDBACK */
+ "Unknown Direction" /* Reserved */
+};
+
+static const char *AcpiDmNhltMicTypeNames[] =
+{
+ "Omnidirectional", /* ACPI_NHLT_MIC_OMNIDIRECTIONAL */
+ "Subcardioid", /* ACPI_NHLT_MIC_SUBCARDIOID */
+ "Cardioid", /* ACPI_NHLT_MIC_CARDIOID */
+ "SuperCardioid", /* ACPI_NHLT_MIC_SUPER_CARDIOID */
+ "HyperCardioid", /* ACPI_NHLT_MIC_HYPER_CARDIOID */
+ "8 Shaped", /* ACPI_NHLT_MIC_8_SHAPED */
+ "Reserved Mic Type", /* Reserved */
+ "Vendor Defined", /* ACPI_NHLT_MIC_VENDOR_DEFINED */
+ "Unknown Mic Type" /* ACPI_NHLT_MIC_RESERVED */
+};
+
+static const char *AcpiDmNhltMicPositionNames[] =
+{
+ "Top", /* ACPI_NHLT_MIC_POSITION_TOP */
+ "Bottom", /* ACPI_NHLT_MIC_POSITION_BOTTOM */
+ "Left", /* ACPI_NHLT_MIC_POSITION_LEFT */
+ "Right", /* ACPI_NHLT_MIC_POSITION_RIGHT */
+ "Front", /* ACPI_NHLT_MIC_POSITION_FRONT */
+ "Back", /* ACPI_NHLT_MIC_POSITION_BACK */
+ "Unknown Mic Position" /* 6 and above are reserved */
+};
+
+static const char *AcpiDmNhltMicArrayTypeNames[] =
+{
+ "Unknown Array Type", /* ACPI_NHLT_ARRAY_TYPE_RESERVED */
+ "Small Linear 2-element", /* ACPI_NHLT_SMALL_LINEAR_2ELEMENT */
+ "Big Linear 2-element", /* ACPI_NHLT_BIG_LINEAR_2ELEMENT */
+ "Linear 4-element 1st Geometry", /* ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT */
+ "Planar L-shaped 4-element", /* ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT */
+ "Linear 4-element 2nd Geometry", /* ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT */
+ "Vendor Defined" /* ACPI_NHLT_VENDOR_DEFINED */
+};
+
+static const char *AcpiDmNhltConfigTypeNames[] =
+{
+ "Generic Type", /* ACPI_NHLT_CONFIG_TYPE_GENERIC */
+ "Microphone Array", /* ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY */
+ "Reserved", /* ACPI_NHLT_CONFIG_TYPE_RESERVED */
+ "Render Feedback", /* ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK */
+ "Unknown Config Type" /* ACPI_NHLT_CONFIG_TYPE_RESERVED */
+};
+
static const char *AcpiDmPcctSubnames[] =
{
"Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
@@ -255,15 +401,24 @@
"HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
"Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
"Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
+ "HW Registers based Comm Subspace", /* ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE */
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmPhatSubnames[] =
+{
+ "Firmware Version Data", /* ACPI_PHAT_TYPE_FW_VERSION_DATA */
+ "Firmware Health Data", /* ACPI_PHAT_TYPE_FW_HEALTH_DATA */
+ "Unknown Subtable Type" /* Reserved */
+};
+
static const char *AcpiDmPmttSubnames[] =
{
"Socket", /* ACPI_PMTT_TYPE_SOCKET */
"Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
"Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
- "Unknown Subtable Type" /* Reserved */
+ "Unknown Subtable Type", /* Reserved */
+ "Vendor Specific" /* ACPI_PMTT_TYPE_VENDOR */
};
static const char *AcpiDmPpttSubnames[] =
@@ -274,6 +429,12 @@
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmRgrtSubnames[] =
+{
+ "Unknown/Reserved Image Type", /* ACPI_RGRT_TYPE_RESERVED0 */
+ "Type PNG" /* ACPI_RGRT_IMAGE_TYPE_PNG */
+};
+
static const char *AcpiDmSdevSubnames[] =
{
"Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
@@ -289,6 +450,7 @@
"GICC Affinity",
"GIC ITS Affinity", /* Acpi 6.2 */
"Generic Initiator Affinity", /* Acpi 6.3 */
+ "Generic Port Affinity", /* Acpi 6.4 */
"Unknown Subtable Type" /* Reserved */
};
@@ -311,9 +473,28 @@
static const char *AcpiDmIvrsSubnames[] =
{
- "Hardware Definition Block",
- "Memory Definition Block",
- "Unknown Subtable Type" /* Reserved */
+ "Hardware Definition Block (IVHD)",
+ "Hardware Definition Block - Mixed Format (IVHD)",
+ "Memory Definition Block (IVMD)",
+ "Unknown/Reserved Subtable Type" /* Reserved */
+};
+
+static const char *AcpiDmIvrsDevEntryNames[] =
+{
+ "Unknown/Reserved Device Entry Type", /* 0- Reserved */
+ "Device Entry: Select All Devices", /* 1 */
+ "Device Entry: Select One Device", /* 2 */
+ "Device Entry: Start of Range", /* 3 */
+ "Device Entry: End of Range", /* 4 */
+ "Device Entry: Alias Select", /* 66 */
+ "Device Entry: Alias Start of Range", /* 67 */
+ "Unknown/Reserved Device Entry Type", /* 68- Reserved */
+ "Unknown/Reserved Device Entry Type", /* 69- Reserved */
+ "Device Entry: Extended Select", /* 70 */
+ "Device Entry: Extended Start of Range", /* 71 */
+ "Device Entry: Special Device", /* 72 */
+ "Device Entry: ACPI HID Named Device", /* 240 */
+ "Unknown/Reserved Device Entry Type" /* Reserved */
};
static const char *AcpiDmLpitSubnames[] =
@@ -322,6 +503,16 @@
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmViotSubnames[] =
+{
+ "Unknown Subtable Type", /* 0 -Reserved */
+ "PCI Range",
+ "MMIO Endpoint",
+ "VirtIO-PCI IOMMU",
+ "VirtIO-MMIO IOMMU",
+ "Unknown Subtable Type" /* Reserved */
+};
+
#define ACPI_FADT_PM_RESERVED 9
static const char *AcpiDmFadtProfiles[] =
@@ -362,17 +553,24 @@
* handler. This table must be NULL terminated. RSDP and FACS are
* special-cased elsewhere.
*
- * Note: Any tables added here should be duplicated within AcpiSupportedTables
- * in the file common/ahtable.c
+ * Note: Any tables added here should be duplicated within
+ * AcpiGbl_SupportedTables in the file common/ahtable.c
*
******************************************************************************/
const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{
+ {ACPI_SIG_AEST, NULL, AcpiDmDumpAest, DtCompileAest, TemplateAest},
+ {ACPI_SIG_AGDI, AcpiDmTableInfoAgdi, NULL, NULL, TemplateAgdi},
+ {ACPI_SIG_APMT, NULL, AcpiDmDumpApmt, DtCompileApmt, TemplateApmt},
{ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
+ {ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat},
{ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
{ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt},
{ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot},
+ {ACPI_SIG_CCEL, AcpiDmTableInfoCcel, NULL, NULL, TemplateCcel},
+ {ACPI_SIG_CDAT, NULL, AcpiDmDumpCdat, NULL, TemplateCdat},
+ {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt},
{ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
{ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
{ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2},
@@ -397,13 +595,16 @@
{ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst},
{ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
{ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
- {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr},
{ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
+ {ACPI_SIG_NHLT, AcpiDmTableInfoNhlt, AcpiDmDumpNhlt, DtCompileNhlt, TemplateNhlt},
{ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
{ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
+ {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat},
{ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
{ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
+ {ACPI_SIG_PRMT, NULL, AcpiDmDumpPrmt, DtCompilePrmt, TemplatePrmt},
{ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
+ {ACPI_SIG_RGRT, NULL, AcpiDmDumpRgrt, DtCompileRgrt, TemplateRgrt},
{ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
{ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
{ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
@@ -415,10 +616,12 @@
{ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi},
{ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
{ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
+ {ACPI_SIG_SVKL, AcpiDmTableInfoSvkl, AcpiDmDumpSvkl, DtCompileSvkl, TemplateSvkl},
{ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
+ {ACPI_SIG_TDEL, AcpiDmTableInfoTdel, NULL, NULL, TemplateTdel},
{ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
{ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
- {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc, AcpiDmDumpVrtc, DtCompileVrtc, TemplateVrtc},
+ {ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot},
{ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet},
{ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat},
{ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
@@ -433,44 +636,6 @@
/*******************************************************************************
*
- * FUNCTION: AcpiDmGenerateChecksum
- *
- * PARAMETERS: Table - Pointer to table to be checksummed
- * Length - Length of the table
- * OriginalChecksum - Value of the checksum field
- *
- * RETURN: 8 bit checksum of buffer
- *
- * DESCRIPTION: Computes an 8 bit checksum of the table.
- *
- ******************************************************************************/
-
-UINT8
-AcpiDmGenerateChecksum (
- void *Table,
- UINT32 Length,
- UINT8 OriginalChecksum)
-{
- UINT8 Checksum;
-
-
- /* Sum the entire table as-is */
-
- Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
-
- /* Subtract off the existing checksum value in the table */
-
- Checksum = (UINT8) (Checksum - OriginalChecksum);
-
- /* Compute the final checksum */
-
- Checksum = (UINT8) (0 - Checksum);
- return (Checksum);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiDmGetTableData
*
* PARAMETERS: Signature - ACPI signature (4 chars) to match
@@ -543,7 +708,7 @@
/*
* Handle tables that don't use the common ACPI table header structure.
- * Currently, these are the FACS, RSDP, and S3PT.
+ * Currently, these are the FACS, RSDP, S3PT and CDAT.
*/
if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
{
@@ -554,7 +719,8 @@
return;
}
}
- else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
+ else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP,
+ Table)->Signature))
{
Length = AcpiDmDumpRsdp (Table);
}
@@ -562,6 +728,28 @@
{
Length = AcpiDmDumpS3pt (Table);
}
+ else if (!AcpiUtValidNameseg (Table->Signature))
+ {
+ /*
+ * For CDAT we are assuming that there should be at least one non-ASCII
+ * byte in the (normally) 4-character Signature field (at least the
+ * high-order byte should be zero).
+ */
+ if (AcpiGbl_CDAT)
+ {
+ /*
+ * Invalid signature and <-ds CDAT> was specified on the command line.
+ * Therefore, we have a CDAT table.
+ */
+ AcpiDmDumpCdat (Table);
+ }
+ else
+ {
+ fprintf (stderr, "Table has an invalid signature\n");
+ }
+
+ return;
+ }
else
{
/*
@@ -685,7 +873,7 @@
{
if (ByteLength)
{
- AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
+ AcpiOsPrintf ("[%3.3Xh %4.4u %3.3Xh] %27s : ",
Offset, Offset, ByteLength, Name);
}
else
@@ -727,12 +915,12 @@
{
if (ByteLength)
{
- AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
+ AcpiOsPrintf ("[%3.3Xh %4.4u %3.3Xh] %24s %3d : ",
Offset, Offset, ByteLength, Name, Value);
}
else
{
- AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
+ AcpiOsPrintf ("[%3.3Xh %4.4u ] %24s %3d : ",
Offset, Offset, Name, Value);
}
}
@@ -799,11 +987,11 @@
/* Check for beyond subtable end or (worse) beyond EOT */
- if (SubtableLength && (Info->Offset >= SubtableLength))
+ if (SubtableLength && (Info->Offset > SubtableLength))
{
AcpiOsPrintf (
- "/**** ACPI subtable terminates early - "
- "may be older version (dump table) */\n");
+ "/**** ACPI subtable terminates early (Len %u) - "
+ "may be older version (dump table) */\n", SubtableLength);
/* Move on to next subtable */
@@ -814,7 +1002,8 @@
{
AcpiOsPrintf (
"/**** ACPI table terminates "
- "in the middle of a data structure! (dump table) */\n");
+ "in the middle of a data structure! (dump table) \n"
+ "CurrentOffset: %X, TableLength: %X ***/", CurrentOffset, TableLength);
return (AE_BAD_DATA);
}
@@ -826,15 +1015,29 @@
case ACPI_DMT_CHKSUM:
case ACPI_DMT_SPACEID:
case ACPI_DMT_ACCWIDTH:
+ case ACPI_DMT_CEDT:
case ACPI_DMT_IVRS:
+ case ACPI_DMT_IVRS_DE:
case ACPI_DMT_GTDT:
case ACPI_DMT_MADT:
+ case ACPI_DMT_NHLT1:
+ case ACPI_DMT_NHLT1a:
+ case ACPI_DMT_NHLT1b:
+ case ACPI_DMT_NHLT1c:
+ case ACPI_DMT_NHLT1d:
+ case ACPI_DMT_NHLT1f:
case ACPI_DMT_PCCT:
case ACPI_DMT_PMTT:
case ACPI_DMT_PPTT:
+ case ACPI_DMT_RGRT:
case ACPI_DMT_SDEV:
case ACPI_DMT_SRAT:
+ case ACPI_DMT_AEST:
+ case ACPI_DMT_AEST_RES:
+ case ACPI_DMT_AEST_XFACE:
+ case ACPI_DMT_AEST_XRUPT:
case ACPI_DMT_ASF:
+ case ACPI_DMT_CDAT:
case ACPI_DMT_HESTNTYP:
case ACPI_DMT_FADTPM:
case ACPI_DMT_EINJACT:
@@ -842,6 +1045,7 @@
case ACPI_DMT_ERSTACT:
case ACPI_DMT_ERSTINST:
case ACPI_DMT_DMAR_SCOPE:
+ case ACPI_DMT_VIOT:
ByteLength = 1;
break;
@@ -851,6 +1055,8 @@
case ACPI_DMT_HEST:
case ACPI_DMT_HMAT:
case ACPI_DMT_NFIT:
+ case ACPI_DMT_NHLT1e:
+ case ACPI_DMT_PHAT:
ByteLength = 2;
break;
@@ -861,6 +1067,8 @@
break;
case ACPI_DMT_UINT32:
+ case ACPI_DMT_AEST_CACHE:
+ case ACPI_DMT_AEST_GIC:
case ACPI_DMT_NAME4:
case ACPI_DMT_SIG:
case ACPI_DMT_LPIT:
@@ -908,11 +1116,22 @@
ByteLength = 16;
break;
+ case ACPI_DMT_BUF18:
+
+ ByteLength = 18;
+ break;
+
case ACPI_DMT_BUF128:
ByteLength = 128;
break;
+ case ACPI_DMT_WPBT_UNICODE:
+
+ ByteLength = SubtableLength;
+ CurrentOffset = sizeof (ACPI_TABLE_WPBT);
+ break;
+
case ACPI_DMT_UNICODE:
case ACPI_DMT_BUFFER:
case ACPI_DMT_RAW_BUFFER:
@@ -920,11 +1139,27 @@
ByteLength = SubtableLength;
break;
+ case ACPI_DMT_PMTT_VENDOR:
+ /*
+ * Calculate the length of the vendor data for the PMTT table:
+ * Length = (Current Subtable ptr + Subtable length) -
+ * Start of the vendor data (Target)
+ */
+ ByteLength = ((ACPI_CAST_PTR (char, Table) +
+ (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) -
+ ACPI_CAST_PTR (char, Target));
+ break;
+
case ACPI_DMT_STRING:
ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1;
break;
+ case ACPI_DMT_IVRS_UNTERMINATED_STRING:
+
+ ByteLength = ((ACPI_CAST_PTR (ACPI_IVRS_DEVICE_HID, Target) -1)->UidLength);
+ break;
+
case ACPI_DMT_GAS:
if (!LastOutputBlankLine)
@@ -1027,7 +1262,12 @@
AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
break;
- case ACPI_DMT_FLAGS4:
+ case ACPI_DMT_FLAGS8_2:
+
+ AcpiOsPrintf ("%2.2X\n", (*Target >> 2) & 0xFF);
+ break;
+
+ case ACPI_DMT_FLAGS4:
AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
break;
@@ -1091,6 +1331,7 @@
case ACPI_DMT_BUF10:
case ACPI_DMT_BUF12:
case ACPI_DMT_BUF16:
+ case ACPI_DMT_BUF18:
case ACPI_DMT_BUF128:
/*
* Buffer: Size depends on the opcode and was set above.
@@ -1121,7 +1362,7 @@
/* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
- (void) AuConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
+ (void) AcpiUtConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
break;
@@ -1131,6 +1372,11 @@
AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target));
break;
+ case ACPI_DMT_IVRS_UNTERMINATED_STRING:
+
+ AcpiOsPrintf ("\"%.*s\"\n", ByteLength, ACPI_CAST_PTR (char, Target));
+ break;
+
/* Fixed length ASCII name fields */
case ACPI_DMT_SIG:
@@ -1174,7 +1420,7 @@
/* Checksum, display and validate */
AcpiOsPrintf ("%2.2X", *Target);
- Temp8 = AcpiDmGenerateChecksum (Table,
+ Temp8 = AcpiUtGenerateChecksum (Table,
ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
@@ -1223,6 +1469,90 @@
LastOutputBlankLine = TRUE;
break;
+ case ACPI_DMT_AEST:
+
+ /* AEST subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_NODE_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_AEST_NODE_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestSubnames[Temp8]);
+ break;
+
+ case ACPI_DMT_AEST_CACHE:
+
+ /* AEST cache resource subtable */
+
+ Temp32 = *Target;
+ if (Temp32 > ACPI_AEST_CACHE_RESERVED)
+ {
+ Temp32 = ACPI_AEST_CACHE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT32_FORMAT, *Target,
+ AcpiDmAestCacheNames[Temp32]);
+ break;
+
+ case ACPI_DMT_AEST_GIC:
+
+ /* AEST GIC error subtable */
+
+ Temp32 = *Target;
+ if (Temp32 > ACPI_AEST_GIC_RESERVED)
+ {
+ Temp32 = ACPI_AEST_GIC_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT32_FORMAT, *Target,
+ AcpiDmAestGicNames[Temp32]);
+ break;
+
+ case ACPI_DMT_AEST_RES:
+
+ /* AEST resource type subtable */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_RESOURCE_RESERVED)
+ {
+ Temp8 = ACPI_AEST_RESOURCE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestResourceNames[Temp8]);
+ break;
+
+ case ACPI_DMT_AEST_XFACE:
+
+ /* AEST interface structure types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_XFACE_RESERVED)
+ {
+ Temp8 = ACPI_AEST_XFACE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestXfaceNames[Temp8]);
+ break;
+
+ case ACPI_DMT_AEST_XRUPT:
+
+ /* AEST interrupt structure types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_XRUPT_RESERVED)
+ {
+ Temp8 = ACPI_AEST_XRUPT_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestXruptNames[Temp8]);
+ break;
+
case ACPI_DMT_ASF:
/* ASF subtable types */
@@ -1236,6 +1566,34 @@
AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]);
break;
+ case ACPI_DMT_CDAT:
+
+ /* CDAT subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_CDAT_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_CDAT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmCdatSubnames[Temp8]);
+ break;
+
+ case ACPI_DMT_CEDT:
+
+ /* CEDT subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_CEDT_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_CEDT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmCedtSubnames[Temp8]);
+ break;
+
case ACPI_DMT_DMAR:
/* DMAR subtable types */
@@ -1412,11 +1770,14 @@
/* MADT subtable types */
Temp8 = *Target;
- if (Temp8 > ACPI_MADT_TYPE_RESERVED)
+ if ((Temp8 >= ACPI_MADT_TYPE_RESERVED) && (Temp8 < ACPI_MADT_TYPE_OEM_RESERVED))
{
Temp8 = ACPI_MADT_TYPE_RESERVED;
}
-
+ else if (Temp8 >= ACPI_MADT_TYPE_OEM_RESERVED)
+ {
+ Temp8 = ACPI_MADT_TYPE_RESERVED + 1;
+ }
AcpiOsPrintf (UINT8_FORMAT, *Target,
AcpiDmMadtSubnames[Temp8]);
break;
@@ -1435,6 +1796,123 @@
AcpiDmNfitSubnames[Temp16]);
break;
+ case ACPI_DMT_NHLT1:
+
+ /* NHLT link types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltLinkTypeNames[Temp8]);
+ break;
+
+ case ACPI_DMT_NHLT1a:
+
+ /* NHLT direction */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_DIR_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_DIR_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltDirectionNames[Temp8]);
+ break;
+
+ case ACPI_DMT_NHLT1b:
+
+ /* NHLT microphone type */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_MIC_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_MIC_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltMicTypeNames[Temp8]);
+ break;
+
+ case ACPI_DMT_NHLT1c:
+
+ /* NHLT microphone position */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_MIC_POSITION_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_MIC_POSITION_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltMicPositionNames[Temp8]);
+ break;
+
+ case ACPI_DMT_NHLT1d:
+
+ /* NHLT microphone array type */
+
+ Temp8 = *Target & ACPI_NHLT_ARRAY_TYPE_MASK;
+ if (Temp8 < ACPI_NHLT_ARRAY_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_ARRAY_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT_NO_NEWLINE, *Target,
+ AcpiDmNhltMicArrayTypeNames[Temp8 - ACPI_NHLT_ARRAY_TYPE_RESERVED]);
+
+ Temp8 = *Target;
+ if (Temp8 & ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT)
+ {
+ AcpiOsPrintf (" [%s]", "SNR and Sensitivity");
+ }
+
+ AcpiOsPrintf ("\n");
+ break;
+
+ case ACPI_DMT_NHLT1e:
+
+ /* NHLT Endpoint Device ID */
+
+ Temp16 = ACPI_GET16 (Target);
+ if (Temp16 == 0xAE20)
+ {
+ Name = "PDM DMIC";
+ }
+ else if (Temp16 == 0xAE30)
+ {
+ Name = "BT Sideband";
+ }
+ else if (Temp16 == 0xAE34)
+ {
+ Name = "I2S/TDM Codecs";
+ }
+ else
+ {
+ Name = "Unknown Device ID";
+ }
+
+ AcpiOsPrintf (UINT16_FORMAT, Temp16, Name);
+ break;
+
+ case ACPI_DMT_NHLT1f:
+
+ /* NHLT ConfigType field */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_CONFIG_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_CONFIG_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltConfigTypeNames[Temp8]);
+ break;
+
case ACPI_DMT_PCCT:
/* PCCT subtable types */
@@ -1449,16 +1927,33 @@
AcpiDmPcctSubnames[Temp8]);
break;
+ case ACPI_DMT_PHAT:
+
+ /* PHAT subtable types */
+
+ Temp16 = ACPI_GET16 (Target);
+ if (Temp16 > ACPI_PHAT_TYPE_RESERVED)
+ {
+ Temp16 = ACPI_PHAT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+ AcpiDmPhatSubnames[Temp16]);
+ break;
+
case ACPI_DMT_PMTT:
/* PMTT subtable types */
Temp8 = *Target;
- if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
+ if (Temp8 == ACPI_PMTT_TYPE_VENDOR)
+ {
+ Temp8 = ACPI_PMTT_TYPE_RESERVED + 1;
+ }
+ else if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
{
Temp8 = ACPI_PMTT_TYPE_RESERVED;
}
-
AcpiOsPrintf (UINT8_FORMAT, *Target,
AcpiDmPmttSubnames[Temp8]);
break;
@@ -1478,6 +1973,7 @@
break;
case ACPI_DMT_UNICODE:
+ case ACPI_DMT_WPBT_UNICODE:
if (ByteLength == 0)
{
@@ -1485,10 +1981,12 @@
break;
}
- AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength);
+ AcpiDmDumpUnicode (Table, 0, ByteLength);
break;
case ACPI_DMT_RAW_BUFFER:
+ case ACPI_DMT_BUFFER:
+ case ACPI_DMT_PMTT_VENDOR:
if (ByteLength == 0)
{
@@ -1496,8 +1994,21 @@
break;
}
- AcpiDmDumpBuffer (Table, CurrentOffset, ByteLength,
- CurrentOffset, NULL);
+ AcpiDmDumpBuffer (Target, 0, ByteLength, CurrentOffset, NULL);
+ break;
+
+ case ACPI_DMT_RGRT:
+
+ /* RGRT subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 >= ACPI_RGRT_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_RGRT_TYPE_RESERVED0;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmRgrtSubnames[Temp8]);
break;
case ACPI_DMT_SDEV:
@@ -1564,21 +2075,64 @@
Temp8 = *Target;
switch (Temp8)
{
- case ACPI_IVRS_TYPE_HARDWARE:
+ case ACPI_IVRS_TYPE_HARDWARE1:
+ case ACPI_IVRS_TYPE_HARDWARE2:
Name = AcpiDmIvrsSubnames[0];
break;
+ case ACPI_IVRS_TYPE_HARDWARE3:
+
+ Name = AcpiDmIvrsSubnames[1];
+ break;
+
case ACPI_IVRS_TYPE_MEMORY1:
case ACPI_IVRS_TYPE_MEMORY2:
case ACPI_IVRS_TYPE_MEMORY3:
- Name = AcpiDmIvrsSubnames[1];
+ Name = AcpiDmIvrsSubnames[2];
break;
default:
- Name = AcpiDmIvrsSubnames[2];
+ Name = AcpiDmIvrsSubnames[3];
+ break;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
+ break;
+
+ case ACPI_DMT_IVRS_DE:
+
+ /* IVRS device entry types */
+
+ Temp8 = *Target;
+ switch (Temp8)
+ {
+ case ACPI_IVRS_TYPE_ALL:
+ case ACPI_IVRS_TYPE_SELECT:
+ case ACPI_IVRS_TYPE_START:
+ case ACPI_IVRS_TYPE_END:
+
+ Name = AcpiDmIvrsDevEntryNames[Temp8];
+ break;
+
+ case ACPI_IVRS_TYPE_ALIAS_SELECT:
+ case ACPI_IVRS_TYPE_ALIAS_START:
+ case ACPI_IVRS_TYPE_EXT_SELECT:
+ case ACPI_IVRS_TYPE_EXT_START:
+ case ACPI_IVRS_TYPE_SPECIAL:
+
+ Name = AcpiDmIvrsDevEntryNames[Temp8 - 61];
+ break;
+
+ case ACPI_IVRS_TYPE_HID:
+
+ Name = AcpiDmIvrsDevEntryNames[Temp8 - 228];
+ break;
+
+ default:
+ Name = AcpiDmIvrsDevEntryNames[0]; /* Unknown/Reserved */
break;
}
@@ -1599,6 +2153,20 @@
AcpiDmLpitSubnames[Temp32]);
break;
+ case ACPI_DMT_VIOT:
+
+ /* VIOT subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_VIOT_RESERVED)
+ {
+ Temp8 = ACPI_VIOT_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmViotSubnames[Temp8]);
+ break;
+
case ACPI_DMT_EXIT:
return (AE_OK);
diff --git a/source/common/dmtables.c b/source/common/dmtables.c
index 61b6044..ea94f16 100644
--- a/source/common/dmtables.c
+++ b/source/common/dmtables.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -184,7 +188,7 @@
AcpiOsPrintf ("\n * Checksum 0x%2.2X", Table->Checksum);
- Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
+ Checksum = AcpiUtChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
if (Checksum)
{
AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
@@ -394,7 +398,6 @@
AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
- ASL_CV_INIT_FILETREE(Table, AmlStart, AmlLength);
AcpiUtSetIntegerWidth (Table->Revision);
diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c
index cf0bf0c..0b2bf95 100644
--- a/source/common/dmtbdump.c
+++ b/source/common/dmtbdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -83,7 +87,9 @@
char *Header)
{
UINT8 *Buffer;
+ UINT8 BufChar;
UINT32 i;
+ UINT32 j;
if (!Length)
@@ -96,20 +102,72 @@
while (i < Length)
{
- if (!(i % 16))
+ if ((Length > 16) && (i != 0))
{
- /* Insert a backslash - line continuation character */
+ if ((Length - i) < 16)
+ AcpiOsPrintf ("\n/* %3.3Xh %4.4u %3u */ ", AbsoluteOffset, AbsoluteOffset, Length - i);
+ else
+ AcpiOsPrintf ("\n/* %3.3Xh %4.4u 16 */ ", AbsoluteOffset, AbsoluteOffset);
+ }
+ AbsoluteOffset += 16;
- if (Length > 16)
+ /* Emit the raw data bytes*/
+
+ for (j = 0; j < 16; j++)
+ {
+ if (i + j >= Length)
{
- AcpiOsPrintf ("\\\n ");
+ /* Dump fill spaces */
+
+ AcpiOsPrintf ("%*s", (48 - (3 * (Length -i))), " ");
+ break;
+ }
+ AcpiOsPrintf ("%.02X ", Buffer[(ACPI_SIZE) i + j]);
+ }
+
+ /* Emit the ASCII equivalent to the raw data bytes */
+
+ for (j = 0; j < 16; j++)
+ {
+ if (i + j >= Length)
+ {
+ AcpiOsPrintf (" */\\\n");
+ return;
+ }
+
+ /*
+ * Add comment characters so rest of line is ignored when
+ * compiled
+ */
+ if (j == 0)
+ {
+ AcpiOsPrintf ("/* ");
+ }
+
+ BufChar = Buffer[(ACPI_SIZE) i + j];
+ if (isprint (BufChar))
+ {
+ AcpiOsPrintf ("%c", BufChar);
+ }
+ else
+ {
+ AcpiOsPrintf (".");
}
}
- AcpiOsPrintf ("%.02X ", *Buffer);
- i++;
- Buffer++;
- AbsoluteOffset++;
+ /* Done with that line. */
+ /* Close the comment and insert a backslash - line continuation character */
+
+ if (Length > 16)
+ {
+ AcpiOsPrintf (" */\\");
+ }
+ else
+ {
+ AcpiOsPrintf (" */\\");
+ }
+
+ i += 16; /* Point to next line */
}
AcpiOsPrintf ("\n");
@@ -218,7 +276,7 @@
/* Validate the first checksum */
- Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON),
+ Checksum = AcpiUtGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON),
Rsdp->Checksum);
if (Checksum != Rsdp->Checksum)
{
@@ -239,7 +297,7 @@
/* Validate the extended checksum over entire RSDP */
- Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP),
+ Checksum = AcpiUtGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP),
Rsdp->ExtendedChecksum);
if (Checksum != Rsdp->ExtendedChecksum)
{
diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c
index 3daabf5..b0f0b9a 100644
--- a/source/common/dmtbdump1.c
+++ b/source/common/dmtbdump1.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -41,6 +45,7 @@
#include "accommon.h"
#include "acdisasm.h"
#include "actables.h"
+#include "aslcompiler.h"
/* This module used for application-level code only */
@@ -50,6 +55,285 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpAest
+ *
+ * PARAMETERS: Table - A AEST table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a AEST table
+ *
+ * NOTE: Assumes the following table structure:
+ * For all AEST Error Nodes:
+ * 1) An AEST Error Node, followed immediately by:
+ * 2) Any node-specific data
+ * 3) An Interface Structure (one)
+ * 4) A list (array) of Interrupt Structures
+ *
+ * AEST - ARM Error Source table. Conforms to:
+ * ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document Sep 2020
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpAest (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ UINT32 Offset = sizeof (ACPI_TABLE_HEADER);
+ ACPI_AEST_HEADER *Subtable;
+ ACPI_AEST_HEADER *NodeHeader;
+ ACPI_AEST_PROCESSOR *ProcessorSubtable;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_SIZE Length;
+ UINT8 Type;
+
+
+ /* Very small, generic main table. AEST consists of mostly subtables */
+
+ while (Offset < Table->Length)
+ {
+ NodeHeader = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+
+ /* Dump the common error node (subtable) header */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, NodeHeader,
+ NodeHeader->Length, AcpiDmTableInfoAestHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Type = NodeHeader->Type;
+
+ /* Setup the node-specific subtable based on the header Type field */
+
+ switch (Type)
+ {
+ case ACPI_AEST_PROCESSOR_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestProcError;
+ Length = sizeof (ACPI_AEST_PROCESSOR);
+ break;
+
+ case ACPI_AEST_MEMORY_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestMemError;
+ Length = sizeof (ACPI_AEST_MEMORY);
+ break;
+
+ case ACPI_AEST_SMMU_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestSmmuError;
+ Length = sizeof (ACPI_AEST_SMMU);
+ break;
+
+ case ACPI_AEST_VENDOR_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestVendorError;
+ Length = sizeof (ACPI_AEST_VENDOR);
+ break;
+
+ case ACPI_AEST_GIC_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestGicError;
+ Length = sizeof (ACPI_AEST_GIC);
+ break;
+
+ /* Error case below */
+ default:
+
+ AcpiOsPrintf ("\n**** Unknown AEST Error Subtable type 0x%X\n",
+ Type);
+ return;
+ }
+
+ /* Point past the common header (to the node-specific data) */
+
+ Offset += sizeof (ACPI_AEST_HEADER);
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+ AcpiOsPrintf ("\n");
+
+ /* Dump the node-specific subtable */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, Length,
+ InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ AcpiOsPrintf ("\n");
+
+ if (Type == ACPI_AEST_PROCESSOR_ERROR_NODE)
+ {
+ /*
+ * Special handling for PROCESSOR_ERROR_NODE subtables
+ * (to handle the Resource Substructure via the ResourceType
+ * field).
+ */
+
+ /* Point past the node-specific data */
+
+ Offset += Length;
+ ProcessorSubtable = ACPI_CAST_PTR (ACPI_AEST_PROCESSOR, Subtable);
+
+ switch (ProcessorSubtable->ResourceType)
+ {
+ /* Setup the Resource Substructure subtable */
+
+ case ACPI_AEST_CACHE_RESOURCE:
+ InfoTable = AcpiDmTableInfoAestCacheRsrc;
+ Length = sizeof (ACPI_AEST_PROCESSOR_CACHE);
+ break;
+
+ case ACPI_AEST_TLB_RESOURCE:
+ InfoTable = AcpiDmTableInfoAestTlbRsrc;
+ Length = sizeof (ACPI_AEST_PROCESSOR_TLB);
+ break;
+
+ case ACPI_AEST_GENERIC_RESOURCE:
+ InfoTable = AcpiDmTableInfoAestGenRsrc;
+ Length = sizeof (ACPI_AEST_PROCESSOR_GENERIC);
+ break;
+
+ /* Error case below */
+ default:
+ AcpiOsPrintf ("\n**** Unknown AEST Processor Resource type 0x%X\n",
+ ProcessorSubtable->ResourceType);
+ return;
+ }
+
+ ProcessorSubtable = ACPI_ADD_PTR (ACPI_AEST_PROCESSOR, Table,
+ Offset);
+
+ /* Dump the resource substructure subtable */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, ProcessorSubtable,
+ Length, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ AcpiOsPrintf ("\n");
+ }
+
+ /* Point past the resource substructure or the node-specific data */
+
+ Offset += Length;
+
+ /* Dump the interface structure, required to be present */
+
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+ if (Subtable->Type >= ACPI_AEST_XFACE_RESERVED)
+ {
+ AcpiOsPrintf ("\n**** Unknown AEST Node Interface type 0x%X\n",
+ Subtable->Type);
+ return;
+ }
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ sizeof (ACPI_AEST_NODE_INTERFACE), AcpiDmTableInfoAestXface);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point past the interface structure */
+
+ AcpiOsPrintf ("\n");
+ Offset += sizeof (ACPI_AEST_NODE_INTERFACE);
+
+ /* Dump the entire interrupt structure array, if present */
+
+ if (NodeHeader->NodeInterruptOffset)
+ {
+ Length = NodeHeader->NodeInterruptCount;
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+
+ while (Length)
+ {
+ /* Dump the interrupt structure */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ sizeof (ACPI_AEST_NODE_INTERRUPT),
+ AcpiDmTableInfoAestXrupt);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point to the next interrupt structure */
+
+ Offset += sizeof (ACPI_AEST_NODE_INTERRUPT);
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+ Length--;
+ AcpiOsPrintf ("\n");
+ }
+ }
+ }
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmDumpApmt
+ *
+ * PARAMETERS: Table - A APMT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a APMT. This table type consists
+ * of an open-ended number of subtables.
+ *
+ *
+ * APMT - ARM Performance Monitoring Unit table. Conforms to:
+ * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
+ * ARM DEN0117 v1.0 November 25, 2021
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpApmt (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ ACPI_APMT_NODE *Subtable;
+ UINT32 Length = Table->Length;
+ UINT32 Offset = sizeof (ACPI_TABLE_APMT);
+ UINT32 NodeNum = 0;
+
+ /* There is no main table (other than the standard ACPI header) */
+
+ /* Subtables */
+
+ Subtable = ACPI_ADD_PTR (ACPI_APMT_NODE, Table, Offset);
+ while (Offset < Table->Length)
+ {
+ AcpiOsPrintf ("\n");
+
+ if (Subtable->Type >= ACPI_APMT_NODE_TYPE_COUNT)
+ {
+ AcpiOsPrintf ("\n**** Unknown APMT subtable type 0x%X\n",
+ Subtable->Type);
+ return;
+ }
+
+ AcpiOsPrintf ("/* APMT Node-%u */\n", NodeNum++);
+
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoApmtNode);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point to next subtable */
+
+ Offset += Subtable->Length;
+ Subtable = ACPI_ADD_PTR (ACPI_APMT_NODE, Subtable,
+ Subtable->Length);
+ AcpiOsPrintf ("\n");
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpAsf
*
* PARAMETERS: Table - A ASF table
@@ -220,6 +504,290 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpCdat
+ *
+ * PARAMETERS: InTable - A CDAT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a CDAT. This table type consists
+ * of an open-ended number of subtables.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpCdat (
+ ACPI_TABLE_HEADER *InTable)
+{
+ ACPI_TABLE_CDAT *Table = ACPI_CAST_PTR (ACPI_TABLE_CDAT, InTable);
+ ACPI_STATUS Status;
+ ACPI_CDAT_HEADER *Subtable;
+ ACPI_TABLE_CDAT *CdatTable = ACPI_CAST_PTR (ACPI_TABLE_CDAT, Table);
+ ACPI_DMTABLE_INFO *InfoTable;
+ UINT32 Length = CdatTable->Length;
+ UINT32 Offset = sizeof (ACPI_TABLE_CDAT);
+ UINT32 SubtableLength;
+ UINT32 SubtableType;
+ INT32 EntriesLength;
+
+
+ /* Main table */
+
+ Status = AcpiDmDumpTable (Offset, 0, CdatTable, 0,
+ AcpiDmTableInfoCdatTableHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, sizeof (ACPI_TABLE_CDAT));
+ while (Offset < Table->Length)
+ {
+ /* Dump the common subtable header */
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "0) HeaderOffset: %X\n", Offset);
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ sizeof (ACPI_CDAT_HEADER), AcpiDmTableInfoCdatHeader);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point past the common subtable header, decode the subtable type */
+
+ Offset += sizeof (ACPI_CDAT_HEADER);
+ SubtableType = Subtable->Type;
+
+ switch (Subtable->Type)
+ {
+ case ACPI_CDAT_TYPE_DSMAS:
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ SubtableLength = sizeof (ACPI_CDAT_DSMAS);
+
+ InfoTable = AcpiDmTableInfoCdat0;
+ break;
+
+ case ACPI_CDAT_TYPE_DSLBIS:
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ SubtableLength = sizeof (ACPI_CDAT_DSLBIS);
+ DbgPrint (ASL_DEBUG_OUTPUT, "1) Offset: %X\n", Offset);
+
+ InfoTable = AcpiDmTableInfoCdat1;
+ break;
+
+ case ACPI_CDAT_TYPE_DSMSCIS:
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ SubtableLength = sizeof (ACPI_CDAT_DSMSCIS);
+
+ InfoTable = AcpiDmTableInfoCdat2;
+ break;
+
+ case ACPI_CDAT_TYPE_DSIS:
+ DbgPrint (ASL_DEBUG_OUTPUT, "2) Offset: %X ", Offset);
+ SubtableLength = sizeof (ACPI_CDAT_DSIS);
+ DbgPrint (ASL_DEBUG_OUTPUT, "1) input pointer: %p\n", Table);
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ DbgPrint (ASL_DEBUG_OUTPUT, "1) output pointers: %p, %p, Offset: %X\n",
+ Table, Subtable, Offset);
+ DbgPrint (ASL_DEBUG_OUTPUT, "3) Offset: %X\n", Offset);
+
+ InfoTable = AcpiDmTableInfoCdat3;
+ break;
+
+ case ACPI_CDAT_TYPE_DSEMTS:
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ SubtableLength = sizeof (ACPI_CDAT_DSEMTS);
+
+ InfoTable = AcpiDmTableInfoCdat4;
+ break;
+
+ case ACPI_CDAT_TYPE_SSLBIS:
+ SubtableLength = Subtable->Length;
+
+ InfoTable = AcpiDmTableInfoCdat5;
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ break;
+
+ default:
+ fprintf (stderr, "ERROR: Unknown SubtableType: %X\n", Subtable->Type);
+ return;
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "SubtableType: %X, Length: %X Actual "
+ "Length: %X Offset: %X tableptr: %p\n", SubtableType,
+ Subtable->Length, SubtableLength, Offset, Table);
+
+ /*
+ * Do the subtable-specific fields
+ */
+ Status = AcpiDmDumpTable (Length, Offset, Subtable, Offset, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "Subtable Type: %X, Offset: %X, SubtableLength: %X\n",
+ SubtableType, Offset, SubtableLength);
+
+ /* Additional sub-subtables, dependent on the main subtable type */
+
+ switch (SubtableType)
+ {
+ case ACPI_CDAT_TYPE_SSLBIS:
+ Offset += sizeof (ACPI_CDAT_SSLBIS);
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table,
+ Offset);
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "Case SSLBIS, Offset: %X, SubtableLength: %X "
+ "Subtable->Length %X\n", Offset, SubtableLength, Subtable->Length);
+
+ /* Generate the total length of all the SSLBE entries */
+
+ EntriesLength = SubtableLength - sizeof (ACPI_CDAT_HEADER) -
+ sizeof (ACPI_CDAT_SSLBIS);
+ DbgPrint (ASL_DEBUG_OUTPUT, "EntriesLength: %X, Offset: %X, Table->Length: %X\n",
+ EntriesLength, Offset, Table->Length);
+
+ /* Do each of the SSLBE Entries */
+
+ while ((EntriesLength > 0) && (Offset < Table->Length))
+ {
+ AcpiOsPrintf ("\n");
+
+ Status = AcpiDmDumpTable (Length, Offset, Subtable, Offset,
+ AcpiDmTableInfoCdatEntries);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ EntriesLength -= sizeof (ACPI_CDAT_SSLBE);
+ Offset += sizeof (ACPI_CDAT_SSLBE);
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ }
+
+ SubtableLength = 0;
+ break;
+
+ default:
+ break;
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "Offset: %X, Subtable Length: %X\n",
+ Offset, SubtableLength);
+
+ /* Point to next subtable */
+
+ Offset += SubtableLength;
+ Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset);
+ }
+
+ return;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmDumpCedt
+ *
+ * PARAMETERS: Table - A CEDT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a CEDT. This table type consists
+ * of an open-ended number of subtables.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpCedt (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ ACPI_CEDT_HEADER *Subtable;
+ UINT32 Length = Table->Length;
+ UINT32 Offset = sizeof (ACPI_TABLE_CEDT);
+
+
+ /* There is no main table (other than the standard ACPI header) */
+
+ Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Table, Offset);
+ while (Offset < Table->Length)
+ {
+ /* Common subtable header */
+
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoCedtHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ switch (Subtable->Type)
+ {
+ case ACPI_CEDT_TYPE_CHBS:
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoCedt0);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
+
+ case ACPI_CEDT_TYPE_CFMWS:
+ {
+ ACPI_CEDT_CFMWS *ptr = (ACPI_CEDT_CFMWS *) Subtable;
+ unsigned int i, max = 0x01 << (ptr->InterleaveWays);
+
+ /* print out table with first "Interleave target" */
+
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoCedt1);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Now, print out any interleave targets beyond the first. */
+
+ for (i = 1; i < max; i++)
+ {
+ unsigned int loc_offset = Offset + (i * 4) + ACPI_OFFSET (ACPI_CEDT_CFMWS, InterleaveTargets);
+ unsigned int *trg = &(ptr->InterleaveTargets[i]);
+
+ Status = AcpiDmDumpTable (Length, loc_offset, trg,
+ Subtable->Length, AcpiDmTableInfoCedt1_te);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ }
+ break;
+ }
+
+ default:
+ AcpiOsPrintf ("\n**** Unknown CEDT subtable type 0x%X\n\n",
+ Subtable->Type);
+
+ /* Attempt to continue */
+ if (!Subtable->Length)
+ {
+ AcpiOsPrintf ("Invalid zero length subtable\n");
+ return;
+ }
+ }
+
+ /* Point to next subtable */
+ Offset += Subtable->Length;
+ Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Subtable,
+ Subtable->Length);
+ }
+}
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpCpep
*
* PARAMETERS: Table - A CPEP table
@@ -583,6 +1151,12 @@
ScopeOffset = sizeof (ACPI_DMAR_ANDD);
break;
+ case ACPI_DMAR_TYPE_SATC:
+
+ InfoTable = AcpiDmTableInfoDmar5;
+ ScopeOffset = sizeof (ACPI_DMAR_SATC);
+ break;
+
default:
AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n",
diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c
index 199a2cf..f66c69b 100644
--- a/source/common/dmtbdump2.c
+++ b/source/common/dmtbdump2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -37,10 +41,12 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
+#include <wchar.h>
#include "acpi.h"
#include "accommon.h"
#include "acdisasm.h"
#include "actables.h"
+#include "aslcompiler.h"
/* This module used for application-level code only */
@@ -69,6 +75,7 @@
ACPI_IORT_NODE *IortNode;
ACPI_IORT_ITS_GROUP *IortItsGroup = NULL;
ACPI_IORT_SMMU *IortSmmu = NULL;
+ ACPI_IORT_RMR *IortRmr = NULL;
UINT32 Offset;
UINT32 NodeOffset;
UINT32 Length;
@@ -76,6 +83,7 @@
char *String;
UINT32 i;
UINT32 MappingByteLength;
+ UINT8 Revision;
/* Main table */
@@ -86,6 +94,17 @@
return;
}
+ Revision = Table->Revision;
+
+ /* IORT Revisions E, E.a and E.c have known issues and are not supported */
+
+ if (Revision == 1 || Revision == 2 || Revision == 4)
+ {
+ AcpiOsPrintf ("\n**** Unsupported IORT revision 0x%X\n",
+ Revision);
+ return;
+ }
+
Iort = ACPI_CAST_PTR (ACPI_TABLE_IORT, Table);
Offset = sizeof (ACPI_TABLE_IORT);
@@ -109,8 +128,18 @@
IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, Table, Offset);
AcpiOsPrintf ("\n");
Length = ACPI_OFFSET (ACPI_IORT_NODE, NodeData);
- Status = AcpiDmDumpTable (Table->Length, Offset,
- IortNode, Length, AcpiDmTableInfoIortHdr);
+
+ if (Revision == 0)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset,
+ IortNode, Length, AcpiDmTableInfoIortHdr);
+ }
+ else if (Revision >= 3)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset,
+ IortNode, Length, AcpiDmTableInfoIortHdr3);
+ }
+
if (ACPI_FAILURE (Status))
{
return;
@@ -160,6 +189,13 @@
Length = IortNode->Length - NodeOffset;
break;
+ case ACPI_IORT_NODE_RMR:
+
+ InfoTable = AcpiDmTableInfoIort6;
+ Length = IortNode->Length - NodeOffset;
+ IortRmr = ACPI_ADD_PTR (ACPI_IORT_RMR, IortNode, NodeOffset);
+ break;
+
default:
AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",
@@ -279,6 +315,29 @@
}
break;
+ case ACPI_IORT_NODE_RMR:
+
+ /* Validate IortRmr to avoid compiler warnings */
+ if (IortRmr)
+ {
+ NodeOffset = IortRmr->RmrOffset;
+ Length = sizeof (ACPI_IORT_RMR_DESC);
+ for (i = 0; i < IortRmr->RmrCount; i++)
+ {
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
+ ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset),
+ Length, AcpiDmTableInfoIort6a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ NodeOffset += Length;
+ }
+ }
+ break;
+
default:
break;
@@ -318,12 +377,21 @@
*
* RETURN: None
*
- * DESCRIPTION: Format the contents of a IVRS
+ * DESCRIPTION: Format the contents of a IVRS. Notes:
+ * The IVRS is essentially a flat table, with the following
+ * structure:
+ * <Main ACPI Table Header>
+ * <Main subtable - virtualization info>
+ * <IVHD>
+ * <Device Entries>
+ * ...
+ * <IVHD>
+ * <Device Entries>
+ * <IVMD>
+ * ...
*
******************************************************************************/
-static UINT8 EntrySizes[] = {4,8,16,32};
-
void
AcpiDmDumpIvrs (
ACPI_TABLE_HEADER *Table)
@@ -333,6 +401,7 @@
UINT32 EntryOffset;
UINT32 EntryLength;
UINT32 EntryType;
+ ACPI_IVRS_DEVICE_HID *HidSubtable;
ACPI_IVRS_DE_HEADER *DeviceEntry;
ACPI_IVRS_HEADER *Subtable;
ACPI_DMTABLE_INFO *InfoTable;
@@ -349,30 +418,36 @@
/* Subtables */
Subtable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Table, Offset);
+
while (Offset < Table->Length)
{
- /* Common subtable header */
-
- AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
- Subtable->Length, AcpiDmTableInfoIvrsHdr);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
switch (Subtable->Type)
{
- case ACPI_IVRS_TYPE_HARDWARE:
+ /* Type 10h, IVHD (I/O Virtualization Hardware Definition) */
- InfoTable = AcpiDmTableInfoIvrs0;
+ case ACPI_IVRS_TYPE_HARDWARE1:
+
+ AcpiOsPrintf ("\n");
+ InfoTable = AcpiDmTableInfoIvrsHware1;
break;
+ /* Types 11h, 40h, IVHD (I/O Virtualization Hardware Definition) */
+
+ case ACPI_IVRS_TYPE_HARDWARE2:
+ case ACPI_IVRS_TYPE_HARDWARE3:
+
+ AcpiOsPrintf ("\n");
+ InfoTable = AcpiDmTableInfoIvrsHware23;
+ break;
+
+ /* Types 20h-22h, IVMD (I/O Virtualization Memory Definition Block) */
+
case ACPI_IVRS_TYPE_MEMORY1:
case ACPI_IVRS_TYPE_MEMORY2:
case ACPI_IVRS_TYPE_MEMORY3:
- InfoTable = AcpiDmTableInfoIvrs1;
+ AcpiOsPrintf ("\n");
+ InfoTable = AcpiDmTableInfoIvrsMemory;
break;
default:
@@ -392,7 +467,6 @@
/* Dump the subtable */
- AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
Subtable->Length, InfoTable);
if (ACPI_FAILURE (Status))
@@ -400,27 +474,42 @@
return;
}
- /* The hardware subtable can contain multiple device entries */
+ /* The hardware subtables (IVHD) can contain multiple device entries */
- if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE)
+ if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1 ||
+ Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2 ||
+ Subtable->Type == ACPI_IVRS_TYPE_HARDWARE3)
{
- EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE);
- DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
- sizeof (ACPI_IVRS_HARDWARE));
+ if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1)
+ {
+ EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE1);
+ DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
+ sizeof (ACPI_IVRS_HARDWARE1));
+ }
+ else
+ {
+ /* ACPI_IVRS_TYPE_HARDWARE2, HARDWARE3 subtable types */
+
+ EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE2);
+ DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
+ sizeof (ACPI_IVRS_HARDWARE2));
+ }
+
+ /* Process all of the Device Entries */
while (EntryOffset < (Offset + Subtable->Length))
{
AcpiOsPrintf ("\n");
+
/*
* Upper 2 bits of Type encode the length of the device entry
*
* 00 = 4 byte
* 01 = 8 byte
- * 10 = 16 byte - currently no entries defined
- * 11 = 32 byte - currently no entries defined
+ * 1x = variable length
*/
EntryType = DeviceEntry->Type;
- EntryLength = EntrySizes [EntryType >> 6];
+ EntryLength = EntryType >> 6 == 1 ? 8 : 4;
switch (EntryType)
{
@@ -459,6 +548,14 @@
InfoTable = AcpiDmTableInfoIvrs8c;
break;
+ /* Variable-length entries */
+
+ case ACPI_IVRS_TYPE_HID:
+
+ EntryLength = 4;
+ InfoTable = AcpiDmTableInfoIvrsHid;
+ break;
+
default:
InfoTable = AcpiDmTableInfoIvrs4;
AcpiOsPrintf (
@@ -477,9 +574,90 @@
return;
}
+ HidSubtable = ACPI_CAST_PTR (ACPI_IVRS_DEVICE_HID, DeviceEntry);
EntryOffset += EntryLength;
- DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, DeviceEntry,
+ DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, HidSubtable,
EntryLength);
+
+ if (EntryType == ACPI_IVRS_TYPE_HID)
+ {
+ /*
+ * Determine if the HID is an integer or a string.
+ * An integer is defined to be 32 bits, with the upper 32 bits
+ * set to zero. (from the ACPI Spec): "The HID can be a 32-bit
+ * integer or a character string. If an integer, the lower
+ * 4 bytes of the field contain the integer and the upper
+ * 4 bytes are padded with 0".
+ */
+ if (UtIsIdInteger ((UINT8 *) &HidSubtable->AcpiHid))
+ {
+ Status = AcpiDmDumpTable (Table->Length, EntryOffset,
+ &HidSubtable->AcpiHid, 8, AcpiDmTableInfoIvrsHidInteger);
+ }
+ else
+ {
+ Status = AcpiDmDumpTable (Table->Length, EntryOffset,
+ &HidSubtable->AcpiHid, 8, AcpiDmTableInfoIvrsHidString);
+ }
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ EntryOffset += 8;
+
+ /*
+ * Determine if the CID is an integer or a string. The format
+ * of the CID is the same as the HID above. From ACPI Spec:
+ * "If present, CID must be a single Compatible Device ID
+ * following the same format as the HID field."
+ */
+ if (UtIsIdInteger ((UINT8 *) &HidSubtable->AcpiCid))
+ {
+ Status = AcpiDmDumpTable (Table->Length, EntryOffset,
+ &HidSubtable->AcpiCid, 8, AcpiDmTableInfoIvrsCidInteger);
+ }
+ else
+ {
+ Status = AcpiDmDumpTable (Table->Length, EntryOffset,
+ &HidSubtable->AcpiCid, 8, AcpiDmTableInfoIvrsCidString);
+ }
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ EntryOffset += 8;
+ EntryLength = HidSubtable->UidLength;
+
+ if (EntryLength > ACPI_IVRS_UID_NOT_PRESENT)
+ {
+ /* Dump the UID based upon the UidType field (String or Integer) */
+
+ if (HidSubtable->UidType == ACPI_IVRS_UID_IS_STRING)
+ {
+ Status = AcpiDmDumpTable (Table->Length, EntryOffset,
+ &HidSubtable->UidType, EntryLength, AcpiDmTableInfoIvrsUidString);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ }
+ else /* ACPI_IVRS_UID_IS_INTEGER */
+ {
+ Status = AcpiDmDumpTable (Table->Length, EntryOffset,
+ &HidSubtable->UidType, EntryLength, AcpiDmTableInfoIvrsUidInteger);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ }
+ }
+
+ EntryOffset += EntryLength+2;
+ DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER,
+ Table, EntryOffset);
+ }
}
}
@@ -602,6 +780,8 @@
/* Subtables */
Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset);
+ DbgPrint (ASL_PARSE_OUTPUT, "//0B) Offset %X, from table start: 0x%8.8X%8.8X\n",
+ Offset, ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table)));
while (Offset < Table->Length)
{
/* Common subtable header */
@@ -614,6 +794,7 @@
return;
}
+ DbgPrint (ASL_PARSE_OUTPUT, "subtableType: %X\n", Subtable->Type);
switch (Subtable->Type)
{
case ACPI_MADT_TYPE_LOCAL_APIC:
@@ -696,10 +877,30 @@
InfoTable = AcpiDmTableInfoMadt15;
break;
+ case ACPI_MADT_TYPE_MULTIPROC_WAKEUP:
+
+ InfoTable = AcpiDmTableInfoMadt16;
+ break;
+
default:
- AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n",
- Subtable->Type);
+ if ((Subtable->Type >= ACPI_MADT_TYPE_RESERVED) &&
+ (Subtable->Type < ACPI_MADT_TYPE_OEM_RESERVED))
+ {
+ AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n",
+ Subtable->Type);
+ goto NextSubtable;
+ }
+ else if (Subtable->Type >= ACPI_MADT_TYPE_OEM_RESERVED)
+ {
+ DbgPrint (ASL_PARSE_OUTPUT, "//[Found an OEM structure, type = %0x]\n",
+ Subtable->Type);
+ Offset += sizeof (ACPI_SUBTABLE_HEADER);
+ DbgPrint (ASL_PARSE_OUTPUT, "//[0) Subtable->Length = %X, Subtable = %p, Offset = %X]\n",
+ Subtable->Length, Subtable, Offset);
+ DbgPrint (ASL_PARSE_OUTPUT, "//[0A) Offset from table start: 0x%8.8X%8.8X]\n",
+ ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table)));
+ }
/* Attempt to continue */
@@ -709,9 +910,24 @@
return;
}
+ /* Dump the OEM data */
+
+ Status = AcpiDmDumpTable (Length, Offset, ACPI_CAST_PTR (UINT8, Table) + Offset,
+ Subtable->Length - sizeof (ACPI_SUBTABLE_HEADER), AcpiDmTableInfoMadt17);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ DbgPrint (ASL_PARSE_OUTPUT, "//[1) Subtable->Length = %X, Offset = %X]\n",
+ Subtable->Length, Offset);
+ Offset -= sizeof (ACPI_SUBTABLE_HEADER);
+
goto NextSubtable;
}
+ DbgPrint (ASL_PARSE_OUTPUT, "//[2) Subtable->Length = %X, Offset = %X]\n",
+ Subtable->Length, Offset);
Status = AcpiDmDumpTable (Length, Offset, Subtable,
Subtable->Length, InfoTable);
if (ACPI_FAILURE (Status))
@@ -722,9 +938,28 @@
NextSubtable:
/* Point to next subtable */
- Offset += Subtable->Length;
+ DbgPrint (ASL_PARSE_OUTPUT, "//[3) Subtable->Length = %X, Offset = %X]\n",
+ Subtable->Length, Offset);
+ DbgPrint (ASL_PARSE_OUTPUT, "//[4) Offset from table start: 0x%8.8X%8.8X (%p) %p]\n",
+ ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (UINT8, Subtable) - ACPI_CAST_PTR (UINT8, Table)), Subtable, Table);
+ if (Offset > Table->Length)
+ {
+ return;
+ }
+
Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable,
Subtable->Length);
+
+ DbgPrint (ASL_PARSE_OUTPUT, "//[5) Next Subtable %p, length %X]\n",
+ Subtable, Subtable->Length);
+ DbgPrint (ASL_PARSE_OUTPUT, "//[5B) Offset from table start: 0x%8.8X%8.8X (%p)]\n",
+ ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table)), Subtable);
+
+ Offset = ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table);
+ if (Offset >= Table->Length)
+ {
+ return;
+ }
}
}
@@ -987,59 +1222,6 @@
/*******************************************************************************
*
- * FUNCTION: AcpiDmDumpMtmr
- *
- * PARAMETERS: Table - A MTMR table
- *
- * RETURN: None
- *
- * DESCRIPTION: Format the contents of a MTMR
- *
- ******************************************************************************/
-
-void
-AcpiDmDumpMtmr (
- ACPI_TABLE_HEADER *Table)
-{
- ACPI_STATUS Status;
- UINT32 Offset = sizeof (ACPI_TABLE_MTMR);
- ACPI_MTMR_ENTRY *Subtable;
-
-
- /* Main table */
-
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMtmr);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Subtables */
-
- Subtable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Table, Offset);
- while (Offset < Table->Length)
- {
- /* Common subtable header */
-
- AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
- sizeof (ACPI_MTMR_ENTRY), AcpiDmTableInfoMtmr0);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Point to next subtable */
-
- Offset += sizeof (ACPI_MTMR_ENTRY);
- Subtable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Subtable,
- sizeof (ACPI_MTMR_ENTRY));
- }
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiDmDumpNfit
*
* PARAMETERS: Table - A NFIT table
@@ -1232,6 +1414,410 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpNhlt
+ *
+ * PARAMETERS: Table - A NHLT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of an NHLT.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpNhlt (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ UINT32 Offset;
+ UINT32 TableLength = Table->Length;
+ UINT32 EndpointCount;
+ UINT8 FormatsCount;
+ ACPI_NHLT_ENDPOINT *Subtable;
+ ACPI_NHLT_FORMAT_CONFIG *FormatSubtable;
+ ACPI_TABLE_NHLT *InfoTable;
+ UINT32 CapabilitiesSize;
+ UINT32 i;
+ UINT32 j;
+ UINT32 EndpointEndOffset;
+ UINT8 ConfigType = 0;
+ UINT8 ArrayType;
+ UINT8 MicrophoneCount;
+ ACPI_NHLT_VENDOR_MIC_COUNT *MicCount;
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A *DevSpecific;
+ ACPI_NHLT_FORMATS_CONFIG *FormatsConfig;
+ ACPI_NHLT_DEVICE_INFO_COUNT *Count;
+ ACPI_NHLT_DEVICE_INFO *DeviceInfo;
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B *Capabilities;
+
+
+ /* Main table */
+
+ AcpiOsPrintf (" /* Main table */\n");
+
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoNhlt);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Get the Endpoint Descriptor Count */
+
+ InfoTable = ACPI_ADD_PTR (ACPI_TABLE_NHLT, Table, 0);
+ EndpointCount = InfoTable->EndpointCount;
+
+ /* Subtables */
+
+ Offset = sizeof (ACPI_TABLE_NHLT);
+
+ while (Offset < TableLength)
+ {
+ /* A variable number of Endpoint Descriptors - process each */
+
+ for (i = 0; i < EndpointCount; i++)
+ {
+ /* Do the Endpoint Descriptor table */
+
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+
+ /* Check for endpoint descriptor length beyond end-of-table */
+
+ if (Subtable->DescriptorLength > TableLength)
+ {
+ Offset += 1;
+ AcpiOsPrintf ("\n /* Endpoint Descriptor Length larger than"
+ " table size: %X, table %X, adjusting table offset (+1) */\n",
+ Subtable->DescriptorLength, TableLength);
+
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+ }
+
+ AcpiOsPrintf ("\n /* Endpoint Descriptor #%u */\n", i+1);
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
+ Subtable->DescriptorLength, AcpiDmTableInfoNhlt0);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ EndpointEndOffset = Subtable->DescriptorLength + Offset;
+
+ /* Check for endpoint descriptor beyond end-of-table */
+
+ if (Subtable->DescriptorLength > TableLength)
+ {
+ AcpiOsPrintf ("\n /* Endpoint Descriptor Length larger than table size: %X, table %X */\n",
+ Subtable->DescriptorLength, TableLength);
+ }
+
+ Offset += sizeof (ACPI_NHLT_ENDPOINT);
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+
+ /* Do the Device Specific table */
+
+ AcpiOsPrintf ("\n /* Endpoint Device_Specific_Config table */\n");
+ DevSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Subtable);
+ CapabilitiesSize = DevSpecific->CapabilitiesSize;
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B), AcpiDmTableInfoNhlt5b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ ArrayType = 0;
+
+ /* Different subtables based upon capabilities_size */
+
+ switch (CapabilitiesSize)
+ {
+ case 0:
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B);
+ break;
+
+ case 1:
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C), AcpiDmTableInfoNhlt5c);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C);
+ break;
+
+ case 2:
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG), AcpiDmTableInfoNhlt5);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG);
+ break;
+
+ case 3:
+ default:
+ /* Extract the ConfigType and ArrayType */
+
+ ConfigType = DevSpecific->ConfigType;
+ ArrayType = DevSpecific->ArrayType;
+
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A), AcpiDmTableInfoNhlt5a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Capabilities Size == 3 */
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A);
+ break;
+
+ case 7:
+ ConfigType = DevSpecific->ConfigType;
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+ DevSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Subtable);
+
+ AcpiOsPrintf ("\n /* Render Feedback Device-Specific table */\n");
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG), AcpiDmTableInfoNhlt5);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Capabilities Size = 7 */
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG);
+
+ if (ConfigType == ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK)
+ {
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+ DevSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Subtable);
+
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG), AcpiDmTableInfoNhlt6b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG);
+ }
+ break;
+ }
+
+ /* Check for a vendor-defined mic array */
+
+ if (ConfigType == ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY)
+ {
+ if ((ArrayType & ACPI_NHLT_ARRAY_TYPE_MASK) == ACPI_NHLT_VENDOR_DEFINED)
+ {
+ /* Vendor-defined microphone array; get the microphone count first */
+
+ AcpiOsPrintf ("\n /* Vendor-defined microphone count */\n");
+ MicCount = ACPI_ADD_PTR (ACPI_NHLT_VENDOR_MIC_COUNT, Table, Offset);
+ MicrophoneCount = MicCount->MicrophoneCount;
+
+ Status = AcpiDmDumpTable (TableLength, Offset, MicCount,
+ sizeof (ACPI_NHLT_VENDOR_MIC_COUNT), AcpiDmTableInfoNhlt6a);
+ Offset += sizeof (ACPI_NHLT_VENDOR_MIC_COUNT);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Get the vendor microphone config structure(s) */
+
+ for (j = 0; j < MicrophoneCount; j++)
+ {
+ AcpiOsPrintf ("\n /* Vendor-defined microphone array #%u*/\n", j+1);
+ DevSpecific = ACPI_ADD_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Table, Offset);
+
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_VENDOR_MIC_CONFIG), AcpiDmTableInfoNhlt6);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_NHLT_VENDOR_MIC_CONFIG);
+ }
+
+ /* Check for Microphone SNR and sensitivity extension */
+
+ if ((ArrayType & ACPI_NHLT_ARRAY_TYPE_EXT_MASK) == ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT)
+ {
+ AcpiOsPrintf ("\n /* Microphone SNR and sensitivity array */\n");
+ DevSpecific = ACPI_ADD_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Table, Offset);
+
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION), AcpiDmTableInfoNhlt9);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION);
+ }
+ }
+ }
+
+ /* Do the Formats_Config table - starts with the FormatsCount field */
+
+ FormatsConfig = ACPI_ADD_PTR (ACPI_NHLT_FORMATS_CONFIG, Table, Offset);
+ FormatsCount = FormatsConfig->FormatsCount;
+
+ AcpiOsPrintf ("\n /* Formats_Config table */\n");
+
+ /* Dump the FormatsCount value */
+
+ if (FormatsCount > 0)
+ {
+ Status = AcpiDmDumpTable (TableLength, Offset, FormatsConfig,
+ sizeof (ACPI_NHLT_FORMATS_CONFIG), AcpiDmTableInfoNhlt4);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ }
+ Offset += sizeof (ACPI_NHLT_FORMATS_CONFIG);
+
+ /* A variable number of Format_Config Descriptors - process each */
+
+ for (j = 0; j < FormatsCount; j++)
+ {
+ FormatSubtable = ACPI_ADD_PTR (ACPI_NHLT_FORMAT_CONFIG, Table, Offset);
+ CapabilitiesSize = FormatSubtable->CapabilitySize;
+
+ /* Do the Wave_extensible struct */
+
+ AcpiOsPrintf ("\n /* Wave_Format_Extensible table #%u */\n", j+1);
+ Status = AcpiDmDumpTable (TableLength, Offset, FormatSubtable,
+ sizeof (ACPI_NHLT_FORMAT_CONFIG), AcpiDmTableInfoNhlt3);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_NHLT_FORMAT_CONFIG);
+
+ if (CapabilitiesSize > 0)
+ {
+ UINT8* CapabilitiesBuf = ACPI_ADD_PTR (UINT8, Table, Offset);
+ /* Do the Capabilities array (of bytes) */
+
+ AcpiOsPrintf ("\n /* Specific_Config table #%u */\n", j+1);
+
+ Status = AcpiDmDumpTable (TableLength, Offset, CapabilitiesBuf,
+ CapabilitiesSize, AcpiDmTableInfoNhlt3a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += CapabilitiesSize; /* + sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B); */
+ }
+
+ } /* for (j = 0; j < FormatsCount; j++) */
+
+ /*
+ * If we are not done with the current Endpoint yet, then there must be
+ * some non documented structure(s) yet to be processed. First, get
+ * the count of such structure(s).
+ */
+ if (Offset < EndpointEndOffset)
+ {
+ AcpiOsPrintf ("\n /* Structures that are not part of NHLT spec */\n");
+ Count = ACPI_ADD_PTR (ACPI_NHLT_DEVICE_INFO_COUNT, Table, Offset);
+ Status = AcpiDmDumpTable (TableLength, Offset, Count,
+ sizeof (ACPI_NHLT_DEVICE_INFO_COUNT), AcpiDmTableInfoNhlt7);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_INFO_COUNT);
+
+ /* Variable number of device structures */
+
+ for (j = 0; j < Count->StructureCount; j++)
+ {
+ DeviceInfo = ACPI_ADD_PTR (ACPI_NHLT_DEVICE_INFO, Table, Offset);
+ AcpiOsPrintf ("\n /* Device Info structure #%u (not part of NHLT spec) */\n", j+1);
+
+ /*
+ * Dump the following Device Info fields:
+ * 1) Device ID
+ * 2) Device Instance ID
+ * 3) Device Port ID
+ */
+ Status = AcpiDmDumpTable (TableLength, Offset, DeviceInfo,
+ sizeof (ACPI_NHLT_DEVICE_INFO), AcpiDmTableInfoNhlt7a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_NHLT_DEVICE_INFO);
+ }
+
+ /*
+ * Check that the current offset is not beyond the end of
+ * this endpoint descriptor. If it is not, print those
+ * undocumented bytes.
+ */
+ if (Offset < EndpointEndOffset)
+ {
+ /* Unknown data at the end of the Endpoint */
+ UINT32 size = EndpointEndOffset - Offset;
+ UINT8* buffer = ACPI_ADD_PTR (UINT8, Table, Offset);
+ AcpiOsPrintf ("\n /* Unknown data at the end of the Endpoint, size: %X */\n", size);
+ Status = AcpiDmDumpTable (TableLength, Offset, buffer,
+ size, AcpiDmTableInfoNhlt7b);
+ Offset = EndpointEndOffset;
+ }
+
+ /* Should be at the end of the Endpoint structure. */
+ }
+
+ } /* for (i = 0; i < EndpointCount; i++) */
+
+
+ /*
+ * Done with all of the Endpoint Descriptors, Emit the table terminator
+ * (if such a legacy structure is present -- not in NHLT specification)
+ */
+ if (Offset < TableLength)
+ {
+ Capabilities = ACPI_ADD_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B, Table, Offset);
+ AcpiOsPrintf ("\n/* Terminating specific config (not part of NHLT spec) */\n");
+
+ Status = AcpiDmDumpTable (TableLength, Offset, Capabilities,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B), AcpiDmTableInfoNhlt5b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B);
+
+ if (Capabilities->CapabilitiesSize > 0)
+ {
+ UINT32 remainingBytes = TableLength - Offset;
+ UINT8* buffer = ACPI_ADD_PTR (UINT8, Table, Offset);
+
+ if (remainingBytes != Capabilities->CapabilitiesSize)
+ AcpiOsPrintf ("\n/* Incorrect config size, should be %X, is %X */\n",
+ Capabilities->CapabilitiesSize, remainingBytes);
+ Status = AcpiDmDumpTable (TableLength, Offset, buffer,
+ remainingBytes, AcpiDmTableInfoNhlt3a);
+ }
+ }
+
+ return;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpPcct
*
* PARAMETERS: Table - A PCCT table
@@ -1304,6 +1890,11 @@
InfoTable = AcpiDmTableInfoPcct4;
break;
+ case ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE:
+
+ InfoTable = AcpiDmTableInfoPcct5;
+ break;
+
default:
AcpiOsPrintf (
@@ -1385,6 +1976,205 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpPhat
+ *
+ * PARAMETERS: Table - A PHAT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a PHAT.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpPhat (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_PHAT_HEADER *Subtable;
+ ACPI_PHAT_VERSION_DATA *VersionData;
+ UINT32 RecordCount;
+ UINT32 Length = Table->Length;
+ UINT32 Offset = sizeof (ACPI_TABLE_PHAT);
+ UINT32 OriginalOffset;
+ UINT32 SubtableLength;
+ UINT32 PathLength;
+ UINT32 VendorLength;
+ UINT16 RecordType;
+ const wchar_t *WideString;
+
+
+ Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, sizeof (ACPI_TABLE_PHAT));
+
+ while (Offset < Table->Length)
+ {
+ /* Common subtable header */
+
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ sizeof (ACPI_PHAT_HEADER), AcpiDmTableInfoPhatHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "\n/* %u, Subtable->Type %X */\n",
+ __LINE__, Subtable->Type);
+
+ switch (Subtable->Type)
+ {
+ case ACPI_PHAT_TYPE_FW_VERSION_DATA:
+
+ InfoTable = AcpiDmTableInfoPhat0;
+ SubtableLength = Offset += sizeof (ACPI_PHAT_VERSION_DATA);
+ break;
+
+ case ACPI_PHAT_TYPE_FW_HEALTH_DATA:
+
+ InfoTable = AcpiDmTableInfoPhat1;
+ SubtableLength = Offset += sizeof (ACPI_PHAT_TYPE_FW_HEALTH_DATA);
+ break;
+
+ default:
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "\n**** Unknown PHAT subtable type 0x%X\n\n",
+ Subtable->Type);
+
+ return;
+ }
+
+ Status = AcpiDmDumpTable (Length, SubtableLength, Subtable,
+ SubtableLength, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ OriginalOffset = Offset;
+ switch (Subtable->Type)
+ {
+ case ACPI_PHAT_TYPE_FW_VERSION_DATA:
+
+ VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA, Subtable);
+ RecordCount = VersionData->ElementCount;
+ RecordType = *ACPI_CAST_PTR (UINT8, Subtable);
+
+ /*
+ * Skip past a zero-valued block (not part of the ACPI PHAT specification).
+ * First, check for a zero length record and a zero element count
+ */
+ if (!VersionData->Header.Length && !VersionData->ElementCount)
+ {
+ while (RecordType == 0)
+ {
+ Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, Offset);
+ RecordType = *ACPI_CAST_PTR (UINT8, Subtable);
+ RecordCount = VersionData->ElementCount;
+ Offset += 1;
+ }
+
+ Offset -= 1;
+ AcpiOsPrintf ("\n/* Warning: Block of zeros found above starting at Offset %X Length %X */\n"
+ "/* (not compliant to PHAT specification -- ignoring block) */\n",
+ OriginalOffset - 12, Offset - OriginalOffset + 12);
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, RecordCount: %X, Offset %X, SubtableLength %X */\n",
+ __LINE__, RecordCount, Offset, SubtableLength);
+
+ /* Emit each of the version elements */
+
+ while (RecordCount && VersionData->Header.Length)
+ {
+ AcpiOsPrintf ("\n/* Version Element #%Xh Offset %Xh */\n\n",
+ VersionData->ElementCount - RecordCount + 1, Offset);
+
+ Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, Offset);
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_PHAT_VERSION_ELEMENT);
+ RecordCount--;
+ }
+
+ break;
+
+ case ACPI_PHAT_TYPE_FW_HEALTH_DATA:
+
+ /*
+ * Get the length of the Device Path (UEFI wide string).
+ * Include the wide null terminator (+2),
+ */
+ WideString = ACPI_ADD_PTR (wchar_t, Subtable,
+ sizeof (ACPI_PHAT_HEALTH_DATA));
+
+ PathLength = (wcslen (WideString) * 2) + 2;
+ DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, PathLength %X, Offset %X, Table->Length %X */\n",
+ __LINE__, PathLength, Offset, Length);
+
+ Status = AcpiDmDumpTable (Length, Offset,
+ ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)),
+ PathLength, AcpiDmTableInfoPhat1a);
+ Offset += PathLength;
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Get Device-Specific Data - length of which is the remaining subtable length. */
+
+ VendorLength =
+ Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength;
+ DbgPrint (ASL_DEBUG_OUTPUT, "%u, Subtable->Length %X, VendorLength %X, Offset %X PathLength: %X\n",
+ __LINE__, Subtable->Length, VendorLength, Offset, PathLength);
+
+ if (VendorLength)
+ {
+ /* Point past the Device Path, Compile the Device-Specific Data */
+
+ Status = AcpiDmDumpTable (Length, Offset,
+ ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength),
+ VendorLength, AcpiDmTableInfoPhat1b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += VendorLength;
+ }
+
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
+
+ default:
+
+ AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n",
+ Subtable->Type);
+ return;
+ }
+
+ /* Next subtable */
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, Bottom of main loop: Offset %X, "
+ "Subtable->Length %X, Table->Length %X */\n",
+ __LINE__, Offset, Subtable->Length, Table->Length);
+
+ Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table,
+ Offset);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpPmtt
*
* PARAMETERS: Table - A PMTT table
@@ -1402,15 +2192,8 @@
{
ACPI_STATUS Status;
ACPI_PMTT_HEADER *Subtable;
- ACPI_PMTT_HEADER *MemSubtable;
- ACPI_PMTT_HEADER *DimmSubtable;
- ACPI_PMTT_DOMAIN *DomainArray;
UINT32 Length = Table->Length;
UINT32 Offset = sizeof (ACPI_TABLE_PMTT);
- UINT32 MemOffset;
- UINT32 DimmOffset;
- UINT32 DomainOffset;
- UINT32 DomainCount;
/* Main table */
@@ -1426,160 +2209,56 @@
Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset);
while (Offset < Table->Length)
{
- /* Common subtable header */
+ /* Each of the types below contain the common subtable header */
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
- Subtable->Length, AcpiDmTableInfoPmttHdr);
- if (ACPI_FAILURE (Status))
+ switch (Subtable->Type)
{
- return;
- }
+ case ACPI_PMTT_TYPE_SOCKET:
- /* Only Socket subtables are expected at this level */
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoPmtt0);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
- if (Subtable->Type != ACPI_PMTT_TYPE_SOCKET)
- {
+ case ACPI_PMTT_TYPE_CONTROLLER:
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoPmtt1);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
+
+ case ACPI_PMTT_TYPE_DIMM:
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoPmtt2);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
+
+ case ACPI_PMTT_TYPE_VENDOR:
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoPmttVendor);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
+
+ default:
AcpiOsPrintf (
"\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
Subtable->Type);
return;
}
- /* Dump the fixed-length portion of the subtable */
-
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
- Subtable->Length, AcpiDmTableInfoPmtt0);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Walk the memory controller subtables */
-
- MemOffset = sizeof (ACPI_PMTT_SOCKET);
- MemSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Subtable,
- sizeof (ACPI_PMTT_SOCKET));
-
- while (((Offset + MemOffset) < Table->Length) &&
- (MemOffset < Subtable->Length))
- {
- /* Common subtable header */
-
- AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Length,
- Offset + MemOffset, MemSubtable,
- MemSubtable->Length, AcpiDmTableInfoPmttHdr);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Only memory controller subtables are expected at this level */
-
- if (MemSubtable->Type != ACPI_PMTT_TYPE_CONTROLLER)
- {
- AcpiOsPrintf (
- "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
- MemSubtable->Type);
- return;
- }
-
- /* Dump the fixed-length portion of the controller subtable */
-
- Status = AcpiDmDumpTable (Length,
- Offset + MemOffset, MemSubtable,
- MemSubtable->Length, AcpiDmTableInfoPmtt1);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Walk the variable count of proximity domains */
-
- DomainCount = ((ACPI_PMTT_CONTROLLER *) MemSubtable)->DomainCount;
- DomainOffset = sizeof (ACPI_PMTT_CONTROLLER);
- DomainArray = ACPI_ADD_PTR (ACPI_PMTT_DOMAIN, MemSubtable,
- sizeof (ACPI_PMTT_CONTROLLER));
-
- while (((Offset + MemOffset + DomainOffset) < Table->Length) &&
- ((MemOffset + DomainOffset) < Subtable->Length) &&
- DomainCount)
- {
- Status = AcpiDmDumpTable (Length,
- Offset + MemOffset + DomainOffset, DomainArray,
- sizeof (ACPI_PMTT_DOMAIN), AcpiDmTableInfoPmtt1a);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- DomainOffset += sizeof (ACPI_PMTT_DOMAIN);
- DomainArray++;
- DomainCount--;
- }
-
- if (DomainCount)
- {
- AcpiOsPrintf (
- "\n**** DomainCount exceeds subtable length\n\n");
- }
-
- /* Walk the physical component (DIMM) subtables */
-
- DimmOffset = DomainOffset;
- DimmSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, MemSubtable,
- DomainOffset);
-
- while (((Offset + MemOffset + DimmOffset) < Table->Length) &&
- (DimmOffset < MemSubtable->Length))
- {
- /* Common subtable header */
-
- AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Length,
- Offset + MemOffset + DimmOffset, DimmSubtable,
- DimmSubtable->Length, AcpiDmTableInfoPmttHdr);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Only DIMM subtables are expected at this level */
-
- if (DimmSubtable->Type != ACPI_PMTT_TYPE_DIMM)
- {
- AcpiOsPrintf (
- "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
- DimmSubtable->Type);
- return;
- }
-
- /* Dump the fixed-length DIMM subtable */
-
- Status = AcpiDmDumpTable (Length,
- Offset + MemOffset + DimmOffset, DimmSubtable,
- DimmSubtable->Length, AcpiDmTableInfoPmtt2);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- /* Point to next DIMM subtable */
-
- DimmOffset += DimmSubtable->Length;
- DimmSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER,
- DimmSubtable, DimmSubtable->Length);
- }
-
- /* Point to next Controller subtable */
-
- MemOffset += MemSubtable->Length;
- MemSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER,
- MemSubtable, MemSubtable->Length);
- }
-
- /* Point to next Socket subtable */
+ /* Point to next subtable */
Offset += Subtable->Length;
Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER,
@@ -1710,6 +2389,21 @@
}
break;
+ case ACPI_PPTT_TYPE_CACHE:
+
+ if (Table->Revision < 3)
+ {
+ break;
+ }
+ Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
+ ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
+ sizeof (ACPI_PPTT_CACHE_V1), AcpiDmTableInfoPptt1a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ break;
+
default:
break;
@@ -1725,6 +2419,108 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpPrmt
+ *
+ * PARAMETERS: Table - A PRMT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a PRMT. This table type consists
+ * of an open-ended number of subtables.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpPrmt (
+ ACPI_TABLE_HEADER *Table)
+{
+ UINT32 CurrentOffset = sizeof (ACPI_TABLE_HEADER);
+ ACPI_TABLE_PRMT_HEADER *PrmtHeader;
+ ACPI_PRMT_MODULE_INFO *PrmtModuleInfo;
+ ACPI_PRMT_HANDLER_INFO *PrmtHandlerInfo;
+ ACPI_STATUS Status;
+ UINT32 i, j;
+
+
+ /* Main table header */
+
+ PrmtHeader = ACPI_ADD_PTR (ACPI_TABLE_PRMT_HEADER, Table, CurrentOffset);
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHeader,
+ sizeof (ACPI_TABLE_PRMT_HEADER), AcpiDmTableInfoPrmtHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Invalid PRMT header\n");
+ return;
+ }
+
+ CurrentOffset += sizeof (ACPI_TABLE_PRMT_HEADER);
+
+ /* PRM Module Information Structure array */
+
+ for (i = 0; i < PrmtHeader->ModuleInfoCount; ++i)
+ {
+ PrmtModuleInfo = ACPI_ADD_PTR (ACPI_PRMT_MODULE_INFO, Table, CurrentOffset);
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtModuleInfo,
+ sizeof (ACPI_PRMT_MODULE_INFO), AcpiDmTableInfoPrmtModule);
+
+ CurrentOffset += sizeof (ACPI_PRMT_MODULE_INFO);
+
+ /* PRM handler information structure array */
+
+ for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; ++j)
+ {
+ PrmtHandlerInfo = ACPI_ADD_PTR (ACPI_PRMT_HANDLER_INFO, Table, CurrentOffset);
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHandlerInfo,
+ sizeof (ACPI_PRMT_HANDLER_INFO), AcpiDmTableInfoPrmtHandler);
+
+ CurrentOffset += sizeof (ACPI_PRMT_HANDLER_INFO);
+ }
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmDumpRgrt
+ *
+ * PARAMETERS: Table - A RGRT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a RGRT
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpRgrt (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ ACPI_TABLE_RGRT *Subtable = ACPI_CAST_PTR (ACPI_TABLE_RGRT, Table);
+ UINT32 Offset = sizeof (ACPI_TABLE_RGRT);
+
+
+ /* Main table */
+
+ Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoRgrt);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Dump the binary image as a subtable */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, &Subtable->Image,
+ Table->Length - Offset, AcpiDmTableInfoRgrt0);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpS3pt
*
* PARAMETERS: Table - A S3PT table
@@ -1830,17 +2626,20 @@
AcpiDmDumpSdev (
ACPI_TABLE_HEADER *Table)
{
- ACPI_STATUS Status;
- ACPI_SDEV_HEADER *Subtable;
- ACPI_SDEV_PCIE *Pcie;
- ACPI_SDEV_NAMESPACE *Namesp;
- ACPI_DMTABLE_INFO *InfoTable;
- UINT32 Length = Table->Length;
- UINT32 Offset = sizeof (ACPI_TABLE_SDEV);
- UINT16 PathOffset;
- UINT16 PathLength;
- UINT16 VendorDataOffset;
- UINT16 VendorDataLength;
+ ACPI_STATUS Status;
+ ACPI_SDEV_HEADER *Subtable;
+ ACPI_SDEV_PCIE *Pcie;
+ ACPI_SDEV_NAMESPACE *Namesp;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_DMTABLE_INFO *SecureComponentInfoTable;
+ UINT32 Length = Table->Length;
+ UINT32 Offset = sizeof (ACPI_TABLE_SDEV);
+ UINT16 PathOffset;
+ UINT16 PathLength;
+ UINT16 VendorDataOffset;
+ UINT16 VendorDataLength;
+ ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL;
+ UINT32 CurrentOffset = 0;
/* Main table */
@@ -1883,7 +2682,7 @@
}
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ Status = AcpiDmDumpTable (Table->Length, 0, Subtable,
Subtable->Length, InfoTable);
if (ACPI_FAILURE (Status))
{
@@ -1894,6 +2693,52 @@
{
case ACPI_SDEV_TYPE_NAMESPACE_DEVICE:
+ CurrentOffset = sizeof (ACPI_SDEV_NAMESPACE);
+ if (Subtable->Flags & ACPI_SDEV_SECURE_COMPONENTS_PRESENT)
+ {
+ SecureComponent = ACPI_CAST_PTR (ACPI_SDEV_SECURE_COMPONENT,
+ ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_SDEV_NAMESPACE)));
+
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset,
+ ACPI_ADD_PTR(UINT8, Subtable, sizeof (ACPI_SDEV_NAMESPACE)),
+ sizeof (ACPI_SDEV_SECURE_COMPONENT), AcpiDmTableInfoSdev0b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ CurrentOffset += sizeof (ACPI_SDEV_SECURE_COMPONENT);
+
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset,
+ ACPI_ADD_PTR(UINT8, Subtable, SecureComponent->SecureComponentOffset),
+ sizeof (ACPI_SDEV_HEADER), AcpiDmTableInfoSdevSecCompHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ CurrentOffset += sizeof (ACPI_SDEV_HEADER);
+
+ switch (Subtable->Type)
+ {
+ case ACPI_SDEV_TYPE_ID_COMPONENT:
+
+ SecureComponentInfoTable = AcpiDmTableInfoSdevSecCompId;
+ break;
+
+ case ACPI_SDEV_TYPE_MEM_COMPONENT:
+
+ SecureComponentInfoTable = AcpiDmTableInfoSdevSecCompMem;
+ break;
+
+ default:
+ goto NextSubtable;
+ }
+
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset,
+ ACPI_ADD_PTR(UINT8, Subtable, SecureComponent->SecureComponentOffset),
+ SecureComponent->SecureComponentLength, SecureComponentInfoTable);
+ CurrentOffset += SecureComponent->SecureComponentLength;
+ }
+
/* Dump the PCIe device ID(s) */
Namesp = ACPI_CAST_PTR (ACPI_SDEV_NAMESPACE, Subtable);
@@ -1902,13 +2747,14 @@
if (PathLength)
{
- Status = AcpiDmDumpTable (Table->Length, 0,
+ Status = AcpiDmDumpTable (Table->Length, CurrentOffset,
ACPI_ADD_PTR (UINT8, Namesp, PathOffset),
PathLength, AcpiDmTableInfoSdev0a);
if (ACPI_FAILURE (Status))
{
return;
}
+ CurrentOffset += PathLength;
}
/* Dump the vendor-specific data */
diff --git a/source/common/dmtbdump3.c b/source/common/dmtbdump3.c
index 3b6070e..b39ceff 100644
--- a/source/common/dmtbdump3.c
+++ b/source/common/dmtbdump3.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -226,6 +230,11 @@
InfoTable = AcpiDmTableInfoSrat5;
break;
+ case ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY:
+
+ InfoTable = AcpiDmTableInfoSrat6;
+ break;
+
default:
AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n",
Subtable->Type);
@@ -310,6 +319,65 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpSvkl
+ *
+ * PARAMETERS: Table - A SVKL table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a SVKL. This is a variable-length
+ * table that contains an open-ended number of key subtables at
+ * the end of the header.
+ *
+ * NOTES: SVKL is essentially a flat table, with a small main table and
+ * a variable number of a single type of subtable.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpSvkl (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ UINT32 Length = Table->Length;
+ UINT32 Offset = sizeof (ACPI_TABLE_SVKL);
+ ACPI_SVKL_KEY *Subtable;
+
+
+ /* Main table */
+
+ Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSvkl);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* The rest of the table consists of subtables (single type) */
+
+ Subtable = ACPI_ADD_PTR (ACPI_SVKL_KEY, Table, Offset);
+ while (Offset < Table->Length)
+ {
+ /* Dump the subtable */
+
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ sizeof (ACPI_SVKL_KEY), AcpiDmTableInfoSvkl0);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point to next subtable */
+
+ Offset += sizeof (ACPI_SVKL_KEY);
+ Subtable = ACPI_ADD_PTR (ACPI_SVKL_KEY, Subtable,
+ sizeof (ACPI_SVKL_KEY));
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpTcpa
*
* PARAMETERS: Table - A TCPA table
@@ -390,6 +458,7 @@
* DESCRIPTION: Format the contents of a TPM2.
*
******************************************************************************/
+
static void
AcpiDmDumpTpm2Rev3 (
ACPI_TABLE_HEADER *Table)
@@ -491,53 +560,100 @@
/*******************************************************************************
*
- * FUNCTION: AcpiDmDumpVrtc
+ * FUNCTION: AcpiDmDumpViot
*
- * PARAMETERS: Table - A VRTC table
+ * PARAMETERS: Table - A VIOT table
*
* RETURN: None
*
- * DESCRIPTION: Format the contents of a VRTC
+ * DESCRIPTION: Format the contents of a VIOT
*
******************************************************************************/
void
-AcpiDmDumpVrtc (
+AcpiDmDumpViot (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
- UINT32 Offset = sizeof (ACPI_TABLE_VRTC);
- ACPI_VRTC_ENTRY *Subtable;
-
+ ACPI_TABLE_VIOT *Viot;
+ ACPI_VIOT_HEADER *ViotHeader;
+ UINT16 Length;
+ UINT32 Offset;
+ ACPI_DMTABLE_INFO *InfoTable;
/* Main table */
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoVrtc);
+ Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoViot);
if (ACPI_FAILURE (Status))
{
return;
}
- /* Subtables */
+ Viot = ACPI_CAST_PTR (ACPI_TABLE_VIOT, Table);
- Subtable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, Table, Offset);
+ Offset = Viot->NodeOffset;
while (Offset < Table->Length)
{
/* Common subtable header */
-
+ ViotHeader = ACPI_ADD_PTR (ACPI_VIOT_HEADER, Table, Offset);
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
- sizeof (ACPI_VRTC_ENTRY), AcpiDmTableInfoVrtc0);
+
+ Length = sizeof (ACPI_VIOT_HEADER);
+ Status = AcpiDmDumpTable (Table->Length, Offset, ViotHeader, Length,
+ AcpiDmTableInfoViotHeader);
if (ACPI_FAILURE (Status))
{
return;
}
- /* Point to next subtable */
+ Length = ViotHeader->Length;
+ switch (ViotHeader->Type)
+ {
+ case ACPI_VIOT_NODE_PCI_RANGE:
- Offset += sizeof (ACPI_VRTC_ENTRY);
- Subtable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, Subtable,
- sizeof (ACPI_VRTC_ENTRY));
+ InfoTable = AcpiDmTableInfoViot1;
+ break;
+
+ case ACPI_VIOT_NODE_MMIO:
+
+ InfoTable = AcpiDmTableInfoViot2;
+ break;
+
+ case ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI:
+
+ InfoTable = AcpiDmTableInfoViot3;
+ break;
+
+ case ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO:
+
+ InfoTable = AcpiDmTableInfoViot4;
+ break;
+
+ default:
+
+ AcpiOsPrintf ("\n*** Unknown VIOT node type 0x%X\n",
+ ViotHeader->Type);
+
+ /* Attempt to continue */
+
+ if (!Length)
+ {
+ AcpiOsPrintf ("Invalid zero length VIOT node\n");
+ return;
+ }
+ goto NextSubtable;
+ }
+
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Table->Length, Offset, ViotHeader, Length,
+ InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+NextSubtable:
+ Offset += Length;
}
}
@@ -614,13 +730,12 @@
{
ACPI_STATUS Status;
ACPI_TABLE_WPBT *Subtable;
- UINT32 Length = Table->Length;
UINT16 ArgumentsLength;
/* Dump the main table */
- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoWpbt);
+ Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWpbt);
if (ACPI_FAILURE (Status))
{
return;
@@ -631,8 +746,11 @@
Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table);
ArgumentsLength = Subtable->ArgumentsLength;
- /* Dump the arguments buffer */
+ /* Dump the arguments buffer if present */
- (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength,
- AcpiDmTableInfoWpbt0);
+ if (ArgumentsLength)
+ {
+ (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength,
+ AcpiDmTableInfoWpbt0);
+ }
}
diff --git a/source/common/dmtbinfo.c b/source/common/dmtbinfo.c
index 6aa83a4..70b967f 100644
--- a/source/common/dmtbinfo.c
+++ b/source/common/dmtbinfo.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -180,7 +184,7 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{
{ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Facs), "FACS Address", 0},
- {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Dsdt), "DSDT Address", DT_NON_ZERO},
+ {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Dsdt), "DSDT Address", 0},
{ACPI_DMT_UINT8, ACPI_FADT_OFFSET (Model), "Model", 0},
{ACPI_DMT_FADTPM, ACPI_FADT_OFFSET (PreferredProfile), "PM Profile", 0},
{ACPI_DMT_UINT16, ACPI_FADT_OFFSET (SciInterrupt), "SCI Interrupt", 0},
@@ -296,7 +300,7 @@
ACPI_DMT_TERMINATOR
};
-/* ACPI 5.0 Extensions (FADT version 5) */
+/* Extensions for FADT version 5 */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] =
{
@@ -305,7 +309,7 @@
ACPI_DMT_TERMINATOR
};
-/* ACPI 6.0 Extensions (FADT version 6) */
+/* Extensions for FADT version 6 */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[] =
{
diff --git a/source/common/dmtbinfo1.c b/source/common/dmtbinfo1.c
index d624fa8..4cde9a8 100644
--- a/source/common/dmtbinfo1.c
+++ b/source/common/dmtbinfo1.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -81,6 +85,144 @@
/*******************************************************************************
*
+ * AEST - ARM Error Source table. Conforms to:
+ * ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document Sep 2020
+ *
+ ******************************************************************************/
+
+/* Common Subtable header (one per Subtable) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestHdr[] =
+{
+ {ACPI_DMT_AEST, ACPI_AESTH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT16, ACPI_AESTH_OFFSET (Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_AESTH_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeSpecificOffset), "Node Specific Offset", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeInterfaceOffset), "Node Interface Offset", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeInterruptOffset), "Node Interrupt Array Offset", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeInterruptCount), "Node Interrupt Array Count", 0},
+ {ACPI_DMT_UINT64, ACPI_AESTH_OFFSET (TimestampRate), "Timestamp Rate", 0},
+ {ACPI_DMT_UINT64, ACPI_AESTH_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_AESTH_OFFSET (ErrorInjectionRate), "Error Injection Rate", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*
+ * AEST subtables (nodes)
+ */
+
+/* 0: Processor Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestProcError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST0_OFFSET (ProcessorId), "Processor ID", 0},
+ {ACPI_DMT_AEST_RES, ACPI_AEST0_OFFSET (ResourceType), "Resource Type", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0_OFFSET (Flags), "Flags (decoded Below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AEST0_FLAG_OFFSET (Flags, 0), "Global", 0},
+ {ACPI_DMT_FLAG1, ACPI_AEST0_FLAG_OFFSET (Flags, 0), "Shared", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0_OFFSET (Revision), "Revision", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0_OFFSET (ProcessorAffinity), "Processor Affinity Structure", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0RT: Processor Cache Resource */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestCacheRsrc[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST0A_OFFSET (CacheReference), "Cache Reference", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0A_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1RT: ProcessorTLB Resource */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestTlbRsrc[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST0B_OFFSET (TlbLevel), "TLB Level", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0B_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 2RT: Processor Generic Resource */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestGenRsrc[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Resource", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1: Memory Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestMemError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST1_OFFSET (SratProximityDomain), "Srat Proximity Domain", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 2: Smmu Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestSmmuError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST2_OFFSET (IortNodeReference), "Iort Node Reference", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST2_OFFSET (SubcomponentReference), "Subcomponent Reference", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 3: Vendor Defined */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST3_OFFSET (AcpiHid), "ACPI HID", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST3_OFFSET (AcpiUid), "ACPI UID", 0},
+ {ACPI_DMT_BUF16, ACPI_AEST3_OFFSET (VendorSpecificData), "Vendor Specific Data", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 4: Gic Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[] =
+{
+ {ACPI_DMT_AEST_GIC, ACPI_AEST4_OFFSET (InterfaceType), "GIC Interface Type", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST4_OFFSET (InstanceId), "Instance ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* AestXface: Node Interface Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[] =
+{
+ {ACPI_DMT_AEST_XFACE, ACPI_AEST0D_OFFSET (Type), "Interface Type", 0},
+ {ACPI_DMT_UINT24, ACPI_AEST0D_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0D_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AEST0D_FLAG_OFFSET (Flags, 0), "Shared Interface", 0},
+ {ACPI_DMT_FLAG1, ACPI_AEST0D_FLAG_OFFSET (Flags, 0), "Clear MISCx Registers", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (Address), "Address", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0D_OFFSET (ErrorRecordIndex), "Error Record Index", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0D_OFFSET (ErrorRecordCount), "Error Record Count", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (ErrorRecordImplemented),"Error Record Implemented", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (ErrorStatusReporting), "Error Status Reporting", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (AddressingMode), "Addressing Mode", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* AestXrupt: Node Interrupt Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[] =
+{
+ {ACPI_DMT_AEST_XRUPT, ACPI_AEST0E_OFFSET (Type), "Interrupt Type", 0},
+ {ACPI_DMT_UINT16, ACPI_AEST0E_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0E_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AEST0E_FLAG_OFFSET (Flags, 0), "Level Triggered", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0E_OFFSET (Gsiv), "Gsiv", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0E_OFFSET (IortId), "IortId", 0},
+ {ACPI_DMT_UINT24, ACPI_AEST0E_OFFSET (Reserved1[0]), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* ASF - Alert Standard Format table (Signature "ASF!")
*
******************************************************************************/
@@ -185,6 +327,19 @@
/*******************************************************************************
*
+ * BDAT - BIOS Data ACPI Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[] =
+{
+ {ACPI_DMT_GAS, ACPI_BDAT_OFFSET (Gas), "BDAT Generic Address", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* BERT - Boot Error Record table
*
******************************************************************************/
@@ -231,6 +386,165 @@
ACPI_DMT_TERMINATOR
};
+/*******************************************************************************
+ *
+ * CDAT - Coherent Device Attribute Table
+ *
+ ******************************************************************************/
+
+ /* Table header (not ACPI-compliant) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdatTableHdr[] =
+{
+ {ACPI_DMT_UINT32, ACPI_CDAT_OFFSET (Length), "CDAT Table Length", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_CDAT_OFFSET (Revision), "Revision", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT_OFFSET (Checksum), "Checksum", 0},
+ {ACPI_DMT_UINT48, ACPI_CDAT_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_CDAT_OFFSET (Sequence), "Sequence", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Common subtable header */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdatHeader[] =
+{
+ {ACPI_DMT_CDAT, ACPI_CDATH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT8, ACPI_CDATH_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_CDATH_OFFSET (Length), "Length", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdat0[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CDAT0_OFFSET (DsmadHandle), "DSMAD Handle", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT0_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT0_OFFSET (DpaBaseAddress), "DPA Base Address", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT0_OFFSET (DpaLength), "DPA Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdat1[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (Handle), "Handle", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (DataType), "Data Type", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT1_OFFSET (EntryBaseUnit), "Entry Base Unit", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Entry[0]), "Entry0", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Entry[1]), "Entry1", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Entry[2]), "Entry2", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Reserved2), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdat2[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CDAT2_OFFSET (DsmasHandle), "DSMAS Handle", 0},
+ {ACPI_DMT_UINT24, ACPI_CDAT2_OFFSET (Reserved[3]), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT2_OFFSET (SideCacheSize), "Side Cache Size", 0},
+ {ACPI_DMT_UINT32, ACPI_CDAT2_OFFSET (CacheAttributes), "Cache Attributes", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Subtable 3: Device Scoped Initiator Structure (DSIS) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdat3[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CDAT3_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT3_OFFSET (Handle), "Handle", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT3_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdat4[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CDAT4_OFFSET (DsmasHandle), "DSMAS Handle", 0},
+ {ACPI_DMT_UINT8, ACPI_CDAT4_OFFSET (MemoryType), "Memory Type", 0},
+ {ACPI_DMT_UINT16, ACPI_CDAT4_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT4_OFFSET (DpaOffset), "DPA Offset", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT4_OFFSET (RangeLength), "DPA Range Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdat5[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CDAT5_OFFSET (DataType), "Data Type", 0},
+ {ACPI_DMT_UINT24, ACPI_CDAT5_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CDAT5_OFFSET (EntryBaseUnit), "Entry Base Unit", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Switch Scoped Latency and Bandwidth Entry (SSLBE) (For subtable 5 above) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCdatEntries[] =
+{
+ {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (PortxId), "Port X Id", 0},
+ {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (PortyId), "Port Y Id", 0},
+ {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (LatencyOrBandwidth), "Latency or Bandwidth", 0},
+ {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * CEDT - CXL Early Discovery Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[] =
+{
+ {ACPI_DMT_CEDT, ACPI_CEDT_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT8, ACPI_CEDT_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT_OFFSET (Length), "Length", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0: CXL Host Bridge Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[] =
+{
+ {ACPI_DMT_UINT32, ACPI_CEDT0_OFFSET (Uid), "Associated host bridge", 0},
+ {ACPI_DMT_UINT32, ACPI_CEDT0_OFFSET (CxlVersion), "Specification version", 0},
+ {ACPI_DMT_UINT32, ACPI_CEDT0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CEDT0_OFFSET (Base), "Register base", 0},
+ {ACPI_DMT_UINT64, ACPI_CEDT0_OFFSET (Length), "Register length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1: CXL Fixed Memory Window Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[] =
+{
+ {ACPI_DMT_UINT32, ACPI_CEDT1_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CEDT1_OFFSET (BaseHpa), "Window base address", 0},
+ {ACPI_DMT_UINT64, ACPI_CEDT1_OFFSET (WindowSize), "Window size", 0},
+ {ACPI_DMT_UINT8, ACPI_CEDT1_OFFSET (InterleaveWays), "Interleave Members (2^n)", 0},
+ {ACPI_DMT_UINT8, ACPI_CEDT1_OFFSET (InterleaveArithmetic), "Interleave Arithmetic", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT1_OFFSET (Reserved2), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_CEDT1_OFFSET (Granularity), "Granularity", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT1_OFFSET (Restrictions), "Restrictions", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT1_OFFSET (QtgId), "QtgId", 0},
+ {ACPI_DMT_UINT32, ACPI_CEDT1_OFFSET (InterleaveTargets), "First Target", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1_te[] =
+{
+ {ACPI_DMT_UINT32, ACPI_CEDT1_TE_OFFSET (InterleaveTarget), "Next Target", 0},
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
@@ -478,6 +792,15 @@
ACPI_DMT_TERMINATOR
};
+/* 5: Hardware Unit Definition */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoDmar5[] =
+{
+ {ACPI_DMT_UINT8, ACPI_DMAR5_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_UINT8, ACPI_DMAR5_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_DMAR5_OFFSET (Segment), "PCI Segment Number", 0},
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
@@ -1009,7 +1332,7 @@
{ACPI_DMT_UINT16, ACPI_HMAT0_OFFSET (Flags), "Flags (decoded below)", 0},
{ACPI_DMT_FLAG0, ACPI_HMAT0_FLAG_OFFSET (Flags,0), "Processor Proximity Domain Valid", 0},
{ACPI_DMT_UINT16, ACPI_HMAT0_OFFSET (Reserved1), "Reserved1", 0},
- {ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (ProcessorPD), "Processor Proximity Domain", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (InitiatorPD), "Attached Initiator Proximity Domain", 0},
{ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (MemoryPD), "Memory Proximity Domain", 0},
{ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (Reserved2), "Reserved2", 0},
{ACPI_DMT_UINT64, ACPI_HMAT0_OFFSET (Reserved3), "Reserved3", 0},
@@ -1022,9 +1345,12 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1[] =
{
{ACPI_DMT_UINT8, ACPI_HMAT1_OFFSET (Flags), "Flags (decoded below)", 0},
- {ACPI_DMT_FLAGS4_0, ACPI_HMAT1_FLAG_OFFSET (Flags,0), "Memory Hierarchy", 0},
+ {ACPI_DMT_FLAGS4_0, ACPI_HMAT1_FLAG_OFFSET (Flags,0), "Memory Hierarchy", 0}, /* First 4 bits */
+ {ACPI_DMT_FLAG4, ACPI_HMAT1_FLAG_OFFSET (Flags,0), "Use Minimum Transfer Size", 0},
+ {ACPI_DMT_FLAG5, ACPI_HMAT1_FLAG_OFFSET (Flags,0), "Non-sequential Transfers", 0},
{ACPI_DMT_UINT8, ACPI_HMAT1_OFFSET (DataType), "Data Type", 0},
- {ACPI_DMT_UINT16, ACPI_HMAT1_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT8, ACPI_HMAT1_OFFSET (MinTransferSize), "Minimum Transfer Size", 0},
+ {ACPI_DMT_UINT8, ACPI_HMAT1_OFFSET (Reserved1), "Reserved1", 0},
{ACPI_DMT_UINT32, ACPI_HMAT1_OFFSET (NumberOfInitiatorPDs), "Initiator Proximity Domains #", 0},
{ACPI_DMT_UINT32, ACPI_HMAT1_OFFSET (NumberOfTargetPDs), "Target Proximity Domains #", 0},
{ACPI_DMT_UINT32, ACPI_HMAT1_OFFSET (Reserved2), "Reserved2", 0},
diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c
index 1691452..97e0aaa 100644
--- a/source/common/dmtbinfo2.c
+++ b/source/common/dmtbinfo2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -76,6 +80,59 @@
* Remaining tables are not consumed directly by the ACPICA subsystem
*/
+/*******************************************************************************
+ *
+ * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
+ *
+ * Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
+ * ARM DEN0093 v1.1
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAgdi[] =
+{
+ {ACPI_DMT_UINT8, ACPI_AGDI_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AGDI_FLAG_OFFSET (Flags, 0), "Signalling mode", 0},
+ {ACPI_DMT_UINT24, ACPI_AGDI_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_AGDI_OFFSET (SdeiEvent), "SdeiEvent", 0},
+ {ACPI_DMT_UINT32, ACPI_AGDI_OFFSET (Gsiv), "Gsiv", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * APMT - ARM Performance Monitoring Unit Table
+ *
+ * Conforms to:
+ * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
+ * ARM DEN0117 v1.0 November 25, 2021
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoApmtNode[] =
+{
+ {ACPI_DMT_UINT16, ACPI_APMTN_OFFSET (Length), "Length of APMT Node", 0},
+ {ACPI_DMT_UINT8, ACPI_APMTN_OFFSET (Flags), "Node Flags", 0},
+ {ACPI_DMT_FLAG0, ACPI_APMTN_FLAG_OFFSET (Flags, 0), "Dual Page Extension", 0},
+ {ACPI_DMT_FLAG1, ACPI_APMTN_FLAG_OFFSET (Flags, 0), "Processor Affinity Type", 0},
+ {ACPI_DMT_FLAG2, ACPI_APMTN_FLAG_OFFSET (Flags, 0), "64-bit Atomic Support", 0},
+ {ACPI_DMT_UINT8, ACPI_APMTN_OFFSET (Type), "Node Type", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (Id), "Unique Node Identifier", 0},
+ {ACPI_DMT_UINT64, ACPI_APMTN_OFFSET (InstPrimary), "Primary Node Instance", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (InstSecondary), "Secondary Node Instance", 0},
+ {ACPI_DMT_UINT64, ACPI_APMTN_OFFSET (BaseAddress0), "Page 0 Base Address", 0},
+ {ACPI_DMT_UINT64, ACPI_APMTN_OFFSET (BaseAddress1), "Page 1 Base Address", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (OvflwIrq), "Overflow Interrupt ID", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (OvflwIrqFlags), "Overflow Interrupt Flags", 0},
+ {ACPI_DMT_FLAG0, ACPI_APMTN_FLAG_OFFSET (OvflwIrqFlags, 0), "Interrupt Mode", 0},
+ {ACPI_DMT_FLAG1, ACPI_APMTN_FLAG_OFFSET (OvflwIrqFlags, 0), "Interrupt Type", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (ProcAffinity), "Processor Affinity", 0},
+ {ACPI_DMT_UINT32, ACPI_APMTN_OFFSET (ImplId), "Implementation ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
@@ -106,7 +163,20 @@
{ACPI_DMT_UINT8, ACPI_IORTH_OFFSET (Type), "Type", 0},
{ACPI_DMT_UINT16, ACPI_IORTH_OFFSET (Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT8, ACPI_IORTH_OFFSET (Revision), "Revision", 0},
- {ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (Identifier), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (MappingCount), "Mapping Count", 0},
+ {ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (MappingOffset), "Mapping Offset", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Common Subtable header (one per Subtable)- Revision 3 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr3[] =
+{
+ {ACPI_DMT_UINT8, ACPI_IORTH_OFFSET (Type), "Type", 0},
+ {ACPI_DMT_UINT16, ACPI_IORTH_OFFSET (Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_IORTH_OFFSET (Revision), "Revision", 0},
+ {ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (Identifier), "Identifier", 0},
{ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (MappingCount), "Mapping Count", 0},
{ACPI_DMT_UINT32, ACPI_IORTH_OFFSET (MappingOffset), "Mapping Offset", 0},
ACPI_DMT_TERMINATOR
@@ -179,7 +249,8 @@
{ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (AtsAttribute), "ATS Attribute", 0},
{ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (PciSegmentNumber), "PCI Segment Number", 0},
{ACPI_DMT_UINT8, ACPI_IORT2_OFFSET (MemoryAddressLimit), "Memory Size Limit", 0},
- {ACPI_DMT_UINT24, ACPI_IORT2_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_IORT2_OFFSET (PasidCapabilities), "PASID Capabilities", 0},
+ {ACPI_DMT_UINT8, ACPI_IORT2_OFFSET (Reserved[0]), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
@@ -233,6 +304,7 @@
{ACPI_DMT_FLAG0, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "COHACC Override", 0},
{ACPI_DMT_FLAG1, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "HTTU Override", 0},
{ACPI_DMT_FLAG3, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "Proximity Domain Valid", 0},
+ {ACPI_DMT_FLAG4, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "DeviceID Valid", 0},
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_IORT4_OFFSET (VatosAddress), "VATOS Address", 0},
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Model), "Model", 0},
@@ -257,6 +329,27 @@
};
+/* 0x06: RMR */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIort6[] =
+{
+ {ACPI_DMT_UINT32, ACPI_IORT6_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_IORT6_FLAG_OFFSET (Flags, 0), "Remapping Permitted", 0},
+ {ACPI_DMT_FLAG1, ACPI_IORT6_FLAG_OFFSET (Flags, 0), "Access Privileged", 0},
+ {ACPI_DMT_FLAGS8_2, ACPI_IORT6_FLAG_OFFSET (Flags, 0), "Access Attributes", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT6_OFFSET (RmrCount), "Number of RMR Descriptors", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT6_OFFSET (RmrOffset), "RMR Descriptor Offset", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIort6a[] =
+{
+ {ACPI_DMT_UINT64, ACPI_IORT6A_OFFSET (BaseAddress), "Base Address of RMR", DT_OPTIONAL},
+ {ACPI_DMT_UINT64, ACPI_IORT6A_OFFSET (Length), "Length of RMR", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT6A_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
* IVRS - I/O Virtualization Reporting Structure
@@ -270,35 +363,70 @@
ACPI_DMT_TERMINATOR
};
-/* Common Subtable header (one per Subtable) */
-
-ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHdr[] =
-{
- {ACPI_DMT_IVRS, ACPI_IVRSH_OFFSET (Type), "Subtable Type", 0},
- {ACPI_DMT_UINT8, ACPI_IVRSH_OFFSET (Flags), "Flags", 0},
- {ACPI_DMT_UINT16, ACPI_IVRSH_OFFSET (Length), "Length", DT_LENGTH},
- {ACPI_DMT_UINT16, ACPI_IVRSH_OFFSET (DeviceId), "DeviceId", 0},
- ACPI_DMT_TERMINATOR
-};
-
/* IVRS subtables */
/* 0x10: I/O Virtualization Hardware Definition (IVHD) Block */
-ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[] =
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHware1[] =
{
+ {ACPI_DMT_IVRS, ACPI_IVRSH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT8, ACPI_IVRSH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_IVRS_FLAG_OFFSET (Flags,0), "HtTunEn", 0},
+ {ACPI_DMT_FLAG1, ACPI_IVRS_FLAG_OFFSET (Flags,0), "PassPW", 0},
+ {ACPI_DMT_FLAG2, ACPI_IVRS_FLAG_OFFSET (Flags,0), "ResPassPW", 0},
+ {ACPI_DMT_FLAG3, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Isoc Control", 0},
+ {ACPI_DMT_FLAG4, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Iotlb Support", 0},
+ {ACPI_DMT_FLAG5, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Coherent", 0},
+ {ACPI_DMT_FLAG6, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Prefetch Support", 0},
+ {ACPI_DMT_FLAG7, ACPI_IVRS_FLAG_OFFSET (Flags,0), "PPR Support", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRSH_OFFSET (Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT16, ACPI_IVRSH_OFFSET (DeviceId), "DeviceId", 0},
{ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (CapabilityOffset), "Capability Offset", 0},
{ACPI_DMT_UINT64, ACPI_IVRS0_OFFSET (BaseAddress), "Base Address", 0},
{ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (PciSegmentGroup), "PCI Segment Group", 0},
{ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (Info), "Virtualization Info", 0},
- {ACPI_DMT_UINT32, ACPI_IVRS0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_IVRS0_OFFSET (FeatureReporting), "Feature Reporting", 0},
ACPI_DMT_TERMINATOR
};
-/* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition (IVMD) Block */
+/* 0x11, 0x40: I/O Virtualization Hardware Definition (IVHD) Block */
-ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs1[] =
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHware23[] =
{
+ {ACPI_DMT_IVRS, ACPI_IVRSH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT8, ACPI_IVRSH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_IVRS_FLAG_OFFSET (Flags,0), "HtTunEn", 0},
+ {ACPI_DMT_FLAG1, ACPI_IVRS_FLAG_OFFSET (Flags,0), "PassPW", 0},
+ {ACPI_DMT_FLAG2, ACPI_IVRS_FLAG_OFFSET (Flags,0), "ResPassPW", 0},
+ {ACPI_DMT_FLAG3, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Isoc Control", 0},
+ {ACPI_DMT_FLAG4, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Iotlb Support", 0},
+ {ACPI_DMT_FLAG5, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Coherent", 0},
+ {ACPI_DMT_FLAG6, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Prefetch Support", 0},
+ {ACPI_DMT_FLAG7, ACPI_IVRS_FLAG_OFFSET (Flags,0), "PPR Support", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (Header.Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (Header.DeviceId), "DeviceId", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (CapabilityOffset), "Capability Offset", 0},
+ {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (BaseAddress), "Base Address", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (PciSegmentGroup), "PCI Segment Group", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (Info), "Virtualization Info", 0},
+ {ACPI_DMT_UINT32, ACPI_IVRS01_OFFSET (Attributes), "Attributes", 0},
+ {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (EfrRegisterImage), "EFR Image", 0},
+ {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition (IVMD) Device Entry Block */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsMemory[] =
+{
+ {ACPI_DMT_IVRS, ACPI_IVRSH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT8, ACPI_IVRSH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Unity", 0},
+ {ACPI_DMT_FLAG1, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Readable", 0},
+ {ACPI_DMT_FLAG2, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Writeable", 0},
+ {ACPI_DMT_FLAG3, ACPI_IVRS_FLAG_OFFSET (Flags,0), "Exclusion Range", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRSH_OFFSET (Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT16, ACPI_IVRSH_OFFSET (DeviceId), "DeviceId", 0},
{ACPI_DMT_UINT16, ACPI_IVRS1_OFFSET (AuxData), "Auxiliary Data", 0},
{ACPI_DMT_UINT64, ACPI_IVRS1_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_IVRS1_OFFSET (StartAddress), "Start Address", 0},
@@ -309,19 +437,26 @@
/* Device entry header for IVHD block */
#define ACPI_DMT_IVRS_DE_HEADER \
- {ACPI_DMT_UINT8, ACPI_IVRSD_OFFSET (Type), "Entry Type", 0}, \
+ {ACPI_DMT_IVRS_DE, ACPI_IVRSD_OFFSET (Type), "Subtable Type", 0}, \
{ACPI_DMT_UINT16, ACPI_IVRSD_OFFSET (Id), "Device ID", 0}, \
- {ACPI_DMT_UINT8, ACPI_IVRSD_OFFSET (DataSetting), "Data Setting", 0}
+ {ACPI_DMT_UINT8, ACPI_IVRSD_OFFSET (DataSetting), "Data Setting (decoded below)", 0}, \
+ {ACPI_DMT_FLAG0, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "INITPass", 0}, \
+ {ACPI_DMT_FLAG1, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "EIntPass", 0}, \
+ {ACPI_DMT_FLAG2, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "NMIPass", 0}, \
+ {ACPI_DMT_FLAG3, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "Reserved", 0}, \
+ {ACPI_DMT_FLAGS4, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "System MGMT", 0}, \
+ {ACPI_DMT_FLAG6, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "LINT0 Pass", 0}, \
+ {ACPI_DMT_FLAG7, ACPI_IVRSDE_FLAG_OFFSET (DataSetting, 0), "LINT1 Pass", 0}
-/* 4-byte device entry */
+/* 4-byte device entry (Types 1,2,3,4) */
ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs4[] =
{
ACPI_DMT_IVRS_DE_HEADER,
- {ACPI_DMT_EXIT, 0, NULL, 0},
+ ACPI_DMT_TERMINATOR
};
-/* 8-byte device entry */
+/* 8-byte device entry (Type Alias Select, Alias Start of Range) */
ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8a[] =
{
@@ -332,7 +467,7 @@
ACPI_DMT_TERMINATOR
};
-/* 8-byte device entry */
+/* 8-byte device entry (Type Extended Select, Extended Start of Range) */
ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8b[] =
{
@@ -341,7 +476,7 @@
ACPI_DMT_TERMINATOR
};
-/* 8-byte device entry */
+/* 8-byte device entry (Type Special Device) */
ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8c[] =
{
@@ -352,6 +487,53 @@
ACPI_DMT_TERMINATOR
};
+/* Variable-length Device Entry Type 0xF0 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHid[] =
+{
+ ACPI_DMT_IVRS_DE_HEADER,
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsUidString[] =
+{
+ {ACPI_DMT_UINT8, 0, "UID Format", DT_DESCRIBES_OPTIONAL},
+ {ACPI_DMT_UINT8, 1, "UID Length", DT_DESCRIBES_OPTIONAL},
+ {ACPI_DMT_IVRS_UNTERMINATED_STRING, 2, "UID", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsUidInteger[] =
+{
+ {ACPI_DMT_UINT8, 0, "UID Format", DT_DESCRIBES_OPTIONAL},
+ {ACPI_DMT_UINT8, 1, "UID Length", DT_DESCRIBES_OPTIONAL},
+ {ACPI_DMT_UINT64, 2, "UID", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHidString[] =
+{
+ {ACPI_DMT_NAME8, 0, "ACPI HID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHidInteger[] =
+{
+ {ACPI_DMT_UINT64, 0, "ACPI HID", 0},
+ ACPI_DMT_TERMINATOR
+};
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsCidString[] =
+{
+ {ACPI_DMT_NAME8, 0, "ACPI CID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsCidInteger[] =
+{
+ {ACPI_DMT_UINT64, 0, "ACPI CID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
@@ -625,6 +807,23 @@
ACPI_DMT_TERMINATOR
};
+/* 16: Multiprocessor wakeup structure (ACPI 6.4) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoMadt16[] =
+{
+ {ACPI_DMT_UINT16, ACPI_MADT16_OFFSET (MailboxVersion), "Mailbox Version", 0},
+ {ACPI_DMT_UINT32, ACPI_MADT16_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_MADT16_OFFSET (BaseAddress), "Mailbox Address", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 17: OEM data structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoMadt17[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "OEM Data", 0},
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
@@ -785,28 +984,6 @@
/*******************************************************************************
*
- * MTMR - MID Timer Table
- *
- ******************************************************************************/
-
-ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[] =
-{
- ACPI_DMT_TERMINATOR
-};
-
-/* MTMR Subtables - MTMR Entry */
-
-ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[] =
-{
- {ACPI_DMT_GAS, ACPI_MTMR0_OFFSET (PhysicalAddress), "PhysicalAddress", 0},
- {ACPI_DMT_UINT32, ACPI_MTMR0_OFFSET (Frequency), "Frequency", 0},
- {ACPI_DMT_UINT32, ACPI_MTMR0_OFFSET (Irq), "IRQ", 0},
- ACPI_DMT_TERMINATOR
-};
-
-
-/*******************************************************************************
- *
* NFIT - NVDIMM Firmware Interface Table and Subtables - (ACPI 6.0)
*
******************************************************************************/
@@ -834,12 +1011,14 @@
{ACPI_DMT_UINT16, ACPI_NFIT0_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_NFIT0_FLAG_OFFSET (Flags,0), "Add/Online Operation Only", 0},
{ACPI_DMT_FLAG1, ACPI_NFIT0_FLAG_OFFSET (Flags,0), "Proximity Domain Valid", 0},
+ {ACPI_DMT_FLAG2, ACPI_NFIT0_FLAG_OFFSET (Flags,0), "Location Cookie Valid", 0},
{ACPI_DMT_UINT32, ACPI_NFIT0_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_NFIT0_OFFSET (ProximityDomain), "Proximity Domain", 0},
{ACPI_DMT_UUID, ACPI_NFIT0_OFFSET (RangeGuid[0]), "Region Type GUID", 0},
{ACPI_DMT_UINT64, ACPI_NFIT0_OFFSET (Address), "Address Range Base", 0},
{ACPI_DMT_UINT64, ACPI_NFIT0_OFFSET (Length), "Address Range Length", 0},
{ACPI_DMT_UINT64, ACPI_NFIT0_OFFSET (MemoryMapping), "Memory Map Attribute", 0},
+ {ACPI_DMT_UINT64, ACPI_NFIT0_OFFSET (LocationCookie), "Location Cookie", 0}, /* ACPI 6.4 */
ACPI_DMT_TERMINATOR
};
@@ -973,6 +1152,206 @@
/*******************************************************************************
*
+ * NHLT - Non HD Audio Link Table. Conforms to Intel Smart Sound Technology
+ * NHLT Specification, January 2020 Revision 0.8.1
+ *
+ ******************************************************************************/
+
+/* Main table */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT_OFFSET (EndpointCount), "Endpoint Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Endpoint config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt0[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT0_OFFSET (DescriptorLength), "Descriptor Length", DT_LENGTH},
+ {ACPI_DMT_NHLT1, ACPI_NHLT0_OFFSET (LinkType), "Link Type", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT0_OFFSET (InstanceId), "Instance Id", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT0_OFFSET (VendorId), "Vendor Id", 0},
+ {ACPI_DMT_NHLT1e, ACPI_NHLT0_OFFSET (DeviceId), "Device Id", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT0_OFFSET (RevisionId), "Revision Id", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT0_OFFSET (SubsystemId), "Subsystem Id", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT0_OFFSET (DeviceType), "Device Type", 0},
+ {ACPI_DMT_NHLT1a, ACPI_NHLT0_OFFSET (Direction), "Direction", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT0_OFFSET (VirtualBusId), "Virtual Bus Id", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Device_Specific config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt1[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT1_OFFSET (CapabilitiesSize), "Capabilities Size", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT1_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ {ACPI_DMT_NHLT1f, ACPI_NHLT1_OFFSET (ConfigType), "Config Type", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Wave Format Extensible */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt2[] =
+{
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (FormatTag), "Format Tag", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (ChannelCount), "Channel Count", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT2_OFFSET (SamplesPerSec), "Samples Per Second", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT2_OFFSET (AvgBytesPerSec), "Average Bytes Per Second", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (BlockAlign), "Block Alignment", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (BitsPerSample), "Bits Per Sample", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (ExtraFormatSize), "Extra Format Size", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (ValidBitsPerSample), "Valid Bits Per Sample", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT2_OFFSET (ChannelMask), "Channel Mask", 0},
+ {ACPI_DMT_UUID, ACPI_NHLT2_OFFSET (SubFormatGuid), "SubFormat GUID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Format Config (wave_format_extensible structure) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3[] =
+{
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.FormatTag), "Format Tag", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.ChannelCount), "Channel Count", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (Format.SamplesPerSec), "Samples Per Second", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (Format.AvgBytesPerSec), "Average Bytes Per Second", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.BlockAlign), "Block Alignment", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.BitsPerSample), "Bits Per Sample", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.ExtraFormatSize), "Extra Format Size", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.ValidBitsPerSample), "Valid Bits Per Sample", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (Format.ChannelMask), "Channel Mask", 0},
+ {ACPI_DMT_UUID, ACPI_NHLT3_OFFSET (Format.SubFormatGuid), "SubFormat GUID", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (CapabilitySize), "Capabilities Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*
+ * We treat the binary Capabilities field as its own subtable (to make
+ * ACPI_DMT_RAW_BUFFER work properly).
+ */
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3a[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Capabilities", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Formats Config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt4[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT4_OFFSET (FormatsCount), "Formats Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 2 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT5_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ {ACPI_DMT_NHLT1f, ACPI_NHLT5_OFFSET (ConfigType), "Config Type", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 3 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5a[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT5A_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ {ACPI_DMT_NHLT1f, ACPI_NHLT5A_OFFSET (ConfigType), "Config Type", 0},
+ {ACPI_DMT_NHLT1d, ACPI_NHLT5A_OFFSET (ArrayType), "Array Type", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 0 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5b[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT5B_OFFSET (CapabilitiesSize), "Capabilities Size", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 1 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5c[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT5C_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Microphone array Config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6a[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT6A_OFFSET (MicrophoneCount), "Microphone Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Render Feedback Device Config, CapabilitiesSize == 7 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6b[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT6B_OFFSET (FeedbackVirtualSlot), "Feedback Virtual Slot", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6B_OFFSET (FeedbackChannels), "Feedback Channels", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6B_OFFSET (FeedbackValidBitsPerSample),"Valid Bits Per Sample", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6[] =
+{
+ {ACPI_DMT_NHLT1b, ACPI_NHLT6_OFFSET (Type), "Type", 0},
+ {ACPI_DMT_NHLT1c, ACPI_NHLT6_OFFSET (Panel), "Panel", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (SpeakerPositionDistance), "Speaker Position Distance", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (HorizontalOffset), "Horizontal Offset", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (VerticalOffset), "Vertical Offset", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT6_OFFSET (FrequencyLowBand), "Frequency Low Band", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT6_OFFSET (FrequencyHighBand), "Frequency High Band", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (DirectionAngle), "Direction Angle", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (ElevationAngle), "Elevation Angle", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkVerticalAngleBegin), "Work Vertical Angle Begin", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkVerticalAngleEnd), "Work Vertical Angle End", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkHorizontalAngleBegin), "Work Horizontal Angle Begin", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkHorizontalAngleEnd), "Work Horizontal Angle End", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Number of DeviceInfo structures */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT7_OFFSET (StructureCount), "Device Info struct count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* The DeviceInfo structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7a[] =
+{
+ {ACPI_DMT_UUID, ACPI_NHLT7A_OFFSET (DeviceId), "Device ID GUID", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT7A_OFFSET (DeviceInstanceId), "Device Instance ID", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT7A_OFFSET (DevicePortId), "Device Port ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7b[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Bytes", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Sensitivity Extension */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt9[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT9_OFFSET (SNR), "Signal-to-noise ratio", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT9_OFFSET (Sensitivity), "Mic Sensitivity", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* PCCT - Platform Communications Channel Table (ACPI 5.0)
*
******************************************************************************/
@@ -1115,6 +1494,25 @@
ACPI_DMT_TERMINATOR
};
+/* 5: HW Registers based Communications Subspace */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPcct5[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PCCT5_OFFSET (Version), "Version", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT5_OFFSET (BaseAddress), "Base Address", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT5_OFFSET (Length), "Length", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT5_OFFSET (DoorbellRegister), "Doorbell Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT5_OFFSET (DoorbellPreserve), "Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT5_OFFSET (DoorbellWrite), "Write Mask", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT5_OFFSET (CmdCompleteRegister), "Command Complete Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT5_OFFSET (CmdCompleteMask), "Command Complete Check Mask", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT5_OFFSET (ErrorStatusRegister), "Error Status Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT5_OFFSET (ErrorStatusMask), "Error Status Mask", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT5_OFFSET (NominalLatency), "Nominal Latency", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT5_OFFSET (MinTurnaroundTime), "Minimum Turnaround Time", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
@@ -1143,30 +1541,85 @@
/*******************************************************************************
*
+ * PHAT - Platform Health Assessment Table (ACPI 6.4)
+ *
+ ******************************************************************************/
+
+/* Common subtable header */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[] =
+{
+ {ACPI_DMT_PHAT, ACPI_PHATH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT16, ACPI_PHATH_OFFSET (Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_PHATH_OFFSET (Revision), "Revision", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0: Firmware version table */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0[] =
+{
+ {ACPI_DMT_UINT24, ACPI_PHAT0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_PHAT0_OFFSET (ElementCount), "Element Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[] =
+{
+ {ACPI_DMT_UUID, ACPI_PHAT0A_OFFSET (Guid), "GUID", 0},
+ {ACPI_DMT_UINT64, ACPI_PHAT0A_OFFSET (VersionValue), "Version Value", 0},
+ {ACPI_DMT_UINT32, ACPI_PHAT0A_OFFSET (ProducerId), "Producer ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1: Firmware Health Data Record */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PHAT1_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT8, ACPI_PHAT1_OFFSET (Health), "Health", 0},
+ {ACPI_DMT_UUID, ACPI_PHAT1_OFFSET (DeviceGuid), "Device GUID", 0},
+ {ACPI_DMT_UINT32, ACPI_PHAT1_OFFSET (DeviceSpecificOffset), "Device-Specific Offset", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1a[] =
+{
+ {ACPI_DMT_UNICODE, 0, "Device Path", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1b[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Device-Specific Data", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* PMTT - Platform Memory Topology Table
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[] =
{
- {ACPI_DMT_UINT32, ACPI_PMTT_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_PMTT_OFFSET (MemoryDeviceCount), "Memory Device Count", 0},
ACPI_DMT_TERMINATOR
};
/* Common Subtable header (one per Subtable) */
-ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[] =
-{
- {ACPI_DMT_PMTT, ACPI_PMTTH_OFFSET (Type), "Subtable Type", 0},
- {ACPI_DMT_UINT8, ACPI_PMTTH_OFFSET (Reserved1), "Reserved", 0},
- {ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Length), "Length", DT_LENGTH},
- {ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
- {ACPI_DMT_FLAG0, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Top-level Device", 0},
- {ACPI_DMT_FLAG1, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Physical Element", 0},
- {ACPI_DMT_FLAGS2, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Memory Type", 0},
- {ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Reserved2), "Reserved", 0},
- ACPI_DMT_TERMINATOR
-};
+#define ACPI_DM_PMTT_HEADER \
+ {ACPI_DMT_PMTT, ACPI_PMTTH_OFFSET (Type), "Subtable Type", 0}, \
+ {ACPI_DMT_UINT8, ACPI_PMTTH_OFFSET (Reserved1), "Reserved", 0}, \
+ {ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Length), "Length", DT_LENGTH}, \
+ {ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG}, \
+ {ACPI_DMT_FLAG0, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Top-level Device", 0}, \
+ {ACPI_DMT_FLAG1, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Physical Element", 0}, \
+ {ACPI_DMT_FLAGS2, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Memory Type", 0}, \
+ {ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Reserved2), "Reserved", 0}, \
+ {ACPI_DMT_UINT32, ACPI_PMTTH_OFFSET (MemoryDeviceCount), "Memory Device Count", 0}
/* PMTT Subtables */
@@ -1174,6 +1627,7 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[] =
{
+ ACPI_DM_PMTT_HEADER,
{ACPI_DMT_UINT16, ACPI_PMTT0_OFFSET (SocketId), "Socket ID", 0},
{ACPI_DMT_UINT16, ACPI_PMTT0_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
@@ -1183,22 +1637,9 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[] =
{
- {ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (ReadLatency), "Read Latency", 0},
- {ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (WriteLatency), "Write Latency", 0},
- {ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (ReadBandwidth), "Read Bandwidth", 0},
- {ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (WriteBandwidth), "Write Bandwidth", 0},
- {ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (AccessWidth), "Access Width", 0},
- {ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (Alignment), "Alignment", 0},
+ ACPI_DM_PMTT_HEADER,
+ {ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (ControllerId), "Controller ID", 0},
{ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (Reserved), "Reserved", 0},
- {ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (DomainCount), "Domain Count", 0},
- ACPI_DMT_TERMINATOR
-};
-
-/* 1a: Proximity Domain */
-
-ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[] =
-{
- {ACPI_DMT_UINT32, ACPI_PMTT1A_OFFSET (ProximityDomain), "Proximity Domain", 0},
ACPI_DMT_TERMINATOR
};
@@ -1206,13 +1647,21 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[] =
{
- {ACPI_DMT_UINT16, ACPI_PMTT2_OFFSET (ComponentId), "Component ID", 0},
- {ACPI_DMT_UINT16, ACPI_PMTT2_OFFSET (Reserved), "Reserved", 0},
- {ACPI_DMT_UINT32, ACPI_PMTT2_OFFSET (MemorySize), "Memory Size", 0},
+ ACPI_DM_PMTT_HEADER,
{ACPI_DMT_UINT32, ACPI_PMTT2_OFFSET (BiosHandle), "Bios Handle", 0},
ACPI_DMT_TERMINATOR
};
+/* 0xFF: Vendor Specific */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPmttVendor[] =
+{
+ ACPI_DM_PMTT_HEADER,
+ {ACPI_DMT_UUID, ACPI_PMTT_VENDOR_OFFSET (TypeUuid), "Type Uuid", 0},
+ {ACPI_DMT_PMTT_VENDOR, ACPI_PMTT_VENDOR_OFFSET (Specific), "Vendor Data", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
@@ -1267,6 +1716,7 @@
{ACPI_DMT_FLAG4, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Cache Type valid", 0},
{ACPI_DMT_FLAG5, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Write Policy valid", 0},
{ACPI_DMT_FLAG6, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Line Size valid", 0},
+ {ACPI_DMT_FLAG7, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Cache ID valid", 0},
{ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (NextLevelOfCache), "Next Level of Cache", 0},
{ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (Size), "Size", 0},
{ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (NumberOfSets), "Number of Sets", 0},
@@ -1279,6 +1729,14 @@
ACPI_DMT_TERMINATOR
};
+/* 1: cache type v1 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1a[] =
+{
+ {ACPI_DMT_UINT32, ACPI_PPTT1A_OFFSET (CacheId), "Cache ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/* 2: ID */
ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[] =
@@ -1296,6 +1754,52 @@
/*******************************************************************************
*
+ * PRMT - Platform Runtime Mechanism Table
+ * Version 1
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHdr[] =
+{
+ {ACPI_DMT_UUID, ACPI_PRMTH_OFFSET (PlatformGuid[0]), "Platform GUID", 0},
+ {ACPI_DMT_UINT32, ACPI_PRMTH_OFFSET (ModuleInfoOffset), "Module info offset", 0},
+ {ACPI_DMT_UINT32, ACPI_PRMTH_OFFSET (ModuleInfoCount), "Module info count", 0},
+ ACPI_DMT_NEW_LINE,
+ ACPI_DMT_TERMINATOR
+
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtModule[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (Revision), "Revision", 0},
+ {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (Length), "Length", 0},
+ {ACPI_DMT_UUID, ACPI_PRMT0_OFFSET (ModuleGuid[0]), "Module GUID", 0},
+ {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (MajorRev), "Major Revision", 0},
+ {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (MinorRev), "Minor Revision", 0},
+ {ACPI_DMT_UINT16, ACPI_PRMT0_OFFSET (HandlerInfoCount), "Handler Info Count", 0},
+ {ACPI_DMT_UINT32, ACPI_PRMT0_OFFSET (HandlerInfoOffset), "Handler Info Offset", 0},
+ {ACPI_DMT_UINT64, ACPI_PRMT0_OFFSET (MmioListPointer), "Mmio List pointer", 0},
+ ACPI_DMT_NEW_LINE,
+ ACPI_DMT_TERMINATOR
+
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHandler[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PRMT1_OFFSET (Revision), "Revision", 0},
+ {ACPI_DMT_UINT16, ACPI_PRMT1_OFFSET (Length), "Length", 0},
+ {ACPI_DMT_UUID, ACPI_PRMT1_OFFSET (HandlerGuid[0]), "Handler GUID", 0},
+ {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (HandlerAddress), "Handler address", 0},
+ {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (StaticDataBufferAddress),"Static Data Address", 0},
+ {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (AcpiParamBufferAddress), "ACPI Parameter Address", 0},
+ ACPI_DMT_NEW_LINE,
+ ACPI_DMT_TERMINATOR
+
+};
+
+
+/*******************************************************************************
+ *
* RASF - RAS Feature table
*
******************************************************************************/
@@ -1309,6 +1813,31 @@
/*******************************************************************************
*
+ * RGRT - Regulatory Graphics Resource Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt[] =
+{
+ {ACPI_DMT_UINT16, ACPI_RGRT_OFFSET (Version), "Version", 0},
+ {ACPI_DMT_RGRT, ACPI_RGRT_OFFSET (ImageType), "Image Type", 0},
+ {ACPI_DMT_UINT8, ACPI_RGRT_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*
+ * We treat the binary image field as its own subtable (to make
+ * ACPI_DMT_RAW_BUFFER work properly).
+ */
+ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt0[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Image", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* S3PT - S3 Performance Table
*
******************************************************************************/
@@ -1395,7 +1924,8 @@
{ACPI_DMT_SDEV, ACPI_SDEVH_OFFSET (Type), "Subtable Type", 0},
{ACPI_DMT_UINT8, ACPI_SDEVH_OFFSET (Flags), "Flags (decoded below)", 0},
{ACPI_DMT_FLAG0, ACPI_SDEVH_FLAG_OFFSET (Flags,0), "Allow handoff to unsecure OS", 0},
- {ACPI_DMT_UINT16, ACPI_SDEVH_OFFSET (Length), "Length", 0},
+ {ACPI_DMT_FLAG1, ACPI_SDEVH_FLAG_OFFSET (Flags,0), "Secure access components present", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEVH_OFFSET (Length), "Length", DT_LENGTH},
ACPI_DMT_TERMINATOR
};
@@ -1418,6 +1948,53 @@
ACPI_DMT_TERMINATOR
};
+ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0b[] =
+{
+ {ACPI_DMT_UINT16, ACPI_SDEV0B_OFFSET (SecureComponentOffset), "Secure Access Components Offset", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEV0B_OFFSET (SecureComponentLength), "Secure Access Components Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Secure access components */
+
+/* Common secure access components header secure access component */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompHdr[] =
+{
+ {ACPI_DMT_UINT8, ACPI_SDEVCH_OFFSET (Type), "Secure Component Type", 0},
+ {ACPI_DMT_UINT8, ACPI_SDEVCH_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEVCH_OFFSET (Length), "Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0: Identification Based Secure Access Component */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompId[] =
+{
+ {ACPI_DMT_UINT16, ACPI_SDEVC0_OFFSET (HardwareIdOffset), "Hardware ID Offset", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEVC0_OFFSET (HardwareIdLength), "Hardware ID Length", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEVC0_OFFSET (SubsystemIdOffset), "Subsystem ID Offset", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEVC0_OFFSET (SubsystemIdLength), "Subsystem ID Length", 0},
+ {ACPI_DMT_UINT16, ACPI_SDEVC0_OFFSET (HardwareRevision), "Hardware Revision", 0},
+ {ACPI_DMT_UINT8, ACPI_SDEVC0_OFFSET (HardwareRevPresent), "Hardware Rev Present", 0},
+ {ACPI_DMT_UINT8, ACPI_SDEVC0_OFFSET (ClassCodePresent), "Class Code Present", 0},
+ {ACPI_DMT_UINT8, ACPI_SDEVC0_OFFSET (PciBaseClass), "PCI Base Class", 0},
+ {ACPI_DMT_UINT8, ACPI_SDEVC0_OFFSET (PciSubClass), "PCI SubClass", 0},
+ {ACPI_DMT_UINT8, ACPI_SDEVC0_OFFSET (PciProgrammingXface), "PCI Programming Xface", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1: Memory Based Secure Access Component */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompMem[] =
+{
+ {ACPI_DMT_UINT32, ACPI_SDEVC1_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_SDEVC1_OFFSET (MemoryBaseAddress), "Memory Base Address", 0},
+ {ACPI_DMT_UINT64, ACPI_SDEVC1_OFFSET (MemoryLength), "Memory Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
/* 1: PCIe Endpoint Device Based Device Structure */
ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1[] =
@@ -1443,4 +2020,5 @@
{ACPI_DMT_RAW_BUFFER, 0, "Vendor Data", 0}, /*, DT_OPTIONAL}, */
ACPI_DMT_TERMINATOR
};
+
/*! [End] no source code translation !*/
diff --git a/source/common/dmtbinfo3.c b/source/common/dmtbinfo3.c
index 113192f..fe94e29 100644
--- a/source/common/dmtbinfo3.c
+++ b/source/common/dmtbinfo3.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -80,6 +84,23 @@
/*******************************************************************************
*
+ * CCEL - CC-Event Log Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[] =
+{
+ {ACPI_DMT_UINT8, ACPI_CCEL_OFFSET (CCType), "CC Type", 0},
+ {ACPI_DMT_UINT8, ACPI_CCEL_OFFSET (CCSubType), "CC Sub Type", 0},
+ {ACPI_DMT_UINT32, ACPI_CCEL_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CCEL_OFFSET (LogAreaMinimumLength), "Log Area Minimum Length", 0},
+ {ACPI_DMT_UINT64, ACPI_CCEL_OFFSET (LogAreaStartAddress), "Log Area Start Address", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* SLIC - Software Licensing Description Table. This table contains the standard
* ACPI header followed by proprietary data structures
*
@@ -256,20 +277,33 @@
ACPI_DMT_TERMINATOR
};
+/* Common SRAT structure for Generic Affinity Subtables */
+
+#define ACPI_DM_SRAT_GENERIC_AFFINITY \
+ {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (Reserved), "Reserved1", 0}, \
+ {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (DeviceHandleType), "Device Handle Type", 0}, \
+ {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (ProximityDomain), "Proximity Domain", 0}, \
+ {ACPI_DMT_BUF16, ACPI_SRAT5_OFFSET (DeviceHandle), "Device Handle", 0}, \
+ {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Flags), "Flags (decoded below)", DT_FLAG}, \
+ {ACPI_DMT_FLAG0, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Enabled", 0}, \
+ {ACPI_DMT_FLAG1, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Architectural Transactions", 0}, \
+ {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Reserved1), "Reserved2", 0}
+
/* 5: Generic Initiator Affinity Structure (ACPI 6.3) */
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat5[] =
{
- {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (Reserved), "Reserved1", 0},
- {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (DeviceHandleType), "Device Handle Type", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (ProximityDomain), "Proximity Domain", 0},
- {ACPI_DMT_BUF16, ACPI_SRAT5_OFFSET (DeviceHandle), "Device Handle", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
- {ACPI_DMT_FLAG0, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Enabled", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Reserved1), "Reserved2", 0},
+ ACPI_DM_SRAT_GENERIC_AFFINITY,
ACPI_DMT_TERMINATOR
};
+/* 6: Generic Port Affinity Structure (ACPI 6.4) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSrat6[] =
+{
+ ACPI_DM_SRAT_GENERIC_AFFINITY,
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
@@ -292,6 +326,30 @@
/*******************************************************************************
*
+ * SVKL - Storage Volume Key Location table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl[] =
+{
+ {ACPI_DMT_UINT32, ACPI_SVKL_OFFSET (Count), "Key Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* SVKL subtables */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl0[] =
+{
+ {ACPI_DMT_UINT16, ACPI_SVKL0_OFFSET (Type), "Key Type", 0},
+ {ACPI_DMT_UINT16, ACPI_SVKL0_OFFSET (Format), "Key Format", 0},
+ {ACPI_DMT_UINT32, ACPI_SVKL0_OFFSET (Size), "Key Size", 0},
+ {ACPI_DMT_UINT64, ACPI_SVKL0_OFFSET (Address), "Key Address", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* TCPA - Trusted Computing Platform Alliance table (Client)
*
* NOTE: There are two versions of the table with the same signature --
@@ -344,6 +402,20 @@
/*******************************************************************************
*
+ * TDEL - TD-Event Log Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoTdel[] =
+{
+ {ACPI_DMT_UINT32, ACPI_TDEL_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_TDEL_OFFSET (LogAreaMinimumLength), "Log Area Minimum Length", 0},
+ {ACPI_DMT_UINT64, ACPI_TDEL_OFFSET (LogAreaStartAddress), "Log Area Start Address", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*******************************************************************************
+ *
* TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
*
******************************************************************************/
@@ -416,21 +488,71 @@
/*******************************************************************************
*
- * VRTC - Virtual Real Time Clock Table
+ * VIOT - Virtual I/O Translation Table
*
******************************************************************************/
-ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[] =
+ACPI_DMTABLE_INFO AcpiDmTableInfoViot[] =
{
+ {ACPI_DMT_UINT16, ACPI_VIOT_OFFSET (NodeCount), "Node count", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT_OFFSET (NodeOffset), "Node offset", 0},
+ {ACPI_DMT_UINT64, ACPI_VIOT_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
-/* VRTC Subtables - VRTC Entry */
+/* Common VIOT subtable header */
-ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[] =
+ACPI_DMTABLE_INFO AcpiDmTableInfoViotHeader[] =
{
- {ACPI_DMT_GAS, ACPI_VRTC0_OFFSET (PhysicalAddress), "PhysicalAddress", 0},
- {ACPI_DMT_UINT32, ACPI_VRTC0_OFFSET (Irq), "IRQ", 0},
+ {ACPI_DMT_VIOT, ACPI_VIOTH_OFFSET (Type), "Type", 0},
+ {ACPI_DMT_UINT8, ACPI_VIOTH_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOTH_OFFSET (Length), "Length", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+/* VIOT Subtables */
+
+/* 0x01: PCI Range Node */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoViot1[] =
+{
+ {ACPI_DMT_UINT32, ACPI_VIOT1_OFFSET (EndpointStart), "Endpoint start", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT1_OFFSET (SegmentStart), "PCI Segment start", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT1_OFFSET (SegmentEnd), "PCI Segment end", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT1_OFFSET (BdfStart), "PCI BDF start", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT1_OFFSET (BdfEnd), "PCI BDF end", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT1_OFFSET (OutputNode), "Output node", 0},
+ {ACPI_DMT_UINT48, ACPI_VIOT1_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x02: MMIO Endpoint Node */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoViot2[] =
+{
+ {ACPI_DMT_UINT32, ACPI_VIOT2_OFFSET (Endpoint), "Endpoint", 0},
+ {ACPI_DMT_UINT64, ACPI_VIOT2_OFFSET (BaseAddress), "Base address", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT2_OFFSET (OutputNode), "Output node", 0},
+ {ACPI_DMT_UINT48, ACPI_VIOT2_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x03: PCI Virtio-IOMMU Node */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoViot3[] =
+{
+ {ACPI_DMT_UINT16, ACPI_VIOT3_OFFSET (Segment), "PCI Segment", 0},
+ {ACPI_DMT_UINT16, ACPI_VIOT3_OFFSET (Bdf), "PCI BDF number", 0},
+ {ACPI_DMT_UINT64, ACPI_VIOT3_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x04: MMIO Virtio-IOMMU Node */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoViot4[] =
+{
+ {ACPI_DMT_UINT32, ACPI_VIOT4_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_VIOT4_OFFSET (BaseAddress), "Base address", 0},
ACPI_DMT_TERMINATOR
};
@@ -572,14 +694,14 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] =
{
- {ACPI_DMT_UNICODE, sizeof (ACPI_TABLE_WPBT), "Command-line Arguments", 0},
+ {ACPI_DMT_WPBT_UNICODE, ACPI_WPBT2_OFFSET (UnicodeString), "Command-line Arguments", DT_DESCRIBES_OPTIONAL},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
- * WSMT - Windows SMM Security Migrations Table
+ * WSMT - Windows SMM Security Mitigations Table
*
******************************************************************************/
@@ -647,6 +769,7 @@
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_STRING, "String"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UNICODE, "Unicode"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_BUFFER, "Buffer"),
+ ACPI_DM_GENERIC_ENTRY (ACPI_DMT_BUF16, "BUF16"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UUID, "GUID"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_STRING, "DevicePath"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_LABEL, "Label"),
diff --git a/source/common/getopt.c b/source/common/getopt.c
index 3bfe47c..2fb99f5 100644
--- a/source/common/getopt.c
+++ b/source/common/getopt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslallocate.c b/source/compiler/aslallocate.c
index c6120b1..934c314 100644
--- a/source/compiler/aslallocate.c
+++ b/source/compiler/aslallocate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -41,7 +45,7 @@
/*
* Local heap allocation wrappers. See aslcache.c for allocation from local
- * cache alloctions
+ * cache allocations
*/
diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index ade6309..55468cc 100644
--- a/source/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -39,6 +43,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
+#include "acnamesp.h"
#include <string.h>
@@ -309,6 +314,7 @@
{
ACPI_PARSE_OBJECT *OwningOp;
ACPI_NAMESPACE_NODE *Node;
+ char *ExternalPath;
Node = ArgOp->Asl.Node;
@@ -323,18 +329,19 @@
/* Examine the parent op of this method */
OwningOp = Node->Op;
+ ExternalPath = AcpiNsGetNormalizedPathname (Node, TRUE);
+
if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL)
{
/* Method NEVER returns a value */
- AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName);
+ AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, ExternalPath);
}
else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL)
{
/* Method SOMETIMES returns a value, SOMETIMES not */
- AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL,
- Op, Op->Asl.ExternalName);
+ AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, Op, ExternalPath);
}
else if (!(ThisNodeBtype & RequiredBtypes))
{
@@ -355,9 +362,14 @@
"Method returns [%s], %s operator requires [%s]",
AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
- AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
+ AslError (ASL_WARNING, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
}
}
+
+ if (ExternalPath)
+ {
+ ACPI_FREE (ExternalPath);
+ }
}
diff --git a/source/compiler/aslascii.c b/source/compiler/aslascii.c
index 745ab14..339c727 100644
--- a/source/compiler/aslascii.c
+++ b/source/compiler/aslascii.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -72,7 +76,7 @@
* not handle comment delimiters within string literals. However,
* on the rare chance this happens and an invalid character is
* missed, the parser will catch the error by failing in some
- * spectactular manner.
+ * spectacular manner.
*
******************************************************************************/
@@ -104,7 +108,7 @@
while (fread (&Byte, 1, 1, Handle) == 1)
{
- /* Ignore comment fields (allow non-ascii within) */
+ /* Ignore comment fields (allow non-ASCII within) */
if (OpeningComment)
{
diff --git a/source/compiler/aslbtypes.c b/source/compiler/aslbtypes.c
index fcc258b..45d9e3e 100644
--- a/source/compiler/aslbtypes.c
+++ b/source/compiler/aslbtypes.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -560,7 +564,7 @@
*
* PARAMETERS: Btype - Bitfield of ACPI types
*
- * RETURN: The Etype corresponding the the Btype
+ * RETURN: The Etype corresponding the Btype
*
* DESCRIPTION: Convert a bitfield type to an encoded type
*
diff --git a/source/compiler/aslcache.c b/source/compiler/aslcache.c
index 0835d2f..0fb40fc 100644
--- a/source/compiler/aslcache.c
+++ b/source/compiler/aslcache.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -71,6 +75,11 @@
UINT32 CacheSize = ASL_STRING_CACHE_SIZE;
+#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
+ /* Used for objects other than strings, so keep allocations aligned */
+ Length = ACPI_ROUND_UP_TO_NATIVE_WORD (Length);
+#endif
+
if (Length > CacheSize)
{
CacheSize = Length;
diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
index 8bd8789..533e446 100644
--- a/source/compiler/aslcodegen.c
+++ b/source/compiler/aslcodegen.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -41,6 +45,7 @@
#include "aslcompiler.y.h"
#include "amlcode.h"
#include "acconvert.h"
+#include "actbinfo.h"
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("aslcodegen")
@@ -69,6 +74,10 @@
CgUpdateHeader (
ACPI_PARSE_OBJECT *Op);
+static void
+CgUpdateCdatHeader (
+ ACPI_PARSE_OBJECT *Op);
+
/*******************************************************************************
*
@@ -95,7 +104,14 @@
CgAmlWriteWalk, NULL, NULL);
DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2);
- CgUpdateHeader (AslGbl_CurrentDB);
+ if (AcpiGbl_CDAT)
+ {
+ CgUpdateCdatHeader (AslGbl_CurrentDB);
+ }
+ else
+ {
+ CgUpdateHeader (AslGbl_CurrentDB);
+ }
}
@@ -546,6 +562,67 @@
/*******************************************************************************
*
+ * FUNCTION: CgUpdateCdatHeader
+ *
+ * PARAMETERS: Op - Op for the Definition Block
+ *
+ * RETURN: None.
+ *
+ * DESCRIPTION: Complete the ACPI table by calculating the checksum and
+ * re-writing the header for the input definition block
+ *
+ ******************************************************************************/
+
+static void
+CgUpdateCdatHeader (
+ ACPI_PARSE_OBJECT *Op)
+{
+ signed char Sum;
+ UINT32 i;
+ UINT32 Length;
+ UINT8 FileByte;
+ UINT8 Checksum;
+
+
+ /* Calculate the checksum over the entire definition block */
+
+ Sum = 0;
+ Length = sizeof (ACPI_TABLE_CDAT) + Op->Asl.AmlSubtreeLength;
+ FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset);
+
+ for (i = 0; i < Length; i++)
+ {
+ if (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) != AE_OK)
+ {
+ AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL,
+ "Table length is greater than size of the input file");
+ return;
+ }
+
+ Sum = (signed char) (Sum + FileByte);
+ }
+
+ Checksum = (UINT8) (0 - Sum);
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "Computed checksum = %X\n", Checksum);
+
+ /* Re-write the checksum byte */
+
+ FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset +
+ ACPI_CDAT_OFFSET (Checksum));
+
+ FlWriteFile (ASL_FILE_AML_OUTPUT, &Checksum, 1);
+
+ /*
+ * Seek to the end of the file. This is done to support multiple file
+ * compilation. Doing this simplifies other parts of the codebase because
+ * it eliminates the need to seek for a different starting place.
+ */
+ FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset + Length);
+}
+
+/*******************************************************************************
+ *
* FUNCTION: CgUpdateHeader
*
* PARAMETERS: Op - Op for the Definition Block
@@ -588,7 +665,7 @@
Checksum = (UINT8) (0 - Sum);
- /* Re-write the the checksum byte */
+ /* Re-write the checksum byte */
FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset +
ACPI_OFFSET (ACPI_TABLE_HEADER, Checksum));
diff --git a/source/compiler/aslcompile.c b/source/compiler/aslcompile.c
index 467a399..c091143 100644
--- a/source/compiler/aslcompile.c
+++ b/source/compiler/aslcompile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -129,7 +133,7 @@
if (AslGbl_SyntaxError)
{
- fprintf (stderr,
+ AslError (ASL_ERROR, ASL_MSG_SYNTAX, NULL,
"Compiler aborting due to parser-detected syntax error(s)\n");
/* Flag this error in the FileNode for compilation summary */
@@ -138,6 +142,8 @@
FileNode->ParserErrorDetected = TRUE;
AslGbl_ParserErrorDetected = TRUE;
LsDumpParseTree ();
+ AePrintErrorLog(ASL_FILE_STDERR);
+
goto ErrorExit;
}
@@ -155,6 +161,8 @@
goto ErrorExit;
}
+ AePrintErrorLog(ASL_FILE_STDERR);
+
/* Flush out any remaining source after parse tree is complete */
Event = UtBeginEvent ("Flush source input");
@@ -171,9 +179,13 @@
LsDumpParseTree ();
+ AslGbl_ParserErrorDetected = FALSE;
+ AslGbl_SyntaxError = FALSE;
+ UtEndEvent (Event);
UtEndEvent (FullCompile);
- return (AE_OK);
+ AslGbl_ParserErrorDetected = FALSE;
+ AslGbl_SyntaxError = FALSE;
ErrorExit:
UtEndEvent (FullCompile);
return (AE_ERROR);
@@ -535,7 +547,7 @@
AslCompilerFileHeader (
UINT32 FileId)
{
- struct tm *NewTime;
+ char *NewTime;
time_t Aclock;
char *Prefix = "";
@@ -579,13 +591,17 @@
/* Compilation header with timestamp */
- (void) time (&Aclock);
- NewTime = localtime (&Aclock);
+ Aclock = time (NULL);
+ NewTime = ctime (&Aclock);
FlPrintFile (FileId,
- "%sCompilation of \"%s\" - %s%s\n",
- Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename, asctime (NewTime),
- Prefix);
+ "%sCompilation of \"%s\" -",
+ Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename);
+
+ if (NewTime)
+ {
+ FlPrintFile (FileId, " %s%s\n", NewTime, Prefix);
+ }
switch (FileId)
{
@@ -798,7 +814,7 @@
if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
{
- printf ("\nMaximum error count (%d) exceeded\n",
+ printf ("\nMaximum error count (%d) exceeded (aslcompile.c)\n",
ASL_MAX_ERROR_COUNT);
}
diff --git a/source/compiler/aslcompiler.h b/source/compiler/aslcompiler.h
index d7a4a0b..7f27ae7 100644
--- a/source/compiler/aslcompiler.h
+++ b/source/compiler/aslcompiler.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -261,6 +265,15 @@
UINT32 Level,
void *Context);
+UINT32
+MtProcessTypeOp (
+ ACPI_PARSE_OBJECT *TypeOp);
+
+UINT8
+MtProcessParameterTypeList (
+ ACPI_PARSE_OBJECT *ParamTypeOp,
+ UINT32 *TypeList);
+
/*
* aslbtypes - bitfield data types
@@ -367,7 +380,7 @@
void);
ACPI_STATUS
-AslExpectException (
+AslLogExpectedException (
char *MessageIdString);
ACPI_STATUS
@@ -380,10 +393,16 @@
BOOLEAN
AslIsExceptionIgnored (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId);
void
+AslLogExpectedExceptionByLine (
+ char *MessageIdString);
+
+void
AslCoreSubsystemError (
ACPI_PARSE_OBJECT *Op,
ACPI_STATUS Status,
@@ -1097,6 +1116,10 @@
#define ASL_PARSE_OUTPUT 1
#define ASL_TREE_OUTPUT 2
+BOOLEAN
+UtIsIdInteger (
+ UINT8 *Target);
+
UINT8
UtIsBigEndianMachine (
void);
@@ -1121,10 +1144,14 @@
ACPI_PARSE_OBJECT *Op,
UINT32 Level);
-void *
-UtGetParentMethod (
+ACPI_NAMESPACE_NODE *
+UtGetParentMethodNode (
ACPI_NAMESPACE_NODE *Node);
+ACPI_PARSE_OBJECT *
+UtGetParentMethodOp (
+ ACPI_PARSE_OBJECT *Op);
+
BOOLEAN
UtNodeIsDescendantOf (
ACPI_NAMESPACE_NODE *Node1,
@@ -1408,6 +1435,10 @@
ASL_RESOURCE_INFO *Info);
ASL_RESOURCE_NODE *
+RsDoCsi2SerialBusDescriptor (
+ ASL_RESOURCE_INFO *Info);
+
+ASL_RESOURCE_NODE *
RsDoPinFunctionDescriptor (
ASL_RESOURCE_INFO *Info);
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
index cb1f0d9..2268ce2 100644
--- a/source/compiler/aslcompiler.l
+++ b/source/compiler/aslcompiler.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -44,7 +48,6 @@
#include <stdlib.h>
#include <string.h>
-YYSTYPE AslCompilerlval;
/*
* Generation: Use the following command line:
@@ -83,6 +86,7 @@
LeadNameChar [A-Za-z_]
DigitChar [0-9]
+ErrorCode [(][ ]*[1-9][0-9][0-9][0-9][ ]*[)]
OctalChar [0-7]
HexDigitChar [A-Fa-f0-9]
RootChar [\\]
@@ -167,8 +171,8 @@
/*
* Begin standard ASL grammar
*/
-[0-9][a-zA-Z0-9]* { AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
- count (1); return (PARSEOP_INTEGER); }
+[0-9][a-zA-Z0-9]* { count (1); AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
+ return (PARSEOP_INTEGER); }
"Include" { count (1); return (PARSEOP_INCLUDE); }
"External" { count (1); return (PARSEOP_EXTERNAL); }
@@ -322,6 +326,7 @@
"ResourceTemplate" { count (1); return (PARSEOP_RESOURCETEMPLATE); }
"RawDataBuffer" { count (1); return (PARSEOP_DATABUFFER); }
+"Csi2Bus" { count (1); return (PARSEOP_CSI2_SERIALBUS); }
"DMA" { count (1); return (PARSEOP_DMA); }
"DWordIO" { count (1); return (PARSEOP_DWORDIO); }
"DWordMemory" { count (1); return (PARSEOP_DWORDMEMORY); }
@@ -580,7 +585,8 @@
"IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
"GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */
"GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */
-"PlatformCommChannel" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
+"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
+"PlatformRtMechanism" { count (0); return (PARSEOP_REGIONSPACE_PRM); }
"FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
/* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
@@ -698,6 +704,22 @@
"__LINE__" { count (0); return (PARSEOP___LINE__); }
"__PATH__" { count (0); return (PARSEOP___PATH__); }
"__METHOD__" { count (0); return (PARSEOP___METHOD__); }
+"__EXPECT__"{ErrorCode} { char *s;
+ unsigned int index = 0;
+ count (0);
+ while (!isdigit ((int) AslCompilertext[index]))
+ {
+ index++;
+ }
+
+ /*
+ * The error code is contained inside the
+ * {ErrorCode} pattern. Extract it and log it
+ * as the expected error code.
+ */
+ s = UtLocalCacheCalloc (ASL_ERROR_CODE_LENGTH + 1);
+ memcpy (s, AslCompilertext + index, ASL_ERROR_CODE_LENGTH);
+ AslLogExpectedExceptionByLine (s); }
{NameSeg} { char *s;
count (0);
@@ -712,7 +734,6 @@
* the required length.
*/
strcpy (s, "____");
- AcpiUtStrupr (AslCompilertext);
}
memcpy (s, AslCompilertext, strlen (AslCompilertext));
AslCompilerlval.s = s;
@@ -722,7 +743,6 @@
{NameString} { char *s;
count (0);
s=UtLocalCacheCalloc (strlen (AslCompilertext)+1);
- AcpiUtStrupr (AslCompilertext);
strcpy (s, AslCompilertext);
AslCompilerlval.s = s;
DbgPrint (ASL_PARSE_OUTPUT, "NameString: %s\n", s);
diff --git a/source/compiler/aslcompiler.y b/source/compiler/aslcompiler.y
deleted file mode 100644
index 933f79e..0000000
--- a/source/compiler/aslcompiler.y
+++ /dev/null
@@ -1,4809 +0,0 @@
-%{
-/******************************************************************************
- *
- * Module Name: aslparser.y - Master Bison/Yacc input file for iASL
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2020, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include "aslcompiler.h"
-#include "acpi.h"
-#include "accommon.h"
-
-#define _COMPONENT ACPI_COMPILER
- ACPI_MODULE_NAME ("aslparse")
-
-/*
- * Global Notes:
- *
- * October 2005: The following list terms have been optimized (from the
- * original ASL grammar in the ACPI specification) to force the immediate
- * reduction of each list item so that the parse stack use doesn't increase on
- * each list element and possibly overflow on very large lists (>4000 items).
- * This dramatically reduces use of the parse stack overall.
- *
- * ArgList, TermList, ByteList, DWordList, PackageList,
- * ResourceMacroList, and FieldUnitList
- */
-
-void *
-AslLocalAllocate (
- unsigned int Size);
-
-
-/* Bison/yacc configuration */
-
-#define static
-#undef malloc
-#define malloc AslLocalAllocate
-#undef alloca
-#define alloca AslLocalAllocate
-#define yytname AslCompilername
-
-#define YYINITDEPTH 600 /* State stack depth */
-#define YYDEBUG 1 /* Enable debug output */
-#define YYERROR_VERBOSE 1 /* Verbose error messages */
-#define YYFLAG -32768
-
-/* Define YYMALLOC/YYFREE to prevent redefinition errors */
-
-#define YYMALLOC AslLocalAllocate
-#define YYFREE ACPI_FREE
-%}
-
-/*
- * Declare the type of values in the grammar
- */
-%union {
- UINT64 i;
- char *s;
- ACPI_PARSE_OBJECT *n;
-}
-
-/*
- * These shift/reduce conflicts are expected. There should be zero
- * reduce/reduce conflicts.
- */
-%expect 124
-
-/*! [Begin] no source code translation */
-
-/*
- * The M4 macro processor is used to bring in the parser items,
- * in order to keep this master file smaller, and to break up
- * the various parser items.
- */
-
-
-/* Token types */
-
-
-
-/******************************************************************************
- *
- * Token types: These are returned by the lexer
- *
- * NOTE: This list MUST match the AslKeywordMapping table found
- * in aslmap.c EXACTLY! Double check any changes!
- *
- *****************************************************************************/
-
-/*
- * Most tokens are defined to return <i>, which is a UINT64.
- *
- * These tokens return <s>, a pointer to the associated lexed string:
- *
- * PARSEOP_NAMESEG
- * PARSEOP_NAMESTRING
- * PARSEOP_STRING_LITERAL
- * PARSEOP_STRUCTURE_NAMESTRING
- */
-%token <i> PARSEOP_ACCESSAS
-%token <i> PARSEOP_ACCESSATTRIB_BLOCK
-%token <i> PARSEOP_ACCESSATTRIB_BLOCK_CALL
-%token <i> PARSEOP_ACCESSATTRIB_BYTE
-%token <i> PARSEOP_ACCESSATTRIB_BYTES
-%token <i> PARSEOP_ACCESSATTRIB_QUICK
-%token <i> PARSEOP_ACCESSATTRIB_RAW_BYTES
-%token <i> PARSEOP_ACCESSATTRIB_RAW_PROCESS
-%token <i> PARSEOP_ACCESSATTRIB_SND_RCV
-%token <i> PARSEOP_ACCESSATTRIB_WORD
-%token <i> PARSEOP_ACCESSATTRIB_WORD_CALL
-%token <i> PARSEOP_ACCESSTYPE_ANY
-%token <i> PARSEOP_ACCESSTYPE_BUF
-%token <i> PARSEOP_ACCESSTYPE_BYTE
-%token <i> PARSEOP_ACCESSTYPE_DWORD
-%token <i> PARSEOP_ACCESSTYPE_QWORD
-%token <i> PARSEOP_ACCESSTYPE_WORD
-%token <i> PARSEOP_ACQUIRE
-%token <i> PARSEOP_ADD
-%token <i> PARSEOP_ADDRESSINGMODE_7BIT
-%token <i> PARSEOP_ADDRESSINGMODE_10BIT
-%token <i> PARSEOP_ADDRESSTYPE_ACPI
-%token <i> PARSEOP_ADDRESSTYPE_MEMORY
-%token <i> PARSEOP_ADDRESSTYPE_NVS
-%token <i> PARSEOP_ADDRESSTYPE_RESERVED
-%token <i> PARSEOP_ALIAS
-%token <i> PARSEOP_AND
-%token <i> PARSEOP_ARG0
-%token <i> PARSEOP_ARG1
-%token <i> PARSEOP_ARG2
-%token <i> PARSEOP_ARG3
-%token <i> PARSEOP_ARG4
-%token <i> PARSEOP_ARG5
-%token <i> PARSEOP_ARG6
-%token <i> PARSEOP_BANKFIELD
-%token <i> PARSEOP_BITSPERBYTE_EIGHT
-%token <i> PARSEOP_BITSPERBYTE_FIVE
-%token <i> PARSEOP_BITSPERBYTE_NINE
-%token <i> PARSEOP_BITSPERBYTE_SEVEN
-%token <i> PARSEOP_BITSPERBYTE_SIX
-%token <i> PARSEOP_BREAK
-%token <i> PARSEOP_BREAKPOINT
-%token <i> PARSEOP_BUFFER
-%token <i> PARSEOP_BUSMASTERTYPE_MASTER
-%token <i> PARSEOP_BUSMASTERTYPE_NOTMASTER
-%token <i> PARSEOP_BYTECONST
-%token <i> PARSEOP_CASE
-%token <i> PARSEOP_CLOCKPHASE_FIRST
-%token <i> PARSEOP_CLOCKPHASE_SECOND
-%token <i> PARSEOP_CLOCKPOLARITY_HIGH
-%token <i> PARSEOP_CLOCKPOLARITY_LOW
-%token <i> PARSEOP_CONCATENATE
-%token <i> PARSEOP_CONCATENATERESTEMPLATE
-%token <i> PARSEOP_CONDREFOF
-%token <i> PARSEOP_CONNECTION
-%token <i> PARSEOP_CONTINUE
-%token <i> PARSEOP_COPYOBJECT
-%token <i> PARSEOP_CREATEBITFIELD
-%token <i> PARSEOP_CREATEBYTEFIELD
-%token <i> PARSEOP_CREATEDWORDFIELD
-%token <i> PARSEOP_CREATEFIELD
-%token <i> PARSEOP_CREATEQWORDFIELD
-%token <i> PARSEOP_CREATEWORDFIELD
-%token <i> PARSEOP_DATABUFFER
-%token <i> PARSEOP_DATATABLEREGION
-%token <i> PARSEOP_DEBUG
-%token <i> PARSEOP_DECODETYPE_POS
-%token <i> PARSEOP_DECODETYPE_SUB
-%token <i> PARSEOP_DECREMENT
-%token <i> PARSEOP_DEFAULT
-%token <i> PARSEOP_DEFAULT_ARG
-%token <i> PARSEOP_DEFINITION_BLOCK
-%token <i> PARSEOP_DEREFOF
-%token <i> PARSEOP_DEVICE
-%token <i> PARSEOP_DEVICEPOLARITY_HIGH
-%token <i> PARSEOP_DEVICEPOLARITY_LOW
-%token <i> PARSEOP_DIVIDE
-%token <i> PARSEOP_DMA
-%token <i> PARSEOP_DMATYPE_A
-%token <i> PARSEOP_DMATYPE_COMPATIBILITY
-%token <i> PARSEOP_DMATYPE_B
-%token <i> PARSEOP_DMATYPE_F
-%token <i> PARSEOP_DWORDCONST
-%token <i> PARSEOP_DWORDIO
-%token <i> PARSEOP_DWORDMEMORY
-%token <i> PARSEOP_DWORDSPACE
-%token <i> PARSEOP_EISAID
-%token <i> PARSEOP_ELSE
-%token <i> PARSEOP_ELSEIF
-%token <i> PARSEOP_ENDDEPENDENTFN
-%token <i> PARSEOP_ENDIAN_BIG
-%token <i> PARSEOP_ENDIAN_LITTLE
-%token <i> PARSEOP_ENDTAG
-%token <i> PARSEOP_ERRORNODE
-%token <i> PARSEOP_EVENT
-%token <i> PARSEOP_EXTENDEDIO
-%token <i> PARSEOP_EXTENDEDMEMORY
-%token <i> PARSEOP_EXTENDEDSPACE
-%token <i> PARSEOP_EXTERNAL
-%token <i> PARSEOP_FATAL
-%token <i> PARSEOP_FIELD
-%token <i> PARSEOP_FINDSETLEFTBIT
-%token <i> PARSEOP_FINDSETRIGHTBIT
-%token <i> PARSEOP_FIXEDDMA
-%token <i> PARSEOP_FIXEDIO
-%token <i> PARSEOP_FLOWCONTROL_HW
-%token <i> PARSEOP_FLOWCONTROL_NONE
-%token <i> PARSEOP_FLOWCONTROL_SW
-%token <i> PARSEOP_FROMBCD
-%token <i> PARSEOP_FUNCTION
-%token <i> PARSEOP_GPIO_INT
-%token <i> PARSEOP_GPIO_IO
-%token <i> PARSEOP_I2C_SERIALBUS
-%token <i> PARSEOP_I2C_SERIALBUS_V2
-%token <i> PARSEOP_IF
-%token <i> PARSEOP_INCLUDE
-%token <i> PARSEOP_INCLUDE_END
-%token <i> PARSEOP_INCREMENT
-%token <i> PARSEOP_INDEX
-%token <i> PARSEOP_INDEXFIELD
-%token <i> PARSEOP_INTEGER
-%token <i> PARSEOP_INTERRUPT
-%token <i> PARSEOP_INTLEVEL_ACTIVEBOTH
-%token <i> PARSEOP_INTLEVEL_ACTIVEHIGH
-%token <i> PARSEOP_INTLEVEL_ACTIVELOW
-%token <i> PARSEOP_INTTYPE_EDGE
-%token <i> PARSEOP_INTTYPE_LEVEL
-%token <i> PARSEOP_IO
-%token <i> PARSEOP_IODECODETYPE_10
-%token <i> PARSEOP_IODECODETYPE_16
-%token <i> PARSEOP_IORESTRICT_IN
-%token <i> PARSEOP_IORESTRICT_NONE
-%token <i> PARSEOP_IORESTRICT_OUT
-%token <i> PARSEOP_IORESTRICT_PRESERVE
-%token <i> PARSEOP_IRQ
-%token <i> PARSEOP_IRQNOFLAGS
-%token <i> PARSEOP_LAND
-%token <i> PARSEOP_LEQUAL
-%token <i> PARSEOP_LGREATER
-%token <i> PARSEOP_LGREATEREQUAL
-%token <i> PARSEOP_LLESS
-%token <i> PARSEOP_LLESSEQUAL
-%token <i> PARSEOP_LNOT
-%token <i> PARSEOP_LNOTEQUAL
-%token <i> PARSEOP_LOAD
-%token <i> PARSEOP_LOADTABLE
-%token <i> PARSEOP_LOCAL0
-%token <i> PARSEOP_LOCAL1
-%token <i> PARSEOP_LOCAL2
-%token <i> PARSEOP_LOCAL3
-%token <i> PARSEOP_LOCAL4
-%token <i> PARSEOP_LOCAL5
-%token <i> PARSEOP_LOCAL6
-%token <i> PARSEOP_LOCAL7
-%token <i> PARSEOP_LOCKRULE_LOCK
-%token <i> PARSEOP_LOCKRULE_NOLOCK
-%token <i> PARSEOP_LOR
-%token <i> PARSEOP_MATCH
-%token <i> PARSEOP_MATCHTYPE_MEQ
-%token <i> PARSEOP_MATCHTYPE_MGE
-%token <i> PARSEOP_MATCHTYPE_MGT
-%token <i> PARSEOP_MATCHTYPE_MLE
-%token <i> PARSEOP_MATCHTYPE_MLT
-%token <i> PARSEOP_MATCHTYPE_MTR
-%token <i> PARSEOP_MAXTYPE_FIXED
-%token <i> PARSEOP_MAXTYPE_NOTFIXED
-%token <i> PARSEOP_MEMORY24
-%token <i> PARSEOP_MEMORY32
-%token <i> PARSEOP_MEMORY32FIXED
-%token <i> PARSEOP_MEMTYPE_CACHEABLE
-%token <i> PARSEOP_MEMTYPE_NONCACHEABLE
-%token <i> PARSEOP_MEMTYPE_PREFETCHABLE
-%token <i> PARSEOP_MEMTYPE_WRITECOMBINING
-%token <i> PARSEOP_METHOD
-%token <i> PARSEOP_METHODCALL
-%token <i> PARSEOP_MID
-%token <i> PARSEOP_MINTYPE_FIXED
-%token <i> PARSEOP_MINTYPE_NOTFIXED
-%token <i> PARSEOP_MOD
-%token <i> PARSEOP_MULTIPLY
-%token <i> PARSEOP_MUTEX
-%token <i> PARSEOP_NAME
-%token <s> PARSEOP_NAMESEG
-%token <s> PARSEOP_NAMESTRING
-%token <i> PARSEOP_NAND
-%token <i> PARSEOP_NOOP
-%token <i> PARSEOP_NOR
-%token <i> PARSEOP_NOT
-%token <i> PARSEOP_NOTIFY
-%token <i> PARSEOP_OBJECTTYPE
-%token <i> PARSEOP_OBJECTTYPE_BFF
-%token <i> PARSEOP_OBJECTTYPE_BUF
-%token <i> PARSEOP_OBJECTTYPE_DDB
-%token <i> PARSEOP_OBJECTTYPE_DEV
-%token <i> PARSEOP_OBJECTTYPE_EVT
-%token <i> PARSEOP_OBJECTTYPE_FLD
-%token <i> PARSEOP_OBJECTTYPE_INT
-%token <i> PARSEOP_OBJECTTYPE_MTH
-%token <i> PARSEOP_OBJECTTYPE_MTX
-%token <i> PARSEOP_OBJECTTYPE_OPR
-%token <i> PARSEOP_OBJECTTYPE_PKG
-%token <i> PARSEOP_OBJECTTYPE_POW
-%token <i> PARSEOP_OBJECTTYPE_PRO
-%token <i> PARSEOP_OBJECTTYPE_STR
-%token <i> PARSEOP_OBJECTTYPE_THZ
-%token <i> PARSEOP_OBJECTTYPE_UNK
-%token <i> PARSEOP_OFFSET
-%token <i> PARSEOP_ONE
-%token <i> PARSEOP_ONES
-%token <i> PARSEOP_OPERATIONREGION
-%token <i> PARSEOP_OR
-%token <i> PARSEOP_PACKAGE
-%token <i> PARSEOP_PACKAGE_LENGTH
-%token <i> PARSEOP_PARITYTYPE_EVEN
-%token <i> PARSEOP_PARITYTYPE_MARK
-%token <i> PARSEOP_PARITYTYPE_NONE
-%token <i> PARSEOP_PARITYTYPE_ODD
-%token <i> PARSEOP_PARITYTYPE_SPACE
-%token <i> PARSEOP_PINCONFIG
-%token <i> PARSEOP_PINFUNCTION
-%token <i> PARSEOP_PINGROUP
-%token <i> PARSEOP_PINGROUPCONFIG
-%token <i> PARSEOP_PINGROUPFUNCTION
-%token <i> PARSEOP_PIN_NOPULL
-%token <i> PARSEOP_PIN_PULLDEFAULT
-%token <i> PARSEOP_PIN_PULLDOWN
-%token <i> PARSEOP_PIN_PULLUP
-%token <i> PARSEOP_POWERRESOURCE
-%token <i> PARSEOP_PROCESSOR
-%token <i> PARSEOP_QWORDCONST
-%token <i> PARSEOP_QWORDIO
-%token <i> PARSEOP_QWORDMEMORY
-%token <i> PARSEOP_QWORDSPACE
-%token <i> PARSEOP_RANGETYPE_ENTIRE
-%token <i> PARSEOP_RANGETYPE_ISAONLY
-%token <i> PARSEOP_RANGETYPE_NONISAONLY
-%token <i> PARSEOP_RAW_DATA
-%token <i> PARSEOP_READWRITETYPE_BOTH
-%token <i> PARSEOP_READWRITETYPE_READONLY
-%token <i> PARSEOP_REFOF
-%token <i> PARSEOP_REGIONSPACE_CMOS
-%token <i> PARSEOP_REGIONSPACE_EC
-%token <i> PARSEOP_REGIONSPACE_FFIXEDHW
-%token <i> PARSEOP_REGIONSPACE_GPIO
-%token <i> PARSEOP_REGIONSPACE_GSBUS
-%token <i> PARSEOP_REGIONSPACE_IO
-%token <i> PARSEOP_REGIONSPACE_IPMI
-%token <i> PARSEOP_REGIONSPACE_MEM
-%token <i> PARSEOP_REGIONSPACE_PCC
-%token <i> PARSEOP_REGIONSPACE_PCI
-%token <i> PARSEOP_REGIONSPACE_PCIBAR
-%token <i> PARSEOP_REGIONSPACE_SMBUS
-%token <i> PARSEOP_REGISTER
-%token <i> PARSEOP_RELEASE
-%token <i> PARSEOP_RESERVED_BYTES
-%token <i> PARSEOP_RESET
-%token <i> PARSEOP_RESOURCETEMPLATE
-%token <i> PARSEOP_RESOURCETYPE_CONSUMER
-%token <i> PARSEOP_RESOURCETYPE_PRODUCER
-%token <i> PARSEOP_RETURN
-%token <i> PARSEOP_REVISION
-%token <i> PARSEOP_SCOPE
-%token <i> PARSEOP_SERIALIZERULE_NOTSERIAL
-%token <i> PARSEOP_SERIALIZERULE_SERIAL
-%token <i> PARSEOP_SHARETYPE_EXCLUSIVE
-%token <i> PARSEOP_SHARETYPE_EXCLUSIVEWAKE
-%token <i> PARSEOP_SHARETYPE_SHARED
-%token <i> PARSEOP_SHARETYPE_SHAREDWAKE
-%token <i> PARSEOP_SHIFTLEFT
-%token <i> PARSEOP_SHIFTRIGHT
-%token <i> PARSEOP_SIGNAL
-%token <i> PARSEOP_SIZEOF
-%token <i> PARSEOP_SLAVEMODE_CONTROLLERINIT
-%token <i> PARSEOP_SLAVEMODE_DEVICEINIT
-%token <i> PARSEOP_SLEEP
-%token <i> PARSEOP_SPI_SERIALBUS
-%token <i> PARSEOP_SPI_SERIALBUS_V2
-%token <i> PARSEOP_STALL
-%token <i> PARSEOP_STARTDEPENDENTFN
-%token <i> PARSEOP_STARTDEPENDENTFN_NOPRI
-%token <i> PARSEOP_STOPBITS_ONE
-%token <i> PARSEOP_STOPBITS_ONEPLUSHALF
-%token <i> PARSEOP_STOPBITS_TWO
-%token <i> PARSEOP_STOPBITS_ZERO
-%token <i> PARSEOP_STORE
-%token <s> PARSEOP_STRING_LITERAL
-%token <i> PARSEOP_SUBTRACT
-%token <i> PARSEOP_SWITCH
-%token <i> PARSEOP_THERMALZONE
-%token <i> PARSEOP_TIMER
-%token <i> PARSEOP_TOBCD
-%token <i> PARSEOP_TOBUFFER
-%token <i> PARSEOP_TODECIMALSTRING
-%token <i> PARSEOP_TOHEXSTRING
-%token <i> PARSEOP_TOINTEGER
-%token <i> PARSEOP_TOSTRING
-%token <i> PARSEOP_TOUUID
-%token <i> PARSEOP_TRANSLATIONTYPE_DENSE
-%token <i> PARSEOP_TRANSLATIONTYPE_SPARSE
-%token <i> PARSEOP_TYPE_STATIC
-%token <i> PARSEOP_TYPE_TRANSLATION
-%token <i> PARSEOP_UART_SERIALBUS
-%token <i> PARSEOP_UART_SERIALBUS_V2
-%token <i> PARSEOP_UNICODE
-%token <i> PARSEOP_UNLOAD
-%token <i> PARSEOP_UPDATERULE_ONES
-%token <i> PARSEOP_UPDATERULE_PRESERVE
-%token <i> PARSEOP_UPDATERULE_ZEROS
-%token <i> PARSEOP_VAR_PACKAGE
-%token <i> PARSEOP_VENDORLONG
-%token <i> PARSEOP_VENDORSHORT
-%token <i> PARSEOP_WAIT
-%token <i> PARSEOP_WHILE
-%token <i> PARSEOP_WIREMODE_FOUR
-%token <i> PARSEOP_WIREMODE_THREE
-%token <i> PARSEOP_WORDBUSNUMBER
-%token <i> PARSEOP_WORDCONST
-%token <i> PARSEOP_WORDIO
-%token <i> PARSEOP_WORDSPACE
-%token <i> PARSEOP_XFERSIZE_8
-%token <i> PARSEOP_XFERSIZE_16
-%token <i> PARSEOP_XFERSIZE_32
-%token <i> PARSEOP_XFERSIZE_64
-%token <i> PARSEOP_XFERSIZE_128
-%token <i> PARSEOP_XFERSIZE_256
-%token <i> PARSEOP_XFERTYPE_8
-%token <i> PARSEOP_XFERTYPE_8_16
-%token <i> PARSEOP_XFERTYPE_16
-%token <i> PARSEOP_XOR
-%token <i> PARSEOP_ZERO
-
-/* ToPld macro */
-
-%token <i> PARSEOP_TOPLD
-%token <i> PARSEOP_PLD_REVISION
-%token <i> PARSEOP_PLD_IGNORECOLOR
-%token <i> PARSEOP_PLD_RED
-%token <i> PARSEOP_PLD_GREEN
-%token <i> PARSEOP_PLD_BLUE
-%token <i> PARSEOP_PLD_WIDTH
-%token <i> PARSEOP_PLD_HEIGHT
-%token <i> PARSEOP_PLD_USERVISIBLE
-%token <i> PARSEOP_PLD_DOCK
-%token <i> PARSEOP_PLD_LID
-%token <i> PARSEOP_PLD_PANEL
-%token <i> PARSEOP_PLD_VERTICALPOSITION
-%token <i> PARSEOP_PLD_HORIZONTALPOSITION
-%token <i> PARSEOP_PLD_SHAPE
-%token <i> PARSEOP_PLD_GROUPORIENTATION
-%token <i> PARSEOP_PLD_GROUPTOKEN
-%token <i> PARSEOP_PLD_GROUPPOSITION
-%token <i> PARSEOP_PLD_BAY
-%token <i> PARSEOP_PLD_EJECTABLE
-%token <i> PARSEOP_PLD_EJECTREQUIRED
-%token <i> PARSEOP_PLD_CABINETNUMBER
-%token <i> PARSEOP_PLD_CARDCAGENUMBER
-%token <i> PARSEOP_PLD_REFERENCE
-%token <i> PARSEOP_PLD_ROTATION
-%token <i> PARSEOP_PLD_ORDER
-%token <i> PARSEOP_PLD_RESERVED
-%token <i> PARSEOP_PLD_VERTICALOFFSET
-%token <i> PARSEOP_PLD_HORIZONTALOFFSET
-
-/*
- * C-style expression parser. These must appear after all of the
- * standard ASL operators and keywords.
- *
- * Note: The order of these tokens implements the precedence rules
- * (low precedence to high). See aslrules.y for an exhaustive list.
- */
-%right <i> PARSEOP_EXP_EQUALS
- PARSEOP_EXP_ADD_EQ
- PARSEOP_EXP_SUB_EQ
- PARSEOP_EXP_MUL_EQ
- PARSEOP_EXP_DIV_EQ
- PARSEOP_EXP_MOD_EQ
- PARSEOP_EXP_SHL_EQ
- PARSEOP_EXP_SHR_EQ
- PARSEOP_EXP_AND_EQ
- PARSEOP_EXP_XOR_EQ
- PARSEOP_EXP_OR_EQ
-
-%left <i> PARSEOP_EXP_LOGICAL_OR
-%left <i> PARSEOP_EXP_LOGICAL_AND
-%left <i> PARSEOP_EXP_OR
-%left <i> PARSEOP_EXP_XOR
-%left <i> PARSEOP_EXP_AND
-%left <i> PARSEOP_EXP_EQUAL
- PARSEOP_EXP_NOT_EQUAL
-%left <i> PARSEOP_EXP_GREATER
- PARSEOP_EXP_LESS
- PARSEOP_EXP_GREATER_EQUAL
- PARSEOP_EXP_LESS_EQUAL
-%left <i> PARSEOP_EXP_SHIFT_RIGHT
- PARSEOP_EXP_SHIFT_LEFT
-%left <i> PARSEOP_EXP_ADD
- PARSEOP_EXP_SUBTRACT
-%left <i> PARSEOP_EXP_MULTIPLY
- PARSEOP_EXP_DIVIDE
- PARSEOP_EXP_MODULO
-
-%right <i> PARSEOP_EXP_NOT
- PARSEOP_EXP_LOGICAL_NOT
-
-%left <i> PARSEOP_EXP_INCREMENT
- PARSEOP_EXP_DECREMENT
-
-%left <i> PARSEOP_OPEN_PAREN
- PARSEOP_CLOSE_PAREN
-
-/* Brackets for Index() support */
-
-%left <i> PARSEOP_EXP_INDEX_LEFT
-%right <i> PARSEOP_EXP_INDEX_RIGHT
-
-/* Macros */
-
-%token <i> PARSEOP_PRINTF
-%token <i> PARSEOP_FPRINTF
-%token <i> PARSEOP_FOR
-
-/* Structures */
-
-%token <i> PARSEOP_STRUCTURE
-%token <s> PARSEOP_STRUCTURE_NAMESTRING
-%token <i> PARSEOP_STRUCTURE_TAG
-%token <i> PARSEOP_STRUCTURE_ELEMENT
-%token <i> PARSEOP_STRUCTURE_INSTANCE
-%token <i> PARSEOP_STRUCTURE_REFERENCE
-%token <i> PARSEOP_STRUCTURE_POINTER
-
-/* Top level */
-
-%token <i> PARSEOP_ASL_CODE
-
-
-/*******************************************************************************
- *
- * Tokens below are not in the aslmap.c file
- *
- ******************************************************************************/
-
-
-/* Tokens below this are not in the aslmap.c file */
-
-/* Specific parentheses tokens are not used at this time */
- /* PARSEOP_EXP_PAREN_OPEN */
- /* PARSEOP_EXP_PAREN_CLOSE */
-
-/* ASL+ variable creation */
-
-%token <i> PARSEOP_INTEGER_TYPE
-%token <i> PARSEOP_STRING_TYPE
-%token <i> PARSEOP_BUFFER_TYPE
-%token <i> PARSEOP_PACKAGE_TYPE
-%token <i> PARSEOP_REFERENCE_TYPE
-
-
-/*
- * Special functions. These should probably stay at the end of this
- * table.
- */
-%token <i> PARSEOP___DATE__
-%token <i> PARSEOP___FILE__
-%token <i> PARSEOP___LINE__
-%token <i> PARSEOP___PATH__
-%token <i> PARSEOP___METHOD__
-
-
-/* Production types/names */
-
-
-
-/******************************************************************************
- *
- * Production names
- *
- *****************************************************************************/
-
-%type <n> ArgList
-%type <n> AslCode
-%type <n> BufferData
-%type <n> BufferTermData
-%type <n> CompilerDirective
-%type <n> DataObject
-%type <n> DefinitionBlockTerm
-%type <n> DefinitionBlockList
-%type <n> IntegerData
-%type <n> NamedObject
-%type <n> NameSpaceModifier
-%type <n> Object
-%type <n> PackageData
-%type <n> ParameterTypePackage
-%type <n> ParameterTypePackageList
-%type <n> ParameterTypesPackage
-%type <n> ParameterTypesPackageList
-%type <n> RequiredTarget
-%type <n> SimpleName
-%type <n> StringData
-%type <n> Target
-%type <n> Term
-%type <n> TermArg
-%type <n> TermList
-%type <n> MethodInvocationTerm
-
-/* Type4Opcode is obsolete */
-
-%type <n> Type1Opcode
-%type <n> Type2BufferOpcode
-%type <n> Type2BufferOrStringOpcode
-%type <n> Type2IntegerOpcode
-%type <n> Type2Opcode
-%type <n> Type2StringOpcode
-%type <n> Type3Opcode
-%type <n> Type5Opcode
-%type <n> Type6Opcode
-
-%type <n> AccessAsTerm
-%type <n> ExternalTerm
-%type <n> FieldUnit
-%type <n> FieldUnitEntry
-%type <n> FieldUnitList
-%type <n> IncludeTerm
-%type <n> OffsetTerm
-%type <n> OptionalAccessAttribTerm
-
-/* Named Objects */
-
-%type <n> BankFieldTerm
-%type <n> CreateBitFieldTerm
-%type <n> CreateByteFieldTerm
-%type <n> CreateDWordFieldTerm
-%type <n> CreateFieldTerm
-%type <n> CreateQWordFieldTerm
-%type <n> CreateWordFieldTerm
-%type <n> DataRegionTerm
-%type <n> DeviceTerm
-%type <n> EventTerm
-%type <n> FieldTerm
-%type <n> FunctionTerm
-%type <n> IndexFieldTerm
-%type <n> MethodTerm
-%type <n> MutexTerm
-%type <n> OpRegionTerm
-%type <n> OpRegionSpaceIdTerm
-%type <n> PowerResTerm
-%type <n> ProcessorTerm
-%type <n> ThermalZoneTerm
-
-/* Namespace modifiers */
-
-%type <n> AliasTerm
-%type <n> NameTerm
-%type <n> ScopeTerm
-
-/* Type 1 opcodes */
-
-%type <n> BreakPointTerm
-%type <n> BreakTerm
-%type <n> CaseDefaultTermList
-%type <n> CaseTerm
-%type <n> ContinueTerm
-%type <n> DefaultTerm
-%type <n> ElseTerm
-%type <n> FatalTerm
-%type <n> ElseIfTerm
-%type <n> IfTerm
-%type <n> LoadTerm
-%type <n> NoOpTerm
-%type <n> NotifyTerm
-%type <n> ReleaseTerm
-%type <n> ResetTerm
-%type <n> ReturnTerm
-%type <n> SignalTerm
-%type <n> SleepTerm
-%type <n> StallTerm
-%type <n> SwitchTerm
-%type <n> UnloadTerm
-%type <n> WhileTerm
-/* %type <n> CaseTermList */
-
-/* Type 2 opcodes */
-
-%type <n> AcquireTerm
-%type <n> AddTerm
-%type <n> AndTerm
-%type <n> ConcatResTerm
-%type <n> ConcatTerm
-%type <n> CondRefOfTerm
-%type <n> CopyObjectTerm
-%type <n> DecTerm
-%type <n> DerefOfTerm
-%type <n> DivideTerm
-%type <n> FindSetLeftBitTerm
-%type <n> FindSetRightBitTerm
-%type <n> FromBCDTerm
-%type <n> IncTerm
-%type <n> IndexTerm
-%type <n> LAndTerm
-%type <n> LEqualTerm
-%type <n> LGreaterEqualTerm
-%type <n> LGreaterTerm
-%type <n> LLessEqualTerm
-%type <n> LLessTerm
-%type <n> LNotEqualTerm
-%type <n> LNotTerm
-%type <n> LoadTableTerm
-%type <n> LOrTerm
-%type <n> MatchTerm
-%type <n> MidTerm
-%type <n> ModTerm
-%type <n> MultiplyTerm
-%type <n> NAndTerm
-%type <n> NOrTerm
-%type <n> NotTerm
-%type <n> ObjectTypeTerm
-%type <n> OrTerm
-%type <n> RawDataBufferTerm
-%type <n> RefOfTerm
-%type <n> ShiftLeftTerm
-%type <n> ShiftRightTerm
-%type <n> SizeOfTerm
-%type <n> StoreTerm
-%type <n> SubtractTerm
-%type <n> TimerTerm
-%type <n> ToBCDTerm
-%type <n> ToBufferTerm
-%type <n> ToDecimalStringTerm
-%type <n> ToHexStringTerm
-%type <n> ToIntegerTerm
-%type <n> ToStringTerm
-%type <n> WaitTerm
-%type <n> XOrTerm
-
-/* Keywords */
-
-%type <n> AccessAttribKeyword
-%type <n> AccessTypeKeyword
-%type <n> AddressingModeKeyword
-%type <n> AddressKeyword
-%type <n> AddressSpaceKeyword
-%type <n> BitsPerByteKeyword
-%type <n> ClockPhaseKeyword
-%type <n> ClockPolarityKeyword
-%type <n> DecodeKeyword
-%type <n> DevicePolarityKeyword
-%type <n> DMATypeKeyword
-%type <n> EndianKeyword
-%type <n> FlowControlKeyword
-%type <n> InterruptLevel
-%type <n> InterruptTypeKeyword
-%type <n> IODecodeKeyword
-%type <n> IoRestrictionKeyword
-%type <n> LockRuleKeyword
-%type <n> MatchOpKeyword
-%type <n> MaxKeyword
-%type <n> MemTypeKeyword
-%type <n> MinKeyword
-%type <n> ObjectTypeKeyword
-%type <n> OptionalBusMasterKeyword
-%type <n> OptionalReadWriteKeyword
-%type <n> ParityTypeKeyword
-%type <n> PinConfigByte
-%type <n> PinConfigKeyword
-%type <n> RangeTypeKeyword
-%type <n> RegionSpaceKeyword
-%type <n> ResourceTypeKeyword
-%type <n> SerializeRuleKeyword
-%type <n> ShareTypeKeyword
-%type <n> SlaveModeKeyword
-%type <n> StopBitsKeyword
-%type <n> TranslationKeyword
-%type <n> TypeKeyword
-%type <n> UpdateRuleKeyword
-%type <n> WireModeKeyword
-%type <n> XferSizeKeyword
-%type <n> XferTypeKeyword
-
-/* Types */
-
-%type <n> SuperName
-%type <n> ObjectTypeSource
-%type <n> DerefOfSource
-%type <n> RefOfSource
-%type <n> CondRefOfSource
-%type <n> ArgTerm
-%type <n> LocalTerm
-%type <n> DebugTerm
-
-%type <n> Integer
-%type <n> ByteConst
-%type <n> WordConst
-%type <n> DWordConst
-%type <n> QWordConst
-%type <n> String
-
-%type <n> ConstTerm
-%type <n> ConstExprTerm
-%type <n> ByteConstExpr
-%type <n> WordConstExpr
-%type <n> DWordConstExpr
-%type <n> QWordConstExpr
-
-%type <n> DWordList
-%type <n> BufferTerm
-%type <n> ByteList
-
-%type <n> PackageElement
-%type <n> PackageList
-%type <n> PackageTerm
-
-/* Macros */
-
-%type <n> EISAIDTerm
-%type <n> ResourceMacroList
-%type <n> ResourceMacroTerm
-%type <n> ResourceTemplateTerm
-%type <n> PldKeyword
-%type <n> PldKeywordList
-%type <n> ToPLDTerm
-%type <n> ToUUIDTerm
-%type <n> UnicodeTerm
-%type <n> PrintfArgList
-%type <n> PrintfTerm
-%type <n> FprintfTerm
-%type <n> ForTerm
-
-/* Resource Descriptors */
-
-%type <n> ConnectionTerm
-%type <n> DMATerm
-%type <n> DWordIOTerm
-%type <n> DWordMemoryTerm
-%type <n> DWordSpaceTerm
-%type <n> EndDependentFnTerm
-%type <n> ExtendedIOTerm
-%type <n> ExtendedMemoryTerm
-%type <n> ExtendedSpaceTerm
-%type <n> FixedDmaTerm
-%type <n> FixedIOTerm
-%type <n> GpioIntTerm
-%type <n> GpioIoTerm
-%type <n> I2cSerialBusTerm
-%type <n> I2cSerialBusTermV2
-%type <n> InterruptTerm
-%type <n> IOTerm
-%type <n> IRQNoFlagsTerm
-%type <n> IRQTerm
-%type <n> Memory24Term
-%type <n> Memory32FixedTerm
-%type <n> Memory32Term
-%type <n> NameSeg
-%type <n> NameString
-%type <n> PinConfigTerm
-%type <n> PinFunctionTerm
-%type <n> PinGroupTerm
-%type <n> PinGroupConfigTerm
-%type <n> PinGroupFunctionTerm
-%type <n> QWordIOTerm
-%type <n> QWordMemoryTerm
-%type <n> QWordSpaceTerm
-%type <n> RegisterTerm
-%type <n> SpiSerialBusTerm
-%type <n> SpiSerialBusTermV2
-%type <n> StartDependentFnNoPriTerm
-%type <n> StartDependentFnTerm
-%type <n> UartSerialBusTerm
-%type <n> UartSerialBusTermV2
-%type <n> VendorLongTerm
-%type <n> VendorShortTerm
-%type <n> WordBusNumberTerm
-%type <n> WordIOTerm
-%type <n> WordSpaceTerm
-
-/* Local types that help construct the AML, not in ACPI spec */
-
-%type <n> AmlPackageLengthTerm
-%type <n> IncludeEndTerm
-%type <n> NameStringItem
-%type <n> TermArgItem
-
-%type <n> OptionalAccessSize
-%type <n> OptionalAccessTypeKeyword
-%type <n> OptionalAddressingMode
-%type <n> OptionalAddressRange
-%type <n> OptionalBitsPerByte
-%type <n> OptionalBuffer_Last
-%type <n> OptionalByteConstExpr
-%type <n> OptionalCount
-%type <n> OptionalDataCount
-%type <n> OptionalDecodeType
-%type <n> OptionalDevicePolarity
-%type <n> OptionalDWordConstExpr
-%type <n> OptionalEndian
-%type <n> OptionalFlowControl
-%type <n> OptionalIoRestriction
-%type <n> OptionalListString
-%type <n> OptionalLockRuleKeyword
-%type <n> OptionalMaxType
-%type <n> OptionalMemType
-%type <n> OptionalMinType
-%type <n> OptionalNameString
-%type <n> OptionalNameString_First
-%type <n> OptionalNameString_Last
-%type <n> OptionalObjectTypeKeyword
-%type <n> OptionalParameterTypePackage
-%type <n> OptionalParameterTypesPackage
-%type <n> OptionalParentheses
-%type <n> OptionalParityType
-%type <n> OptionalPredicate
-%type <n> OptionalQWordConstExpr
-%type <n> OptionalRangeType
-%type <n> OptionalReference
-%type <n> OptionalResourceType
-%type <n> OptionalResourceType_First
-%type <n> OptionalProducerResourceType
-%type <n> OptionalReturnArg
-%type <n> OptionalSerializeRuleKeyword
-%type <n> OptionalShareType
-%type <n> OptionalShareType_First
-%type <n> OptionalSlaveMode
-%type <n> OptionalStopBits
-%type <n> OptionalStringData
-%type <n> OptionalSyncLevel
-%type <n> OptionalTermArg
-%type <n> OptionalTranslationType_Last
-%type <n> OptionalType
-%type <n> OptionalType_Last
-%type <n> OptionalUpdateRuleKeyword
-%type <n> OptionalWireMode
-%type <n> OptionalWordConst
-%type <n> OptionalWordConstExpr
-%type <n> OptionalXferSize
-
-/*
- * ASL+ (C-style) parser
- */
-
-/* Expressions and symbolic operators */
-
-%type <n> Expression
-%type <n> EqualsTerm
-%type <n> IndexExpTerm
-
-/* ASL+ Named object declaration support */
-/*
-%type <n> NameTermAslPlus
-
-%type <n> BufferBegin
-%type <n> BufferEnd
-%type <n> PackageBegin
-%type <n> PackageEnd
-%type <n> OptionalLength
-*/
-/* ASL+ Structure declarations */
-/*
-%type <n> StructureTerm
-%type <n> StructureTermBegin
-%type <n> StructureType
-%type <n> StructureTag
-%type <n> StructureElementList
-%type <n> StructureElement
-%type <n> StructureElementType
-%type <n> OptionalStructureElementType
-%type <n> StructureId
-*/
-/* Structure instantiantion */
-/*
-%type <n> StructureInstanceTerm
-%type <n> StructureTagReference
-%type <n> StructureInstanceEnd
-*/
-/* Pseudo-instantiantion for method Args/Locals */
-/*
-%type <n> MethodStructureTerm
-%type <n> LocalStructureName
-*/
-/* Direct structure references via the Index operator */
-/*
-%type <n> StructureReference
-%type <n> StructureIndexTerm
-%type <n> StructurePointerTerm
-%type <n> StructurePointerReference
-%type <n> OptionalDefinePointer
-*/
-
-%%
-
-/* Production rules */
-
-
-
-/*******************************************************************************
- *
- * ASL Root and Secondary Terms
- *
- ******************************************************************************/
-
-/*
- * Root term. Allow multiple #line directives before the definition block
- * to handle output from preprocessors
- */
-AslCode
- : DefinitionBlockList {$<n>$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_ASL_CODE),1, $1);}
- | error {YYABORT; $$ = NULL;}
- ;
-
-
-/*
- * Note concerning support for "module-level code".
- *
- * ACPI 1.0 allowed Type1 and Type2 executable opcodes outside of control
- * methods (the so-called module-level code.) This support was explicitly
- * removed in ACPI 2.0, but this type of code continues to be created by
- * BIOS vendors. In order to support the disassembly and recompilation of
- * such code (and the porting of ASL code to iASL), iASL supports this
- * code in violation of the current ACPI specification.
- *
- * The grammar change to support module-level code is to revert the
- * {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
- * original use of {TermList} instead (see below.) This allows the use
- * of Type1 and Type2 opcodes at module level.
- *
- * 04/2016: The module-level code is now allowed in the following terms:
- * DeviceTerm, PowerResTerm, ProcessorTerm, ScopeTerm, ThermalZoneTerm.
- * The ObjectList term is obsolete and has been removed.
- */
-DefinitionBlockTerm
- : PARSEOP_DEFINITION_BLOCK
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEFINITION_BLOCK); COMMENT_CAPTURE_OFF;}
- String ','
- String ','
- ByteConst ','
- String ','
- String ','
- DWordConst
- PARSEOP_CLOSE_PAREN {TrSetOpIntegerWidth ($6,$8);
- TrSetOpEndLineNumber ($<n>3); COMMENT_CAPTURE_ON;}
- '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
- $4,$6,$8,$10,$12,$14,$18);}
- ;
-
-DefinitionBlockList
- : DefinitionBlockTerm
- | DefinitionBlockTerm
- DefinitionBlockList {$$ = TrLinkPeerOps (2, $1,$2);}
- ;
-
-
-/******* Basic ASCII identifiers **************************************************/
-
-/* Allow IO, DMA, IRQ Resource macro and FOR macro names to also be used as identifiers */
-
-NameString
- : NameSeg {}
- | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) $1);}
- | PARSEOP_IO {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
- | PARSEOP_DMA {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
- | PARSEOP_IRQ {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
- | PARSEOP_FOR {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "FOR");}
- ;
-/*
-NameSeg
- : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
- TrNormalizeNameSeg ($1));}
- ;
-*/
-
-NameSeg
- : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
- (ACPI_NATIVE_INT) AslCompilerlval.s);}
- ;
-
-
-/******* Fundamental argument/statement types ***********************************/
-
-Term
- : Object {}
- | Type1Opcode {}
- | Type2Opcode {}
- | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | Type2BufferOpcode {}
- | Type2BufferOrStringOpcode {}
- | error {$$ = AslDoError(); yyclearin;}
- ;
-
-SuperName
- : SimpleName {}
- | DebugTerm {}
- | Type6Opcode {}
- ;
-
-Target
- : {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
- | ',' {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
- | ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
- ;
-
-RequiredTarget
- : ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
- ;
-
-TermArg
- : SimpleName {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
- | Type2Opcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
- | DataObject {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
- | PARSEOP_OPEN_PAREN
- TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrSetOpFlags ($2, OP_IS_TERM_ARG);}
- ;
-
-/*
- NOTE: Removed from TermArg due to reduce/reduce conflicts:
- | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
- | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
- | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
- | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
-
-*/
-
-MethodInvocationTerm
- : NameString
- PARSEOP_OPEN_PAREN {TrSetOpIntegerValue (PARSEOP_METHODCALL, $1); COMMENT_CAPTURE_OFF;}
- ArgList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildOp ($1,$4); COMMENT_CAPTURE_ON;}
- ;
-
-/* OptionalCount must appear before ByteList or an incorrect reduction will result */
-
-OptionalCount
- : {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
- | ',' {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
- | ',' TermArg {$$ = $2;}
- ;
-
-/*
- * Data count for buffers and packages (byte count for buffers,
- * element count for packages).
- */
-OptionalDataCount
-
- /* Legacy ASL */
- : {$$ = NULL;}
- | PARSEOP_OPEN_PAREN
- TermArg
- PARSEOP_CLOSE_PAREN {$$ = $2;}
- | PARSEOP_OPEN_PAREN
- PARSEOP_CLOSE_PAREN {$$ = NULL;}
-
- /* C-style (ASL+) -- adds equals term */
-
- | PARSEOP_EXP_EQUALS {$$ = NULL;}
-
- | PARSEOP_OPEN_PAREN
- TermArg
- PARSEOP_CLOSE_PAREN
- PARSEOP_EXP_EQUALS {$$ = $2;}
-
- | PARSEOP_OPEN_PAREN
- PARSEOP_CLOSE_PAREN
- String
- PARSEOP_EXP_EQUALS {$$ = NULL;}
- ;
-
-
-/******* List Terms **************************************************/
-
- /* ACPI 3.0 -- allow semicolons between terms */
-
-TermList
- : {$$ = NULL;}
- | TermList Term {$$ = TrLinkPeerOp (
- TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);}
- | TermList Term ';' {$$ = TrLinkPeerOp (
- TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);}
- | TermList ';' Term {$$ = TrLinkPeerOp (
- TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);}
- | TermList ';' Term ';' {$$ = TrLinkPeerOp (
- TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);}
- ;
-
-ArgList
- : {$$ = NULL;}
- | TermArg
- | ArgList ',' /* Allows a trailing comma at list end */
- | ArgList ','
- TermArg {$$ = TrLinkPeerOp ($1,$3);}
- ;
-
-ByteList
- : {$$ = NULL;}
- | ByteConstExpr
- | ByteList ',' /* Allows a trailing comma at list end */
- | ByteList ','
- ByteConstExpr {$$ = TrLinkPeerOp ($1,$3);}
- ;
-
-DWordList
- : {$$ = NULL;}
- | DWordConstExpr
- | DWordList ',' /* Allows a trailing comma at list end */
- | DWordList ','
- DWordConstExpr {$$ = TrLinkPeerOp ($1,$3);}
- ;
-
-FieldUnitList
- : {$$ = NULL;}
- | FieldUnit
- | FieldUnitList ',' /* Allows a trailing comma at list end */
- | FieldUnitList ','
- FieldUnit {$$ = TrLinkPeerOp ($1,$3);}
- ;
-
-FieldUnit
- : FieldUnitEntry {}
- | OffsetTerm {}
- | AccessAsTerm {}
- | ConnectionTerm {}
- ;
-
-FieldUnitEntry
- : ',' AmlPackageLengthTerm {$$ = TrCreateOp (PARSEOP_RESERVED_BYTES,1,$2);}
- | NameSeg ','
- AmlPackageLengthTerm {$$ = TrLinkChildOp ($1,$3);}
- ;
-
-Object
- : CompilerDirective {}
- | NamedObject {}
- | NameSpaceModifier {}
-/* | StructureTerm {} */
- ;
-
-PackageList
- : {$$ = NULL;}
- | PackageElement
- | PackageList ',' /* Allows a trailing comma at list end */
- | PackageList ','
- PackageElement {$$ = TrLinkPeerOp ($1,$3);}
- ;
-
-PackageElement
- : DataObject {}
- | NameString {}
- ;
-
- /* Rules for specifying the type of one method argument or return value */
-
-ParameterTypePackage
- : {$$ = NULL;}
- | ObjectTypeKeyword {$$ = $1;}
- | ParameterTypePackage ','
- ObjectTypeKeyword {$$ = TrLinkPeerOps (2,$1,$3);}
- ;
-
-ParameterTypePackageList
- : {$$ = NULL;}
- | ObjectTypeKeyword {$$ = $1;}
- | '{' ParameterTypePackage '}' {$$ = $2;}
- ;
-
-OptionalParameterTypePackage
- : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypePackageList {$$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
- ;
-
- /* Rules for specifying the types for method arguments */
-
-ParameterTypesPackage
- : ParameterTypePackageList {$$ = $1;}
- | ParameterTypesPackage ','
- ParameterTypePackageList {$$ = TrLinkPeerOps (2,$1,$3);}
- ;
-
-ParameterTypesPackageList
- : {$$ = NULL;}
- | ObjectTypeKeyword {$$ = $1;}
- | '{' ParameterTypesPackage '}' {$$ = $2;}
- ;
-
-OptionalParameterTypesPackage
- : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypesPackageList {$$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
- ;
-
-/*
- * Case-Default list; allow only one Default term and unlimited Case terms
- */
-CaseDefaultTermList
- : {$$ = NULL;}
- | CaseTerm {}
- | DefaultTerm {}
- | CaseDefaultTermList
- CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
- | CaseDefaultTermList
- DefaultTerm {$$ = TrLinkPeerOp ($1,$2);}
-
-/* Original - attempts to force zero or one default term within the switch */
-
-/*
-CaseDefaultTermList
- : {$$ = NULL;}
- | CaseTermList
- DefaultTerm
- CaseTermList {$$ = TrLinkPeerOp ($1,TrLinkPeerOp ($2, $3));}
- | CaseTermList
- CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
- ;
-
-CaseTermList
- : {$$ = NULL;}
- | CaseTerm {}
- | CaseTermList
- CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
- ;
-*/
-
-
-/*******************************************************************************
- *
- * ASL Data and Constant Terms
- *
- ******************************************************************************/
-
-DataObject
- : BufferData {}
- | PackageData {}
- | IntegerData {}
- | StringData {}
- ;
-
-BufferData
- : Type5Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | BufferTerm {}
- ;
-
-PackageData
- : PackageTerm {}
- ;
-
-IntegerData
- : Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | Integer {}
- | ConstTerm {}
- ;
-
-StringData
- : Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | String {}
- ;
-
-ByteConst
- : Integer {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
- ;
-
-WordConst
- : Integer {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);}
- ;
-
-DWordConst
- : Integer {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);}
- ;
-
-QWordConst
- : Integer {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);}
- ;
-
-/*
- * The OP_COMPILE_TIME_CONST flag in the following constant expressions
- * enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes
- * to simple integers. It is an error if these types of expressions cannot be
- * reduced, since the AML grammar for ****ConstExpr requires a simple constant.
- * Note: The required byte length of the constant is passed through to the
- * constant folding code in the node AmlLength field.
- */
-ByteConstExpr
- : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 1);}
- | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 1);}
- | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
- | ByteConst {}
- ;
-
-WordConstExpr
- : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 2);}
- | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 2);}
- | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);}
- | WordConst {}
- ;
-
-DWordConstExpr
- : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 4);}
- | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 4);}
- | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);}
- | DWordConst {}
- ;
-
-QWordConstExpr
- : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 8);}
- | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
- TrSetOpAmlLength ($1, 8);}
- | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);}
- | QWordConst {}
- ;
-
-ConstTerm
- : ConstExprTerm {}
- | PARSEOP_REVISION {$$ = TrCreateLeafOp (PARSEOP_REVISION);}
- ;
-
-ConstExprTerm
- : PARSEOP_ZERO {$$ = TrCreateValuedLeafOp (PARSEOP_ZERO, 0);}
- | PARSEOP_ONE {$$ = TrCreateValuedLeafOp (PARSEOP_ONE, 1);}
- | PARSEOP_ONES {$$ = TrCreateValuedLeafOp (PARSEOP_ONES, ACPI_UINT64_MAX);}
- | PARSEOP___DATE__ {$$ = TrCreateConstantLeafOp (PARSEOP___DATE__);}
- | PARSEOP___FILE__ {$$ = TrCreateConstantLeafOp (PARSEOP___FILE__);}
- | PARSEOP___LINE__ {$$ = TrCreateConstantLeafOp (PARSEOP___LINE__);}
- | PARSEOP___PATH__ {$$ = TrCreateConstantLeafOp (PARSEOP___PATH__);}
- | PARSEOP___METHOD__ {$$ = TrCreateConstantLeafOp (PARSEOP___METHOD__);}
- ;
-
-Integer
- : PARSEOP_INTEGER {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER,
- AslCompilerlval.i);}
- ;
-
-String
- : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafOp (PARSEOP_STRING_LITERAL,
- (ACPI_NATIVE_INT) AslCompilerlval.s);}
- ;
-
-
-/*******************************************************************************
- *
- * ASL Opcode Terms
- *
- ******************************************************************************/
-
-CompilerDirective
- : IncludeTerm {}
- | IncludeEndTerm {}
- | ExternalTerm {}
- ;
-
-NamedObject
- : BankFieldTerm {}
- | CreateBitFieldTerm {}
- | CreateByteFieldTerm {}
- | CreateDWordFieldTerm {}
- | CreateFieldTerm {}
- | CreateQWordFieldTerm {}
- | CreateWordFieldTerm {}
- | DataRegionTerm {}
- | DeviceTerm {}
- | EventTerm {}
- | FieldTerm {}
- | FunctionTerm {}
- | IndexFieldTerm {}
- | MethodTerm {}
- | MutexTerm {}
- | OpRegionTerm {}
- | PowerResTerm {}
- | ProcessorTerm {}
- | ThermalZoneTerm {}
- ;
-
-NameSpaceModifier
- : AliasTerm {}
- | NameTerm {}
-/* | NameTermAslPlus {} */
- | ScopeTerm {}
- ;
-
-SimpleName
- : NameString {}
- | LocalTerm {}
- | ArgTerm {}
- ;
-
-/* For ObjectType(), SuperName except for MethodInvocationTerm */
-
-ObjectTypeSource
- : SimpleName {}
- | DebugTerm {}
- | RefOfTerm {}
- | DerefOfTerm {}
- | IndexTerm {}
- | IndexExpTerm {}
- ;
-
-/* For DeRefOf(), SuperName except for DerefOf and Debug */
-
-DerefOfSource
- : SimpleName {}
- | RefOfTerm {}
- | DerefOfTerm {}
- | IndexTerm {}
- | IndexExpTerm {}
- | StoreTerm {}
- | EqualsTerm {}
- | MethodInvocationTerm {}
- ;
-
-/* For RefOf(), SuperName except for RefOf and MethodInvocationTerm */
-
-RefOfSource
- : SimpleName {}
- | DebugTerm {}
- | DerefOfTerm {}
- | IndexTerm {}
- | IndexExpTerm {}
- ;
-
-/* For CondRefOf(), SuperName except for RefOf and MethodInvocationTerm */
-
-CondRefOfSource
- : SimpleName {}
- | DebugTerm {}
- | DerefOfTerm {}
- | IndexTerm {}
- | IndexExpTerm {}
- ;
-
-/*
- * Opcode types, as defined in the ACPI specification
- */
-Type1Opcode
- : BreakTerm {}
- | BreakPointTerm {}
- | ContinueTerm {}
- | FatalTerm {}
- | ForTerm {}
- | ElseIfTerm {}
- | LoadTerm {}
- | NoOpTerm {}
- | NotifyTerm {}
- | ReleaseTerm {}
- | ResetTerm {}
- | ReturnTerm {}
- | SignalTerm {}
- | SleepTerm {}
- | StallTerm {}
- | SwitchTerm {}
- | UnloadTerm {}
- | WhileTerm {}
- ;
-
-Type2Opcode
- : AcquireTerm {}
- | CondRefOfTerm {}
- | CopyObjectTerm {}
- | DerefOfTerm {}
- | ObjectTypeTerm {}
- | RefOfTerm {}
- | SizeOfTerm {}
- | StoreTerm {}
- | EqualsTerm {}
- | TimerTerm {}
- | WaitTerm {}
- | MethodInvocationTerm {}
- ;
-
-/*
- * Type 3/4/5 opcodes
- */
-Type2IntegerOpcode /* "Type3" opcodes */
- : Expression {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | AddTerm {}
- | AndTerm {}
- | DecTerm {}
- | DivideTerm {}
- | FindSetLeftBitTerm {}
- | FindSetRightBitTerm {}
- | FromBCDTerm {}
- | IncTerm {}
- | IndexTerm {}
-/* | StructureIndexTerm {} */
-/* | StructurePointerTerm {} */
- | LAndTerm {}
- | LEqualTerm {}
- | LGreaterTerm {}
- | LGreaterEqualTerm {}
- | LLessTerm {}
- | LLessEqualTerm {}
- | LNotTerm {}
- | LNotEqualTerm {}
- | LoadTableTerm {}
- | LOrTerm {}
- | MatchTerm {}
- | ModTerm {}
- | MultiplyTerm {}
- | NAndTerm {}
- | NOrTerm {}
- | NotTerm {}
- | OrTerm {}
- | ShiftLeftTerm {}
- | ShiftRightTerm {}
- | SubtractTerm {}
- | ToBCDTerm {}
- | ToIntegerTerm {}
- | XOrTerm {}
- ;
-
-Type2StringOpcode /* "Type4" Opcodes */
- : ToDecimalStringTerm {}
- | ToHexStringTerm {}
- | ToStringTerm {}
- ;
-
-Type2BufferOpcode /* "Type5" Opcodes */
- : ToBufferTerm {}
- | ConcatResTerm {}
- ;
-
-Type2BufferOrStringOpcode
- : ConcatTerm {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
- | PrintfTerm {}
- | FprintfTerm {}
- | MidTerm {}
- ;
-
-/*
- * A type 3 opcode evaluates to an Integer and cannot have a destination operand
- */
-Type3Opcode
- : EISAIDTerm {}
- ;
-
-/* Obsolete
-Type4Opcode
- : ConcatTerm {}
- | ToDecimalStringTerm {}
- | ToHexStringTerm {}
- | MidTerm {}
- | ToStringTerm {}
- ;
-*/
-
-/* Type 5 opcodes are a subset of Type2 opcodes, and return a constant */
-
-Type5Opcode
- : ResourceTemplateTerm {}
- | UnicodeTerm {}
- | ToPLDTerm {}
- | ToUUIDTerm {}
- ;
-
-Type6Opcode
- : RefOfTerm {}
- | DerefOfTerm {}
- | IndexTerm {}
- | IndexExpTerm {}
-/* | StructureIndexTerm {} */
-/* | StructurePointerTerm {} */
- | MethodInvocationTerm {}
- ;
-
-
-/*******************************************************************************
- *
- * ASL Helper Terms
- *
- ******************************************************************************/
-
-AmlPackageLengthTerm
- : Integer {$$ = TrSetOpIntegerValue (PARSEOP_PACKAGE_LENGTH,
- (ACPI_PARSE_OBJECT *) $1);}
- ;
-
-NameStringItem
- : ',' NameString {$$ = $2;}
- | ',' error {$$ = AslDoError (); yyclearin;}
- ;
-
-TermArgItem
- : ',' TermArg {$$ = $2;}
- | ',' error {$$ = AslDoError (); yyclearin;}
- ;
-
-OptionalReference
- : {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
- | ',' {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
- | ',' TermArg {$$ = $2;}
- ;
-
-OptionalReturnArg
- : {$$ = TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
- OP_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
- | TermArg {$$ = $1;}
- ;
-
-OptionalSerializeRuleKeyword
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' SerializeRuleKeyword {$$ = $2;}
- ;
-
-OptionalTermArg
- : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
- | TermArg {$$ = $1;}
- ;
-
-OptionalWordConst
- : {$$ = NULL;}
- | WordConst {$$ = $1;}
- ;
-
-
-
-
-/*******************************************************************************
- *
- * ASL Primary Terms
- *
- ******************************************************************************/
-
-AccessAsTerm
- : PARSEOP_ACCESSAS
- PARSEOP_OPEN_PAREN
- AccessTypeKeyword
- OptionalAccessAttribTerm
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_ACCESSAS,2,$3,$4);}
- | PARSEOP_ACCESSAS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-AcquireTerm
- : PARSEOP_ACQUIRE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp(PARSEOP_ACQUIRE);}
- SuperName
- ',' WordConstExpr
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$6);}
- | PARSEOP_ACQUIRE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-AddTerm
- : PARSEOP_ADD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_ADD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-AliasTerm
- : PARSEOP_ALIAS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ALIAS);}
- NameString
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
- TrSetOpFlags ($5, OP_IS_NAME_DECLARATION));}
- | PARSEOP_ALIAS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-AndTerm
- : PARSEOP_AND
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_AND
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ArgTerm
- : PARSEOP_ARG0 {$$ = TrCreateLeafOp (PARSEOP_ARG0);}
- | PARSEOP_ARG1 {$$ = TrCreateLeafOp (PARSEOP_ARG1);}
- | PARSEOP_ARG2 {$$ = TrCreateLeafOp (PARSEOP_ARG2);}
- | PARSEOP_ARG3 {$$ = TrCreateLeafOp (PARSEOP_ARG3);}
- | PARSEOP_ARG4 {$$ = TrCreateLeafOp (PARSEOP_ARG4);}
- | PARSEOP_ARG5 {$$ = TrCreateLeafOp (PARSEOP_ARG5);}
- | PARSEOP_ARG6 {$$ = TrCreateLeafOp (PARSEOP_ARG6);}
- ;
-
-BankFieldTerm
- : PARSEOP_BANKFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_BANKFIELD);}
- NameString
- NameStringItem
- TermArgItem
- OptionalAccessTypeKeyword
- OptionalLockRuleKeyword
- OptionalUpdateRuleKeyword
- PARSEOP_CLOSE_PAREN '{'
- FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,7,
- $4,$5,$6,$7,$8,$9,$12);}
- | PARSEOP_BANKFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN
- '{' error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-BreakTerm
- : PARSEOP_BREAK {$$ = TrCreateOp (PARSEOP_BREAK, 0);}
- ;
-
-BreakPointTerm
- : PARSEOP_BREAKPOINT {$$ = TrCreateOp (PARSEOP_BREAKPOINT, 0);}
- ;
-
-BufferTerm
- : PARSEOP_BUFFER {$<n>$ = TrCreateLeafOp (PARSEOP_BUFFER); COMMENT_CAPTURE_OFF; }
- OptionalDataCount
- '{' BufferTermData '}' {$$ = TrLinkOpChildren ($<n>2,2,$3,$5); COMMENT_CAPTURE_ON;}
- ;
-
-BufferTermData
- : ByteList {}
- | StringData {}
- ;
-
-CaseTerm
- : PARSEOP_CASE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CASE);}
- DataObject
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_CASE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ConcatTerm
- : PARSEOP_CONCATENATE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONCATENATE);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_CONCATENATE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ConcatResTerm
- : PARSEOP_CONCATENATERESTEMPLATE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (
- PARSEOP_CONCATENATERESTEMPLATE);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_CONCATENATERESTEMPLATE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CondRefOfTerm
- : PARSEOP_CONDREFOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONDREFOF);}
- CondRefOfSource
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_CONDREFOF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ConnectionTerm
- : PARSEOP_CONNECTION
- PARSEOP_OPEN_PAREN
- NameString
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_CONNECTION,1,$3);}
- | PARSEOP_CONNECTION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONNECTION);}
- ResourceMacroTerm
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3, 1,
- TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_RESOURCETEMPLATE), 3,
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
- $4));}
- | PARSEOP_CONNECTION
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ContinueTerm
- : PARSEOP_CONTINUE {$$ = TrCreateOp (PARSEOP_CONTINUE, 0);}
- ;
-
-CopyObjectTerm
- : PARSEOP_COPYOBJECT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_COPYOBJECT);}
- TermArg
- ',' SimpleName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
- TrSetOpFlags ($6, OP_IS_TARGET));}
- | PARSEOP_COPYOBJECT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateBitFieldTerm
- : PARSEOP_CREATEBITFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBITFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
- TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEBITFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateByteFieldTerm
- : PARSEOP_CREATEBYTEFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBYTEFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
- TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEBYTEFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateDWordFieldTerm
- : PARSEOP_CREATEDWORDFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEDWORDFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
- TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEDWORDFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateFieldTerm
- : PARSEOP_CREATEFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEFIELD);}
- TermArg
- TermArgItem
- TermArgItem
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,
- TrSetOpFlags ($7, OP_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateQWordFieldTerm
- : PARSEOP_CREATEQWORDFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEQWORDFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
- TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEQWORDFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateWordFieldTerm
- : PARSEOP_CREATEWORDFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEWORDFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
- TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEWORDFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DataRegionTerm
- : PARSEOP_DATATABLEREGION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DATATABLEREGION);}
- NameString
- TermArgItem
- TermArgItem
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5,$6,$7);}
- | PARSEOP_DATATABLEREGION
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DebugTerm
- : PARSEOP_DEBUG {$$ = TrCreateLeafOp (PARSEOP_DEBUG);}
- ;
-
-DecTerm
- : PARSEOP_DECREMENT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_DECREMENT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DefaultTerm
- : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafOp (PARSEOP_DEFAULT);}
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_DEFAULT '{'
- error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-DerefOfTerm
- : PARSEOP_DEREFOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEREFOF);}
- DerefOfSource
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_DEREFOF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DeviceTerm
- : PARSEOP_DEVICE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEVICE);}
- NameString
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
- | PARSEOP_DEVICE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DivideTerm
- : PARSEOP_DIVIDE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
- TermArg
- TermArgItem
- Target
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
- | PARSEOP_DIVIDE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-EISAIDTerm
- : PARSEOP_EISAID
- PARSEOP_OPEN_PAREN
- StringData
- PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_EISAID, $3);}
- | PARSEOP_EISAID
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ElseIfTerm
- : IfTerm ElseTerm {$$ = TrLinkPeerOp ($1,$2);}
- ;
-
-ElseTerm
- : {$$ = NULL;}
- | PARSEOP_ELSE '{'
- TermList {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
- '}' {$$ = TrLinkOpChildren ($<n>4,1,$3);}
-
- | PARSEOP_ELSE '{'
- error '}' {$$ = AslDoError(); yyclearin;}
-
- | PARSEOP_ELSE
- error {$$ = AslDoError(); yyclearin;}
-
- | PARSEOP_ELSEIF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
- TermArg {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {TrLinkOpChildren ($<n>5,2,$4,$8);}
- ElseTerm {TrLinkPeerOp ($<n>5,$11);}
- {$$ = TrLinkOpChildren ($<n>3,1,$<n>5);}
-
- | PARSEOP_ELSEIF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
-
- | PARSEOP_ELSEIF
- error {$$ = AslDoError(); yyclearin;}
- ;
-
-EventTerm
- : PARSEOP_EVENT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EVENT);}
- NameString
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION));}
- | PARSEOP_EVENT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ExternalTerm
- : PARSEOP_EXTERNAL
- PARSEOP_OPEN_PAREN
- NameString
- OptionalObjectTypeKeyword
- OptionalParameterTypePackage
- OptionalParameterTypesPackage
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
- | PARSEOP_EXTERNAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FatalTerm
- : PARSEOP_FATAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FATAL);}
- ByteConstExpr
- ',' DWordConstExpr
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
- | PARSEOP_FATAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FieldTerm
- : PARSEOP_FIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIELD);}
- NameString
- OptionalAccessTypeKeyword
- OptionalLockRuleKeyword
- OptionalUpdateRuleKeyword
- PARSEOP_CLOSE_PAREN '{'
- FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
- | PARSEOP_FIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN
- '{' error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-FindSetLeftBitTerm
- : PARSEOP_FINDSETLEFTBIT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETLEFTBIT);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_FINDSETLEFTBIT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FindSetRightBitTerm
- : PARSEOP_FINDSETRIGHTBIT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETRIGHTBIT);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_FINDSETRIGHTBIT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
- /* Convert a For() loop to a While() loop */
-ForTerm
- : PARSEOP_FOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
- OptionalTermArg ',' {}
- OptionalPredicate ','
- OptionalTermArg {$<n>$ = TrLinkPeerOp ($4,$<n>3);
- TrSetOpParent ($9,$<n>3);} /* New parent is WHILE */
- PARSEOP_CLOSE_PAREN
- '{' TermList '}' {$<n>$ = TrLinkOpChildren ($<n>3,2,$7,$13);}
- {$<n>$ = TrLinkPeerOp ($13,$9);
- $$ = $<n>10;}
- ;
-
-OptionalPredicate
- : {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER, 1);}
- | TermArg {$$ = $1;}
- ;
-
-FprintfTerm
- : PARSEOP_FPRINTF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FPRINTF);}
- TermArg ','
- StringData
- PrintfArgList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
- | PARSEOP_FPRINTF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FromBCDTerm
- : PARSEOP_FROMBCD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FROMBCD);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_FROMBCD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FunctionTerm
- : PARSEOP_FUNCTION
- PARSEOP_OPEN_PAREN {COMMENT_CAPTURE_OFF; $<n>$ = TrCreateLeafOp (PARSEOP_METHOD); }
- NameString
- OptionalParameterTypePackage
- OptionalParameterTypesPackage
- PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON; }
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
- TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),
- TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL),
- TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),$5,$6,$10);}
- | PARSEOP_FUNCTION
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-IfTerm
- : PARSEOP_IF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
- TermArg
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
-
- | PARSEOP_IF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-IncludeTerm
- : PARSEOP_INCLUDE
- PARSEOP_OPEN_PAREN
- String
- PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_INCLUDE, $3);
- FlOpenIncludeFile ($3);}
- ;
-
-IncludeEndTerm
- : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafOp (PARSEOP_INCLUDE_END);
- TrSetOpCurrentFilename ($$);}
- ;
-
-IncTerm
- : PARSEOP_INCREMENT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_INCREMENT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-IndexFieldTerm
- : PARSEOP_INDEXFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INDEXFIELD);}
- NameString
- NameStringItem
- OptionalAccessTypeKeyword
- OptionalLockRuleKeyword
- OptionalUpdateRuleKeyword
- PARSEOP_CLOSE_PAREN '{'
- FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$6,$7,$8,$11);}
- | PARSEOP_INDEXFIELD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN
- '{' error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-IndexTerm
- : PARSEOP_INDEX
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INDEX);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_INDEX
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LAndTerm
- : PARSEOP_LAND
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LAND
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LEqualTerm
- : PARSEOP_LEQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LEQUAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LGreaterEqualTerm
- : PARSEOP_LGREATEREQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
- TrLinkOpChildren ($<n>3,2,$4,$5));}
- | PARSEOP_LGREATEREQUAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LGreaterTerm
- : PARSEOP_LGREATER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LGREATER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LLessEqualTerm
- : PARSEOP_LLESSEQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
- TrLinkOpChildren ($<n>3,2,$4,$5));}
- | PARSEOP_LLESSEQUAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LLessTerm
- : PARSEOP_LLESS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LLESS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LNotEqualTerm
- : PARSEOP_LNOTEQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
- TrLinkOpChildren ($<n>3,2,$4,$5));}
- | PARSEOP_LNOTEQUAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LNotTerm
- : PARSEOP_LNOT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
- TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_LNOT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LoadTableTerm
- : PARSEOP_LOADTABLE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOADTABLE);}
- TermArg
- TermArgItem
- TermArgItem
- OptionalListString
- OptionalListString
- OptionalReference
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
- | PARSEOP_LOADTABLE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LoadTerm
- : PARSEOP_LOAD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOAD);}
- NameString
- RequiredTarget
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LOAD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-LocalTerm
- : PARSEOP_LOCAL0 {$$ = TrCreateLeafOp (PARSEOP_LOCAL0);}
- | PARSEOP_LOCAL1 {$$ = TrCreateLeafOp (PARSEOP_LOCAL1);}
- | PARSEOP_LOCAL2 {$$ = TrCreateLeafOp (PARSEOP_LOCAL2);}
- | PARSEOP_LOCAL3 {$$ = TrCreateLeafOp (PARSEOP_LOCAL3);}
- | PARSEOP_LOCAL4 {$$ = TrCreateLeafOp (PARSEOP_LOCAL4);}
- | PARSEOP_LOCAL5 {$$ = TrCreateLeafOp (PARSEOP_LOCAL5);}
- | PARSEOP_LOCAL6 {$$ = TrCreateLeafOp (PARSEOP_LOCAL6);}
- | PARSEOP_LOCAL7 {$$ = TrCreateLeafOp (PARSEOP_LOCAL7);}
- ;
-
-LOrTerm
- : PARSEOP_LOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
- TermArg
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LOR
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-MatchTerm
- : PARSEOP_MATCH
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MATCH);}
- TermArg
- ',' MatchOpKeyword
- TermArgItem
- ',' MatchOpKeyword
- TermArgItem
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
- | PARSEOP_MATCH
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-MethodTerm
- : PARSEOP_METHOD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_METHOD); COMMENT_CAPTURE_OFF;}
- NameString
- OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
- OptionalSerializeRuleKeyword
- OptionalByteConstExpr
- OptionalParameterTypePackage
- OptionalParameterTypesPackage
- PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON;}
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
- $5,$7,$8,$9,$10,$14);}
- | PARSEOP_METHOD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-MidTerm
- : PARSEOP_MID
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MID);}
- TermArg
- TermArgItem
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
- | PARSEOP_MID
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ModTerm
- : PARSEOP_MOD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_MOD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-MultiplyTerm
- : PARSEOP_MULTIPLY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_MULTIPLY
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-MutexTerm
- : PARSEOP_MUTEX
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MUTEX);}
- NameString
- OptionalSyncLevel
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5);}
- | PARSEOP_MUTEX
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-NameTerm
- : PARSEOP_NAME
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NAME);}
- NameString
- ',' DataObject
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);}
- | PARSEOP_NAME
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-NAndTerm
- : PARSEOP_NAND
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NAND);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_NAND
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-NoOpTerm
- : PARSEOP_NOOP {$$ = TrCreateOp (PARSEOP_NOOP, 0);}
- ;
-
-NOrTerm
- : PARSEOP_NOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOR);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_NOR
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-NotifyTerm
- : PARSEOP_NOTIFY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOTIFY);}
- SuperName
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_NOTIFY
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-NotTerm
- : PARSEOP_NOT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_NOT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ObjectTypeTerm
- : PARSEOP_OBJECTTYPE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE);}
- ObjectTypeSource
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_OBJECTTYPE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-OffsetTerm
- : PARSEOP_OFFSET
- PARSEOP_OPEN_PAREN
- AmlPackageLengthTerm
- PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_OFFSET,1,$3);}
- | PARSEOP_OFFSET
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-OpRegionTerm
- : PARSEOP_OPERATIONREGION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OPERATIONREGION);}
- NameString
- ',' OpRegionSpaceIdTerm
- TermArgItem
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
- $6,$7,$8);}
- | PARSEOP_OPERATIONREGION
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-OpRegionSpaceIdTerm
- : RegionSpaceKeyword {}
- | ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
- ;
-
-OrTerm
- : PARSEOP_OR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_OR
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PackageTerm
- : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafOp (PARSEOP_VAR_PACKAGE);}
- OptionalDataCount
- '{' PackageList '}' {$$ = TrLinkOpChildren ($<n>2,2,$3,$5);}
-
-PowerResTerm
- : PARSEOP_POWERRESOURCE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_POWERRESOURCE);}
- NameString
- ',' ByteConstExpr
- ',' WordConstExpr
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,4,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
- $6,$8,$11);}
- | PARSEOP_POWERRESOURCE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PrintfTerm
- : PARSEOP_PRINTF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PRINTF);}
- StringData
- PrintfArgList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_PRINTF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PrintfArgList
- : {$$ = NULL;}
- | TermArg {$$ = $1;}
- | PrintfArgList ','
- TermArg {$$ = TrLinkPeerOp ($1, $3);}
- ;
-
-ProcessorTerm
- : PARSEOP_PROCESSOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PROCESSOR);}
- NameString
- ',' ByteConstExpr
- OptionalDWordConstExpr
- OptionalByteConstExpr
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,5,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
- $6,$7,$8,$11);}
- | PARSEOP_PROCESSOR
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-RawDataBufferTerm
- : PARSEOP_DATABUFFER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DATABUFFER);}
- OptionalWordConst
- PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_DATABUFFER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-/*
- * In RefOf, the node isn't really a target, but we can't keep track of it after
- * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
- */
-RefOfTerm
- : PARSEOP_REFOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REFOF);}
- RefOfSource
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,
- TrSetOpFlags ($4, OP_IS_TARGET));}
- | PARSEOP_REFOF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ReleaseTerm
- : PARSEOP_RELEASE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RELEASE);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_RELEASE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ResetTerm
- : PARSEOP_RESET
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RESET);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_RESET
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ReturnTerm
- : PARSEOP_RETURN
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RETURN);}
- OptionalReturnArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_RETURN {$$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_RETURN),1,
- TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
- OP_IS_NULL_RETURN));}
- | PARSEOP_RETURN
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ScopeTerm
- : PARSEOP_SCOPE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SCOPE);}
- NameString
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
- | PARSEOP_SCOPE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ShiftLeftTerm
- : PARSEOP_SHIFTLEFT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_SHIFTLEFT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ShiftRightTerm
- : PARSEOP_SHIFTRIGHT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_SHIFTRIGHT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SignalTerm
- : PARSEOP_SIGNAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SIGNAL);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_SIGNAL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SizeOfTerm
- : PARSEOP_SIZEOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SIZEOF);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_SIZEOF
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SleepTerm
- : PARSEOP_SLEEP
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SLEEP);}
- TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_SLEEP
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-StallTerm
- : PARSEOP_STALL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STALL);}
- TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_STALL
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-StoreTerm
- : PARSEOP_STORE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STORE);}
- TermArg
- ',' SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
- TrSetOpFlags ($6, OP_IS_TARGET));}
- | PARSEOP_STORE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SubtractTerm
- : PARSEOP_SUBTRACT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_SUBTRACT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SwitchTerm
- : PARSEOP_SWITCH
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SWITCH);}
- TermArg
- PARSEOP_CLOSE_PAREN '{'
- CaseDefaultTermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_SWITCH
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ThermalZoneTerm
- : PARSEOP_THERMALZONE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_THERMALZONE);}
- NameString
- PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
- TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
- | PARSEOP_THERMALZONE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-TimerTerm
- : PARSEOP_TIMER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TIMER);}
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,0);}
- | PARSEOP_TIMER {$$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_TIMER),0);}
- | PARSEOP_TIMER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToBCDTerm
- : PARSEOP_TOBCD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOBCD);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOBCD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToBufferTerm
- : PARSEOP_TOBUFFER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOBUFFER);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOBUFFER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToDecimalStringTerm
- : PARSEOP_TODECIMALSTRING
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TODECIMALSTRING);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TODECIMALSTRING
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToHexStringTerm
- : PARSEOP_TOHEXSTRING
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOHEXSTRING);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOHEXSTRING
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToIntegerTerm
- : PARSEOP_TOINTEGER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOINTEGER);}
- TermArg
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOINTEGER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToPLDTerm
- : PARSEOP_TOPLD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOPLD);}
- PldKeywordList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_TOPLD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PldKeywordList
- : {$$ = NULL;}
- | PldKeyword
- PARSEOP_EXP_EQUALS Integer {$$ = TrLinkOpChildren ($1,1,$3);}
- | PldKeyword
- PARSEOP_EXP_EQUALS String {$$ = TrLinkOpChildren ($1,1,$3);}
- | PldKeywordList ',' /* Allows a trailing comma at list end */
- | PldKeywordList ','
- PldKeyword
- PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
- | PldKeywordList ','
- PldKeyword
- PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
- ;
-
-
-ToStringTerm
- : PARSEOP_TOSTRING
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOSTRING);}
- TermArg
- OptionalCount
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_TOSTRING
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ToUUIDTerm
- : PARSEOP_TOUUID
- PARSEOP_OPEN_PAREN
- StringData
- PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_TOUUID, $3);}
- | PARSEOP_TOUUID
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-UnicodeTerm
- : PARSEOP_UNICODE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNICODE);}
- StringData
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,0,$4);}
- | PARSEOP_UNICODE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-UnloadTerm
- : PARSEOP_UNLOAD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNLOAD);}
- SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_UNLOAD
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-WaitTerm
- : PARSEOP_WAIT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WAIT);}
- SuperName
- TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
- | PARSEOP_WAIT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-XOrTerm
- : PARSEOP_XOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
- TermArg
- TermArgItem
- Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_XOR
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-WhileTerm
- : PARSEOP_WHILE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
- TermArg
- PARSEOP_CLOSE_PAREN
- '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_WHILE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-
-
-/*******************************************************************************
- *
- * Production rules for the symbolic (c-style) operators
- *
- ******************************************************************************/
-
-/*
- * ASL Extensions: C-style math/logical operators and expressions.
- * The implementation transforms these operators into the standard
- * AML opcodes and syntax.
- *
- * Supported operators and precedence rules (high-to-low)
- *
- * NOTE: The operator precedence and associativity rules are
- * implemented by the tokens in asltokens.y
- *
- * (left-to-right):
- * 1) ( ) expr++ expr--
- *
- * (right-to-left):
- * 2) ! ~
- *
- * (left-to-right):
- * 3) * / %
- * 4) + -
- * 5) >> <<
- * 6) < > <= >=
- * 7) == !=
- * 8) &
- * 9) ^
- * 10) |
- * 11) &&
- * 12) ||
- *
- * (right-to-left):
- * 13) = += -= *= /= %= <<= >>= &= ^= |=
- */
-
-
-/*******************************************************************************
- *
- * Basic operations for math and logical expressions.
- *
- ******************************************************************************/
-
-Expression
-
- /* Unary operators */
-
- : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
- TermArg {$$ = TrLinkOpChildren ($<n>2,1,$3);}
- | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
- TermArg {$$ = TrLinkOpChildren ($<n>2,2,$3,TrCreateNullTargetOp ());}
-
- | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
- {$$ = TrLinkOpChildren ($<n>3,1,$1);}
- | SuperName PARSEOP_EXP_DECREMENT {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
- {$$ = TrLinkOpChildren ($<n>3,1,$1);}
-
- /* Binary operators: math and logical */
-
- | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,4,$1,$4,TrCreateNullTargetOp (),
- TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
-
- | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
-
- | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_GREATER_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATEREQUAL);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LESS {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LESS_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LLESSEQUAL);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
-
- | TermArg PARSEOP_EXP_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_NOT_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LNOTEQUAL);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
-
- | TermArg PARSEOP_EXP_LOGICAL_AND {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
-
- /* Parentheses */
-
- | PARSEOP_OPEN_PAREN
- Expression
- PARSEOP_CLOSE_PAREN {$$ = $2;}
-
- /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
-
- | IndexExpTerm
- ;
-
- /*
- * Index term -- "BUF1[5] = " or " = BUF1[5] on either the left side
- * of an equals (target) or the right side (source)
- * Currently used in these terms:
- * Expression
- * ObjectTypeSource
- * DerefOfSource
- * Type6Opcode
- */
-IndexExpTerm
-
- : SuperName
- PARSEOP_EXP_INDEX_LEFT
- TermArg
- PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafOp (PARSEOP_INDEX);
- TrLinkOpChildren ($$,3,$1,$3,TrCreateNullTargetOp ());}
- ;
-
-
-/*******************************************************************************
- *
- * All assignment-type operations -- math and logical. Includes simple
- * assignment and compound assignments.
- *
- ******************************************************************************/
-
-EqualsTerm
-
- /* Allow parens anywhere */
-
- : PARSEOP_OPEN_PAREN
- EqualsTerm
- PARSEOP_CLOSE_PAREN {$$ = $2;}
-
- /* Simple Store() operation */
-
- | SuperName
- PARSEOP_EXP_EQUALS
- TermArg {$$ = TrCreateAssignmentOp ($1, $3);}
-
- /* Chained equals: (a=RefOf)=b, a=b=c=d etc. */
-
- | PARSEOP_OPEN_PAREN
- EqualsTerm
- PARSEOP_CLOSE_PAREN
- PARSEOP_EXP_EQUALS
- TermArg {$$ = TrCreateAssignmentOp ($2, $5);}
-
- /* Compound assignments -- Add (operand, operand, target) */
-
- | TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,4,$1,$4,TrCreateNullTargetOp (),
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_MUL_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_SHL_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_SHR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_SUB_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_AND_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_OR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
-
- | TermArg PARSEOP_EXP_XOR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
- TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
- TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- ;
-
-
-
-/*******************************************************************************
- *
- * ASL Parameter Keyword Terms
- *
- ******************************************************************************/
-
-AccessAttribKeyword
- : PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BLOCK);}
- | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
- | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BYTE);}
- | PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_QUICK );}
- | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_SND_RCV);}
- | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD);}
- | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD_CALL);}
- | PARSEOP_ACCESSATTRIB_BYTES
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BYTES);}
- ByteConst
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_ACCESSATTRIB_RAW_BYTES
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
- ByteConst
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- | PARSEOP_ACCESSATTRIB_RAW_PROCESS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
- ByteConst
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
- ;
-
-AccessTypeKeyword
- : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_ANY);}
- | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_BYTE);}
- | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_WORD);}
- | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_DWORD);}
- | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_QWORD);}
- | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_BUF);}
- ;
-
-AddressingModeKeyword
- : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafOp (PARSEOP_ADDRESSINGMODE_7BIT);}
- | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafOp (PARSEOP_ADDRESSINGMODE_10BIT);}
- ;
-
-AddressKeyword
- : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_MEMORY);}
- | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_RESERVED);}
- | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_NVS);}
- | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_ACPI);}
- ;
-
-AddressSpaceKeyword
- : ByteConst {$$ = UtCheckIntegerRange ($1, ACPI_NUM_PREDEFINED_REGIONS, 0xFF);}
- | RegionSpaceKeyword {}
- ;
-
-BitsPerByteKeyword
- : PARSEOP_BITSPERBYTE_FIVE {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_FIVE);}
- | PARSEOP_BITSPERBYTE_SIX {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_SIX);}
- | PARSEOP_BITSPERBYTE_SEVEN {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_SEVEN);}
- | PARSEOP_BITSPERBYTE_EIGHT {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_EIGHT);}
- | PARSEOP_BITSPERBYTE_NINE {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_NINE);}
- ;
-
-ClockPhaseKeyword
- : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafOp (PARSEOP_CLOCKPHASE_FIRST);}
- | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafOp (PARSEOP_CLOCKPHASE_SECOND);}
- ;
-
-ClockPolarityKeyword
- : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafOp (PARSEOP_CLOCKPOLARITY_LOW);}
- | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafOp (PARSEOP_CLOCKPOLARITY_HIGH);}
- ;
-
-DecodeKeyword
- : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafOp (PARSEOP_DECODETYPE_POS);}
- | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafOp (PARSEOP_DECODETYPE_SUB);}
- ;
-
-DevicePolarityKeyword
- : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafOp (PARSEOP_DEVICEPOLARITY_LOW);}
- | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafOp (PARSEOP_DEVICEPOLARITY_HIGH);}
- ;
-
-DMATypeKeyword
- : PARSEOP_DMATYPE_A {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_A);}
- | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_COMPATIBILITY);}
- | PARSEOP_DMATYPE_B {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_B);}
- | PARSEOP_DMATYPE_F {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_F);}
- ;
-
-EndianKeyword
- : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafOp (PARSEOP_ENDIAN_LITTLE);}
- | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafOp (PARSEOP_ENDIAN_BIG);}
- ;
-
-FlowControlKeyword
- : PARSEOP_FLOWCONTROL_HW {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_HW);}
- | PARSEOP_FLOWCONTROL_NONE {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_NONE);}
- | PARSEOP_FLOWCONTROL_SW {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_SW);}
- ;
-
-InterruptLevel
- : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVEBOTH);}
- | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVEHIGH);}
- | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVELOW);}
- ;
-
-InterruptTypeKeyword
- : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafOp (PARSEOP_INTTYPE_EDGE);}
- | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafOp (PARSEOP_INTTYPE_LEVEL);}
- ;
-
-IODecodeKeyword
- : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafOp (PARSEOP_IODECODETYPE_16);}
- | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafOp (PARSEOP_IODECODETYPE_10);}
- ;
-
-IoRestrictionKeyword
- : PARSEOP_IORESTRICT_IN {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_IN);}
- | PARSEOP_IORESTRICT_OUT {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_OUT);}
- | PARSEOP_IORESTRICT_NONE {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_NONE);}
- | PARSEOP_IORESTRICT_PRESERVE {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_PRESERVE);}
- ;
-
-LockRuleKeyword
- : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafOp (PARSEOP_LOCKRULE_LOCK);}
- | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafOp (PARSEOP_LOCKRULE_NOLOCK);}
- ;
-
-MatchOpKeyword
- : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MTR);}
- | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MEQ);}
- | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MLE);}
- | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MLT);}
- | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MGE);}
- | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MGT);}
- ;
-
-MaxKeyword
- : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafOp (PARSEOP_MAXTYPE_FIXED);}
- | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafOp (PARSEOP_MAXTYPE_NOTFIXED);}
- ;
-
-MemTypeKeyword
- : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_CACHEABLE);}
- | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_WRITECOMBINING);}
- | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_PREFETCHABLE);}
- | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_NONCACHEABLE);}
- ;
-
-MinKeyword
- : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafOp (PARSEOP_MINTYPE_FIXED);}
- | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafOp (PARSEOP_MINTYPE_NOTFIXED);}
- ;
-
-ObjectTypeKeyword
- : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_UNK);}
- | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_INT);}
- | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_STR);}
- | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_BUF);}
- | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_PKG);}
- | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_FLD);}
- | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_DEV);}
- | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_EVT);}
- | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_MTH);}
- | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_MTX);}
- | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_OPR);}
- | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_POW);}
- | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_PRO);}
- | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_THZ);}
- | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_BFF);}
- | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_DDB);}
- ;
-
-ParityTypeKeyword
- : PARSEOP_PARITYTYPE_SPACE {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_SPACE);}
- | PARSEOP_PARITYTYPE_MARK {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_MARK);}
- | PARSEOP_PARITYTYPE_ODD {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_ODD);}
- | PARSEOP_PARITYTYPE_EVEN {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_EVEN);}
- | PARSEOP_PARITYTYPE_NONE {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_NONE);}
- ;
-
-PinConfigByte
- : PinConfigKeyword {$$ = $1;}
- | ByteConstExpr {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
- ;
-
-PinConfigKeyword
- : PARSEOP_PIN_NOPULL {$$ = TrCreateLeafOp (PARSEOP_PIN_NOPULL);}
- | PARSEOP_PIN_PULLDOWN {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLDOWN);}
- | PARSEOP_PIN_PULLUP {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLUP);}
- | PARSEOP_PIN_PULLDEFAULT {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLDEFAULT);}
- ;
-
-PldKeyword
- : PARSEOP_PLD_REVISION {$$ = TrCreateLeafOp (PARSEOP_PLD_REVISION);}
- | PARSEOP_PLD_IGNORECOLOR {$$ = TrCreateLeafOp (PARSEOP_PLD_IGNORECOLOR);}
- | PARSEOP_PLD_RED {$$ = TrCreateLeafOp (PARSEOP_PLD_RED);}
- | PARSEOP_PLD_GREEN {$$ = TrCreateLeafOp (PARSEOP_PLD_GREEN);}
- | PARSEOP_PLD_BLUE {$$ = TrCreateLeafOp (PARSEOP_PLD_BLUE);}
- | PARSEOP_PLD_WIDTH {$$ = TrCreateLeafOp (PARSEOP_PLD_WIDTH);}
- | PARSEOP_PLD_HEIGHT {$$ = TrCreateLeafOp (PARSEOP_PLD_HEIGHT);}
- | PARSEOP_PLD_USERVISIBLE {$$ = TrCreateLeafOp (PARSEOP_PLD_USERVISIBLE);}
- | PARSEOP_PLD_DOCK {$$ = TrCreateLeafOp (PARSEOP_PLD_DOCK);}
- | PARSEOP_PLD_LID {$$ = TrCreateLeafOp (PARSEOP_PLD_LID);}
- | PARSEOP_PLD_PANEL {$$ = TrCreateLeafOp (PARSEOP_PLD_PANEL);}
- | PARSEOP_PLD_VERTICALPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_VERTICALPOSITION);}
- | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_HORIZONTALPOSITION);}
- | PARSEOP_PLD_SHAPE {$$ = TrCreateLeafOp (PARSEOP_PLD_SHAPE);}
- | PARSEOP_PLD_GROUPORIENTATION {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPORIENTATION);}
- | PARSEOP_PLD_GROUPTOKEN {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPTOKEN);}
- | PARSEOP_PLD_GROUPPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPPOSITION);}
- | PARSEOP_PLD_BAY {$$ = TrCreateLeafOp (PARSEOP_PLD_BAY);}
- | PARSEOP_PLD_EJECTABLE {$$ = TrCreateLeafOp (PARSEOP_PLD_EJECTABLE);}
- | PARSEOP_PLD_EJECTREQUIRED {$$ = TrCreateLeafOp (PARSEOP_PLD_EJECTREQUIRED);}
- | PARSEOP_PLD_CABINETNUMBER {$$ = TrCreateLeafOp (PARSEOP_PLD_CABINETNUMBER);}
- | PARSEOP_PLD_CARDCAGENUMBER {$$ = TrCreateLeafOp (PARSEOP_PLD_CARDCAGENUMBER);}
- | PARSEOP_PLD_REFERENCE {$$ = TrCreateLeafOp (PARSEOP_PLD_REFERENCE);}
- | PARSEOP_PLD_ROTATION {$$ = TrCreateLeafOp (PARSEOP_PLD_ROTATION);}
- | PARSEOP_PLD_ORDER {$$ = TrCreateLeafOp (PARSEOP_PLD_ORDER);}
- | PARSEOP_PLD_RESERVED {$$ = TrCreateLeafOp (PARSEOP_PLD_RESERVED);}
- | PARSEOP_PLD_VERTICALOFFSET {$$ = TrCreateLeafOp (PARSEOP_PLD_VERTICALOFFSET);}
- | PARSEOP_PLD_HORIZONTALOFFSET {$$ = TrCreateLeafOp (PARSEOP_PLD_HORIZONTALOFFSET);}
- ;
-
-RangeTypeKeyword
- : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_ISAONLY);}
- | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_NONISAONLY);}
- | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_ENTIRE);}
- ;
-
-RegionSpaceKeyword
- : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_IO);}
- | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_MEM);}
- | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCI);}
- | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_EC);}
- | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_SMBUS);}
- | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_CMOS);}
- | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCIBAR);}
- | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_IPMI);}
- | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GPIO);}
- | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GSBUS);}
- | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCC);}
- | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_FFIXEDHW);}
- ;
-
-ResourceTypeKeyword
- : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafOp (PARSEOP_RESOURCETYPE_CONSUMER);}
- | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafOp (PARSEOP_RESOURCETYPE_PRODUCER);}
- ;
-
-SerializeRuleKeyword
- : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafOp (PARSEOP_SERIALIZERULE_SERIAL);}
- | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL);}
- ;
-
-ShareTypeKeyword
- : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_SHARED);}
- | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_EXCLUSIVE);}
- | PARSEOP_SHARETYPE_SHAREDWAKE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_SHAREDWAKE);}
- | PARSEOP_SHARETYPE_EXCLUSIVEWAKE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);}
- ;
-
-SlaveModeKeyword
- : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafOp (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
- | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafOp (PARSEOP_SLAVEMODE_DEVICEINIT);}
- ;
-
-StopBitsKeyword
- : PARSEOP_STOPBITS_TWO {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_TWO);}
- | PARSEOP_STOPBITS_ONEPLUSHALF {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ONEPLUSHALF);}
- | PARSEOP_STOPBITS_ONE {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ONE);}
- | PARSEOP_STOPBITS_ZERO {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ZERO);}
- ;
-
-TranslationKeyword
- : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafOp (PARSEOP_TRANSLATIONTYPE_SPARSE);}
- | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafOp (PARSEOP_TRANSLATIONTYPE_DENSE);}
- ;
-
-TypeKeyword
- : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafOp (PARSEOP_TYPE_TRANSLATION);}
- | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafOp (PARSEOP_TYPE_STATIC);}
- ;
-
-UpdateRuleKeyword
- : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_PRESERVE);}
- | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_ONES);}
- | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_ZEROS);}
- ;
-
-WireModeKeyword
- : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafOp (PARSEOP_WIREMODE_FOUR);}
- | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafOp (PARSEOP_WIREMODE_THREE);}
- ;
-
-XferSizeKeyword
- : PARSEOP_XFERSIZE_8 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_8, 0);}
- | PARSEOP_XFERSIZE_16 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_16, 1);}
- | PARSEOP_XFERSIZE_32 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_32, 2);}
- | PARSEOP_XFERSIZE_64 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_64, 3);}
- | PARSEOP_XFERSIZE_128 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_128, 4);}
- | PARSEOP_XFERSIZE_256 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_256, 5);}
- ;
-
-XferTypeKeyword
- : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_8);}
- | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_8_16);}
- | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_16);}
- ;
-
-
-
-
-/*******************************************************************************
- *
- * ASL Resource Template Terms
- *
- ******************************************************************************/
-
-/*
- * Note: Create two default nodes to allow conversion to a Buffer AML opcode
- * Also, insert the EndTag at the end of the template.
- */
-ResourceTemplateTerm
- : PARSEOP_RESOURCETEMPLATE {COMMENT_CAPTURE_OFF;}
- OptionalParentheses
- '{'
- ResourceMacroList '}' {$$ = TrCreateOp (PARSEOP_RESOURCETEMPLATE,4,
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
- $5,
- TrCreateLeafOp (PARSEOP_ENDTAG));
- COMMENT_CAPTURE_ON;}
- ;
-
-OptionalParentheses
- : {$$ = NULL;}
- | PARSEOP_OPEN_PAREN
- PARSEOP_CLOSE_PAREN {$$ = NULL;}
- ;
-
-ResourceMacroList
- : {$$ = NULL;}
- | ResourceMacroList
- ResourceMacroTerm {$$ = TrLinkPeerOp ($1,$2);}
- ;
-
-ResourceMacroTerm
- : DMATerm {}
- | DWordIOTerm {}
- | DWordMemoryTerm {}
- | DWordSpaceTerm {}
- | EndDependentFnTerm {}
- | ExtendedIOTerm {}
- | ExtendedMemoryTerm {}
- | ExtendedSpaceTerm {}
- | FixedDmaTerm {}
- | FixedIOTerm {}
- | GpioIntTerm {}
- | GpioIoTerm {}
- | I2cSerialBusTerm {}
- | I2cSerialBusTermV2 {}
- | InterruptTerm {}
- | IOTerm {}
- | IRQNoFlagsTerm {}
- | IRQTerm {}
- | Memory24Term {}
- | Memory32FixedTerm {}
- | Memory32Term {}
- | PinConfigTerm {}
- | PinFunctionTerm {}
- | PinGroupTerm {}
- | PinGroupConfigTerm {}
- | PinGroupFunctionTerm {}
- | QWordIOTerm {}
- | QWordMemoryTerm {}
- | QWordSpaceTerm {}
- | RegisterTerm {}
- | SpiSerialBusTerm {}
- | SpiSerialBusTermV2 {}
- | StartDependentFnNoPriTerm {}
- | StartDependentFnTerm {}
- | UartSerialBusTerm {}
- | UartSerialBusTermV2 {}
- | VendorLongTerm {}
- | VendorShortTerm {}
- | WordBusNumberTerm {}
- | WordIOTerm {}
- | WordSpaceTerm {}
- ;
-
-DMATerm
- : PARSEOP_DMA
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DMA);}
- DMATypeKeyword
- OptionalBusMasterKeyword
- ',' XferTypeKeyword
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$7,$8,$11);}
- | PARSEOP_DMA
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DWordIOTerm
- : PARSEOP_DWORDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDIO);}
- OptionalResourceType_First
- OptionalMinType
- OptionalMaxType
- OptionalDecodeType
- OptionalRangeType
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString
- OptionalType
- OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
- | PARSEOP_DWORDIO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DWordMemoryTerm
- : PARSEOP_DWORDMEMORY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDMEMORY);}
- OptionalResourceType_First
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- OptionalMemType
- ',' OptionalReadWriteKeyword
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString
- OptionalAddressRange
- OptionalType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
- | PARSEOP_DWORDMEMORY
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-DWordSpaceTerm
- : PARSEOP_DWORDSPACE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDSPACE);}
- ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
- OptionalResourceType
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- ',' ByteConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
- $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
- | PARSEOP_DWORDSPACE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-EndDependentFnTerm
- : PARSEOP_ENDDEPENDENTFN
- PARSEOP_OPEN_PAREN
- PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafOp (PARSEOP_ENDDEPENDENTFN);}
- | PARSEOP_ENDDEPENDENTFN
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ExtendedIOTerm
- : PARSEOP_EXTENDEDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDIO);}
- OptionalResourceType_First
- OptionalMinType
- OptionalMaxType
- OptionalDecodeType
- OptionalRangeType
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- OptionalQWordConstExpr
- OptionalNameString
- OptionalType
- OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
- | PARSEOP_EXTENDEDIO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ExtendedMemoryTerm
- : PARSEOP_EXTENDEDMEMORY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDMEMORY);}
- OptionalResourceType_First
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- OptionalMemType
- ',' OptionalReadWriteKeyword
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- OptionalQWordConstExpr
- OptionalNameString
- OptionalAddressRange
- OptionalType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
- | PARSEOP_EXTENDEDMEMORY
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-ExtendedSpaceTerm
- : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDSPACE);}
- ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
- OptionalResourceType
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- ',' ByteConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- OptionalQWordConstExpr
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,13,
- $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
- | PARSEOP_EXTENDEDSPACE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FixedDmaTerm
- : PARSEOP_FIXEDDMA
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDDMA);}
- WordConstExpr /* 04: DMA RequestLines */
- ',' WordConstExpr /* 06: DMA Channels */
- OptionalXferSize /* 07: DMA TransferSize */
- OptionalNameString /* 08: DescriptorName */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$7,$8);}
- | PARSEOP_FIXEDDMA
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-FixedIOTerm
- : PARSEOP_FIXEDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDIO);}
- WordConstExpr
- ',' ByteConstExpr
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
- | PARSEOP_FIXEDIO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-GpioIntTerm
- : PARSEOP_GPIO_INT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_INT);}
- InterruptTypeKeyword /* 04: InterruptType */
- ',' InterruptLevel /* 06: InterruptLevel */
- OptionalShareType /* 07: SharedType */
- ',' PinConfigByte /* 09: PinConfig */
- OptionalWordConstExpr /* 10: DebounceTimeout */
- ',' StringData /* 12: ResourceSource */
- OptionalByteConstExpr /* 13: ResourceSourceIndex */
- OptionalResourceType /* 14: ResourceType */
- OptionalNameString /* 15: DescriptorName */
- OptionalBuffer_Last /* 16: VendorData */
- PARSEOP_CLOSE_PAREN '{'
- DWordConstExpr '}' {$$ = TrLinkOpChildren ($<n>3,11,
- $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
- | PARSEOP_GPIO_INT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-GpioIoTerm
- : PARSEOP_GPIO_IO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_IO);}
- OptionalShareType_First /* 04: SharedType */
- ',' PinConfigByte /* 06: PinConfig */
- OptionalWordConstExpr /* 07: DebounceTimeout */
- OptionalWordConstExpr /* 08: DriveStrength */
- OptionalIoRestriction /* 09: IoRestriction */
- ',' StringData /* 11: ResourceSource */
- OptionalByteConstExpr /* 12: ResourceSourceIndex */
- OptionalResourceType /* 13: ResourceType */
- OptionalNameString /* 14: DescriptorName */
- OptionalBuffer_Last /* 15: VendorData */
- PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkOpChildren ($<n>3,11,
- $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
- | PARSEOP_GPIO_IO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-I2cSerialBusTerm
- : PARSEOP_I2C_SERIALBUS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS);}
- WordConstExpr /* 04: SlaveAddress */
- OptionalSlaveMode /* 05: SlaveMode */
- ',' DWordConstExpr /* 07: ConnectionSpeed */
- OptionalAddressingMode /* 08: AddressingMode */
- ',' StringData /* 10: ResourceSource */
- OptionalByteConstExpr /* 11: ResourceSourceIndex */
- OptionalResourceType /* 12: ResourceType */
- OptionalNameString /* 13: DescriptorName */
- OptionalBuffer_Last /* 14: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
- $4,$5,$7,$8,$10,$11,$12,$13,
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$14);}
- | PARSEOP_I2C_SERIALBUS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-I2cSerialBusTermV2
- : PARSEOP_I2C_SERIALBUS_V2
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS_V2);}
- WordConstExpr /* 04: SlaveAddress */
- OptionalSlaveMode /* 05: SlaveMode */
- ',' DWordConstExpr /* 07: ConnectionSpeed */
- OptionalAddressingMode /* 08: AddressingMode */
- ',' StringData /* 10: ResourceSource */
- OptionalByteConstExpr /* 11: ResourceSourceIndex */
- OptionalResourceType /* 12: ResourceType */
- OptionalNameString /* 13: DescriptorName */
- OptionalShareType /* 14: Share */
- OptionalBuffer_Last /* 15: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
- $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
- | PARSEOP_I2C_SERIALBUS_V2
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-InterruptTerm
- : PARSEOP_INTERRUPT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INTERRUPT);}
- OptionalResourceType_First
- ',' InterruptTypeKeyword
- ',' InterruptLevel
- OptionalShareType
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkOpChildren ($<n>3,8,
- $4,$6,$8,$9,$10,$11,$12,$15);}
- | PARSEOP_INTERRUPT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-IOTerm
- : PARSEOP_IO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IO);}
- IODecodeKeyword
- ',' WordConstExpr
- ',' WordConstExpr
- ',' ByteConstExpr
- ',' ByteConstExpr
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
- | PARSEOP_IO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-IRQNoFlagsTerm
- : PARSEOP_IRQNOFLAGS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQNOFLAGS);}
- OptionalNameString_First
- PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_IRQNOFLAGS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-IRQTerm
- : PARSEOP_IRQ
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQ);}
- InterruptTypeKeyword
- ',' InterruptLevel
- OptionalShareType
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$7,$8,$11);}
- | PARSEOP_IRQ
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-Memory24Term
- : PARSEOP_MEMORY24
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY24);}
- OptionalReadWriteKeyword
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
- | PARSEOP_MEMORY24
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-Memory32FixedTerm
- : PARSEOP_MEMORY32FIXED
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32FIXED);}
- OptionalReadWriteKeyword
- ',' DWordConstExpr
- ',' DWordConstExpr
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$8,$9);}
- | PARSEOP_MEMORY32FIXED
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-Memory32Term
- : PARSEOP_MEMORY32
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32);}
- OptionalReadWriteKeyword
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- ',' DWordConstExpr
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
- | PARSEOP_MEMORY32
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PinConfigTerm
- : PARSEOP_PINCONFIG
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINCONFIG);}
- OptionalShareType_First /* 04: SharedType */
- ',' ByteConstExpr /* 06: PinConfigType */
- ',' DWordConstExpr /* 08: PinConfigValue */
- ',' StringData /* 10: ResourceSource */
- OptionalByteConstExpr /* 11: ResourceSourceIndex */
- OptionalResourceType /* 12: ResourceType */
- OptionalNameString /* 13: DescriptorName */
- OptionalBuffer_Last /* 14: VendorData */
- PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
- $4,$6,$8,$10,$11,$12,$13,$14,$17);}
- | PARSEOP_PINCONFIG
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PinFunctionTerm
- : PARSEOP_PINFUNCTION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINFUNCTION);}
- OptionalShareType_First /* 04: SharedType */
- ',' PinConfigByte /* 06: PinConfig */
- ',' WordConstExpr /* 08: FunctionNumber */
- ',' StringData /* 10: ResourceSource */
- OptionalByteConstExpr /* 11: ResourceSourceIndex */
- OptionalResourceType /* 12: ResourceType */
- OptionalNameString /* 13: DescriptorName */
- OptionalBuffer_Last /* 14: VendorData */
- PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
- $4,$6,$8,$10,$11,$12,$13,$14,$17);}
- | PARSEOP_PINFUNCTION
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PinGroupTerm
- : PARSEOP_PINGROUP
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUP);}
- StringData /* 04: ResourceLabel */
- OptionalProducerResourceType /* 05: ResourceType */
- OptionalNameString /* 06: DescriptorName */
- OptionalBuffer_Last /* 07: VendorData */
- PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
- | PARSEOP_PINGROUP
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PinGroupConfigTerm
- : PARSEOP_PINGROUPCONFIG
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPCONFIG);}
- OptionalShareType_First /* 04: SharedType */
- ',' ByteConstExpr /* 06: PinConfigType */
- ',' DWordConstExpr /* 08: PinConfigValue */
- ',' StringData /* 10: ResourceSource */
- OptionalByteConstExpr /* 11: ResourceSourceIndex */
- ',' StringData /* 13: ResourceSourceLabel */
- OptionalResourceType /* 14: ResourceType */
- OptionalNameString /* 15: DescriptorName */
- OptionalBuffer_Last /* 16: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,9,
- $4,$6,$8,$10,$11,$13,$14,$15,$16);}
- | PARSEOP_PINGROUPCONFIG
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-PinGroupFunctionTerm
- : PARSEOP_PINGROUPFUNCTION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPFUNCTION);}
- OptionalShareType_First /* 04: SharedType */
- ',' WordConstExpr /* 06: FunctionNumber */
- ',' StringData /* 08: ResourceSource */
- OptionalByteConstExpr /* 09: ResourceSourceIndex */
- ',' StringData /* 11: ResourceSourceLabel */
- OptionalResourceType /* 12: ResourceType */
- OptionalNameString /* 13: DescriptorName */
- OptionalBuffer_Last /* 14: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,8,
- $4,$6,$8,$9,$11,$12,$13,$14);}
- | PARSEOP_PINGROUPFUNCTION
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-QWordIOTerm
- : PARSEOP_QWORDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDIO);}
- OptionalResourceType_First
- OptionalMinType
- OptionalMaxType
- OptionalDecodeType
- OptionalRangeType
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString
- OptionalType
- OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
- | PARSEOP_QWORDIO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-QWordMemoryTerm
- : PARSEOP_QWORDMEMORY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDMEMORY);}
- OptionalResourceType_First
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- OptionalMemType
- ',' OptionalReadWriteKeyword
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString
- OptionalAddressRange
- OptionalType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
- | PARSEOP_QWORDMEMORY
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-QWordSpaceTerm
- : PARSEOP_QWORDSPACE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDSPACE);}
- ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
- OptionalResourceType
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- ',' ByteConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- ',' QWordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
- $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
- | PARSEOP_QWORDSPACE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-RegisterTerm
- : PARSEOP_REGISTER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REGISTER);}
- AddressSpaceKeyword
- ',' ByteConstExpr
- ',' ByteConstExpr
- ',' QWordConstExpr
- OptionalAccessSize
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
- | PARSEOP_REGISTER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SpiSerialBusTerm
- : PARSEOP_SPI_SERIALBUS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS);}
- WordConstExpr /* 04: DeviceSelection */
- OptionalDevicePolarity /* 05: DevicePolarity */
- OptionalWireMode /* 06: WireMode */
- ',' ByteConstExpr /* 08: DataBitLength */
- OptionalSlaveMode /* 09: SlaveMode */
- ',' DWordConstExpr /* 11: ConnectionSpeed */
- ',' ClockPolarityKeyword /* 13: ClockPolarity */
- ',' ClockPhaseKeyword /* 15: ClockPhase */
- ',' StringData /* 17: ResourceSource */
- OptionalByteConstExpr /* 18: ResourceSourceIndex */
- OptionalResourceType /* 19: ResourceType */
- OptionalNameString /* 20: DescriptorName */
- OptionalBuffer_Last /* 21: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
- $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
- | PARSEOP_SPI_SERIALBUS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-SpiSerialBusTermV2
- : PARSEOP_SPI_SERIALBUS_V2
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS_V2);}
- WordConstExpr /* 04: DeviceSelection */
- OptionalDevicePolarity /* 05: DevicePolarity */
- OptionalWireMode /* 06: WireMode */
- ',' ByteConstExpr /* 08: DataBitLength */
- OptionalSlaveMode /* 09: SlaveMode */
- ',' DWordConstExpr /* 11: ConnectionSpeed */
- ',' ClockPolarityKeyword /* 13: ClockPolarity */
- ',' ClockPhaseKeyword /* 15: ClockPhase */
- ',' StringData /* 17: ResourceSource */
- OptionalByteConstExpr /* 18: ResourceSourceIndex */
- OptionalResourceType /* 19: ResourceType */
- OptionalNameString /* 20: DescriptorName */
- OptionalShareType /* 21: Share */
- OptionalBuffer_Last /* 22: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
- $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
- | PARSEOP_SPI_SERIALBUS_V2
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-StartDependentFnNoPriTerm
- : PARSEOP_STARTDEPENDENTFN_NOPRI
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN_NOPRI);}
- PARSEOP_CLOSE_PAREN '{'
- ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,1,$6);}
- | PARSEOP_STARTDEPENDENTFN_NOPRI
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-StartDependentFnTerm
- : PARSEOP_STARTDEPENDENTFN
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN);}
- ByteConstExpr
- ',' ByteConstExpr
- PARSEOP_CLOSE_PAREN '{'
- ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$9);}
- | PARSEOP_STARTDEPENDENTFN
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-UartSerialBusTerm
- : PARSEOP_UART_SERIALBUS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS);}
- DWordConstExpr /* 04: ConnectionSpeed */
- OptionalBitsPerByte /* 05: BitsPerByte */
- OptionalStopBits /* 06: StopBits */
- ',' ByteConstExpr /* 08: LinesInUse */
- OptionalEndian /* 09: Endianness */
- OptionalParityType /* 10: Parity */
- OptionalFlowControl /* 11: FlowControl */
- ',' WordConstExpr /* 13: Rx BufferSize */
- ',' WordConstExpr /* 15: Tx BufferSize */
- ',' StringData /* 17: ResourceSource */
- OptionalByteConstExpr /* 18: ResourceSourceIndex */
- OptionalResourceType /* 19: ResourceType */
- OptionalNameString /* 20: DescriptorName */
- OptionalBuffer_Last /* 21: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
- $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
- | PARSEOP_UART_SERIALBUS
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-UartSerialBusTermV2
- : PARSEOP_UART_SERIALBUS_V2
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS_V2);}
- DWordConstExpr /* 04: ConnectionSpeed */
- OptionalBitsPerByte /* 05: BitsPerByte */
- OptionalStopBits /* 06: StopBits */
- ',' ByteConstExpr /* 08: LinesInUse */
- OptionalEndian /* 09: Endianness */
- OptionalParityType /* 10: Parity */
- OptionalFlowControl /* 11: FlowControl */
- ',' WordConstExpr /* 13: Rx BufferSize */
- ',' WordConstExpr /* 15: Tx BufferSize */
- ',' StringData /* 17: ResourceSource */
- OptionalByteConstExpr /* 18: ResourceSourceIndex */
- OptionalResourceType /* 19: ResourceType */
- OptionalNameString /* 20: DescriptorName */
- OptionalShareType /* 21: Share */
- OptionalBuffer_Last /* 22: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
- $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
- | PARSEOP_UART_SERIALBUS_V2
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-VendorLongTerm
- : PARSEOP_VENDORLONG
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORLONG);}
- OptionalNameString_First
- PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_VENDORLONG
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-VendorShortTerm
- : PARSEOP_VENDORSHORT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORSHORT);}
- OptionalNameString_First
- PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
- | PARSEOP_VENDORSHORT
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-WordBusNumberTerm
- : PARSEOP_WORDBUSNUMBER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDBUSNUMBER);}
- OptionalResourceType_First
- OptionalMinType
- OptionalMaxType
- OptionalDecodeType
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,12,
- $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
- | PARSEOP_WORDBUSNUMBER
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-WordIOTerm
- : PARSEOP_WORDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDIO);}
- OptionalResourceType_First
- OptionalMinType
- OptionalMaxType
- OptionalDecodeType
- OptionalRangeType
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString
- OptionalType
- OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
- $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
- | PARSEOP_WORDIO
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-WordSpaceTerm
- : PARSEOP_WORDSPACE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDSPACE);}
- ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
- OptionalResourceType
- OptionalDecodeType
- OptionalMinType
- OptionalMaxType
- ',' ByteConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- ',' WordConstExpr
- OptionalByteConstExpr
- OptionalStringData
- OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
- $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
- | PARSEOP_WORDSPACE
- PARSEOP_OPEN_PAREN
- error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
- ;
-
-
-
-
-/*******************************************************************************
- *
- * ASL Helper Terms
- *
- ******************************************************************************/
-
-OptionalBusMasterKeyword
- : ',' {$$ = TrCreateLeafOp (
- PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafOp (
- PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafOp (
- PARSEOP_BUSMASTERTYPE_NOTMASTER);}
- ;
-
-OptionalAccessAttribTerm
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' ByteConstExpr {$$ = $2;}
- | ',' AccessAttribKeyword {$$ = $2;}
- ;
-
-OptionalAccessSize
- : {$$ = TrCreateValuedLeafOp (
- PARSEOP_BYTECONST, 0);}
- | ',' {$$ = TrCreateValuedLeafOp (
- PARSEOP_BYTECONST, 0);}
- | ',' ByteConstExpr {$$ = $2;}
- ;
-
-OptionalAccessTypeKeyword /* Default: AnyAcc */
- : {$$ = TrCreateLeafOp (
- PARSEOP_ACCESSTYPE_ANY);}
- | ',' {$$ = TrCreateLeafOp (
- PARSEOP_ACCESSTYPE_ANY);}
- | ',' AccessTypeKeyword {$$ = $2;}
- ;
-
-OptionalAddressingMode
- : ',' {$$ = NULL;}
- | ',' AddressingModeKeyword {$$ = $2;}
- ;
-
-OptionalAddressRange
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' AddressKeyword {$$ = $2;}
- ;
-
-OptionalBitsPerByte
- : ',' {$$ = NULL;}
- | ',' BitsPerByteKeyword {$$ = $2;}
- ;
-
-OptionalBuffer_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' RawDataBufferTerm {$$ = $2;}
- ;
-
-OptionalByteConstExpr
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' ByteConstExpr {$$ = $2;}
- ;
-
-OptionalDecodeType
- : ',' {$$ = NULL;}
- | ',' DecodeKeyword {$$ = $2;}
- ;
-
-OptionalDevicePolarity
- : ',' {$$ = NULL;}
- | ',' DevicePolarityKeyword {$$ = $2;}
- ;
-
-OptionalDWordConstExpr
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' DWordConstExpr {$$ = $2;}
- ;
-
-OptionalEndian
- : ',' {$$ = NULL;}
- | ',' EndianKeyword {$$ = $2;}
- ;
-
-OptionalFlowControl
- : ',' {$$ = NULL;}
- | ',' FlowControlKeyword {$$ = $2;}
- ;
-
-OptionalIoRestriction
- : ',' {$$ = NULL;}
- | ',' IoRestrictionKeyword {$$ = $2;}
- ;
-
-OptionalListString
- : {$$ = TrCreateValuedLeafOp (
- PARSEOP_STRING_LITERAL,
- ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
- | ',' {$$ = TrCreateValuedLeafOp (
- PARSEOP_STRING_LITERAL,
- ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
- | ',' TermArg {$$ = $2;}
- ;
-
-OptionalLockRuleKeyword /* Default: NoLock */
- : {$$ = TrCreateLeafOp (
- PARSEOP_LOCKRULE_NOLOCK);}
- | ',' {$$ = TrCreateLeafOp (
- PARSEOP_LOCKRULE_NOLOCK);}
- | ',' LockRuleKeyword {$$ = $2;}
- ;
-
-OptionalMaxType
- : ',' {$$ = NULL;}
- | ',' MaxKeyword {$$ = $2;}
- ;
-
-OptionalMemType
- : ',' {$$ = NULL;}
- | ',' MemTypeKeyword {$$ = $2;}
- ;
-
-OptionalMinType
- : ',' {$$ = NULL;}
- | ',' MinKeyword {$$ = $2;}
- ;
-
-OptionalNameString
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' NameString {$$ = $2;}
- ;
-
-OptionalNameString_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' NameString {$$ = $2;}
- ;
-
-OptionalNameString_First
- : {$$ = TrCreateLeafOp (
- PARSEOP_ZERO);}
- | NameString {$$ = $1;}
- ;
-
-OptionalObjectTypeKeyword
- : {$$ = TrCreateLeafOp (
- PARSEOP_OBJECTTYPE_UNK);}
- | ',' ObjectTypeKeyword {$$ = $2;}
- ;
-
-OptionalParityType
- : ',' {$$ = NULL;}
- | ',' ParityTypeKeyword {$$ = $2;}
- ;
-
-OptionalQWordConstExpr
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' QWordConstExpr {$$ = $2;}
- ;
-
-OptionalRangeType
- : ',' {$$ = NULL;}
- | ',' RangeTypeKeyword {$$ = $2;}
- ;
-
-OptionalReadWriteKeyword
- : {$$ = TrCreateLeafOp (
- PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafOp (
- PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafOp (
- PARSEOP_READWRITETYPE_READONLY);}
- ;
-
-OptionalResourceType_First
- : {$$ = TrCreateLeafOp (
- PARSEOP_RESOURCETYPE_CONSUMER);}
- | ResourceTypeKeyword {$$ = $1;}
- ;
-
-OptionalResourceType
- : {$$ = TrCreateLeafOp (
- PARSEOP_RESOURCETYPE_CONSUMER);}
- | ',' {$$ = TrCreateLeafOp (
- PARSEOP_RESOURCETYPE_CONSUMER);}
- | ',' ResourceTypeKeyword {$$ = $2;}
- ;
-
-/* Same as above except default is producer */
-OptionalProducerResourceType
- : {$$ = TrCreateLeafOp (
- PARSEOP_RESOURCETYPE_PRODUCER);}
- | ',' {$$ = TrCreateLeafOp (
- PARSEOP_RESOURCETYPE_PRODUCER);}
- | ',' ResourceTypeKeyword {$$ = $2;}
- ;
-
-OptionalSlaveMode
- : ',' {$$ = NULL;}
- | ',' SlaveModeKeyword {$$ = $2;}
- ;
-
-OptionalShareType
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' ShareTypeKeyword {$$ = $2;}
- ;
-
-OptionalShareType_First
- : {$$ = NULL;}
- | ShareTypeKeyword {$$ = $1;}
- ;
-
-OptionalStopBits
- : ',' {$$ = NULL;}
- | ',' StopBitsKeyword {$$ = $2;}
- ;
-
-OptionalStringData
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' StringData {$$ = $2;}
- ;
-
-OptionalSyncLevel /* Default: 0 */
- : {$$ = TrCreateValuedLeafOp (
- PARSEOP_BYTECONST, 0);}
- | ',' {$$ = TrCreateValuedLeafOp (
- PARSEOP_BYTECONST, 0);}
- | ',' ByteConstExpr {$$ = $2;}
- ;
-
-OptionalTranslationType_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' TranslationKeyword {$$ = $2;}
- ;
-
-OptionalType
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' TypeKeyword {$$ = $2;}
- ;
-
-OptionalType_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' TypeKeyword {$$ = $2;}
- ;
-
-OptionalUpdateRuleKeyword /* Default: Preserve */
- : {$$ = TrCreateLeafOp (
- PARSEOP_UPDATERULE_PRESERVE);}
- | ',' {$$ = TrCreateLeafOp (
- PARSEOP_UPDATERULE_PRESERVE);}
- | ',' UpdateRuleKeyword {$$ = $2;}
- ;
-
-OptionalWireMode
- : ',' {$$ = NULL;}
- | ',' WireModeKeyword {$$ = $2;}
- ;
-
-OptionalWordConstExpr
- : ',' {$$ = NULL;}
- | ',' WordConstExpr {$$ = $2;}
- ;
-
-OptionalXferSize
- : {$$ = TrCreateValuedLeafOp (
- PARSEOP_XFERSIZE_32, 2);}
- | ',' {$$ = TrCreateValuedLeafOp (
- PARSEOP_XFERSIZE_32, 2);}
- | ',' XferSizeKeyword {$$ = $2;}
- ;
-
-%%
-
-/*! [End] no source code translation !*/
-
-/* Local support functions in C */
-
-
-
-/******************************************************************************
- *
- * Local support functions
- *
- *****************************************************************************/
-
-/*! [Begin] no source code translation */
-int
-AslCompilerwrap(void)
-{
- return (1);
-}
-/*! [End] no source code translation !*/
-
-
-void *
-AslLocalAllocate (
- unsigned int Size)
-{
- void *Mem;
-
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nAslLocalAllocate: Expanding Stack to %u\n\n", Size);
-
- Mem = ACPI_ALLOCATE_ZEROED (Size);
- if (!Mem)
- {
- AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,
- AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
- AslGbl_InputByteCount, AslGbl_CurrentColumn,
- AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
- exit (1);
- }
-
- return (Mem);
-}
-
-ACPI_PARSE_OBJECT *
-AslDoError (
- void)
-{
-
- return (TrCreateLeafOp (PARSEOP_ERRORNODE));
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: UtGetOpName
- *
- * PARAMETERS: ParseOpcode - Parser keyword ID
- *
- * RETURN: Pointer to the opcode name
- *
- * DESCRIPTION: Get the ascii name of the parse opcode
- *
- ******************************************************************************/
-
-char *
-UtGetOpName (
- UINT32 ParseOpcode)
-{
-#ifdef ASL_YYTNAME_START
- /*
- * First entries (ASL_YYTNAME_START) in yytname are special reserved names.
- * Ignore first 8 characters of the name
- */
- return ((char *) yytname
- [(ParseOpcode - ASL_FIRST_PARSE_OPCODE) + ASL_YYTNAME_START] + 8);
-#else
- return ("[Unknown parser generator]");
-#endif
-}
-
diff --git a/source/compiler/aslcstyle.y b/source/compiler/aslcstyle.y
index d23611f..e17620e 100644
--- a/source/compiler/aslcstyle.y
+++ b/source/compiler/aslcstyle.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asldebug.c b/source/compiler/asldebug.c
index ce3674a..80636e8 100644
--- a/source/compiler/asldebug.c
+++ b/source/compiler/asldebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asldefine.h b/source/compiler/asldefine.h
index e3ba2ae..89148fe 100644
--- a/source/compiler/asldefine.h
+++ b/source/compiler/asldefine.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -115,6 +119,7 @@
#define ASL_NO_ABORT FALSE
#define ASL_EOF ACPI_UINT32_MAX
#define ASL_IGNORE_LINE (ACPI_UINT32_MAX -1)
+#define ASL_ERROR_CODE_LENGTH 4
/* Listings */
diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c
index ba3c899..fd3ba0b 100644
--- a/source/compiler/aslerror.c
+++ b/source/compiler/aslerror.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -50,6 +54,8 @@
static BOOLEAN
AslIsExceptionExpected (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId);
@@ -58,7 +64,8 @@
UINT8 Level,
UINT16 MessageId);
-static void AslInitEnode (
+static void
+AslInitEnode (
ASL_ERROR_MSG **Enode,
UINT8 Level,
UINT16 MessageId,
@@ -844,7 +851,7 @@
{
/* Check if user wants to ignore this exception */
- if (AslIsExceptionIgnored (Level, MessageId))
+ if (AslIsExceptionIgnored (Filename, LogicalLineNumber, Level, MessageId))
{
return;
}
@@ -910,7 +917,7 @@
AslGbl_ExceptionCount[ModifiedLevel]++;
if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
{
- printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
+ printf ("\nMaximum error count (%u) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT);
AslGbl_SourceLine = 0;
AslGbl_NextError = AslGbl_ErrorLog;
@@ -941,7 +948,7 @@
UINT8 Level,
UINT16 MessageId)
{
- UINT16 i;
+ UINT32 i;
UINT16 ExceptionCode;
@@ -975,6 +982,8 @@
BOOLEAN
AslIsExceptionIgnored (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId)
{
@@ -984,7 +993,8 @@
/* Note: this allows exception to be disabled and expected */
ExceptionIgnored = AslIsExceptionDisabled (Level, MessageId);
- ExceptionIgnored |= AslIsExceptionExpected (Level, MessageId);
+ ExceptionIgnored |=
+ AslIsExceptionExpected (Filename, LineNumber, Level, MessageId);
return (AslGbl_AllExceptionsDisabled || ExceptionIgnored);
}
@@ -992,7 +1002,7 @@
/*******************************************************************************
*
- * FUNCTION: AslCheckExpectException
+ * FUNCTION: AslCheckExpectedException
*
* PARAMETERS: none
*
@@ -1007,7 +1017,9 @@
AslCheckExpectedExceptions (
void)
{
- UINT8 i;
+ UINT32 i;
+ ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList;
+ ASL_LOCATION_NODE *LocationNode;
for (i = 0; i < AslGbl_ExpectedMessagesIndex; ++i)
@@ -1018,12 +1030,32 @@
AslGbl_ExpectedMessages[i].MessageIdStr);
}
}
+
+ while (Current)
+ {
+ LocationNode = Current->LocationList;
+
+ while (LocationNode)
+ {
+ if (!LocationNode->MessageReceived)
+ {
+ AslCommonError (ASL_ERROR, ASL_MSG_EXCEPTION_NOT_RECEIVED,
+ LocationNode->LineNumber, LocationNode->LineNumber,
+ LocationNode->LogicalByteOffset, LocationNode->Column,
+ LocationNode->Filename, Current->MessageIdStr);
+ }
+
+ LocationNode = LocationNode->Next;
+ }
+
+ Current = Current->Next;
+ }
}
/*******************************************************************************
*
- * FUNCTION: AslExpectException
+ * FUNCTION: AslLogExpectedException
*
* PARAMETERS: MessageIdString - ID of excepted exception during compile
*
@@ -1036,7 +1068,7 @@
******************************************************************************/
ACPI_STATUS
-AslExpectException (
+AslLogExpectedException (
char *MessageIdString)
{
UINT32 MessageId;
@@ -1048,7 +1080,7 @@
if (MessageId > 6999)
{
- printf ("\"%s\" is not a valid warning/remark/erro ID\n",
+ printf ("\"%s\" is not a valid warning/remark/error ID\n",
MessageIdString);
return (AE_BAD_PARAMETER);
}
@@ -1072,6 +1104,61 @@
/*******************************************************************************
*
+ * FUNCTION: AslLogExpectedExceptionByLine
+ *
+ * PARAMETERS: MessageIdString - ID of excepted exception during compile
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a message ID into the global expected messages table
+ * based on file and line number. If these messages are not raised
+ * during the compilation, throw an error.
+ *
+ ******************************************************************************/
+
+void
+AslLogExpectedExceptionByLine (
+ char *MessageIdString)
+{
+ ASL_LOCATION_NODE *NewErrorLocationNode;
+ ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList;
+ UINT32 MessageId;
+
+
+ NewErrorLocationNode = UtLocalCalloc (sizeof (ASL_LOCATION_NODE));
+
+ NewErrorLocationNode->LineNumber = AslGbl_CurrentLineNumber;
+ NewErrorLocationNode->Filename = AslGbl_Files[ASL_FILE_INPUT].Filename;
+ NewErrorLocationNode->LogicalByteOffset = AslGbl_CurrentLineOffset;
+ NewErrorLocationNode->Column = AslGbl_CurrentColumn;
+
+ MessageId = (UINT32) strtoul (MessageIdString, NULL, 0);
+
+ /* search the existing list for a matching message ID */
+
+ while (Current && Current->MessageId != MessageId )
+ {
+ Current = Current->Next;
+ }
+ if (!Current)
+ {
+ /* ID was not found, create a new node for this message ID */
+
+ Current = UtLocalCalloc (sizeof (ASL_EXPECTED_MSG_NODE));
+
+ Current->Next = AslGbl_ExpectedErrorCodeList;
+ Current->MessageIdStr = MessageIdString;
+ Current->MessageId = MessageId;
+ AslGbl_ExpectedErrorCodeList = Current;
+ }
+
+ NewErrorLocationNode->Next = Current->LocationList;
+ Current->LocationList = NewErrorLocationNode;
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AslDisableException
*
* PARAMETERS: MessageIdString - ID to be disabled
@@ -1141,7 +1228,7 @@
if (MessageId > 6999)
{
- printf ("\"%s\" is not a valid warning/remark/erro ID\n",
+ printf ("\"%s\" is not a valid warning/remark/error ID\n",
MessageIdString);
return (AE_BAD_PARAMETER);
}
@@ -1160,6 +1247,7 @@
return (AE_OK);
}
+
/*******************************************************************************
*
* FUNCTION: AslIsExceptionDisabled
@@ -1176,9 +1264,13 @@
static BOOLEAN
AslIsExceptionExpected (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId)
{
+ ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList;
+ ASL_LOCATION_NODE *CurrentErrorLocation;
UINT32 EncodedMessageId;
UINT32 i;
@@ -1196,6 +1288,28 @@
}
}
+ while (Current && Current->MessageId != EncodedMessageId)
+ {
+ Current = Current->Next;
+ }
+ if (!Current)
+ {
+ return (FALSE);
+ }
+
+ CurrentErrorLocation = Current->LocationList;
+
+ while (CurrentErrorLocation)
+ {
+ if (!strcmp (CurrentErrorLocation->Filename, Filename) &&
+ CurrentErrorLocation->LineNumber == LineNumber)
+ {
+ return (CurrentErrorLocation->MessageReceived = TRUE);
+ }
+
+ CurrentErrorLocation = CurrentErrorLocation->Next;
+ }
+
return (FALSE);
}
@@ -1234,7 +1348,7 @@
{
return (TRUE);
}
- /* Fall through */
+ ACPI_FALLTHROUGH;
case ASL_WARNING:
case ASL_REMARK:
@@ -1298,7 +1412,8 @@
/* Check if user wants to ignore this exception */
- if (AslIsExceptionIgnored (Level, MainMsgId) || !MainOp)
+ if (!MainOp || AslIsExceptionIgnored (MainOp->Asl.Filename,
+ MainOp->Asl.LogicalLineNumber, Level, MainMsgId))
{
return;
}
diff --git a/source/compiler/aslexternal.c b/source/compiler/aslexternal.c
index 1447018..2e310e5 100644
--- a/source/compiler/aslexternal.c
+++ b/source/compiler/aslexternal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -80,12 +84,62 @@
ACPI_PARSE_OBJECT *Prev;
ACPI_PARSE_OBJECT *Next;
ACPI_PARSE_OBJECT *ArgCountOp;
+ ACPI_PARSE_OBJECT *TypeOp;
+ ACPI_PARSE_OBJECT *ExternTypeOp = Op->Asl.Child->Asl.Next;
+ UINT32 ExternType;
+ UINT8 ParamCount = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS;
+ UINT32 ParamTypes[ACPI_METHOD_NUM_ARGS];
+ ExternType = AnMapObjTypeToBtype (ExternTypeOp);
+ if (ExternType != ACPI_BTYPE_METHOD)
+ {
+ /*
+ * If this is not a method, it has zero parameters this local variable
+ * is used only for methods
+ */
+ ParamCount = 0;
+ }
+
+ /*
+ * The parser allows optional parameter return types regardless of the
+ * type. Check object type keyword emit error if optional parameter/return
+ * types exist.
+ *
+ * Check the parameter return type
+ */
+ TypeOp = ExternTypeOp->Asl.Next;
+ if (TypeOp->Asl.Child)
+ {
+ /* Ignore the return type for now. */
+
+ (void) MtProcessTypeOp (TypeOp->Asl.Child);
+ if (ExternType != ACPI_BTYPE_METHOD)
+ {
+ sprintf (AslGbl_MsgBuffer, "Found type [%s]", AcpiUtGetTypeName(ExternType));
+ AslError (ASL_ERROR, ASL_MSG_EXTERN_INVALID_RET_TYPE, TypeOp,
+ AslGbl_MsgBuffer);
+ }
+ }
+
+ /* Check the parameter types */
+
+ TypeOp = TypeOp->Asl.Next;
+ if (TypeOp->Asl.Child)
+ {
+ ParamCount = MtProcessParameterTypeList (TypeOp->Asl.Child, ParamTypes);
+ if (ExternType != ACPI_BTYPE_METHOD)
+ {
+ sprintf (AslGbl_MsgBuffer, "Found type [%s]", AcpiUtGetTypeName(ExternType));
+ AslError (ASL_ERROR, ASL_MSG_EXTERN_INVALID_PARAM_TYPE, TypeOp,
+ AslGbl_MsgBuffer);
+ }
+ }
+
ArgCountOp = Op->Asl.Child->Asl.Next->Asl.Next;
ArgCountOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
ArgCountOp->Asl.ParseOpcode = PARSEOP_BYTECONST;
- ArgCountOp->Asl.Value.Integer = 0;
+ ArgCountOp->Asl.Value.Integer = ParamCount;
UtSetParseOpName (ArgCountOp);
/* Create new list node of arbitrary type */
diff --git a/source/compiler/aslfileio.c b/source/compiler/aslfileio.c
index 9998a0a..536cbdb 100644
--- a/source/compiler/aslfileio.c
+++ b/source/compiler/aslfileio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c
index 3ee75ca..8e1e372 100644
--- a/source/compiler/aslfiles.c
+++ b/source/compiler/aslfiles.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -723,8 +727,8 @@
* RETURN: Status
*
* DESCRIPTION: Open the specified input file, and save the directory path to
- * the file so that include files can be opened in
- * the same directory.
+ * the file so that include files can be opened in the same
+ * directory. NOTE: File is opened in text mode.
*
******************************************************************************/
diff --git a/source/compiler/aslfold.c b/source/compiler/aslfold.c
index fca8c28..8088541 100644
--- a/source/compiler/aslfold.c
+++ b/source/compiler/aslfold.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslglobal.h b/source/compiler/aslglobal.h
index 5a7118c..996b11b 100644
--- a/source/compiler/aslglobal.h
+++ b/source/compiler/aslglobal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -308,6 +312,7 @@
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_TableId, "NO_ID");
ASL_EXTERN ASL_FILE_INFO ASL_INIT_GLOBAL (*AslGbl_Files, NULL);
ASL_EXTERN ASL_GLOBAL_FILE_NODE ASL_INIT_GLOBAL (*AslGbl_FilesList, NULL);
+ASL_EXTERN ASL_EXPECTED_MSG_NODE ASL_INIT_GLOBAL (*AslGbl_ExpectedErrorCodeList, NULL);
/* Specific to the -q option */
diff --git a/source/compiler/aslhelp.c b/source/compiler/aslhelp.c
index e3f9812..a4f5754 100644
--- a/source/compiler/aslhelp.c
+++ b/source/compiler/aslhelp.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -150,6 +154,7 @@
ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)");
ACPI_OPTION ("-df", "Force disassembler to assume table contains valid AML");
ACPI_OPTION ("-dl", "Emit legacy ASL code only (no C-style operators)");
+ ACPI_OPTION ("-ds <signature(4)>", "Specify a table signature(4) (CDAT table only)");
ACPI_OPTION ("-e <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file");
ACPI_OPTION ("-in", "Ignore NoOp opcodes");
diff --git a/source/compiler/aslhelpers.y b/source/compiler/aslhelpers.y
index fc4874f..58b8711 100644
--- a/source/compiler/aslhelpers.y
+++ b/source/compiler/aslhelpers.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -248,6 +252,11 @@
| ',' SlaveModeKeyword {$$ = $2;}
;
+OptionalSlaveMode_First
+ : {$$ = NULL;}
+ | SlaveModeKeyword {$$ = $1;}
+ ;
+
OptionalShareType
: {$$ = NULL;}
| ',' {$$ = NULL;}
diff --git a/source/compiler/aslhex.c b/source/compiler/aslhex.c
index 7a28038..a4f0345 100644
--- a/source/compiler/aslhex.c
+++ b/source/compiler/aslhex.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslkeywords.y b/source/compiler/aslkeywords.y
index 6dc2a78..c6b256f 100644
--- a/source/compiler/aslkeywords.y
+++ b/source/compiler/aslkeywords.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -282,6 +286,7 @@
| PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GPIO);}
| PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GSBUS);}
| PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCC);}
+ | PARSEOP_REGIONSPACE_PRM {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PRM);}
| PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_FFIXEDHW);}
;
diff --git a/source/compiler/asllength.c b/source/compiler/asllength.c
index 5d15dfa..899c381 100644
--- a/source/compiler/asllength.c
+++ b/source/compiler/asllength.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asllisting.c b/source/compiler/asllisting.c
index cac5dc5..175bd94 100644
--- a/source/compiler/asllisting.c
+++ b/source/compiler/asllisting.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asllistsup.c b/source/compiler/asllistsup.c
index b72f810..4a9cd1d 100644
--- a/source/compiler/asllistsup.c
+++ b/source/compiler/asllistsup.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c
index 0abc160..232009a 100644
--- a/source/compiler/aslload.c
+++ b/source/compiler/aslload.c
@@ -1,11 +1,11 @@
/******************************************************************************
*
- * Module Name: dswload - Dispatcher namespace load callbacks
+ * Module Name: aslload - compiler namespace load callbacks
*
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -84,6 +88,14 @@
ACPI_NAMESPACE_NODE *Node,
ACPI_PARSE_OBJECT *Op);
+static ACPI_STATUS
+LdAnalyzeExternals (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_OBJECT_TYPE ExternalOpType,
+ ACPI_WALK_STATE *WalkState);
+
+
/*******************************************************************************
*
* FUNCTION: LdLoadNamespace
@@ -394,7 +406,6 @@
ACPI_PARSE_OBJECT *MethodOp;
ACPI_STATUS Status;
ACPI_OBJECT_TYPE ObjectType;
- ACPI_OBJECT_TYPE ActualObjectType = ACPI_TYPE_ANY;
char *Path;
UINT32 Flags = ACPI_NS_NO_UPSEARCH;
ACPI_PARSE_OBJECT *Arg;
@@ -463,7 +474,8 @@
/* Check for a possible illegal forward reference */
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
- (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
+ (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
+ (Op->Asl.ParseOpcode == PARSEOP_METHODCALL))
{
/*
* Op->Asl.Namepath will be NULL for these opcodes.
@@ -479,7 +491,8 @@
* We only want references to named objects:
* Store (2, WXYZ) -> Attempt to resolve the name
*/
- if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
+ if ((Op->Asl.ParseOpcode != PARSEOP_METHODCALL) &&
+ (OpInfo->Class == AML_CLASS_NAMED_OBJECT))
{
return (AE_OK);
}
@@ -566,8 +579,7 @@
*
* first child is name, next child is ObjectType
*/
- ActualObjectType = (UINT8) Op->Asl.Child->Asl.Next->Asl.Value.Integer;
- ObjectType = ACPI_TYPE_ANY;
+ ObjectType = (UINT8) Op->Asl.Child->Asl.Next->Asl.Value.Integer;
/*
* We will mark every new node along the path as "External". This
@@ -586,7 +598,7 @@
* Store (\_SB_.PCI0.ABCD, Local0)
* }
*/
- Flags |= ACPI_NS_EXTERNAL;
+ Flags |= ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE;
break;
case PARSEOP_DEFAULT_ARG:
@@ -787,56 +799,36 @@
Node->Type = (UINT8) ObjectType;
Status = AE_OK;
}
- else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
- (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
- {
- /*
- * Allow one create on an object or segment that was
- * previously declared External
- */
- Node->Flags &= ~ANOBJ_IS_EXTERNAL;
- Node->Type = (UINT8) ObjectType;
-
- /* Just retyped a node, probably will need to open a scope */
-
- if (AcpiNsOpensScope (ObjectType))
- {
- Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
-
- Status = AE_OK;
- }
- else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ else if ((Node->Flags & ANOBJ_IS_EXTERNAL) ||
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
{
- /*
- * Allow externals in same scope as the definition of the
- * actual object. Similar to C. Allows multiple definition
- * blocks that refer to each other in the same file.
- */
- Status = AE_OK;
- }
- else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
- (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
- (ObjectType == ACPI_TYPE_ANY))
- {
- /* Allow update of externals of unknown type. */
-
- if (AcpiNsOpensScope (ActualObjectType))
+ Status = LdAnalyzeExternals (Node, Op, ObjectType, WalkState);
+ if (ACPI_FAILURE (Status))
{
- Node->Type = (UINT8) ActualObjectType;
- Status = AE_OK;
+ if (Status == AE_ERROR)
+ {
+ /*
+ * The use of AE_ERROR here indicates that there was a
+ * compiler error emitted in LdAnalyzeExternals which
+ * means that the caller should proceed to the next Op
+ * for analysis of subsequent parse objects.
+ */
+ Status = AE_OK;
+ }
+ return_ACPI_STATUS (Status);
}
- else
+
+ if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
{
- sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
- AcpiUtGetTypeName (Node->Type));
- AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer);
- return_ACPI_STATUS (AE_OK);
+ /*
+ * If we get to here, it means that an actual definition of
+ * the object declared external exists. Meaning that Op
+ * loading this this Op should have no change to the ACPI
+ * namespace. By going to FinishNode, we skip the
+ * assignment of Node->Op = Op.
+ */
+ goto FinishNode;
}
}
else
@@ -889,28 +881,15 @@
}
}
-FinishNode:
- /*
- * Point the parse node to the new namespace node, and point
- * the Node back to the original Parse node
- */
- Op->Asl.Node = Node;
+ /* Point the Node back to the original Parse node */
+
Node->Op = Op;
- /*
- * Set the actual data type if appropriate (EXTERNAL term only)
- * As of 11/19/2019, ASL External() does not support parameter
- * counts. When an External method is loaded, the parameter count is
- * unknown setting Node->Value to ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS
- * indicates that the parameter count for this method is unknown.
- * This information is used in ASL cross reference to help determine the
- * parameter count through method calls.
- */
- if (ActualObjectType != ACPI_TYPE_ANY)
- {
- Node->Type = (UINT8) ActualObjectType;
- Node->Value = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS;
- }
+FinishNode:
+
+ /* Point the parse node to the new namespace node */
+
+ Op->Asl.Node = Node;
if (Op->Asl.ParseOpcode == PARSEOP_METHOD)
{
@@ -920,6 +899,13 @@
*/
Node->Value = (UINT32) Op->Asl.Extra;
}
+ else if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL &&
+ Node->Type == ACPI_TYPE_METHOD &&
+ (Node->Flags & ANOBJ_IS_EXTERNAL))
+ {
+ Node->Value =
+ (UINT32) Op->Asl.Child->Asl.Next->Asl.Next->Asl.Value.Integer;
+ }
return_ACPI_STATUS (Status);
}
@@ -927,6 +913,203 @@
/*******************************************************************************
*
+ * FUNCTION: LdMatchExternType
+ *
+ * PARAMETERS: Type1
+ * Type2
+ *
+ * RETURN: BOOLEAN
+ *
+ * DESCRIPTION: Match Type1 and Type2 with the assumption that one might be
+ * using external types and another might be using local types.
+ * This should be used to compare the types found in external
+ * declarations with types found in other external declarations or
+ * named object declaration. This should not be used to match two
+ * object type declarations.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+LdMatchExternType (
+ ACPI_OBJECT_TYPE Type1,
+ ACPI_OBJECT_TYPE Type2)
+{
+ BOOLEAN Type1IsLocal = Type1 > ACPI_TYPE_EXTERNAL_MAX;
+ BOOLEAN Type2IsLocal = Type2 > ACPI_TYPE_EXTERNAL_MAX;
+ ACPI_OBJECT_TYPE ExternalType;
+ ACPI_OBJECT_TYPE LocalType;
+
+
+ /*
+ * The inputs could represent types that are local to ACPICA or types that
+ * are known externally. Some local types, such as the OperationRegion
+ * field units, are defined with more granularity than ACPICA local types.
+ *
+ * Therefore, map the local types to the external types before matching.
+ */
+ if (Type1IsLocal && !Type2IsLocal)
+ {
+ LocalType = Type1;
+ ExternalType = Type2;
+ }
+ else if (!Type1IsLocal && Type2IsLocal)
+ {
+ LocalType = Type2;
+ ExternalType = Type1;
+ }
+ else
+ {
+ return (Type1 == Type2);
+ }
+
+ switch (LocalType)
+ {
+ case ACPI_TYPE_LOCAL_REGION_FIELD:
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
+ case ACPI_TYPE_LOCAL_INDEX_FIELD:
+
+ LocalType = ACPI_TYPE_FIELD_UNIT;
+ break;
+
+ default:
+ break;
+ }
+
+ return (LocalType == ExternalType);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: LdAnalyzeExternals
+ *
+ * PARAMETERS: Node - Node that represents the named object
+ * Op - Named object declaring this named object
+ * ExternalOpType - Type of ExternalOp
+ * WalkState - Current WalkState
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Node and Op represents an identically named object declaration
+ * that is either declared by the ASL external keyword or declared
+ * by operators that declare named objects (i.e. Name, Device,
+ * OperationRegion, and etc.). This function ensures that the
+ * declarations do not contradict each other.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+LdAnalyzeExternals (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_OBJECT_TYPE ExternalOpType,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_OBJECT_TYPE ActualExternalOpType;
+ ACPI_OBJECT_TYPE ActualOpType;
+ ACPI_PARSE_OBJECT *ExternalOp;
+ ACPI_PARSE_OBJECT *ActualOp;
+
+
+ /*
+ * The declaration represented by Node and Op must have the same type.
+ * The type of the external Op is represented by ExternalOpType. However,
+ * the type of the pre-existing declaration depends on whether if Op
+ * is an external declaration or an actual declaration.
+ */
+ if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)
+ {
+ ActualExternalOpType = ExternalOpType;
+ ActualOpType = Node->Type;
+ }
+ else
+ {
+ ActualExternalOpType = Node->Type;
+ ActualOpType = ExternalOpType;
+ }
+
+ if ((ActualOpType != ACPI_TYPE_ANY) &&
+ (ActualExternalOpType != ACPI_TYPE_ANY) &&
+ !LdMatchExternType (ActualExternalOpType, ActualOpType))
+ {
+ if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL &&
+ Node->Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)
+ {
+ AslDualParseOpError (ASL_WARNING,
+ ASL_MSG_DUPLICATE_EXTERN_MISMATCH, Op, NULL,
+ ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, Node->Op, NULL);
+ }
+ else
+ {
+ if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL &&
+ Node->Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)
+ {
+ ExternalOp = Op;
+ ActualOp = Node->Op;
+ }
+ else
+ {
+ ExternalOp = Node->Op;
+ ActualOp = Op;
+ }
+ AslDualParseOpError (ASL_WARNING,
+ ASL_MSG_DECLARATION_TYPE_MISMATCH, ExternalOp, NULL,
+ ASL_MSG_TYPE_MISMATCH_FOUND_HERE, ActualOp, NULL);
+ }
+ }
+
+ /* Set the object type of the external */
+
+ if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
+ {
+ /*
+ * Allow one create on an object or segment that was
+ * previously declared External
+ */
+ Node->Flags &= ~ANOBJ_IS_EXTERNAL;
+ Node->Type = (UINT8) ActualOpType;
+
+ /* Just retyped a node, probably will need to open a scope */
+
+ if (AcpiNsOpensScope (ActualOpType))
+ {
+ Status = AcpiDsScopeStackPush (Node, ActualOpType, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+
+ Status = AE_OK;
+ }
+ else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
+ {
+ /*
+ * Allow externals in same scope as the definition of the
+ * actual object. Similar to C. Allows multiple definition
+ * blocks that refer to each other in the same file.
+ */
+ Status = AE_OK;
+ }
+ else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
+ (ActualOpType == ACPI_TYPE_ANY))
+ {
+ /* Allow update of externals of unknown type. */
+
+ Node->Type = (UINT8) ActualExternalOpType;
+ Status = AE_OK;
+ }
+
+ return (Status);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: LdCheckSpecialNames
*
* PARAMETERS: Node - Node that represents the named object
@@ -1113,9 +1296,16 @@
return (AE_OK);
}
- /* Save the target node within the alias node */
+ /* Save the target node within the alias node as well as type information */
Node->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
+ Node->Type = TargetNode->Type;
+ if (Node->Type == ACPI_TYPE_METHOD)
+ {
+ /* Save the parameter count for methods */
+
+ Node->Value = TargetNode->Value;
+ }
}
return (AE_OK);
diff --git a/source/compiler/asllookup.c b/source/compiler/asllookup.c
index 1c5d62b..5d655f0 100644
--- a/source/compiler/asllookup.c
+++ b/source/compiler/asllookup.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslmain.c b/source/compiler/aslmain.c
index 96f373e..5907bba 100644
--- a/source/compiler/aslmain.c
+++ b/source/compiler/aslmain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -305,7 +309,7 @@
}
printf (ASL_PREFIX "Terminating\n");
- exit (0);
+ _exit (0);
}
diff --git a/source/compiler/aslmap.c b/source/compiler/aslmap.c
index c022b5e..e632b5c 100644
--- a/source/compiler/aslmap.c
+++ b/source/compiler/aslmap.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -234,6 +238,7 @@
/* FUNCTION */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, OP_AML_PACKAGE, 0),
/* GPIOINT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* GPIOIO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
+/* CSI2SERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* I2CSERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* I2CSERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, OP_AML_PACKAGE, 0),
@@ -266,8 +271,8 @@
/* LLESSEQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_LESS_EQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* LNOT */ OP_TABLE_ENTRY (AML_LOGICAL_NOT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* LNOTEQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_NOT_EQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* LOAD */ OP_TABLE_ENTRY (AML_LOAD_OP, 0, 0, 0),
-/* LOADTABLE */ OP_TABLE_ENTRY (AML_LOAD_TABLE_OP, 0, 0, ACPI_BTYPE_DDB_HANDLE),
+/* LOAD */ OP_TABLE_ENTRY (AML_LOAD_OP, 0, 0, ACPI_BTYPE_INTEGER),
+/* LOADTABLE */ OP_TABLE_ENTRY (AML_LOAD_TABLE_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* LOCAL0 */ OP_TABLE_ENTRY (AML_LOCAL0, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* LOCAL1 */ OP_TABLE_ENTRY (AML_LOCAL1, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* LOCAL2 */ OP_TABLE_ENTRY (AML_LOCAL2, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
@@ -373,6 +378,7 @@
/* REGIONSPACE_PCC */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_COMM, 0, 0),
/* REGIONSPACE_PCI */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_CONFIG, 0, 0),
/* REGIONSPACE_PCIBAR */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_BAR_TARGET, 0, 0),
+/* REGIONSPACE_PRM */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_RT, 0, 0),
/* REGIONSPACE_SMBUS */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SMBUS, 0, 0),
/* REGISTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* RELEASE */ OP_TABLE_ENTRY (AML_RELEASE_OP, 0, 0, 0),
@@ -425,7 +431,7 @@
/* TYPE_TRANSLATION */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* UART_SERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* UART_SERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
-/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, OP_AML_PACKAGE, 0),
+/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_BUFFER),
/* UNLOAD */ OP_TABLE_ENTRY (AML_UNLOAD_OP, 0, 0, 0),
/* UPDATERULE_ONES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ONES, 0, 0),
/* UPDATERULE_PRESERVE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_PRESERVE, 0, 0),
diff --git a/source/compiler/aslmapenter.c b/source/compiler/aslmapenter.c
index a655ee5..8ab220b 100644
--- a/source/compiler/aslmapenter.c
+++ b/source/compiler/aslmapenter.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslmapoutput.c b/source/compiler/aslmapoutput.c
index 9458d9e..53cbc37 100644
--- a/source/compiler/aslmapoutput.c
+++ b/source/compiler/aslmapoutput.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslmaputils.c b/source/compiler/aslmaputils.c
index d252713..e0b01c3 100644
--- a/source/compiler/aslmaputils.c
+++ b/source/compiler/aslmaputils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslmessages.c b/source/compiler/aslmessages.c
index 4f8d372..182c0b9 100644
--- a/source/compiler/aslmessages.c
+++ b/source/compiler/aslmessages.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -81,7 +85,8 @@
*
* NOTE2: With the introduction of the -vw option to disable specific messages,
* new messages should only be added to the end of this list, so that values
- * for existing messages are not disturbed.
+ * for existing messages are not disturbed. As important, obsolete messages
+ * cannot be removed from this list, as it will affect the -vw option.
*/
/* ASL compiler */
@@ -208,7 +213,7 @@
/* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator",
/* ASL_MSG_SEEK */ "Could not seek file",
/* ASL_MSG_SERIALIZED */ "Control Method marked Serialized",
-/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized",
+/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized due to creation of named objects within",
/* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)",
/* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value",
/* ASL_MSG_STRING_LENGTH */ "String literal too long",
@@ -258,7 +263,22 @@
/* ASL_MSG_INVALID_PROCESSOR_UID */ "_UID inside processor declaration must be an integer",
/* ASL_MSG_LEGACY_PROCESSOR_OP */ "Legacy Processor() keyword detected. Use Device() keyword instead.",
/* ASL_MSG_NAMESTRING_LENGTH */ "NameString contains too many NameSegs (>255)",
-/* ASL_MSG_CASE_FOUND_HERE */ "Original Case value below:"
+/* ASL_MSG_CASE_FOUND_HERE */ "Original Case value below:",
+/* ASL_MSG_EXTERN_INVALID_RET_TYPE */ "Return type is only allowed for Externals declared as MethodObj",
+/* ASL_MSG_EXTERN_INVALID_PARAM_TYPE */ "Parameter type is only allowed for Externals declared as MethodObj",
+/* ASL_MSG_NAMED_OBJECT_CREATION */ "Creation of named objects within a method is highly inefficient, use globals or method local variables instead",
+/* ASL_MSG_ARG_COUNT_MISMATCH */ "Method NumArgs count does not match length of ParameterTypes list",
+/* ASL_MSG_STATIC_OPREGION_IN_METHOD */ "Static OperationRegion should be declared outside control method",
+/* ASL_MSG_DECLARATION_TYPE_MISMATCH */ "Type mismatch between external declaration and actual object declaration detected",
+/* ASL_MSG_TYPE_MISMATCH_FOUND_HERE */ "Actual object declaration:",
+/* ASL_MSG_DUPLICATE_EXTERN_MISMATCH */ "Type mismatch between multiple external declarations detected",
+/* ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE */"Duplicate external declaration:",
+/* ASL_MSG_CONDREF_NEEDS_EXTERNAL_DECL */"CondRefOf parameter requires External() declaration",
+/* ASL_MSG_EXTERNAL_FOUND_HERE */ "External declaration below ",
+/* ASL_MSG_LOWER_CASE_NAMESEG */ "At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case",
+/* ASL_MSG_LOWER_CASE_NAMEPATH */ "At least one lower case letter found in NamePath, ASL is case insensitive - converting to upper case",
+/* ASL_MSG_UUID_NOT_FOUND */ "Unknown UUID string",
+/* ASL_MSG_LEGACY_DDB_TYPE */ "DDBHandleObj has been deprecated along with the Unload operator. DDBHandlObj objects are only used in Unload"
};
/* Table compiler */
@@ -273,14 +293,18 @@
/* ASL_MSG_INVALID_FIELD_NAME */ "Invalid Field Name",
/* ASL_MSG_INVALID_HEX_INTEGER */ "Invalid hex integer constant",
/* ASL_MSG_OEM_TABLE */ "OEM table - unknown contents",
-/* ASL_MSG_RESERVED_VALUE */ "Reserved field",
+/* ASL_MSG_RESERVED_FIELD */ "Reserved field",
/* ASL_MSG_UNKNOWN_LABEL */ "Label is undefined",
/* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type",
/* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature",
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero",
/* ASL_MSG_INVALID_LABEL */ "Invalid field label detected",
/* ASL_MSG_BUFFER_LIST */ "Invalid buffer initializer list",
-/* ASL_MSG_ENTRY_LIST */ "Invalid entry initializer list"
+/* ASL_MSG_ENTRY_LIST */ "Invalid entry initializer list",
+/* ASL_MSG_UNKNOWN_FORMAT */ "Unknown format value",
+/* ASL_MSG_RESERVED_VALUE */ "Value for field is reserved or unknown",
+/* ASL_MSG_TWO_ZERO_VALUES */ "32-bit DSDT Address and 64-bit X_DSDT Address cannot both be zero",
+/* ASL_MSG_BAD_PARSE_TREE */ "Parse tree appears to be ill-defined"
};
/* Preprocessor */
@@ -332,7 +356,7 @@
if (Index >= ACPI_ARRAY_LENGTH (AslCompilerMsgs))
{
- return ("[Unknown ASL Compiler exception ID]");
+ return ("[Unknown iASL Compiler exception ID]");
}
}
@@ -345,7 +369,7 @@
if (Index >= ACPI_ARRAY_LENGTH (AslTableCompilerMsgs))
{
- return ("[Unknown Table Compiler exception ID]");
+ return ("[Unknown iASL Table Compiler exception ID]");
}
}
@@ -358,7 +382,7 @@
if (Index >= ACPI_ARRAY_LENGTH (AslPreprocessorMsgs))
{
- return ("[Unknown Preprocessor exception ID]");
+ return ("[Unknown iASL Preprocessor exception ID]");
}
}
@@ -366,7 +390,7 @@
else
{
- return ("[Unknown exception/component ID]");
+ return ("[Unknown iASL exception ID]");
}
return (MessageTable[Index]);
@@ -434,3 +458,79 @@
*/
return (((Level + 1) * 1000) + MessageId);
}
+
+
+#ifdef ACPI_HELP_APP
+/*******************************************************************************
+ *
+ * FUNCTION: AhDecodeAslException
+ *
+ * PARAMETERS: HexString - iASL status string from command line, in
+ * hex. If null, display all exceptions.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Decode and display an iASL exception code. Note1: a
+ * NULL string for HexString displays all known iASL exceptions. Note2:
+ * implements the -x option for AcpiHelp.
+ *
+ ******************************************************************************/
+
+#define AH_DISPLAY_ASL_EXCEPTION_TEXT(Status, Exception) \
+ printf ("%.4X: %s\n", Status, Exception)
+
+#define AH_DISPLAY_EXCEPTION(Status, Name) \
+ printf ("%.4X: %s\n", Status, Name)
+
+
+void
+AhDecodeAslException (
+ char *HexString)
+{
+ UINT32 i;
+ UINT32 MessageId;
+ const char *OneException;
+ UINT32 Index = 1;
+
+
+ /*
+ * A null input string means to decode and display all known
+ * exception codes.
+ */
+ if (!HexString)
+ {
+ printf ("All defined iASL exception codes:\n\n");
+ printf ("Main iASL exceptions:\n\n");
+ AH_DISPLAY_EXCEPTION (0,
+ "AE_OK (No error occurred)");
+
+ /* Display codes in each block of exception types */
+
+ for (i = 1; Index < ACPI_ARRAY_LENGTH (AslCompilerMsgs); i++, Index++)
+ {
+ AH_DISPLAY_ASL_EXCEPTION_TEXT (Index, AslCompilerMsgs[i]);
+ }
+
+ printf ("\niASL Table Compiler exceptions:\n\n");
+ Index = ASL_MSG_TABLE_COMPILER;
+ for (i = 0; i < ACPI_ARRAY_LENGTH (AslTableCompilerMsgs); i++, Index++)
+ {
+ AH_DISPLAY_ASL_EXCEPTION_TEXT (Index, AslTableCompilerMsgs[i]);
+ }
+
+ printf ("\niASL Preprocessor exceptions:\n\n");
+ Index = ASL_MSG_PREPROCESSOR;
+ for (i = 0; i < ACPI_ARRAY_LENGTH (AslPreprocessorMsgs); i++, Index++)
+ {
+ AH_DISPLAY_ASL_EXCEPTION_TEXT (Index, AslPreprocessorMsgs[i]);
+ }
+ return;
+ }
+
+ /* HexString is valid - convert it to a MessageId and decode it */
+
+ MessageId = strtol (HexString, NULL, 16);
+ OneException = AeDecodeMessageId ((UINT16) MessageId);
+ AH_DISPLAY_ASL_EXCEPTION_TEXT (MessageId, OneException);
+}
+#endif
diff --git a/source/compiler/aslmessages.h b/source/compiler/aslmessages.h
index d76c164..0d52561 100644
--- a/source/compiler/aslmessages.h
+++ b/source/compiler/aslmessages.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -40,7 +44,6 @@
#ifndef __ASLMESSAGES_H
#define __ASLMESSAGES_H
-
/* These values must match error type string tables in aslmessages.c */
typedef enum
@@ -55,9 +58,12 @@
} ASL_MESSAGE_TYPES;
-
#define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings for types above */
+void
+AhDecodeAslException (
+ char *HexString);
+
/*
* Exception code blocks, 0 - 999
* Available for new exception blocks: 600 - 999
@@ -261,6 +267,22 @@
ASL_MSG_LEGACY_PROCESSOR_OP,
ASL_MSG_NAMESTRING_LENGTH,
ASL_MSG_CASE_FOUND_HERE,
+ ASL_MSG_EXTERN_INVALID_RET_TYPE,
+ ASL_MSG_EXTERN_INVALID_PARAM_TYPE,
+ ASL_MSG_NAMED_OBJECT_CREATION,
+ ASL_MSG_ARG_COUNT_MISMATCH,
+ ASL_MSG_STATIC_OPREGION_IN_METHOD,
+ ASL_MSG_DECLARATION_TYPE_MISMATCH,
+ ASL_MSG_TYPE_MISMATCH_FOUND_HERE,
+ ASL_MSG_DUPLICATE_EXTERN_MISMATCH,
+ ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE,
+ ASL_MSG_CONDREF_NEEDS_EXTERNAL_DECL,
+ ASL_MSG_EXTERNAL_FOUND_HERE,
+ ASL_MSG_LOWER_CASE_NAMESEG,
+ ASL_MSG_LOWER_CASE_NAMEPATH,
+ ASL_MSG_UUID_NOT_FOUND,
+ ASL_MSG_LEGACY_DDB_TYPE,
+
/* These messages are used by the Data Table compiler only */
@@ -272,7 +294,7 @@
ASL_MSG_INVALID_FIELD_NAME,
ASL_MSG_INVALID_HEX_INTEGER,
ASL_MSG_OEM_TABLE,
- ASL_MSG_RESERVED_VALUE,
+ ASL_MSG_RESERVED_FIELD,
ASL_MSG_UNKNOWN_LABEL,
ASL_MSG_UNKNOWN_SUBTABLE,
ASL_MSG_UNKNOWN_TABLE,
@@ -280,6 +302,10 @@
ASL_MSG_INVALID_LABEL,
ASL_MSG_BUFFER_LIST,
ASL_MSG_ENTRY_LIST,
+ ASL_MSG_UNKNOWN_FORMAT,
+ ASL_MSG_RESERVED_VALUE,
+ ASL_MSG_TWO_ZERO_VALUES,
+ ASL_MSG_BAD_PARSE_TREE,
/* These messages are used by the Preprocessor only */
diff --git a/source/compiler/aslmethod.c b/source/compiler/aslmethod.c
index 889e507..0b586d5 100644
--- a/source/compiler/aslmethod.c
+++ b/source/compiler/aslmethod.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -39,6 +43,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
+#include "acnamesp.h"
#include "acparser.h"
#include "amlcode.h"
@@ -54,6 +59,10 @@
ACPI_PARSE_OBJECT *Op,
ASL_METHOD_INFO *MethodInfo);
+static void
+MtCheckStaticOperationRegionInMethod (
+ ACPI_PARSE_OBJECT *Op);
+
/*******************************************************************************
*
@@ -85,10 +94,13 @@
char ArgName[] = "Arg0";
ACPI_PARSE_OBJECT *ArgNode;
ACPI_PARSE_OBJECT *NextType;
- ACPI_PARSE_OBJECT *NextParamType;
UINT8 ActualArgs = 0;
BOOLEAN HidExists;
BOOLEAN AdrExists;
+ BOOLEAN PrsExists;
+ BOOLEAN CrsExists;
+ BOOLEAN SrsExists;
+ BOOLEAN DisExists;
/* Build cross-reference output file if requested */
@@ -170,50 +182,38 @@
Next = Next->Asl.Next;
NextType = Next->Asl.Child;
- while (NextType)
- {
- /* Get and map each of the ReturnTypes */
- MethodInfo->ValidReturnTypes |= AnMapObjTypeToBtype (NextType);
- NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
- NextType = NextType->Asl.Next;
- }
+ MethodInfo->ValidReturnTypes = MtProcessTypeOp (NextType);
+ Op->Asl.AcpiBtype |= MethodInfo->ValidReturnTypes;
/* Get the ParameterType node */
Next = Next->Asl.Next;
NextType = Next->Asl.Child;
- while (NextType)
+ if (!NextType)
{
- if (NextType->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
- {
- NextParamType = NextType->Asl.Child;
- while (NextParamType)
- {
- MethodInfo->ValidArgTypes[ActualArgs] |=
- AnMapObjTypeToBtype (NextParamType);
-
- NextParamType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
- NextParamType = NextParamType->Asl.Next;
- }
- }
- else
- {
- MethodInfo->ValidArgTypes[ActualArgs] =
- AnMapObjTypeToBtype (NextType);
-
- NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
- ActualArgs++;
- }
-
- NextType = NextType->Asl.Next;
+ /*
+ * The optional parameter types list was omitted at the source
+ * level. Use the Argument count parameter instead.
+ */
+ ActualArgs = MethodInfo->NumArguments;
+ }
+ else
+ {
+ ActualArgs = MtProcessParameterTypeList (NextType,
+ MethodInfo->ValidArgTypes);
+ MethodInfo->NumArguments = ActualArgs;
+ ArgNode->Asl.Value.Integer |= ActualArgs;
}
if ((MethodInfo->NumArguments) &&
(MethodInfo->NumArguments != ActualArgs))
{
- /* error: Param list did not match number of args */
+ sprintf (AslGbl_MsgBuffer,
+ "Length = %u", ActualArgs);
+ AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_MISMATCH,
+ Op->Asl.Child->Asl.Next, AslGbl_MsgBuffer);
}
/* Allow numarguments == 0 for Function() */
@@ -432,8 +432,8 @@
if (!HidExists && !AdrExists)
{
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "Device object requires a _HID or _ADR in same scope");
+ AslError (ASL_ERROR, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device object requires a _HID or _ADR");
}
else if (HidExists && AdrExists)
{
@@ -445,6 +445,63 @@
AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
"Device object requires either a _HID or _ADR, but not both");
}
+
+ /*
+ * Check usage of _CRS, _DIS, _PRS, and _SRS objects (July 2021).
+ *
+ * Under the Device Object:
+ *
+ * 1) If _PRS present, must have _CRS and _SRS
+ * 2) If _SRS present, must have _PRS (_PRS requires _CRS and _SRS)
+ * 3) If _DIS present, must have _SRS (_SRS requires _PRS, _PRS requires _CRS and _SRS)
+ * 4) If _SRS present, probably should have a _DIS (Remark only)
+ */
+ CrsExists = ApFindNameInDeviceTree (METHOD_NAME__CRS, Op);
+ DisExists = ApFindNameInDeviceTree (METHOD_NAME__DIS, Op);
+ PrsExists = ApFindNameInDeviceTree (METHOD_NAME__PRS, Op);
+ SrsExists = ApFindNameInDeviceTree (METHOD_NAME__SRS, Op);
+
+ /* 1) If _PRS is present, must have a _CRS and _SRS */
+
+ if (PrsExists)
+ {
+ if (!CrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _PRS, missing a _CRS, required");
+ }
+ if (!SrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _PRS, missing a _SRS, required");
+ }
+ }
+
+ /* 2) If _SRS is present, must have _PRS (_PRS requires _CRS and _SRS) */
+
+ if ((SrsExists) && (!PrsExists))
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _SRS, missing a _PRS, required");
+ }
+
+ /* 3) If _DIS is present, must have a _SRS */
+
+ if ((DisExists) && (!SrsExists))
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _DIS, missing a _SRS, required");
+ }
+
+ /*
+ * 4) If _SRS is present, should have a _DIS (_PRS requires _CRS
+ * and _SRS) Remark only.
+ */
+ if ((SrsExists) && (!DisExists))
+ {
+ AslError (ASL_REMARK, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _SRS, no corresponding _DIS");
+ }
break;
case PARSEOP_EVENT:
@@ -464,6 +521,8 @@
AslError (ASL_ERROR, ASL_MSG_RESERVED_USE,
Op, Op->Asl.ExternalName);
}
+
+ MtCheckStaticOperationRegionInMethod (Op);
break;
case PARSEOP_NAME:
@@ -518,6 +577,81 @@
/*******************************************************************************
*
+ * FUNCTION: MtProcessTypeOp
+ *
+ * PARAMETERS: Op - Op representing a btype
+ *
+ * RETURN: Btype represented by Op
+ *
+ * DESCRIPTION: Process a parse object that represents single parameter type or
+ * a return type in method, function, and external declarations.
+ *
+ ******************************************************************************/
+
+UINT32
+MtProcessTypeOp (
+ ACPI_PARSE_OBJECT *TypeOp)
+{
+ UINT32 Btype = ACPI_BTYPE_ANY;
+
+
+ while (TypeOp)
+ {
+ Btype |= AnMapObjTypeToBtype (TypeOp);
+ TypeOp->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+ TypeOp = TypeOp->Asl.Next;
+ }
+
+ return (Btype);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: MtProcessParameterTypeList
+ *
+ * PARAMETERS: Op - Op representing a btype
+ *
+ * RETURN: Btype represented by Op
+ *
+ * DESCRIPTION: Process a parse object that represents a parameter type list in
+ * method, function, and external declarations.
+ *
+ ******************************************************************************/
+
+UINT8
+MtProcessParameterTypeList (
+ ACPI_PARSE_OBJECT *ParamTypeOp,
+ UINT32 *TypeList)
+{
+ UINT8 ParameterCount = 0;
+
+
+ if (ParamTypeOp && ParamTypeOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
+ {
+ /* Special case for a single parameter without braces */
+
+ TypeList[ParameterCount] =
+ MtProcessTypeOp (ParamTypeOp);
+
+ return (1);
+ }
+
+ while (ParamTypeOp)
+ {
+ TypeList[ParameterCount] =
+ MtProcessTypeOp (ParamTypeOp->Asl.Child);
+
+ ParameterCount++;
+ ParamTypeOp = ParamTypeOp->Asl.Next;
+ }
+
+ return (ParameterCount);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: MtCheckNamedObjectInMethod
*
* PARAMETERS: Op - Current parser op
@@ -537,6 +671,7 @@
ASL_METHOD_INFO *MethodInfo)
{
const ACPI_OPCODE_INFO *OpInfo;
+ char *ExternalPath;
/* We don't care about actual method declarations or scopes */
@@ -555,34 +690,107 @@
}
OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode);
- if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
+ if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) && (Op->Asl.AmlOpcode != AML_FIELD_OP))
{
/*
* 1) Mark the method as a method that creates named objects.
*
- * 2) If the method is non-serialized, emit a remark that the method
+ * 2) Issue a remark indicating the inefficiency of creating named
+ * objects within a method (Except for compiler-emitted temporary
+ * variables).
+ *
+ * 3) If the method is non-serialized, emit a remark that the method
* should be serialized.
*
* Reason: If a thread blocks within the method for any reason, and
* another thread enters the method, the method will fail because
* an attempt will be made to create the same object twice.
+ *
+ * Note: The Field opcode is disallowed here because Field() does not
+ * create a new named object.
*/
+ ExternalPath = AcpiNsGetNormalizedPathname (MethodInfo->Op->Asl.Node, TRUE);
+
+ /* No error for compiler temp variables (name starts with "_T_") */
+
+ if ((Op->Asl.NameSeg[0] != '_') &&
+ (Op->Asl.NameSeg[1] != 'T') &&
+ (Op->Asl.NameSeg[2] != '_'))
+ {
+ AslError (ASL_REMARK, ASL_MSG_NAMED_OBJECT_CREATION, Op,
+ ExternalPath);
+ }
+
MethodInfo->CreatesNamedObjects = TRUE;
if (!MethodInfo->ShouldBeSerialized)
{
AslError (ASL_REMARK, ASL_MSG_SERIALIZED_REQUIRED, MethodInfo->Op,
- "due to creation of named objects within");
+ ExternalPath);
/* Emit message only ONCE per method */
MethodInfo->ShouldBeSerialized = TRUE;
}
+
+ if (ExternalPath)
+ {
+ ACPI_FREE (ExternalPath);
+ }
}
}
/*******************************************************************************
*
+ * FUNCTION: MtCheckStaticOperationRegionInMethod
+ *
+ * PARAMETERS: Op - Current parser op
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Warns if an Operation Region with static address or length
+ * is declared inside a control method
+ *
+ ******************************************************************************/
+
+static void
+MtCheckStaticOperationRegionInMethod(
+ ACPI_PARSE_OBJECT* Op)
+{
+ ACPI_PARSE_OBJECT* AddressOp;
+ ACPI_PARSE_OBJECT* LengthOp;
+
+
+ if (Op->Asl.ParseOpcode != PARSEOP_OPERATIONREGION)
+ {
+ return;
+ }
+
+ /*
+ * OperationRegion should have 4 arguments defined. At this point, we
+ * assume that the parse tree is well-formed.
+ */
+ AddressOp = Op->Asl.Child->Asl.Next->Asl.Next;
+ LengthOp = Op->Asl.Child->Asl.Next->Asl.Next->Asl.Next;
+
+ if (UtGetParentMethodOp (Op) &&
+ AddressOp->Asl.ParseOpcode == PARSEOP_INTEGER &&
+ LengthOp->Asl.ParseOpcode == PARSEOP_INTEGER)
+ {
+ /*
+ * At this point, a static operation region declared inside of a
+ * control method has been found. Throw a warning because this is
+ * highly inefficient.
+ */
+ AslError(ASL_WARNING, ASL_MSG_STATIC_OPREGION_IN_METHOD, Op, NULL);
+ }
+
+ return;
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: MtMethodAnalysisWalkEnd
*
* PARAMETERS: ASL_WALK_CALLBACK
@@ -602,6 +810,7 @@
{
ASL_ANALYSIS_WALK_INFO *WalkInfo = (ASL_ANALYSIS_WALK_INFO *) Context;
ASL_METHOD_INFO *MethodInfo = WalkInfo->MethodStack;
+ char *ExternalPath;
switch (Op->Asl.ParseOpcode)
@@ -654,8 +863,15 @@
if (MethodInfo->NumReturnNoValue &&
MethodInfo->NumReturnWithValue)
{
+ ExternalPath = AcpiNsGetNormalizedPathname (Op->Asl.Node, TRUE);
+
AslError (ASL_WARNING, ASL_MSG_RETURN_TYPES, Op,
- Op->Asl.ExternalName);
+ ExternalPath);
+
+ if (ExternalPath)
+ {
+ ACPI_FREE (ExternalPath);
+ }
}
/*
diff --git a/source/compiler/aslnamesp.c b/source/compiler/aslnamesp.c
index ddc24d6..f9b2ab1 100644
--- a/source/compiler/aslnamesp.c
+++ b/source/compiler/aslnamesp.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -114,8 +118,8 @@
/* File header */
- FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Contents of ACPI Namespace\n\n");
- FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Count Depth Name - Type\n\n");
+ FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Contents of ACPI Namespace\n\n"
+ "Count Depth Name - Type\n\n");
/* Walk entire namespace from the root */
@@ -127,14 +131,21 @@
return (Status);
}
- /* Print the full pathname for each namespace node */
+ /* Print the full pathname for each namespace node in the common namespace */
- FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
+ FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
+ "\nNamespace pathnames and where declared:\n"
+ "<NamePath, Object type, Containing file, Line number within file>\n\n");
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL,
NULL, NULL);
+ /*
+ * We just dumped the entire common namespace, we don't want to do it
+ * again for other input files.
+ */
+ AslGbl_NsOutputFlag = FALSE;
return (Status);
}
@@ -400,7 +411,8 @@
*
* RETURN: Status
*
- * DESCRIPTION: Print the full pathname for a namespace node.
+ * DESCRIPTION: Print the full pathname and additional info for a namespace
+ * node.
*
******************************************************************************/
@@ -416,6 +428,13 @@
ACPI_BUFFER TargetPath;
+ /* Ignore predefined namespace nodes and External declarations */
+
+ if (!Node->Op || (Node->Flags & ANOBJ_IS_EXTERNAL))
+ {
+ return (AE_OK);
+ }
+
TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
Status = AcpiNsHandleToPathname (Node, &TargetPath, FALSE);
if (ACPI_FAILURE (Status))
@@ -423,8 +442,15 @@
return (Status);
}
- FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s\n",
- ACPI_CAST_PTR (char, TargetPath.Pointer));
+ /*
+ * Print the full pathname (and other information)
+ * for each namespace node in the common namespace
+ */
+ FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%-41s %-12s %s, %u\n",
+ ACPI_CAST_PTR (char, TargetPath.Pointer),
+ AcpiUtGetTypeName (Node->Type),
+ Node->Op->Asl.Filename, Node->Op->Asl.LogicalLineNumber);
+
ACPI_FREE (TargetPath.Pointer);
return (AE_OK);
}
diff --git a/source/compiler/asloffset.c b/source/compiler/asloffset.c
index 36ca4c3..db2fa20 100644
--- a/source/compiler/asloffset.c
+++ b/source/compiler/asloffset.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c
index 11c04d4..87fbf61 100644
--- a/source/compiler/aslopcodes.c
+++ b/source/compiler/aslopcodes.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -564,7 +568,7 @@
* Bits 4-0 - 3rd character of mfg code
* Byte 2: Bits 7-4 - 1st hex digit of product number
* Bits 3-0 - 2nd hex digit of product number
- * Byte 3: Bits 7-4 - 3st hex digit of product number
+ * Byte 3: Bits 7-4 - 3rd hex digit of product number
* Bits 3-0 - Hex digit of the revision number
*
******************************************************************************/
@@ -686,7 +690,13 @@
}
else
{
+ /* Convert UUID string to a buffer, check for a known UUID */
+
AcpiUtConvertStringToUuid (InString, Buffer);
+ if (!AcpiAhMatchUuid (Buffer))
+ {
+ AslError (ASL_REMARK, ASL_MSG_UUID_NOT_FOUND, Op, NULL);
+ }
}
/* Change Op to a Buffer */
diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c
index 2941484..0575ab2 100644
--- a/source/compiler/asloperands.c
+++ b/source/compiler/asloperands.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -317,6 +321,11 @@
Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
}
+#ifdef _OBSOLETE_CODE
+ /*
+ * January 2022: removed this check due to complaints by users
+ * for too many (invalid) remarks.
+ */
else if (NewBitOffset == CurrentBitOffset)
{
/*
@@ -347,6 +356,7 @@
CurrentBitOffset = NewBitOffset;
}
}
+#endif
else
{
/*
@@ -978,7 +988,7 @@
* Use the definition block file parameter instead of the input
* filename. Since all files were opened previously, remove the
* existing file and open a new file with the name of this
- * definiton block parameter. Since AML code generation has yet
+ * definition block parameter. Since AML code generation has yet
* to happen, the previous file can be removed without any impacts.
*/
FlCloseFile (ASL_FILE_AML_OUTPUT);
diff --git a/source/compiler/aslopt.c b/source/compiler/aslopt.c
index f542afd..77949c1 100644
--- a/source/compiler/aslopt.c
+++ b/source/compiler/aslopt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asloptions.c b/source/compiler/asloptions.c
index a8a4073..2d2ebaf 100644
--- a/source/compiler/asloptions.c
+++ b/source/compiler/asloptions.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -40,6 +44,7 @@
#include "aslcompiler.h"
#include "acapps.h"
#include "acdisasm.h"
+#include "acglobal.h"
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("asloption")
@@ -64,7 +69,7 @@
#define ASL_TOKEN_SEPARATORS " \t\n"
-#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|t|T+G^v^w|x:z"
+#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|:t|T+G^v^w|x:z"
/*******************************************************************************
@@ -158,7 +163,7 @@
BOOLEAN IsResponseFile)
{
ACPI_STATUS Status;
- UINT32 j;
+ INT32 j;
/* Get the command line options */
@@ -254,7 +259,6 @@
{
return (-1);
}
-
AslGbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
@@ -333,6 +337,28 @@
AcpiGbl_CstyleDisassembly = FALSE;
break;
+ case 's': /* Specify table signature (Only supported for CDAT table) */
+
+ /* Get the required argument */
+
+ if (AcpiGetoptArgument (argc, argv))
+ {
+ return (-1);
+ }
+
+ /* Check for exact string "CDAT" (upper or lower case) */
+
+ AcpiGbl_CDAT = ACPI_CAST_PTR (char, &AcpiGbl_Optarg);
+ if (AcpiUtStricmp (AcpiGbl_Optarg, ACPI_SIG_CDAT))
+ {
+ printf ("\nUnknown table signature: %s\n", AcpiGbl_Optarg);
+ return (-1);
+ }
+
+ AcpiGbl_CDAT = malloc (5);
+ AcpiUtSafeStrncpy ((char *) AcpiGbl_CDAT, ACPI_SIG_CDAT, 5);
+ break;
+
default:
printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
@@ -725,7 +751,7 @@
AslGbl_HexOutputFlag = HEX_OUTPUT_C;
break;
- case 'p': /* data table flex/bison prototype */
+ case 'p': /* data table flex/bison prototype */
AslGbl_DtLexBisonPrototype = TRUE;
break;
@@ -836,7 +862,7 @@
return (-1);
}
- Status = AslExpectException (AcpiGbl_Optarg);
+ Status = AslLogExpectedException (AcpiGbl_Optarg);
if (ACPI_FAILURE (Status))
{
return (-1);
diff --git a/source/compiler/aslparseop.c b/source/compiler/aslparseop.c
index e03b40f..f6dc92b 100644
--- a/source/compiler/aslparseop.c
+++ b/source/compiler/aslparseop.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -276,6 +280,8 @@
UINT64 Value)
{
ACPI_PARSE_OBJECT *Op;
+ UINT32 i;
+ char *StringPtr = NULL;
Op = TrAllocateOp (ParseOpcode);
@@ -296,11 +302,35 @@
case PARSEOP_NAMESEG:
+ /* Check for mixed case (or all lower case). Issue a remark in this case */
+
+ for (i = 0; i < ACPI_NAMESEG_SIZE; i++)
+ {
+ if (islower ((int) Op->Asl.Value.Name[i]))
+ {
+ AcpiUtStrupr (&Op->Asl.Value.Name[i]);
+ AslError (ASL_REMARK, ASL_MSG_LOWER_CASE_NAMESEG, Op, Op->Asl.Value.Name);
+ break;
+ }
+ }
DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Op->Asl.Value.String);
break;
case PARSEOP_NAMESTRING:
+ /* Check for mixed case (or all lower case). Issue a remark in this case */
+
+ StringPtr = Op->Asl.Value.Name;
+ for (i = 0; *StringPtr; i++)
+ {
+ if (islower ((int) *StringPtr))
+ {
+ AcpiUtStrupr (&Op->Asl.Value.Name[i]);
+ AslError (ASL_REMARK, ASL_MSG_LOWER_CASE_NAMEPATH, Op, Op->Asl.Value.Name);
+ break;
+ }
+ StringPtr++;
+ }
DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Op->Asl.Value.String);
break;
@@ -631,13 +661,18 @@
/* Get a copy of the current time */
+ Op->Asl.Value.String = "";
CurrentTime = time (NULL);
- StaticTimeString = ctime (&CurrentTime);
- TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
- strcpy (TimeString, StaticTimeString);
- TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
- Op->Asl.Value.String = TimeString;
+ StaticTimeString = ctime (&CurrentTime);
+ if (StaticTimeString)
+ {
+ TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
+ strcpy (TimeString, StaticTimeString);
+
+ TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
+ Op->Asl.Value.String = TimeString;
+ }
break;
default: /* This would be an internal error */
diff --git a/source/compiler/aslparser.y b/source/compiler/aslparser.y
index 5b3c54c..7fc3a74 100644
--- a/source/compiler/aslparser.y
+++ b/source/compiler/aslparser.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -96,7 +100,7 @@
* These shift/reduce conflicts are expected. There should be zero
* reduce/reduce conflicts.
*/
-%expect 124
+%expect 127
/*! [Begin] no source code translation */
diff --git a/source/compiler/aslpld.c b/source/compiler/aslpld.c
index 225a898..2be7133 100644
--- a/source/compiler/aslpld.c
+++ b/source/compiler/aslpld.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslpredef.c b/source/compiler/aslpredef.c
index 63d7ad9..466d938 100644
--- a/source/compiler/aslpredef.c
+++ b/source/compiler/aslpredef.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -451,7 +455,7 @@
if (Name[0] == 0)
{
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
- "zero length name found");
+ "Zero length name found");
}
/* All reserved names are prefixed with a single underscore */
@@ -562,7 +566,7 @@
/*
* Was not actually emitted by the compiler. This is a special case,
* however. If the ASL code being compiled was the result of a
- * dissasembly, it may possibly contain valid compiler-emitted names
+ * disassembly, it may possibly contain valid compiler-emitted names
* of the form "_T_x". We don't want to issue an error or even a
* warning and force the user to manually change the names. So, we
* will issue a remark instead.
diff --git a/source/compiler/aslprepkg.c b/source/compiler/aslprepkg.c
index 5beea6a..86ce74c 100644
--- a/source/compiler/aslprepkg.c
+++ b/source/compiler/aslprepkg.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -206,6 +210,17 @@
*/
for (i = 0; i < Count; i++)
{
+ if (!Op)
+ {
+ /*
+ * If we get to this point, it means that the package length
+ * is larger than the initializer list. Stop processing the
+ * package and return because we have run out of package
+ * elements to analyze.
+ */
+ return;
+ }
+
ApCheckObjectType (Predefined->Info.Name, Op,
Package->RetInfo.ObjectType1, i);
Op = Op->Asl.Next;
@@ -805,7 +820,7 @@
UINT32 ExpectedCount)
{
- sprintf (AslGbl_MsgBuffer, "%s: length %u, required minimum is %u",
+ sprintf (AslGbl_MsgBuffer, "%4.4s: length %u, required minimum is %u",
PredefinedName, Count, ExpectedCount);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
@@ -834,7 +849,7 @@
ACPI_PARSE_OBJECT *Op)
{
- sprintf (AslGbl_MsgBuffer, "%s: length is zero", PredefinedName);
+ sprintf (AslGbl_MsgBuffer, "%4.4s: length is zero", PredefinedName);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
}
@@ -863,7 +878,7 @@
UINT32 ExpectedCount)
{
- sprintf (AslGbl_MsgBuffer, "%s: length is %u, only %u required",
+ sprintf (AslGbl_MsgBuffer, "%4.4s: length is %u, only %u required",
PredefinedName, Count, ExpectedCount);
AslError (ASL_REMARK, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
diff --git a/source/compiler/aslprimaries.y b/source/compiler/aslprimaries.y
index c59708f..e31612b 100644
--- a/source/compiler/aslprimaries.y
+++ b/source/compiler/aslprimaries.y
@@ -8,7 +8,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,10 +26,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -388,7 +392,7 @@
EISAIDTerm
: PARSEOP_EISAID
PARSEOP_OPEN_PAREN
- StringData
+ StringLiteral
PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_EISAID, $3);}
| PARSEOP_EISAID
PARSEOP_OPEN_PAREN
@@ -523,7 +527,7 @@
: PARSEOP_FPRINTF
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FPRINTF);}
TermArg ','
- StringData
+ StringLiteral
PrintfArgList
PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
| PARSEOP_FPRINTF
@@ -551,7 +555,7 @@
PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON; }
TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
- TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL),
TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),$5,$6,$10);}
| PARSEOP_FUNCTION
@@ -731,7 +735,7 @@
: PARSEOP_LOAD
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOAD);}
NameString
- RequiredTarget
+ Target
PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LOAD
PARSEOP_OPEN_PAREN
@@ -979,7 +983,7 @@
PrintfTerm
: PARSEOP_PRINTF
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PRINTF);}
- StringData
+ StringLiteral
PrintfArgList
PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_PRINTF
@@ -1300,7 +1304,7 @@
ToUUIDTerm
: PARSEOP_TOUUID
PARSEOP_OPEN_PAREN
- StringData
+ StringLiteral
PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_TOUUID, $3);}
| PARSEOP_TOUUID
PARSEOP_OPEN_PAREN
@@ -1310,7 +1314,7 @@
UnicodeTerm
: PARSEOP_UNICODE
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNICODE);}
- StringData
+ StringLiteral
PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,0,$4);}
| PARSEOP_UNICODE
PARSEOP_OPEN_PAREN
diff --git a/source/compiler/aslprintf.c b/source/compiler/aslprintf.c
index bc7243b..a978aa8 100644
--- a/source/compiler/aslprintf.c
+++ b/source/compiler/aslprintf.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -240,7 +244,7 @@
/*
* Append an empty string if the first argument is
- * not a string. This will implicitly conver the 2nd
+ * not a string. This will implicitly convert the 2nd
* concat source to a string per the ACPI specification.
*/
if (!Op->Asl.Child)
diff --git a/source/compiler/aslprune.c b/source/compiler/aslprune.c
index 1d31082..66a20ee 100644
--- a/source/compiler/aslprune.c
+++ b/source/compiler/aslprune.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslresource.c b/source/compiler/aslresource.c
index b4fcd31..cd2c62f 100644
--- a/source/compiler/aslresource.c
+++ b/source/compiler/aslresource.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -878,6 +882,11 @@
Rnode = RsDoUartSerialBusDescriptor (Info);
break;
+ case PARSEOP_CSI2_SERIALBUS:
+
+ Rnode = RsDoCsi2SerialBusDescriptor (Info);
+ break;
+
case PARSEOP_PINCONFIG:
Rnode = RsDoPinConfigDescriptor (Info);
diff --git a/source/compiler/aslresources.y b/source/compiler/aslresources.y
index c973999..4c88916 100644
--- a/source/compiler/aslresources.y
+++ b/source/compiler/aslresources.y
@@ -8,7 +8,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,10 +26,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -78,7 +82,8 @@
;
ResourceMacroTerm
- : DMATerm {}
+ : Csi2SerialBusTerm {}
+ | DMATerm {}
| DWordIOTerm {}
| DWordMemoryTerm {}
| DWordSpaceTerm {}
@@ -121,6 +126,23 @@
| WordSpaceTerm {}
;
+Csi2SerialBusTerm
+ : PARSEOP_CSI2_SERIALBUS
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CSI2_SERIALBUS);}
+ OptionalSlaveMode_First {UtCheckIntegerRange ($4, 0x00, 0x01);} /* 04: SlaveMode */
+ ',' ByteConstExpr {UtCheckIntegerRange ($7, 0x00, 0x03);} /* 07: PhyType */
+ OptionalByteConstExpr {UtCheckIntegerRange ($9, 0x00, 0xFC);} /* 09: LocalPortInstance */
+ ',' StringData /* 12: ResourceSource */
+ ',' ByteConstExpr /* 14: ResourceSourceIndex */
+ OptionalResourceType /* 15; ResourceType (ResourceUsage) */
+ OptionalNameString /* 16: DescriptorName */
+ OptionalBuffer_Last /* 17: VendorData */
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,8,
+ $4,$7,$9,$12,$14,$15,$16,$17);}
+ | PARSEOP_CSI2_SERIALBUS
+ PARSEOP_OPEN_PAREN
+ error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
+
DMATerm
: PARSEOP_DMA
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DMA);}
diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c
index 37706f2..64cf07a 100644
--- a/source/compiler/aslrestype1.c
+++ b/source/compiler/aslrestype1.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c
index 0edcc04..78a75ae 100644
--- a/source/compiler/aslrestype1i.c
+++ b/source/compiler/aslrestype1i.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c
index a13535c..928114c 100644
--- a/source/compiler/aslrestype2.c
+++ b/source/compiler/aslrestype2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c
index 81d90a0..55928e5 100644
--- a/source/compiler/aslrestype2d.c
+++ b/source/compiler/aslrestype2d.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c
index 75a786d..8f4c34c 100644
--- a/source/compiler/aslrestype2e.c
+++ b/source/compiler/aslrestype2e.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c
index eae9b1f..d9c24a9 100644
--- a/source/compiler/aslrestype2q.c
+++ b/source/compiler/aslrestype2q.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c
index 5615eeb..6f989ab 100644
--- a/source/compiler/aslrestype2s.c
+++ b/source/compiler/aslrestype2s.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -1277,6 +1281,142 @@
/*******************************************************************************
*
+ * FUNCTION: RsDoCsi2SerialBusDescriptor
+ *
+ * PARAMETERS: Info - Parse Op and resource template offset
+ *
+ * RETURN: Completed resource node
+ *
+ * DESCRIPTION: Construct a long "Csi2SerialBus" descriptor
+ *
+ ******************************************************************************/
+
+ASL_RESOURCE_NODE *
+RsDoCsi2SerialBusDescriptor (
+ ASL_RESOURCE_INFO *Info)
+{
+ AML_RESOURCE *Descriptor;
+ ACPI_PARSE_OBJECT *InitializerOp;
+ ASL_RESOURCE_NODE *Rnode;
+ char *ResourceSource = NULL;
+ UINT8 *VendorData = NULL;
+ UINT16 ResSourceLength;
+ UINT16 VendorLength;
+ UINT16 DescriptorSize;
+ UINT32 CurrentByteOffset;
+ UINT32 i;
+
+
+ InitializerOp = Info->DescriptorTypeOp->Asl.Child;
+ CurrentByteOffset = Info->CurrentByteOffset;
+
+ /*
+ * Calculate lengths for fields that have variable length:
+ * 1) Resource Source string
+ * 2) Vendor Data buffer
+ */
+ ResSourceLength = RsGetStringDataLength (InitializerOp);
+ VendorLength = RsGetBufferDataLength (InitializerOp);
+
+ DescriptorSize = ACPI_AML_SIZE_LARGE (AML_RESOURCE_CSI2_SERIALBUS) +
+ ResSourceLength + VendorLength;
+
+ /* Allocate the local resource node and initialize */
+
+ Rnode = RsAllocateResourceNode (DescriptorSize +
+ sizeof (AML_RESOURCE_LARGE_HEADER));
+
+ Descriptor = Rnode->Buffer;
+ Descriptor->Csi2SerialBus.ResourceLength = DescriptorSize;
+ Descriptor->Csi2SerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
+ Descriptor->Csi2SerialBus.RevisionId = AML_RESOURCE_CSI2_REVISION;
+ Descriptor->Csi2SerialBus.TypeRevisionId = AML_RESOURCE_CSI2_TYPE_REVISION;
+ Descriptor->Csi2SerialBus.Type = AML_RESOURCE_CSI2_SERIALBUSTYPE;
+ Descriptor->Csi2SerialBus.TypeDataLength = AML_RESOURCE_CSI2_MIN_DATA_LEN + VendorLength;
+
+ /* Build pointers to optional areas */
+
+ VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_CSI2_SERIALBUS));
+ ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
+
+ /* Process all child initialization nodes */
+
+ for (i = 0; InitializerOp; i++)
+ {
+ switch (i)
+ {
+ case 0: /* Slave Mode [Flag] (_SLV) */
+
+ RsSetFlagBits (&Descriptor->Csi2SerialBus.Flags, InitializerOp, 0, 0);
+ RsCreateBitField (InitializerOp, ACPI_RESTAG_SLAVEMODE,
+ CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.Flags), 0);
+ break;
+
+ case 1: /* Phy Type [Flag] (_PHY) */
+
+ RsSetFlagBits16 ((UINT16 *) &Descriptor->Csi2SerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
+ RsCreateBitField (InitializerOp, ACPI_RESTAG_PHYTYPE,
+ CurrentByteOffset + ASL_RESDESC_OFFSET (Csi2SerialBus.TypeSpecificFlags), 0);
+ break;
+
+ case 2: /* Local Port Instance [Integer] (_PRT) */
+
+ RsSetFlagBits16 ((UINT16 *) &Descriptor->Csi2SerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
+ RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LOCALPORT,
+ CurrentByteOffset + ASL_RESDESC_OFFSET (Csi2SerialBus.TypeSpecificFlags), 2, 6);
+ break;
+
+ case 3: /* ResSource [Optional Field - STRING] */
+
+ if (ResSourceLength)
+ {
+ /* Copy string to the descriptor */
+
+ strcpy (ResourceSource,
+ InitializerOp->Asl.Value.String);
+ }
+ break;
+
+ case 4: /* Resource Index */
+
+ if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
+ {
+ Descriptor->Csi2SerialBus.ResSourceIndex =
+ (UINT8) InitializerOp->Asl.Value.Integer;
+ }
+ break;
+
+ case 5: /* Resource Usage (consumer/producer) */
+
+ RsSetFlagBits (&Descriptor->Csi2SerialBus.Flags, InitializerOp, 1, 1);
+ break;
+
+ case 6: /* Resource Tag (Descriptor Name) */
+
+ UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
+ break;
+
+ case 7: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
+
+ RsGetVendorData (InitializerOp, VendorData,
+ CurrentByteOffset + sizeof (AML_RESOURCE_CSI2_SERIALBUS));
+ break;
+
+ default: /* Ignore any extra nodes */
+
+ break;
+ }
+
+ InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
+ }
+
+ MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
+ return (Rnode);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: RsDoPinFunctionDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
diff --git a/source/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c
index 1544bf6..05bec5b 100644
--- a/source/compiler/aslrestype2w.c
+++ b/source/compiler/aslrestype2w.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslrules.y b/source/compiler/aslrules.y
index 4d3aa16..a6bb1b7 100644
--- a/source/compiler/aslrules.y
+++ b/source/compiler/aslrules.y
@@ -8,7 +8,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,10 +26,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -149,11 +153,11 @@
| ',' {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
| ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
;
-
+/*
RequiredTarget
: ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
;
-
+*/
TermArg
: SimpleName {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
| Type2Opcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
@@ -309,14 +313,16 @@
ParameterTypePackageList
: {$$ = NULL;}
- | ObjectTypeKeyword {$$ = $1;}
- | '{' ParameterTypePackage '}' {$$ = $2;}
+ | ObjectTypeKeyword {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$1);}
+ | '{' ParameterTypePackage '}' {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
;
+
OptionalParameterTypePackage
- : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypePackageList {$$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
+ : {$$ = NULL;}
+ | ',' ParameterTypePackageList {$$ = $2;}
;
/* Rules for specifying the types for method arguments */
@@ -329,14 +335,15 @@
ParameterTypesPackageList
: {$$ = NULL;}
- | ObjectTypeKeyword {$$ = $1;}
- | '{' ParameterTypesPackage '}' {$$ = $2;}
+ | ObjectTypeKeyword {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$1);}
+ | '{' ParameterTypesPackage '}' {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
;
OptionalParameterTypesPackage
- : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypesPackageList {$$ = TrLinkOpChildren (
- TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
+ : {$$ = NULL;}
+ | ',' ParameterTypesPackageList {$$ = $2;}
;
/*
@@ -408,6 +415,10 @@
| String {}
;
+StringLiteral
+ : String {}
+ ;
+
ByteConst
: Integer {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
;
@@ -596,7 +607,6 @@
| FatalTerm {}
| ForTerm {}
| ElseIfTerm {}
- | LoadTerm {}
| NoOpTerm {}
| NotifyTerm {}
| ReleaseTerm {}
@@ -615,6 +625,7 @@
| CondRefOfTerm {}
| CopyObjectTerm {}
| DerefOfTerm {}
+ | LoadTerm {} /* Moved from Type1 -- now returns an integer (ACPI 6.4) */
| ObjectTypeTerm {}
| RefOfTerm {}
| SizeOfTerm {}
diff --git a/source/compiler/aslstartup.c b/source/compiler/aslstartup.c
index 22ce7ca..0038437 100644
--- a/source/compiler/aslstartup.c
+++ b/source/compiler/aslstartup.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -181,9 +185,17 @@
goto Cleanup;
}
- /* We have some sort of binary table, check for valid ACPI table */
-
- fseek (Info->Handle, 0, SEEK_SET);
+ /*
+ * We have some sort of binary table; reopen in binary mode, then
+ * check for valid ACPI table
+ */
+ fclose (Info->Handle);
+ Info->Handle = fopen (Info->Filename, "rb");
+ if (!Info->Handle)
+ {
+ fprintf (stderr, "Could not open input file %s\n",
+ Info->Filename);
+ }
Status = AcValidateTableHeader (Info->Handle, 0);
if (ACPI_SUCCESS (Status))
@@ -197,7 +209,7 @@
else
{
fprintf (stderr,
- "Binary file does not contain a valid ACPI table\n");
+ "Binary file does not contain a valid standard ACPI table\n");
}
Type = ASL_INPUT_TYPE_BINARY;
@@ -334,8 +346,9 @@
UtConvertBackslashes (AslGbl_Files[ASL_FILE_INPUT].Filename);
/*
- * Open the input file. Here, this should be an ASCII source file,
- * either an ASL file or a Data Table file
+ * Open the input file. Here, this could be an ASCII source file,
+ * either an ASL file or a Data Table file, or a binary AML file
+ * or binary data table file (For disassembly).
*/
Status = FlOpenInputFile (AslGbl_Files[ASL_FILE_INPUT].Filename);
if (ACPI_FAILURE (Status))
@@ -346,8 +359,6 @@
FileNode = FlGetCurrentFileNode();
- FileNode->OriginalInputFileSize = FlGetFileSize (ASL_FILE_INPUT);
-
/* Determine input file type */
AslGbl_FileType = AslDetectSourceFileType (&AslGbl_Files[ASL_FILE_INPUT]);
@@ -357,6 +368,8 @@
return (AE_ERROR);
}
+ FileNode->OriginalInputFileSize = FlGetFileSize (ASL_FILE_INPUT);
+
/*
* If -p not specified, we will use the input filename as the
* output filename prefix
diff --git a/source/compiler/aslstubs.c b/source/compiler/aslstubs.c
index 6a17d39..1eaed5a 100644
--- a/source/compiler/aslstubs.c
+++ b/source/compiler/aslstubs.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslsupport.l b/source/compiler/aslsupport.l
index 67a59c0..ce8077e 100644
--- a/source/compiler/aslsupport.l
+++ b/source/compiler/aslsupport.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/aslsupport.y b/source/compiler/aslsupport.y
index 12ca7a0..12929ce 100644
--- a/source/compiler/aslsupport.y
+++ b/source/compiler/aslsupport.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asltokens.y b/source/compiler/asltokens.y
index a5dcb97..e4f9540 100644
--- a/source/compiler/asltokens.y
+++ b/source/compiler/asltokens.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -171,6 +175,7 @@
%token <i> PARSEOP_FUNCTION
%token <i> PARSEOP_GPIO_INT
%token <i> PARSEOP_GPIO_IO
+%token <i> PARSEOP_CSI2_SERIALBUS
%token <i> PARSEOP_I2C_SERIALBUS
%token <i> PARSEOP_I2C_SERIALBUS_V2
%token <i> PARSEOP_IF
@@ -310,6 +315,7 @@
%token <i> PARSEOP_REGIONSPACE_PCC
%token <i> PARSEOP_REGIONSPACE_PCI
%token <i> PARSEOP_REGIONSPACE_PCIBAR
+%token <i> PARSEOP_REGIONSPACE_PRM
%token <i> PARSEOP_REGIONSPACE_SMBUS
%token <i> PARSEOP_REGISTER
%token <i> PARSEOP_RELEASE
diff --git a/source/compiler/asltransform.c b/source/compiler/asltransform.c
index 115c0cb..5ccf717 100644
--- a/source/compiler/asltransform.c
+++ b/source/compiler/asltransform.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -93,6 +97,10 @@
ACPI_PARSE_OBJECT *Next1,
ACPI_PARSE_OBJECT *Next2);
+static void
+TrDoMethod (
+ ACPI_PARSE_OBJECT *Op);
+
/*******************************************************************************
*
@@ -351,11 +359,8 @@
break;
case PARSEOP_METHOD:
- /*
- * TBD: Zero the tempname (_T_x) count. Probably shouldn't be a global,
- * however
- */
- AslGbl_TempCount = 0;
+
+ TrDoMethod (Op);
break;
case PARSEOP_EXTERNAL:
@@ -428,6 +433,11 @@
AslError (ASL_WARNING, ASL_MSG_LEGACY_PROCESSOR_OP, Op, Op->Asl.ExternalName);
break;
+ case PARSEOP_OBJECTTYPE_DDB:
+
+ AslError (ASL_WARNING, ASL_MSG_LEGACY_DDB_TYPE, Op, Op->Asl.ExternalName);
+ break;
+
default:
/* Nothing to do here for other opcodes */
@@ -1128,3 +1138,76 @@
return (TRUE);
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrDoMethod
+ *
+ * PARAMETERS: Op - Parse node for SWITCH
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Determine that parameter count of an ASL method node by
+ * translating the parameter count parse node from
+ * PARSEOP_DEFAULT_ARG to PARSEOP_BYTECONST.
+ *
+ ******************************************************************************/
+
+static void
+TrDoMethod (
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *ArgCountOp;
+ UINT8 ArgCount;
+ ACPI_PARSE_OBJECT *ParameterOp;
+
+
+ /*
+ * TBD: Zero the tempname (_T_x) count. Probably shouldn't be a global,
+ * however
+ */
+ AslGbl_TempCount = 0;
+
+ ArgCountOp = Op->Asl.Child->Asl.Next;
+ if (ArgCountOp->Asl.ParseOpcode == PARSEOP_BYTECONST)
+ {
+ /*
+ * Parameter count for this method has already been recorded in the
+ * method declaration.
+ */
+ return;
+ }
+
+ /*
+ * Parameter count has been omitted in the method declaration.
+ * Count the amount of arguments here.
+ */
+ ParameterOp = ArgCountOp->Asl.Next->Asl.Next->Asl.Next->Asl.Next;
+ if (ParameterOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
+ {
+ ArgCount = 0;
+ ParameterOp = ParameterOp->Asl.Child;
+
+ while (ParameterOp)
+ {
+ ParameterOp = ParameterOp->Asl.Next;
+ ArgCount++;
+ }
+
+ ArgCountOp->Asl.Value.Integer = ArgCount;
+ ArgCountOp->Asl.ParseOpcode = PARSEOP_BYTECONST;
+ }
+ else
+ {
+ /*
+ * Method parameters can be counted by analyzing the Parameter type
+ * list. If the Parameter list contains more than 1 parameter, it
+ * is nested under PARSEOP_DEFAULT_ARG. When there is only 1
+ * parameter, the parse tree contains a single node representing
+ * that type.
+ */
+ ArgCountOp->Asl.Value.Integer = 1;
+ ArgCountOp->Asl.ParseOpcode = PARSEOP_BYTECONST;
+ }
+}
diff --git a/source/compiler/asltree.c b/source/compiler/asltree.c
index 344bc1d..a704685 100644
--- a/source/compiler/asltree.c
+++ b/source/compiler/asltree.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/asltypes.h b/source/compiler/asltypes.h
index b4b59d1..bd18567 100644
--- a/source/compiler/asltypes.h
+++ b/source/compiler/asltypes.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -269,12 +273,37 @@
typedef struct asl_expected_message
{
- UINT32 MessageId;
- char *MessageIdStr;
- BOOLEAN MessageReceived;
+ UINT32 MessageId;
+ char *MessageIdStr;
+ BOOLEAN MessageReceived;
} ASL_EXPECTED_MESSAGE;
+/*
+ * An entry in the line-based expected messages list
+ *
+ * TBD: might be possible to merge this with ASL_EXPECTED_MESSAGE
+ */
+typedef struct asl_expected_msg_node
+{
+ struct asl_expected_msg_node *Next;
+ UINT32 MessageId;
+ char *MessageIdStr;
+ struct asl_location_node *LocationList;
+
+} ASL_EXPECTED_MSG_NODE;
+
+typedef struct asl_location_node
+{
+ struct asl_location_node *Next;
+ char *Filename;
+ UINT32 LineNumber;
+ UINT32 Column;
+ UINT32 LogicalByteOffset;
+ BOOLEAN MessageReceived;
+
+} ASL_LOCATION_NODE;
+
/* An entry in the listing file stack (for include files) */
diff --git a/source/compiler/asltypes.y b/source/compiler/asltypes.y
index 4c2710b..cb2a42b 100644
--- a/source/compiler/asltypes.y
+++ b/source/compiler/asltypes.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -63,9 +67,12 @@
%type <n> ParameterTypePackageList
%type <n> ParameterTypesPackage
%type <n> ParameterTypesPackageList
+/*
%type <n> RequiredTarget
+*/
%type <n> SimpleName
%type <n> StringData
+%type <n> StringLiteral
%type <n> Target
%type <n> Term
%type <n> TermArg
@@ -297,6 +304,7 @@
/* Resource Descriptors */
%type <n> ConnectionTerm
+%type <n> Csi2SerialBusTerm
%type <n> DMATerm
%type <n> DWordIOTerm
%type <n> DWordMemoryTerm
@@ -388,6 +396,7 @@
%type <n> OptionalShareType
%type <n> OptionalShareType_First
%type <n> OptionalSlaveMode
+%type <n> OptionalSlaveMode_First
%type <n> OptionalStopBits
%type <n> OptionalStringData
%type <n> OptionalSyncLevel
diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c
index 6195438..c952fb0 100644
--- a/source/compiler/aslutils.c
+++ b/source/compiler/aslutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -94,6 +98,46 @@
}
+/*******************************************************************************
+ *
+ * FUNCTION: UtIsIdInteger
+ *
+ * PARAMETERS: Pointer to an ACPI ID (HID, CID) string
+ *
+ * RETURN: TRUE if string is an integer
+ * FALSE if string is not an integer
+ *
+ * DESCRIPTION: Determine whether the input ACPI ID string can be converted to
+ * an integer value.
+ *
+ ******************************************************************************/
+
+BOOLEAN
+UtIsIdInteger (
+ UINT8 *Target)
+{
+ UINT32 i;
+
+
+ /* The first three characters of the string must be alphabetic */
+
+ for (i = 0; i < 3; i++)
+ {
+ if (!isalpha ((int) Target[i]))
+ {
+ break;
+ }
+ }
+
+ if (i < 3)
+ {
+ return (TRUE);
+ }
+
+ return (FALSE);
+}
+
+
/******************************************************************************
*
* FUNCTION: UtQueryForOverwrite
@@ -186,7 +230,7 @@
/*******************************************************************************
*
- * FUNCTION: UtGetParentMethod
+ * FUNCTION: UtGetParentMethodNode
*
* PARAMETERS: Node - Namespace node for any object
*
@@ -197,8 +241,8 @@
*
******************************************************************************/
-void *
-UtGetParentMethod (
+ACPI_NAMESPACE_NODE *
+UtGetParentMethodNode (
ACPI_NAMESPACE_NODE *Node)
{
ACPI_NAMESPACE_NODE *ParentNode;
@@ -228,6 +272,41 @@
/*******************************************************************************
*
+ * FUNCTION: UtGetParentMethodOp
+ *
+ * PARAMETERS: Op - Parse Op to be checked
+ *
+ * RETURN: Control method Op if found. NULL otherwise
+ *
+ * DESCRIPTION: Find the control method parent of a parse op. Returns NULL if
+ * the input Op is not within a control method.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+UtGetParentMethodOp (
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *NextOp;
+
+
+ NextOp = Op->Asl.Parent;
+ while (NextOp)
+ {
+ if (NextOp->Asl.AmlOpcode == AML_METHOD_OP)
+ {
+ return (NextOp);
+ }
+
+ NextOp = NextOp->Asl.Parent;
+ }
+
+ return (NULL); /* No parent method found */
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: UtDisplaySupportedTables
*
* PARAMETERS: None
@@ -247,18 +326,20 @@
printf ("\nACPI tables supported by iASL version %8.8X:\n"
- " (Compiler, Disassembler, Template Generator)\n\n",
+ " (Compiler, Disassembler, Template Generator)\n",
ACPI_CA_VERSION);
/* All ACPI tables with the common table header */
- printf ("\n Supported ACPI tables:\n");
+ printf ("\nKnown/Supported ACPI tables:\n");
for (TableData = AcpiGbl_SupportedTables, i = 1;
TableData->Signature; TableData++, i++)
{
printf ("%8u) %s %s\n", i,
TableData->Signature, TableData->Description);
}
+
+ printf ("\nTotal %u ACPI tables\n\n", i-1);
}
@@ -927,14 +1008,16 @@
{
ACPI_STATUS Status;
UINT64 ConvertedInteger;
- char ErrBuf[64];
+ char ErrBuf[128];
+ const ACPI_EXCEPTION_INFO *ExceptionInfo;
Status = AcpiUtStrtoul64 (String, &ConvertedInteger);
if (ACPI_FAILURE (Status))
{
- sprintf (ErrBuf, "While creating 64-bit constant: %s\n",
- AcpiFormatException (Status));
+ ExceptionInfo = AcpiUtValidateException ((ACPI_STATUS) Status);
+ sprintf (ErrBuf, " %s while converting to 64-bit integer",
+ ExceptionInfo->Description);
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, AslGbl_CurrentLineNumber,
AslGbl_LogicalLineNumber, AslGbl_CurrentLineOffset,
diff --git a/source/compiler/asluuid.c b/source/compiler/asluuid.c
index ae9a207..f9e68fb 100644
--- a/source/compiler/asluuid.c
+++ b/source/compiler/asluuid.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -99,51 +103,3 @@
return (AE_OK);
}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AuConvertUuidToString
- *
- * PARAMETERS: UuidBuffer - 16-byte UUID buffer
- * OutString - 36-byte formatted UUID string
- *
- * RETURN: Status
- *
- * DESCRIPTION: Convert 16-byte UUID buffer to 36-byte formatted UUID string
- * OutString must be 37 bytes to include null terminator.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AuConvertUuidToString (
- char *UuidBuffer,
- char *OutString)
-{
- UINT32 i;
-
-
- if (!UuidBuffer || !OutString)
- {
- return (AE_BAD_PARAMETER);
- }
-
- for (i = 0; i < UUID_BUFFER_LENGTH; i++)
- {
- OutString[AcpiGbl_MapToUuidOffset[i]] =
- AcpiUtHexToAsciiChar (UuidBuffer[i], 4);
-
- OutString[AcpiGbl_MapToUuidOffset[i] + 1] =
- AcpiUtHexToAsciiChar (UuidBuffer[i], 0);
- }
-
- /* Insert required hyphens (dashes) */
-
- OutString[UUID_HYPHEN1_OFFSET] =
- OutString[UUID_HYPHEN2_OFFSET] =
- OutString[UUID_HYPHEN3_OFFSET] =
- OutString[UUID_HYPHEN4_OFFSET] = '-';
-
- OutString[UUID_STRING_LENGTH] = 0; /* Null terminate */
- return (AE_OK);
-}
diff --git a/source/compiler/aslwalks.c b/source/compiler/aslwalks.c
index dc79898..635a690 100644
--- a/source/compiler/aslwalks.c
+++ b/source/compiler/aslwalks.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -404,7 +408,7 @@
break;
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
case ARGI_STORE_TARGET:
diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c
index 4a6068f..8fa4700 100644
--- a/source/compiler/aslxref.c
+++ b/source/compiler/aslxref.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -68,10 +72,6 @@
const ACPI_OPCODE_INFO *OpInfo,
ACPI_NAMESPACE_NODE *Node);
-static ACPI_PARSE_OBJECT *
-XfGetParentMethod (
- ACPI_PARSE_OBJECT *Op);
-
static BOOLEAN
XfObjectExists (
char *Name);
@@ -91,6 +91,16 @@
UINT32 FieldBitLength,
UINT32 AccessBitWidth);
+static BOOLEAN
+XfFindCondRefOfName (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op);
+
+static BOOLEAN
+XfRefIsGuardedByIfCondRefOf (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op);
+
/*******************************************************************************
*
@@ -270,41 +280,6 @@
/*******************************************************************************
*
- * FUNCTION: XfGetParentMethod
- *
- * PARAMETERS: Op - Parse Op to be checked
- *
- * RETURN: Control method Op if found. NULL otherwise
- *
- * DESCRIPTION: Find the control method parent of a parse op. Returns NULL if
- * the input Op is not within a control method.
- *
- ******************************************************************************/
-
-static ACPI_PARSE_OBJECT *
-XfGetParentMethod (
- ACPI_PARSE_OBJECT *Op)
-{
- ACPI_PARSE_OBJECT *NextOp;
-
-
- NextOp = Op->Asl.Parent;
- while (NextOp)
- {
- if (NextOp->Asl.AmlOpcode == AML_METHOD_OP)
- {
- return (NextOp);
- }
-
- NextOp = NextOp->Asl.Parent;
- }
-
- return (NULL); /* No parent method found */
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: XfNamespaceLocateBegin
*
* PARAMETERS: ASL_WALK_CALLBACK
@@ -350,6 +325,7 @@
UINT32 i;
ACPI_NAMESPACE_NODE *DeclarationParentMethod;
ACPI_PARSE_OBJECT *ReferenceParentMethod;
+ char *ExternalPath;
ACPI_FUNCTION_TRACE_PTR (XfNamespaceLocateBegin, Op);
@@ -427,7 +403,7 @@
{
/* Find parent method Op */
- NextOp = XfGetParentMethod (Op);
+ NextOp = UtGetParentMethodOp (Op);
if (!NextOp)
{
return_ACPI_STATUS (AE_OK);
@@ -464,7 +440,7 @@
{
/* Find parent method Op */
- NextOp = XfGetParentMethod (Op);
+ NextOp = UtGetParentMethodOp (Op);
if (!NextOp)
{
return_ACPI_STATUS (AE_OK);
@@ -509,17 +485,6 @@
}
/*
- * One special case: CondRefOf operator - we don't care if the name exists
- * or not at this point, just ignore it, the point of the operator is to
- * determine if the name exists at runtime.
- */
- if ((Op->Asl.Parent) &&
- (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF))
- {
- return_ACPI_STATUS (AE_OK);
- }
-
- /*
* We must enable the "search-to-root" for single NameSegs, but
* we have to be very careful about opening up scopes
*/
@@ -527,7 +492,8 @@
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_METHODCALL) ||
- (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) ||
+ (Op->Asl.ParseOpcode == PARSEOP_CONDREFOF))
{
/*
* These are name references, do not push the scope stack
@@ -592,7 +558,22 @@
* We didn't find the name reference by path -- we can qualify this
* a little better before we print an error message
*/
- if (strlen (Path) == ACPI_NAMESEG_SIZE)
+
+ if ((Op->Asl.Parent) &&
+ (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF))
+ {
+ /*
+ * One special case: CondRefOf operator - if the name doesn't
+ * exist at this point, it means that there's no actual or
+ * external declaration. If the name is not found, just ignore
+ * it, the point of the operator is to determine if the name
+ * exists at runtime. We wanted to see if this named object
+ * exists to facilitate analysis to allow protected usage of
+ * undeclared externals.
+ */
+ return_ACPI_STATUS (AE_OK);
+ }
+ else if (strlen (Path) == ACPI_NAMESEG_SIZE)
{
/* A simple, one-segment ACPI name */
@@ -702,10 +683,10 @@
* same method or outside of any method, this is a forward reference
* and should be reported as a compiler error.
*/
- DeclarationParentMethod = UtGetParentMethod (Node);
- ReferenceParentMethod = XfGetParentMethod (Op);
+ DeclarationParentMethod = UtGetParentMethodNode (Node);
+ ReferenceParentMethod = UtGetParentMethodOp (Op);
- /* case 1: declaration and refrence are both outside of method */
+ /* case 1: declaration and reference are both outside of method */
if (!ReferenceParentMethod && !DeclarationParentMethod)
{
@@ -733,9 +714,24 @@
Node->Flags |= ANOBJ_IS_REFERENCED;
}
- /* Attempt to optimize the NamePath */
-
- OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node);
+ /*
+ * Attempt to optimize the NamePath
+ *
+ * One special case: CondRefOf operator - not all AML interpreter
+ * implementations expect optimized namepaths as a parameter to this
+ * operator. They require relative name paths with prefix operators or
+ * namepaths starting with the root scope.
+ *
+ * Other AML interpreter implementations do not perform the namespace
+ * search that starts at the current scope and recursively searching the
+ * parent scope until the root scope. The lack of search is only known to
+ * occur for the namestring parameter for the CondRefOf operator.
+ */
+ if ((Op->Asl.Parent) &&
+ (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF))
+ {
+ OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node);
+ }
/*
* 1) Dereference an alias (A name reference that is an alias)
@@ -891,12 +887,14 @@
* invocation of the method, it is simply a reference to the method.
*
* September 2016: Removed DeRefOf from this list
+ * July 2020: Added Alias to this list
*/
if ((Op->Asl.Parent) &&
((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) ||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) ||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)||
- (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE)))
+ (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE) ||
+ (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_ALIAS)))
{
return_ACPI_STATUS (AE_OK);
}
@@ -1117,6 +1115,7 @@
/*
* 5) Check for external resolution
+ *
* By this point, everything should be loaded in the namespace. If a
* namespace lookup results in a namespace node that is an external, it
* means that this named object was not defined in the input ASL. This
@@ -1124,13 +1123,48 @@
* use the external keyword to suppress compiler errors about undefined
* objects. Note: this only applies when compiling multiple definition
* blocks.
+ *
+ * Do not check for external resolution in the following cases:
+ *
+ * case 1) External (ABCD)
+ *
+ * This declares ABCD as an external so there is no requirement for
+ * ABCD to be loaded in the namespace when analyzing the actual
+ * External() statement.
+ *
+ * case 2) CondRefOf (ABCD)
+ *
+ * This operator will query the ACPI namespace on the existence of
+ * ABCD. If ABCD does not exist, this operator will return a 0
+ * without incurring AML runtime errors. Therefore, ABCD is allowed
+ * to not exist when analyzing the CondRefOf operator.
+ *
+ * case 3) External (ABCD)
+ * if (CondRefOf (ABCD))
+ * {
+ * Store (0, ABCD)
+ * }
+ *
+ * In this case, ABCD is accessed only if it exists due to the if
+ * statement so there is no need to flag the ABCD nested in the
+ * store operator.
*/
if (AslGbl_ParseTreeRoot->Asl.Child && AslGbl_ParseTreeRoot->Asl.Child->Asl.Next &&
- (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL &&
- Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL) &&
- (Node->Flags & ANOBJ_IS_EXTERNAL))
+ (Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL &&
+ Op->Asl.ParseOpcode != PARSEOP_EXTERNAL &&
+ Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF &&
+ !XfRefIsGuardedByIfCondRefOf (Node, Op))
{
- AslError (ASL_ERROR, ASL_MSG_UNDEFINED_EXTERNAL, Op, NULL);
+ ExternalPath = AcpiNsGetNormalizedPathname (Node, TRUE);
+ sprintf (AslGbl_MsgBuffer, "full path of external object: %s",
+ ExternalPath);
+ AslDualParseOpError (ASL_ERROR, ASL_MSG_UNDEFINED_EXTERNAL, Op, NULL,
+ ASL_MSG_EXTERNAL_FOUND_HERE, Node->Op, AslGbl_MsgBuffer);
+ if (ExternalPath)
+ {
+ ACPI_FREE (ExternalPath);
+ }
}
/* 5) Check for a connection object */
@@ -1148,6 +1182,96 @@
/*******************************************************************************
*
+ * FUNCTION: XfRefIsGuardedByIfCondRefOf
+ *
+ * PARAMETERS: Node - Named object reference node
+ * Op - Named object reference parse node
+ *
+ * RETURN: BOOLEAN
+ *
+ * DESCRIPTION: returns true if Op checked inside if (CondRefOf (...))
+ * refers to Node.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+XfRefIsGuardedByIfCondRefOf (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *Parent = Op->Asl.Parent;
+
+
+ while (Parent)
+ {
+ if (Parent->Asl.ParseOpcode == PARSEOP_IF &&
+ XfFindCondRefOfName (Node, Parent->Asl.Child))
+ {
+ return (TRUE);
+ }
+
+ Parent = Parent->Asl.Parent;
+ }
+
+ return (FALSE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: XfRefIsGuardedByIfCondRefOf
+ *
+ * PARAMETERS: Node - Named object reference node
+ * Op - Named object reference parse node
+ *
+ * RETURN: BOOLEAN
+ *
+ * DESCRIPTION: returns true if Op checked inside if (CondRefOf (...))
+ * refers to Node.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+XfFindCondRefOfName (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op)
+{
+ BOOLEAN CondRefOfFound = FALSE;
+
+
+ if (!Op)
+ {
+ return (FALSE);
+ }
+
+ switch (Op->Asl.ParseOpcode)
+ {
+ case PARSEOP_CONDREFOF:
+
+ return (Op->Asl.Child->Common.Node == Node);
+ break;
+
+ case PARSEOP_LAND:
+
+ CondRefOfFound = XfFindCondRefOfName (Node, Op->Asl.Child);
+ if (CondRefOfFound)
+ {
+ return (TRUE);
+ }
+
+ return (XfFindCondRefOfName (Node, Op->Asl.Child->Asl.Next));
+ break;
+
+ default:
+
+ return (FALSE);
+ break;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: XfNamespaceLocateEnd
*
* PARAMETERS: ASL_WALK_CALLBACK
@@ -1225,8 +1349,8 @@
* execution of A)
*
* NOTES:
- * A null pointer returned by either XfGetParentMethod or
- * UtGetParentMethod indicates that the parameter object is not
+ * A null pointer returned by either UtGetParentMethodOp or
+ * UtGetParentMethodNode indicates that the parameter object is not
* within a control method.
*
* Five cases are handled: Case(Op, Node)
@@ -1259,8 +1383,8 @@
* 1) Search upwards in parse tree for owner of the referencing object
* 2) Search upwards in namespace to find the owner of the referenced object
*/
- ReferencingMethodOp = XfGetParentMethod (Op);
- ReferencedMethodNode = UtGetParentMethod (Node);
+ ReferencingMethodOp = UtGetParentMethodOp (Op);
+ ReferencedMethodNode = UtGetParentMethodNode (Node);
if (!ReferencingMethodOp && !ReferencedMethodNode)
{
diff --git a/source/compiler/aslxrefout.c b/source/compiler/aslxrefout.c
index 9036b6c..99db691 100644
--- a/source/compiler/aslxrefout.c
+++ b/source/compiler/aslxrefout.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/cvcompiler.c b/source/compiler/cvcompiler.c
index 789a849..6fec880 100644
--- a/source/compiler/cvcompiler.c
+++ b/source/compiler/cvcompiler.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/cvdisasm.c b/source/compiler/cvdisasm.c
index 7c67585..50cb324 100644
--- a/source/compiler/cvdisasm.c
+++ b/source/compiler/cvdisasm.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/cvparser.c b/source/compiler/cvparser.c
index 49146f5..c212e96 100644
--- a/source/compiler/cvparser.c
+++ b/source/compiler/cvparser.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -118,8 +122,7 @@
* FUNCTION: CvInitFileTree
*
* PARAMETERS: Table - input table
- * AmlStart - Address of the starting point of the AML.
- * AmlLength - Length of the AML file.
+ * RootFile - Output file that defines the DefinitionBlock
*
* RETURN: None
*
@@ -131,8 +134,7 @@
void
CvInitFileTree (
ACPI_TABLE_HEADER *Table,
- UINT8 *AmlStart,
- UINT32 AmlLength)
+ FILE *RootFile)
{
UINT8 *TreeAml;
UINT8 *FileEnd;
@@ -140,6 +142,8 @@
char *PreviousFilename = NULL;
char *ParentFilename = NULL;
char *ChildFilename = NULL;
+ UINT8 *AmlStart;
+ UINT32 AmlLength;
if (!AcpiGbl_CaptureComments)
@@ -147,9 +151,13 @@
return;
}
+
+ AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
+ AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
+
CvDbgPrint ("AmlLength: %x\n", AmlLength);
CvDbgPrint ("AmlStart: %p\n", AmlStart);
- CvDbgPrint ("AmlEnd?: %p\n", AmlStart+AmlLength);
+ CvDbgPrint ("AmlEnd: %p\n", AmlStart+AmlLength);
AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
@@ -161,7 +169,7 @@
/* Set the root file to the current open file */
- AcpiGbl_FileTreeRoot->File = AcpiGbl_OutputFile;
+ AcpiGbl_FileTreeRoot->File = RootFile;
/*
* Set this to true because we don't need to output
diff --git a/source/compiler/dtcompile.c b/source/compiler/dtcompile.c
index 0289638..f600bfd 100644
--- a/source/compiler/dtcompile.c
+++ b/source/compiler/dtcompile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -340,6 +344,48 @@
}
/*
+ * If the first field is named "CDAT Table Length" (not "Signature"),
+ * assume that we have a CDAT table (whose table header does not have
+ * a signature). Instead, the TableLength field is where the
+ * signature would (normally) be.
+ */
+ else if (!strcmp ((*FieldList)->Name, "CDAT Table Length"))
+ {
+ /* No longer true: (However, use this technique in the disassembler)
+ * We are assuming that there
+ * should be at least one non-ASCII byte in the 4-character
+ * Signature field, (At least the high-order byte should be zero).
+ */
+ Status = DtCompileTable (FieldList, AcpiDmTableInfoCdatTableHdr,
+ &AslGbl_RootTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Compile the CDAT */
+
+ DtPushSubtable (AslGbl_RootTable);
+ Status = DtCompileCdat ((void **) FieldList);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /*
+ * Set the overall table length and the table checksum.
+ * The entire compiled table (including the CDAT table header with
+ * the table length and checksum) is in AslGbl_RootTable->Buffer.
+ */
+ DtSetTableLength ();
+ DtSetTableChecksum (&ACPI_CAST_PTR (ACPI_TABLE_CDAT, AslGbl_RootTable->Buffer)->Checksum);
+
+ DtDumpFieldList (RootField);
+ DtDumpSubtableList ();
+ return (AE_OK);
+ }
+
+ /*
* All other tables must use the common ACPI table header. Insert the
* current iASL IDs (name, version), and compile the header now.
*/
diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
index a885fe8..db12d06 100644
--- a/source/compiler/dtcompiler.h
+++ b/source/compiler/dtcompiler.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -349,7 +353,6 @@
/* dtparser - lex/yacc files */
-UINT64 DtCompilerParserResult; /* Expression return value */
int
DtCompilerParserparse (
void);
@@ -455,10 +458,26 @@
DT_FIELD **PFieldList);
ACPI_STATUS
+DtCompileAest (
+ void **PFieldList);
+
+ACPI_STATUS
+DtCompileApmt (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompileAsf (
void **PFieldList);
ACPI_STATUS
+DtCompileCdat (
+ void **PFieldList);
+
+ACPI_STATUS
+DtCompileCedt (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompileCpep (
void **PFieldList);
@@ -535,11 +554,11 @@
void **PFieldList);
ACPI_STATUS
-DtCompileMtmr (
+DtCompileNfit (
void **PFieldList);
ACPI_STATUS
-DtCompileNfit (
+DtCompileNhlt (
void **PFieldList);
ACPI_STATUS
@@ -551,6 +570,10 @@
void **PFieldList);
ACPI_STATUS
+DtCompilePhat (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompilePmtt (
void **PFieldList);
@@ -559,6 +582,14 @@
void **PFieldList);
ACPI_STATUS
+DtCompilePrmt (
+ void **PFieldList);
+
+ACPI_STATUS
+DtCompileRgrt (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompileRsdt (
void **PFieldList);
@@ -587,6 +618,10 @@
void **PFieldList);
ACPI_STATUS
+DtCompileSvkl (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompileTcpa (
void **PFieldList);
@@ -599,7 +634,7 @@
void **PFieldList);
ACPI_STATUS
-DtCompileVrtc (
+DtCompileViot (
void **PFieldList);
ACPI_STATUS
@@ -626,10 +661,17 @@
/* ACPI Table templates */
+extern const unsigned char TemplateAest[];
+extern const unsigned char TemplateAgdi[];
+extern const unsigned char TemplateApmt[];
extern const unsigned char TemplateAsf[];
extern const unsigned char TemplateBoot[];
+extern const unsigned char TemplateBdat[];
extern const unsigned char TemplateBert[];
extern const unsigned char TemplateBgrt[];
+extern const unsigned char TemplateCcel[];
+extern const unsigned char TemplateCdat[];
+extern const unsigned char TemplateCedt[];
extern const unsigned char TemplateCpep[];
extern const unsigned char TemplateCsrt[];
extern const unsigned char TemplateDbg2[];
@@ -654,13 +696,16 @@
extern const unsigned char TemplateMpst[];
extern const unsigned char TemplateMsct[];
extern const unsigned char TemplateMsdm[];
-extern const unsigned char TemplateMtmr[];
extern const unsigned char TemplateNfit[];
+extern const unsigned char TemplateNhlt[];
extern const unsigned char TemplatePcct[];
extern const unsigned char TemplatePdtt[];
+extern const unsigned char TemplatePhat[];
extern const unsigned char TemplatePmtt[];
extern const unsigned char TemplatePptt[];
+extern const unsigned char TemplatePrmt[];
extern const unsigned char TemplateRasf[];
+extern const unsigned char TemplateRgrt[];
extern const unsigned char TemplateRsdt[];
extern const unsigned char TemplateS3pt[];
extern const unsigned char TemplateSbst[];
@@ -672,10 +717,12 @@
extern const unsigned char TemplateSpmi[];
extern const unsigned char TemplateSrat[];
extern const unsigned char TemplateStao[];
+extern const unsigned char TemplateSvkl[];
extern const unsigned char TemplateTcpa[];
+extern const unsigned char TemplateTdel[];
extern const unsigned char TemplateTpm2[];
extern const unsigned char TemplateUefi[];
-extern const unsigned char TemplateVrtc[];
+extern const unsigned char TemplateViot[];
extern const unsigned char TemplateWaet[];
extern const unsigned char TemplateWdat[];
extern const unsigned char TemplateWddt[];
diff --git a/source/compiler/dtcompilerparser.l b/source/compiler/dtcompilerparser.l
index 799c5a1..0fb0348 100644
--- a/source/compiler/dtcompilerparser.l
+++ b/source/compiler/dtcompilerparser.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -41,7 +45,6 @@
#include "aslcompiler.h"
#include "dtcompilerparser.y.h"
-YYSTYPE DtCompilerlval;
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("dtcompilerscanner")
diff --git a/source/compiler/dtcompilerparser.y b/source/compiler/dtcompilerparser.y
index 75dbe70..a4f04ea 100644
--- a/source/compiler/dtcompilerparser.y
+++ b/source/compiler/dtcompilerparser.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -58,7 +62,6 @@
extern DT_FIELD *AslGbl_CurrentField;
extern int DtLabelByteOffset;
-extern UINT64 DtCompilerParserResult; /* Expression return value */
extern UINT64 DtCompilerParserlineno; /* Current line number */
extern UINT32 DtTokenFirstLine;
diff --git a/source/compiler/dtexpress.c b/source/compiler/dtexpress.c
index 068c50e..d6d9768 100644
--- a/source/compiler/dtexpress.c
+++ b/source/compiler/dtexpress.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c
index 0a384c5..d930edb 100644
--- a/source/compiler/dtfield.c
+++ b/source/compiler/dtfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -115,7 +119,7 @@
break;
}
- /* Fall through. */
+ ACPI_FALLTHROUGH;
case DT_FIELD_TYPE_BUFFER:
@@ -322,14 +326,14 @@
{
if (Value != 1)
{
- DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field,
+ DtError (ASL_ERROR, ASL_MSG_RESERVED_FIELD, Field,
"Must be one, setting to one");
Value = 1;
}
}
else if (Value != 0)
{
- DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field,
+ DtError (ASL_ERROR, ASL_MSG_RESERVED_FIELD, Field,
"Must be zero, setting to zero");
Value = 0;
}
@@ -564,6 +568,12 @@
BitLength = 2;
break;
+ case ACPI_DMT_FLAGS8_2:
+
+ BitPosition = 2;
+ BitLength = 8;
+ break;
+
case ACPI_DMT_FLAGS4:
BitPosition = 4;
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index 9e7345a..5d5f709 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -840,7 +844,7 @@
UINT8 BufChar;
- FlPrintFile (FileId, "Output: [%3.3Xh %4.4d %3d] ",
+ FlPrintFile (FileId, "Output: [%3.3Xh %4.4d %3.3Xh] ",
Offset, Offset, Length);
i = 0;
@@ -974,9 +978,9 @@
{
DbgPrint (ASL_DEBUG_OUTPUT,
- "[%.04X] %24s %*s%p (%.02X) - (%.02X)\n",
+ "[%.04X] %24s %*s%p (%.02X) - (%.02X) %.02X\n",
Subtable->Depth, Subtable->Name, (4 * Subtable->Depth), " ",
- Subtable, Subtable->Length, Subtable->TotalLength);
+ Subtable, Subtable->Length, Subtable->TotalLength, *Subtable->Buffer);
}
@@ -1011,7 +1015,7 @@
DtWalkTableTree (AslGbl_RootTable, DtDumpSubtableInfo, NULL, NULL);
DbgPrint (ASL_DEBUG_OUTPUT,
- "\nSubtable Tree: (Depth, Name, Subtable, Length, TotalLength)\n\n");
+ "\nSubtable Tree: (Depth, Name, Subtable, Length, TotalLength, Integer Value)\n\n");
DtWalkTableTree (AslGbl_RootTable, DtDumpSubtableTree, NULL, NULL);
DbgPrint (ASL_DEBUG_OUTPUT, "\n");
diff --git a/source/compiler/dtparser.l b/source/compiler/dtparser.l
index 8c80077..6ac88ba 100644
--- a/source/compiler/dtparser.l
+++ b/source/compiler/dtparser.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -96,7 +100,7 @@
/*
* Local support functions
*/
-YY_BUFFER_STATE LexBuffer;
+static YY_BUFFER_STATE LexBuffer;
/******************************************************************************
*
diff --git a/source/compiler/dtparser.y b/source/compiler/dtparser.y
index f40f380..b6123cb 100644
--- a/source/compiler/dtparser.y
+++ b/source/compiler/dtparser.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/dtsubtable.c b/source/compiler/dtsubtable.c
index fcea420..b417c63 100644
--- a/source/compiler/dtsubtable.c
+++ b/source/compiler/dtsubtable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/dttable.c b/source/compiler/dttable.c
index ade2240..378a098 100644
--- a/source/compiler/dttable.c
+++ b/source/compiler/dttable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -111,10 +115,12 @@
*
* RETURN: Status
*
- * DESCRIPTION: Compile FADT.
+ * DESCRIPTION: Compile FADT (signature FACP).
*
*****************************************************************************/
+#define ACPI_XDSDT_LOCATION_IN_LIST 11
+
ACPI_STATUS
DtCompileFadt (
void **List)
@@ -123,10 +129,17 @@
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
- ACPI_TABLE_HEADER *Table;
+ DT_FIELD *DsdtFieldList;
+ ACPI_TABLE_FADT *Table;
UINT8 Revision;
+ UINT32 DsdtAddress;
+ UINT64 X_DsdtAddress;
+ UINT32 i;
+ /* Get the table revision and 32-bit DSDT Address definition */
+
+ DsdtFieldList = (*PFieldList)->Next;
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt1,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -137,8 +150,16 @@
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
- Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
- Revision = Table->Revision;
+ Table = ACPI_CAST_PTR (ACPI_TABLE_FADT, ParentTable->Buffer);
+ Revision = Table->Header.Revision;
+ DsdtAddress = Table->Dsdt;
+
+ /* FADT version 1 has only 32-bit addresses - error if DSDT address is NULL */
+
+ if ((Revision == 1) && (!DsdtAddress))
+ {
+ DtError (ASL_ERROR, ASL_MSG_ZERO_VALUE, DsdtFieldList, NULL);
+ }
if (Revision == 2)
{
@@ -151,8 +172,24 @@
DtInsertSubtable (ParentTable, Subtable);
}
- else if (Revision >= 2)
+
+ else if (Revision > 2)
{
+ /*
+ * Rev 3 and greater have 64-bit addresses (as well as 32-bit).
+ * Get the 64-bit DSDT (X_DSDT) Address definition. Note: This
+ * appears at field list offset 11 within AcpiDmTableInfoFadt3.
+ */
+ DsdtFieldList = *PFieldList;
+ for (i = 0; i < ACPI_XDSDT_LOCATION_IN_LIST; i++)
+ {
+ DsdtFieldList = DsdtFieldList->Next;
+ if (!DsdtFieldList)
+ {
+ return (ASL_MSG_BAD_PARSE_TREE);
+ }
+ }
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt3,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -162,6 +199,20 @@
DtInsertSubtable (ParentTable, Subtable);
+ Table = ACPI_CAST_PTR (ACPI_TABLE_FADT, ParentTable->Buffer);
+ X_DsdtAddress = Table->XDsdt;
+
+ /*
+ * Error if both the 32-bit DSDT address and the
+ * 64-bit X_DSDT address are zero.
+ */
+ if ((!X_DsdtAddress) && (!DsdtAddress))
+ {
+ DtError (ASL_ERROR, ASL_MSG_TWO_ZERO_VALUES, DsdtFieldList, NULL);
+ }
+
+ /* Fields specific to FADT Revision 5 (appended to previous) */
+
if (Revision >= 5)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt5,
@@ -174,6 +225,8 @@
DtInsertSubtable (ParentTable, Subtable);
}
+ /* Fields specific to FADT Revision 6 (appended to previous) */
+
if (Revision >= 6)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt6,
diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c
index 5e280d3..461652b 100644
--- a/source/compiler/dttable1.c
+++ b/source/compiler/dttable1.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -60,6 +64,319 @@
/******************************************************************************
*
+ * FUNCTION: DtCompileAest
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile AEST.
+ *
+ * NOTE: Assumes the following table structure:
+ * For all AEST Error Nodes:
+ * 1) An AEST Error Node, followed immediately by:
+ * 2) Any node-specific data
+ * 3) An Interface Structure (one)
+ * 4) A list (array) of Interrupt Structures, the count as specified
+ * in the NodeInterruptCount field of the Error Node header.
+ *
+ * AEST - ARM Error Source table. Conforms to:
+ * ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document Sep 2020
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileAest (
+ void **List)
+{
+ ACPI_AEST_HEADER *ErrorNodeHeader;
+ ACPI_AEST_PROCESSOR *AestProcessor;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_STATUS Status;
+ UINT32 i;
+ UINT32 Offset;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+
+
+ while (*PFieldList)
+ {
+ /* Compile the common error node header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoAestHdr,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Everything past the error node header will be a subtable */
+
+ DtPushSubtable (Subtable);
+
+ /*
+ * Compile the node-specific structure (Based on the error
+ * node header Type field)
+ */
+ ErrorNodeHeader = ACPI_CAST_PTR (ACPI_AEST_HEADER, Subtable->Buffer);
+
+ /* Point past the common error node header */
+
+ Offset = sizeof (ACPI_AEST_HEADER);
+ ErrorNodeHeader->NodeSpecificOffset = Offset;
+
+ /* Decode the error node type */
+
+ switch (ErrorNodeHeader->Type)
+ {
+ case ACPI_AEST_PROCESSOR_ERROR_NODE:
+
+ InfoTable = AcpiDmTableInfoAestProcError;
+ break;
+
+ case ACPI_AEST_MEMORY_ERROR_NODE:
+
+ InfoTable = AcpiDmTableInfoAestMemError;
+ break;
+
+ case ACPI_AEST_SMMU_ERROR_NODE:
+
+ InfoTable = AcpiDmTableInfoAestSmmuError;
+ break;
+
+ case ACPI_AEST_VENDOR_ERROR_NODE:
+
+ InfoTable = AcpiDmTableInfoAestVendorError;
+ break;
+
+ case ACPI_AEST_GIC_ERROR_NODE:
+
+ InfoTable = AcpiDmTableInfoAestGicError;
+ break;
+
+ /* Error case below */
+ default:
+ AcpiOsPrintf ("Unknown AEST Subtable Type: %X\n",
+ ErrorNodeHeader->Type);
+ return (AE_ERROR);
+ }
+
+ Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Point past the node-specific structure */
+
+ Offset += Subtable->Length;
+ ErrorNodeHeader->NodeInterfaceOffset = Offset;
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Compile any additional node-specific substructures */
+
+ if (ErrorNodeHeader->Type == ACPI_AEST_PROCESSOR_ERROR_NODE)
+ {
+ /*
+ * Special handling for PROCESSOR_ERROR_NODE subtables
+ * (to handle the Resource Substructure via the ResourceType
+ * field).
+ */
+ AestProcessor = ACPI_CAST_PTR (ACPI_AEST_PROCESSOR,
+ Subtable->Buffer);
+
+ switch (AestProcessor->ResourceType)
+ {
+ case ACPI_AEST_CACHE_RESOURCE:
+
+ InfoTable = AcpiDmTableInfoAestCacheRsrc;
+ break;
+
+ case ACPI_AEST_TLB_RESOURCE:
+
+ InfoTable = AcpiDmTableInfoAestTlbRsrc;
+ break;
+
+ case ACPI_AEST_GENERIC_RESOURCE:
+
+ InfoTable = AcpiDmTableInfoAestGenRsrc;
+ AcpiOsPrintf ("Generic Resource Type (%X) is not supported at this time\n",
+ AestProcessor->ResourceType);
+ return (AE_ERROR);
+
+ /* Error case below */
+ default:
+ AcpiOsPrintf ("Unknown AEST Processor Resource Type: %X\n",
+ AestProcessor->ResourceType);
+ return (AE_ERROR);
+ }
+
+ Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Point past the resource substructure subtable */
+
+ Offset += Subtable->Length;
+ ErrorNodeHeader->NodeInterfaceOffset = Offset;
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+
+ /* Compile the (required) node interface structure */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoAestXface,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ErrorNodeHeader->NodeInterruptOffset = 0;
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Compile each of the node interrupt structures */
+
+ if (ErrorNodeHeader->NodeInterruptCount)
+ {
+ /* Point to the first interrupt structure */
+
+ Offset += Subtable->Length;
+ ErrorNodeHeader->NodeInterruptOffset = Offset;
+ }
+
+ /* Compile each of the interrupt structures */
+
+ for (i = 0; i < ErrorNodeHeader->NodeInterruptCount; i++)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoAestXrupt,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+
+ /* Prepare for the next AEST Error node */
+
+ DtPopSubtable ();
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: DtCompileApmt
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile APMT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileApmt (
+ void **List)
+{
+ ACPI_STATUS Status;
+ ACPI_TABLE_HEADER *Header;
+ ACPI_APMT_NODE *ApmtNode;
+ ACPI_APMT_NODE *PeerApmtNode;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *PeerSubtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD**)List;
+ DT_FIELD *SubtableStart;
+ UINT32 CurLength;
+ char MsgBuffer[64] = "";
+
+ ParentTable = DtPeekSubtable();
+
+ Header = ACPI_CAST_PTR(ACPI_TABLE_HEADER, ParentTable->Buffer);
+
+ CurLength = sizeof(ACPI_TABLE_HEADER);
+
+ /* Walk the parse tree */
+
+ while (*PFieldList)
+ {
+ /* APMT Node Subtable */
+
+ SubtableStart = *PFieldList;
+
+ Status = DtCompileTable(PFieldList, AcpiDmTableInfoApmtNode, &Subtable);
+
+ if (ACPI_FAILURE(Status))
+ {
+ return (Status);
+ }
+
+ ApmtNode = ACPI_CAST_PTR(ACPI_APMT_NODE, Subtable->Buffer);
+
+ if (ApmtNode->Length != sizeof(ACPI_APMT_NODE))
+ {
+ DtFatal(ASL_MSG_INVALID_LENGTH, SubtableStart, "APMT");
+ return (AE_ERROR);
+ }
+
+ if (ApmtNode->Type >= ACPI_APMT_NODE_TYPE_COUNT)
+ {
+ snprintf(MsgBuffer, 64, "Node Type : 0x%X", ApmtNode->Type);
+ DtFatal(ASL_MSG_INVALID_TYPE, SubtableStart, MsgBuffer);
+ return (AE_ERROR);
+ }
+
+ PeerSubtable = DtGetNextSubtable(ParentTable, NULL);
+
+ /* Validate the node id needs to be unique. */
+ while(PeerSubtable)
+ {
+ PeerApmtNode = ACPI_CAST_PTR(ACPI_APMT_NODE, PeerSubtable->Buffer);
+ if (PeerApmtNode->Id == ApmtNode->Id)
+ {
+ snprintf(MsgBuffer, 64, "Node Id : 0x%X existed", ApmtNode->Id);
+ DtFatal(ASL_MSG_DUPLICATE_ITEM, SubtableStart, MsgBuffer);
+ return (AE_ERROR);
+ }
+
+ PeerSubtable = DtGetNextSubtable(ParentTable, PeerSubtable);
+ }
+
+ CurLength += ApmtNode->Length;
+
+ DtInsertSubtable(ParentTable, Subtable);
+ }
+
+ if (Header->Length != CurLength)
+ {
+ snprintf(MsgBuffer, 64, " - APMT Length : %u (expected: %u)",
+ Header->Length, CurLength);
+ DtFatal(ASL_MSG_INVALID_LENGTH, NULL, MsgBuffer);
+ return (AE_ERROR);
+ }
+
+ return (AE_OK);
+}
+
+/******************************************************************************
+ *
* FUNCTION: DtCompileAsf
*
* PARAMETERS: List - Current field list pointer
@@ -232,6 +549,257 @@
/******************************************************************************
*
+ * FUNCTION: DtCompileCdat
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile CDAT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileCdat (
+ void **List)
+{
+ ACPI_STATUS Status = AE_OK;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ ACPI_CDAT_HEADER *CdatHeader;
+ ACPI_DMTABLE_INFO *InfoTable = NULL;
+ DT_FIELD *SubtableStart;
+
+
+ /* Walk the parse tree.
+ *
+ * Note: Main table consists of only the CDAT table header
+ * (This is not the standard ACPI table header, however)--
+ * Followed by some number of subtables.
+ */
+ while (*PFieldList)
+ {
+ SubtableStart = *PFieldList;
+
+ /* Compile the expected CDAT Subtable header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCdatHeader,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ CdatHeader = ACPI_CAST_PTR (ACPI_CDAT_HEADER, Subtable->Buffer);
+
+ /* Decode the subtable by type */
+
+ switch (CdatHeader->Type)
+ {
+ case ACPI_CDAT_TYPE_DSMAS:
+ InfoTable = AcpiDmTableInfoCdat0;
+ break;
+
+ case ACPI_CDAT_TYPE_DSLBIS:
+ InfoTable = AcpiDmTableInfoCdat1;
+ break;
+
+ case ACPI_CDAT_TYPE_DSMSCIS:
+ InfoTable = AcpiDmTableInfoCdat2;
+ break;
+
+ case ACPI_CDAT_TYPE_DSIS:
+ InfoTable = AcpiDmTableInfoCdat3;
+ break;
+
+ case ACPI_CDAT_TYPE_DSEMTS:
+ InfoTable = AcpiDmTableInfoCdat4;
+ break;
+
+ case ACPI_CDAT_TYPE_SSLBIS:
+ InfoTable = AcpiDmTableInfoCdat5;
+ break;
+
+ default:
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "CDAT");
+ }
+
+ /* Compile the CDAT subtable */
+
+ Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ switch (CdatHeader->Type)
+ {
+ /* Multiple entries supported for this type */
+
+ case ACPI_CDAT_TYPE_SSLBIS:
+
+ /*
+ * Check for multiple SSLBEs
+ */
+ while (*PFieldList && !AcpiUtStricmp ((*PFieldList)->Name, "Port X ID"))
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCdatEntries, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ /* Pop off the CDAT Subtable header subtree */
+
+ DtPopSubtable ();
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: DtCompileCedt
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile CEDT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileCedt (
+ void **List)
+{
+ ACPI_STATUS Status;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ ACPI_CEDT_HEADER *CedtHeader;
+ DT_FIELD *SubtableStart;
+
+
+ /* Walk the parse tree */
+
+ while (*PFieldList)
+ {
+ /* if CFMWS and has more than one target, then set to zero later */
+
+ int InsertFlag = 1;
+ SubtableStart = *PFieldList;
+
+ /* CEDT Header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedtHdr,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ CedtHeader = ACPI_CAST_PTR (ACPI_CEDT_HEADER, Subtable->Buffer);
+
+ switch (CedtHeader->Type)
+ {
+ case ACPI_CEDT_TYPE_CHBS:
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt0, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ break;
+ case ACPI_CEDT_TYPE_CFMWS: {
+ unsigned char *dump;
+ unsigned int idx, offset, max = 0;
+
+ /* Compile table with first "Interleave target" */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt1, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Look in buffer for the number of targets */
+ offset = (unsigned int) ACPI_OFFSET (ACPI_CEDT_CFMWS, InterleaveWays);
+ dump = (unsigned char *) Subtable->Buffer - 4; /* place at beginning of cedt1 */
+ max = 0x01 << dump[offset]; /* 2^max, so 0=1, 1=2, 2=4, 3=8. 8 is MAX */
+ if (max > 8) max=1; /* Error in encoding Interleaving Ways. */
+ if (max == 1) /* if only one target, then break here. */
+ break; /* break if only one target. */
+
+ /* We need to add more interleave targets, so write the current Subtable. */
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable); /* Insert AcpiDmTableInfoCedt1 table so we can put in */
+ DtPushSubtable (Subtable); /* the targets > the first. */
+
+ /* Now, find out all interleave targets beyond the first. */
+
+ for (idx = 1; idx < max; idx++) {
+ ParentTable = DtPeekSubtable ();
+
+ if (*PFieldList)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt1_te, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ if (Subtable)
+ {
+ DtInsertSubtable (ParentTable, Subtable); /* got a target, so insert table. */
+ InsertFlag = 0;
+ }
+ }
+ }
+
+ DtPopSubtable ();
+ ParentTable = DtPeekSubtable ();
+ break;
+ }
+
+ default:
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "CEDT");
+ return (AE_ERROR);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ if (InsertFlag == 1) {
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ DtPopSubtable ();
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompileCpep
*
* PARAMETERS: List - Current field list pointer
@@ -602,6 +1170,11 @@
InfoTable = AcpiDmTableInfoDmar4;
break;
+ case ACPI_DMAR_TYPE_SATC:
+
+ InfoTable = AcpiDmTableInfoDmar5;
+ break;
+
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "DMAR");
@@ -1470,10 +2043,12 @@
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
+ ACPI_TABLE_HEADER *Table;
ACPI_TABLE_IORT *Iort;
ACPI_IORT_NODE *IortNode;
ACPI_IORT_ITS_GROUP *IortItsGroup;
ACPI_IORT_SMMU *IortSmmu;
+ ACPI_IORT_RMR *IortRmr;
UINT32 NodeNumber;
UINT32 NodeLength;
UINT32 IdMappingNumber;
@@ -1481,6 +2056,8 @@
UINT32 ContextIrptNumber;
UINT32 PmuIrptNumber;
UINT32 PaddingLength;
+ UINT8 Revision;
+ UINT32 RmrCount;
ParentTable = DtPeekSubtable ();
@@ -1493,6 +2070,17 @@
}
DtInsertSubtable (ParentTable, Subtable);
+ Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
+ Revision = Table->Revision;
+
+ /* IORT Revisions E, E.a & E.c have known issues and are not supported */
+
+ if (Revision == 1 || Revision == 2 || Revision == 4)
+ {
+ DtError (ASL_ERROR, ASL_MSG_UNSUPPORTED, NULL, "IORT table revision");
+ return (AE_ERROR);
+ }
+
/*
* Using ACPI_SUB_PTR, We needn't define a separate structure. Care
* should be taken to avoid accessing ACPI_TABLE_HEADER fields.
@@ -1533,8 +2121,17 @@
while (*PFieldList)
{
SubtableStart = *PFieldList;
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortHdr,
- &Subtable);
+ if (Revision == 0)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortHdr,
+ &Subtable);
+ }
+ else if (Revision >= 3)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortHdr3,
+ &Subtable);
+ }
+
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -1752,6 +2349,45 @@
NodeLength += Subtable->Length;
break;
+ case ACPI_IORT_NODE_RMR:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort6,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ DtInsertSubtable (ParentTable, Subtable);
+ IortRmr = ACPI_CAST_PTR (ACPI_IORT_RMR, Subtable->Buffer);
+ NodeLength += Subtable->Length;
+
+ /* Compile RMR Descriptors */
+
+ RmrCount = 0;
+ IortRmr->RmrOffset = NodeLength;
+ while (*PFieldList)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort6a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ if (!Subtable)
+ {
+ break;
+ }
+
+ DtInsertSubtable (ParentTable, Subtable);
+ NodeLength += sizeof (ACPI_IORT_RMR_DESC);
+ RmrCount++;
+ }
+
+ IortRmr->RmrCount = RmrCount;
+ break;
+
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IORT");
@@ -1809,7 +2445,18 @@
*
* RETURN: Status
*
- * DESCRIPTION: Compile IVRS.
+ * DESCRIPTION: Compile IVRS. Notes:
+ * The IVRS is essentially a flat table, with the following
+ * structure:
+ * <Main ACPI Table Header>
+ * <Main subtable - virtualization info>
+ * <IVHD>
+ * <Device Entries>
+ * ...
+ * <IVHD>
+ * <Device Entries>
+ * <IVMD>
+ * ...
*
*****************************************************************************/
@@ -1820,13 +2467,17 @@
ACPI_STATUS Status;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
+ DT_SUBTABLE *MainSubtable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
- ACPI_DMTABLE_INFO *InfoTable;
- ACPI_IVRS_HEADER *IvrsHeader;
- UINT8 EntryType;
+ ACPI_DMTABLE_INFO *InfoTable = NULL;
+ UINT8 SubtableType;
+ UINT8 Temp64[16];
+ UINT8 Temp8;
+ /* Main table */
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrs,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -1836,11 +2487,98 @@
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ /* Save a pointer to the main subtable */
+
+ MainSubtable = Subtable;
while (*PFieldList)
{
SubtableStart = *PFieldList;
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsHdr,
+
+ /* Compile the SubtableType integer */
+
+ DtCompileInteger (&SubtableType, *PFieldList, 1, 0);
+
+ switch (SubtableType)
+ {
+
+ /* Type 10h, IVHD (I/O Virtualization Hardware Definition) */
+
+ case ACPI_IVRS_TYPE_HARDWARE1:
+
+ InfoTable = AcpiDmTableInfoIvrsHware1;
+ break;
+
+ /* Types 11h, 40h, IVHD (I/O Virtualization Hardware Definition) */
+
+ case ACPI_IVRS_TYPE_HARDWARE2:
+ case ACPI_IVRS_TYPE_HARDWARE3:
+
+ InfoTable = AcpiDmTableInfoIvrsHware23;
+ break;
+
+ /* Types 20h, 21h, 22h, IVMD (I/O Virtualization Memory Definition Block) */
+
+ case ACPI_IVRS_TYPE_MEMORY1:
+ case ACPI_IVRS_TYPE_MEMORY2:
+ case ACPI_IVRS_TYPE_MEMORY3:
+
+ InfoTable = AcpiDmTableInfoIvrsMemory;
+ break;
+
+ /* 4-byte device entries */
+
+ case ACPI_IVRS_TYPE_PAD4:
+ case ACPI_IVRS_TYPE_ALL:
+ case ACPI_IVRS_TYPE_SELECT:
+ case ACPI_IVRS_TYPE_START:
+ case ACPI_IVRS_TYPE_END:
+
+ InfoTable = AcpiDmTableInfoIvrs4;
+ break;
+
+ /* 8-byte device entries, type A */
+
+ case ACPI_IVRS_TYPE_ALIAS_SELECT:
+ case ACPI_IVRS_TYPE_ALIAS_START:
+
+ InfoTable = AcpiDmTableInfoIvrs8a;
+ break;
+
+ /* 8-byte device entries, type B */
+
+ case ACPI_IVRS_TYPE_EXT_SELECT:
+ case ACPI_IVRS_TYPE_EXT_START:
+
+ InfoTable = AcpiDmTableInfoIvrs8b;
+ break;
+
+ /* 8-byte device entries, type C */
+
+ case ACPI_IVRS_TYPE_SPECIAL:
+
+ InfoTable = AcpiDmTableInfoIvrs8c;
+ break;
+
+ /* Variable device entries, type F0h */
+
+ case ACPI_IVRS_TYPE_HID:
+
+ InfoTable = AcpiDmTableInfoIvrsHid;
+ break;
+
+ default:
+
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart,
+ "IVRS Device Entry");
+ return (AE_ERROR);
+ }
+
+ /* Compile the InfoTable from above */
+
+ Status = DtCompileTable (PFieldList, InfoTable,
&Subtable);
if (ACPI_FAILURE (Status))
{
@@ -1848,104 +2586,163 @@
}
ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
- DtPushSubtable (Subtable);
-
- IvrsHeader = ACPI_CAST_PTR (ACPI_IVRS_HEADER, Subtable->Buffer);
-
- switch (IvrsHeader->Type)
+ if (SubtableType != ACPI_IVRS_TYPE_HARDWARE1 &&
+ SubtableType != ACPI_IVRS_TYPE_HARDWARE2 &&
+ SubtableType != ACPI_IVRS_TYPE_HARDWARE3 &&
+ SubtableType != ACPI_IVRS_TYPE_HID &&
+ SubtableType != ACPI_IVRS_TYPE_MEMORY1 &&
+ SubtableType != ACPI_IVRS_TYPE_MEMORY2 &&
+ SubtableType != ACPI_IVRS_TYPE_MEMORY3)
{
- case ACPI_IVRS_TYPE_HARDWARE:
+ if (ParentTable)
+ DtInsertSubtable (ParentTable, Subtable);
+ }
- InfoTable = AcpiDmTableInfoIvrs0;
- break;
-
+ switch (SubtableType)
+ {
+ case ACPI_IVRS_TYPE_HARDWARE1:
+ case ACPI_IVRS_TYPE_HARDWARE2:
+ case ACPI_IVRS_TYPE_HARDWARE3:
case ACPI_IVRS_TYPE_MEMORY1:
case ACPI_IVRS_TYPE_MEMORY2:
case ACPI_IVRS_TYPE_MEMORY3:
- InfoTable = AcpiDmTableInfoIvrs1;
+ /* Insert these IVHDs/IVMDs at the root subtable */
+
+ DtInsertSubtable (MainSubtable, Subtable);
+ DtPushSubtable (Subtable);
break;
- default:
+ case ACPI_IVRS_TYPE_HID:
- DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IVRS");
- return (AE_ERROR);
- }
+ /* Special handling for the HID named device entry (0xF0) */
- Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
-
- if (IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE)
- {
- while (*PFieldList &&
- !strcmp ((*PFieldList)->Name, "Entry Type"))
+ if (ParentTable)
{
- SubtableStart = *PFieldList;
- DtCompileInteger (&EntryType, *PFieldList, 1, 0);
+ DtInsertSubtable (ParentTable, Subtable);
+ }
- switch (EntryType)
- {
- /* 4-byte device entries */
+ /*
+ * Process the HID value. First, get the HID value as a string.
+ */
+ DtCompileOneField ((UINT8 *) &Temp64, *PFieldList, 16, DT_FIELD_TYPE_STRING, 0);
- case ACPI_IVRS_TYPE_PAD4:
- case ACPI_IVRS_TYPE_ALL:
- case ACPI_IVRS_TYPE_SELECT:
- case ACPI_IVRS_TYPE_START:
- case ACPI_IVRS_TYPE_END:
+ /*
+ * Determine if the HID is an integer or a string.
+ * An integer is defined to be 32 bits, with the upper 32 bits
+ * set to zero. (from the ACPI Spec): "The HID can be a 32-bit
+ * integer or a character string. If an integer, the lower
+ * 4 bytes of the field contain the integer and the upper
+ * 4 bytes are padded with 0".
+ */
+ if (UtIsIdInteger ((UINT8 *) &Temp64))
+ {
+ /* Compile the HID value as an integer */
- InfoTable = AcpiDmTableInfoIvrs4;
- break;
+ DtCompileOneField ((UINT8 *) &Temp64, *PFieldList, 8, DT_FIELD_TYPE_INTEGER, 0);
- /* 8-byte entries, type A */
-
- case ACPI_IVRS_TYPE_ALIAS_SELECT:
- case ACPI_IVRS_TYPE_ALIAS_START:
-
- InfoTable = AcpiDmTableInfoIvrs8a;
- break;
-
- /* 8-byte entries, type B */
-
- case ACPI_IVRS_TYPE_PAD8:
- case ACPI_IVRS_TYPE_EXT_SELECT:
- case ACPI_IVRS_TYPE_EXT_START:
-
- InfoTable = AcpiDmTableInfoIvrs8b;
- break;
-
- /* 8-byte entries, type C */
-
- case ACPI_IVRS_TYPE_SPECIAL:
-
- InfoTable = AcpiDmTableInfoIvrs8c;
- break;
-
- default:
-
- DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart,
- "IVRS Device Entry");
- return (AE_ERROR);
- }
-
- Status = DtCompileTable (PFieldList, InfoTable,
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsHidInteger,
&Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
-
- DtInsertSubtable (ParentTable, Subtable);
}
- }
+ else
+ {
+ /* Compile the HID value as a string */
- DtPopSubtable ();
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsHidString,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /*
+ * Process the CID value. First, get the CID value as a string.
+ */
+ DtCompileOneField ((UINT8 *) &Temp64, *PFieldList, 16, DT_FIELD_TYPE_STRING, 0);
+
+ if (UtIsIdInteger ((UINT8 *) &Temp64))
+ {
+ /* Compile the CID value as an integer */
+
+ DtCompileOneField ((UINT8 *) &Temp64, *PFieldList, 8, DT_FIELD_TYPE_INTEGER, 0);
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsCidInteger,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+ else
+ {
+ /* Compile the CID value as a string */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsCidString,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /*
+ * Process the UID value. First, get and decode the "UID Format" field (Integer).
+ */
+ if (!*PFieldList)
+ {
+ return (AE_OK);
+ }
+
+ DtCompileOneField (&Temp8, *PFieldList, 1, DT_FIELD_TYPE_INTEGER, 0);
+
+ switch (Temp8)
+ {
+ case ACPI_IVRS_UID_NOT_PRESENT:
+ break;
+
+ case ACPI_IVRS_UID_IS_INTEGER:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsUidInteger,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+ break;
+
+ case ACPI_IVRS_UID_IS_STRING:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoIvrsUidString,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+ break;
+
+ default:
+
+ DtFatal (ASL_MSG_UNKNOWN_FORMAT, SubtableStart,
+ "IVRS Device Entry");
+ return (AE_ERROR);
+ }
+
+ default:
+
+ /* All other subtable types come through here */
+ break;
+ }
}
return (AE_OK);
diff --git a/source/compiler/dttable2.c b/source/compiler/dttable2.c
index 28a6138..cd32838 100644
--- a/source/compiler/dttable2.c
+++ b/source/compiler/dttable2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -254,10 +258,24 @@
InfoTable = AcpiDmTableInfoMadt15;
break;
+ case ACPI_MADT_TYPE_MULTIPROC_WAKEUP:
+
+ InfoTable = AcpiDmTableInfoMadt16;
+ break;
+
default:
- DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "MADT");
- return (AE_ERROR);
+ if (MadtHeader->Type >= ACPI_MADT_TYPE_OEM_RESERVED)
+ {
+ InfoTable = AcpiDmTableInfoMadt17;
+ }
+ else
+ {
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "MADT");
+ return (AE_ERROR);
+ }
+
+ break;
}
Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
@@ -464,31 +482,6 @@
/******************************************************************************
*
- * FUNCTION: DtCompileMtmr
- *
- * PARAMETERS: List - Current field list pointer
- *
- * RETURN: Status
- *
- * DESCRIPTION: Compile MTMR.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-DtCompileMtmr (
- void **List)
-{
- ACPI_STATUS Status;
-
-
- Status = DtCompileTwoSubtables (List,
- AcpiDmTableInfoMtmr, AcpiDmTableInfoMtmr0);
- return (Status);
-}
-
-
-/******************************************************************************
- *
* FUNCTION: DtCompileNfit
*
* PARAMETERS: List - Current field list pointer
@@ -691,6 +684,399 @@
/******************************************************************************
*
+ * FUNCTION: DtCompileNhlt
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile NHLT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileNhlt (
+ void **List)
+{
+ ACPI_STATUS Status;
+ UINT32 EndpointCount;
+ UINT32 MicrophoneCount;
+ UINT32 FormatsCount;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ UINT32 CapabilitiesSize;
+ UINT8 ArrayType;
+ UINT8 ConfigType;
+ UINT8 DeviceInfoCount;
+ UINT32 i;
+ UINT32 j;
+ ACPI_TABLE_NHLT_ENDPOINT_COUNT *MainTable;
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A *DevSpecific;
+ ACPI_NHLT_VENDOR_MIC_COUNT *MicCount;
+ ACPI_NHLT_FORMATS_CONFIG *FormatsConfig;
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D *ConfigSpecific;
+ ACPI_NHLT_DEVICE_INFO_COUNT *DeviceInfo;
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B *Terminator;
+
+
+ /* Main table */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Get the Endpoint Descriptor count */
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ MainTable = ACPI_CAST_PTR (ACPI_TABLE_NHLT_ENDPOINT_COUNT, Subtable->Buffer);
+ EndpointCount = MainTable->EndpointCount;
+
+ /* Subtables */
+
+ while (*PFieldList)
+ {
+ /* Variable number of Endpoint descriptors */
+
+ for (i = 0; i < EndpointCount; i++)
+ {
+ /* Do the Endpoint Descriptor */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt0,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ /* Do the Device Specific table */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5b,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ DevSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Subtable->Buffer);
+ CapabilitiesSize = DevSpecific->CapabilitiesSize;
+
+ ArrayType = 0;
+ ConfigType = 0;
+
+ switch (CapabilitiesSize)
+ {
+ case 0:
+ break;
+
+ case 1:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5c,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ break;
+
+ case 2:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ break;
+
+ case 3:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ ConfigSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D, Subtable->Buffer);
+ ArrayType = ConfigSpecific->ArrayType;
+ ConfigType = ConfigSpecific->ConfigType;
+ break;
+
+ case 7:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt6b,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ ConfigSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D, Subtable->Buffer);
+ ArrayType = ConfigSpecific->ArrayType;
+ ConfigType = ConfigSpecific->ConfigType;
+ break;
+
+ default:
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ ConfigSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D, Subtable->Buffer);
+ ArrayType = ConfigSpecific->ArrayType;
+ ConfigType = ConfigSpecific->ConfigType;
+ break;
+
+ } /* switch (CapabilitiesSize) */
+
+ if (CapabilitiesSize >= 3)
+ {
+ /* Check for a vendor-defined mic array */
+
+ if (ConfigType == ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY)
+ {
+ if ((ArrayType & ACPI_NHLT_ARRAY_TYPE_MASK) == ACPI_NHLT_VENDOR_DEFINED)
+ {
+ /* Get the microphone count */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt6a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ MicCount = ACPI_CAST_PTR (ACPI_NHLT_VENDOR_MIC_COUNT, Subtable->Buffer);
+ MicrophoneCount = MicCount->MicrophoneCount;
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Variable number of microphones */
+
+ for (j = 0; j < MicrophoneCount; j++)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt6,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+
+ /* Do the MIC_SNR_SENSITIVITY_EXTENSION, if present */
+
+ if (ArrayType & ACPI_NHLT_ARRAY_TYPE_EXT_MASK)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt9,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ }
+ }
+ }
+
+ /* Get the formats count */
+
+ DtPopSubtable ();
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt4,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ FormatsConfig = ACPI_CAST_PTR (ACPI_NHLT_FORMATS_CONFIG, Subtable->Buffer);
+ FormatsCount = FormatsConfig->FormatsCount;
+
+ /* Variable number of wave_format_extensible structs */
+
+ for (j = 0; j < FormatsCount; j++)
+ {
+ /* Do the main wave_format_extensible structure */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt3,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ /* Do the capabilities list */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt3a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ DtPopSubtable ();
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ } /* for (j = 0; j < FormatsCount; j++) */
+
+ /*
+ * If we are not done with the current Endpoint yet, then there must be
+ * some non documeneted structure(s) yet to be processed. First, get
+ * the count of such structure(s).
+ */
+ if (*PFieldList && !(strcmp ((const char *) (*PFieldList)->Name, "Device Info struct count")))
+ {
+ /* Get the count of non documented structures */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt7,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ DeviceInfo = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_INFO_COUNT, Subtable->Buffer);
+ DeviceInfoCount = DeviceInfo->StructureCount;
+
+ for (j = 0; j < DeviceInfoCount; j++)
+ {
+ /*
+ * Compile the following Device Info fields:
+ * 1) Device ID
+ * 2) Device Instance ID
+ * 3) Device Port ID
+ */
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt7a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ } /* for (j = 0; j < LinuxSpecificCount; j++) */
+
+ /* Undocumented data at the end of endpoint */
+ if (*PFieldList && !(strcmp ((const char *) (*PFieldList)->Name, "Bytes")))
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt7b,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ }
+
+ DtPopSubtable ();
+
+ } /* for (i = 0; i < EndpointCount; i++) */
+
+ /*
+ * All Endpoint Descriptors are completed.
+ * Do the table terminator specific config (not in NHLT spec, optional)
+ */
+ if (*PFieldList && !(strcmp ((const char *) (*PFieldList)->Name, "Capabilities Size")))
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5b,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ Terminator = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B, Subtable->Buffer);
+
+ if (Terminator->CapabilitiesSize)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt3a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ }
+
+ return (AE_OK);
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompilePcct
*
* PARAMETERS: List - Current field list pointer
@@ -771,6 +1157,11 @@
InfoTable = AcpiDmTableInfoPcct4;
break;
+ case ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE:
+
+ InfoTable = AcpiDmTableInfoPcct5;
+ break;
+
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "PCCT");
@@ -854,6 +1245,262 @@
/******************************************************************************
*
+ * FUNCTION: DtCompilePhat
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile Phat.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompilePhat (
+ void **List)
+{
+ ACPI_STATUS Status = AE_OK;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ ACPI_PHAT_HEADER *PhatHeader;
+ ACPI_DMTABLE_INFO *Info;
+ ACPI_PHAT_VERSION_DATA *VersionData;
+ UINT32 DeviceDataLength;
+ UINT32 RecordCount;
+ DT_FIELD *DataOffsetField;
+ DT_FIELD *DevicePathField;
+ UINT32 TableOffset = 0;
+ UINT32 DataOffsetValue;
+ UINT32 i;
+
+
+ /* The table consists of subtables */
+
+ while (*PFieldList)
+ {
+ /* Compile the common subtable header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhatHdr, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ TableOffset += Subtable->Length;
+ DbgPrint (ASL_DEBUG_OUTPUT, "0 Subtable->Length: %X\n", Subtable->Length);
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ PhatHeader = ACPI_CAST_PTR (ACPI_PHAT_HEADER, Subtable->Buffer);
+
+ switch (PhatHeader->Type)
+ {
+ case ACPI_PHAT_TYPE_FW_VERSION_DATA:
+
+ /* Compile the middle portion of the Firmware Version Data */
+
+ Info = AcpiDmTableInfoPhat0;
+ PhatHeader->Length = sizeof (ACPI_PHAT_VERSION_DATA);
+ DataOffsetField = NULL;
+ break;
+
+ case ACPI_PHAT_TYPE_FW_HEALTH_DATA:
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "1 Offset: %X, Name: \"%s\" Length: %X\n",
+ (*PFieldList)->TableOffset, (*PFieldList)->Name, Subtable->Length);
+
+ DataOffsetField = *PFieldList;
+
+ /* Walk the field list to get to the "Device-specific data Offset" field */
+
+ TableOffset = sizeof (ACPI_PHAT_HEALTH_DATA);
+ for (i = 0; i < 3; i++)
+ {
+ DataOffsetField = DataOffsetField->Next;
+ DbgPrint (ASL_DEBUG_OUTPUT, "2 Offset: %X, Name: \"%s\" Length: %X Value: %s:\n",
+ TableOffset, DataOffsetField->Name, DataOffsetField->StringLength, DataOffsetField->Value);
+ }
+
+ /* Convert DataOffsetField->Value (a char * string) to an integer value */
+
+ sscanf (DataOffsetField->Value, "%X", &DataOffsetValue);
+
+ /*
+ * Get the next field (Device Path):
+ * DataOffsetField points to "Device-Specific Offset", next field is
+ * "Device Path".
+ */
+ DevicePathField = DataOffsetField->Next;
+
+ /* Compute the size of the input ASCII string as a unicode string (*2 + 2) */
+
+ DevicePathField->StringLength = (strlen ((const char *) DevicePathField->Value) * 2) + 2;
+ TableOffset += DevicePathField->StringLength;
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "3 Offset: %X, Length: %X devicepathLength: %X\n",
+ TableOffset, Subtable->Length, DevicePathField->StringLength);
+
+ /* Set the DataOffsetField to the current TableOffset */
+ /* Must set the DataOffsetField here (not later) */
+
+ if (DataOffsetValue != 0)
+ {
+ snprintf (DataOffsetField->Value, Subtable->Length, "%X", TableOffset);
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "4 Offset: %X, Length: %X\n", TableOffset, Subtable->Length);
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "5 TableOffset: %X, DataOffsetField->StringLength: "
+ "%X DevicePathField Length: %X DevicePathField->Value: %s, DataOffsetField->Value: %s DataOffsetField->ByteOffset %X\n",
+ TableOffset, DataOffsetField->StringLength, DevicePathField->StringLength,
+ DevicePathField->Value, DataOffsetField->Value, DataOffsetField->ByteOffset);
+
+ /* Compile the middle portion of the Health Data Record */
+
+ Info = AcpiDmTableInfoPhat1;
+ PhatHeader->Length = sizeof (ACPI_PHAT_HEALTH_DATA);
+ break;
+
+ default:
+
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT");
+ return (AE_ERROR);
+ }
+
+ /* Compile either the Version Data or the Health Data */
+
+ Status = DtCompileTable (PFieldList, Info, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "6 Offset: %X, Name: \"%s\" SubtableLength: %X\n",
+ TableOffset /* - StartTableOffset*/, (*PFieldList)->Name, Subtable->Length);
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ switch (PhatHeader->Type)
+ {
+ case ACPI_PHAT_TYPE_FW_VERSION_DATA:
+
+ VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA,
+ (Subtable->Buffer - sizeof (ACPI_PHAT_HEADER)));
+ RecordCount = VersionData->ElementCount;
+
+ /* Compile all of the Version Elements */
+
+ while (RecordCount)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat0a,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ TableOffset += Subtable->Length;
+ RecordCount--;
+ PhatHeader->Length += sizeof (ACPI_PHAT_VERSION_ELEMENT);
+ }
+
+ DtPopSubtable ();
+ break;
+
+ case ACPI_PHAT_TYPE_FW_HEALTH_DATA:
+
+ /* Compile the Device Path */
+
+ DeviceDataLength = Subtable->Length;
+ TableOffset += Subtable->Length;
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "7 Device Path Length: %X FieldName: \"%s\" FieldLength: "
+ "%s FieldValue: %s SubtableLength: %X TableOffset: %X\n", DeviceDataLength,
+ (*PFieldList)->Name, DataOffsetField->Value, (*PFieldList)->Value,
+ Subtable->Length, TableOffset);
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat1a, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* *PFieldList will be null if previous field was at the end-of-ParseTree (EOF) */
+
+ if (!*PFieldList)
+ {
+ DbgPrint (ASL_DEBUG_OUTPUT, "8 Exit on end-of-ParseTree\n");
+ return (AE_OK);
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "9 Device Data Length: %X FieldName: \"%s"
+ " TableOffset: %X FieldLength: %X Field Value: %s SubtableLength: %X\n",
+ DeviceDataLength, (*PFieldList)->Name, TableOffset,
+ (*PFieldList)->StringLength, (*PFieldList)->Value, Subtable->Length);
+
+ PhatHeader->Length += (UINT16) Subtable->Length;
+
+ /* Convert DataOffsetField->Value (a hex char * string) to an integer value */
+
+ sscanf (DataOffsetField->Value, "%X", &DataOffsetValue);
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "10 Device-Specific Offset: %X Table Offset: %X\n",
+ DataOffsetValue, TableOffset);
+ if (DataOffsetValue != 0)
+ {
+ /* Compile Device-Specific Data - only if the Data Offset is non-zero */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat1b, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "11 Subtable: %p Table Offset: %X\n",
+ Subtable, TableOffset);
+ if (Subtable)
+ {
+ DbgPrint (ASL_DEBUG_OUTPUT, "12 Device Specific Offset: "
+ "%X FieldName \"%s\" SubtableLength %X\n",
+ DeviceDataLength, DataOffsetField->Name, Subtable->Length);
+
+ DeviceDataLength += Subtable->Length;
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ PhatHeader->Length += (UINT16) Subtable->Length;
+ }
+ }
+
+ DtPopSubtable ();
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "13 FieldName: \"%s\" FieldLength: %X Field Value: %s\n",
+ DataOffsetField->Name, DataOffsetField->StringLength, DataOffsetField->Value);
+ break;
+
+ default:
+
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT");
+ return (AE_ERROR);
+ }
+ }
+
+ return (Status);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompilePmtt
*
* PARAMETERS: List - Current field list pointer
@@ -873,10 +1520,7 @@
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
- ACPI_PMTT_HEADER *PmttHeader;
- ACPI_PMTT_CONTROLLER *PmttController;
- UINT16 DomainCount;
- UINT8 PrevType = ACPI_PMTT_TYPE_SOCKET;
+ UINT16 Type;
/* Main table */
@@ -891,41 +1535,21 @@
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
+ /* Subtables */
+
while (*PFieldList)
{
SubtableStart = *PFieldList;
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmttHdr,
- &Subtable);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ DtCompileInteger ((UINT8 *) &Type, *PFieldList, 2, 0);
- PmttHeader = ACPI_CAST_PTR (ACPI_PMTT_HEADER, Subtable->Buffer);
- while (PrevType >= PmttHeader->Type)
- {
- DtPopSubtable ();
-
- if (PrevType == ACPI_PMTT_TYPE_SOCKET)
- {
- break;
- }
-
- PrevType--;
- }
-
- PrevType = PmttHeader->Type;
-
- ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
- DtPushSubtable (Subtable);
-
- switch (PmttHeader->Type)
+ switch (Type)
{
case ACPI_PMTT_TYPE_SOCKET:
/* Subtable: Socket Structure */
+ DbgPrint (ASL_DEBUG_OUTPUT, "Compile PMTT_TYPE_SOCKET (0)\n");
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt0,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -933,14 +1557,14 @@
return (Status);
}
- ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
break;
case ACPI_PMTT_TYPE_CONTROLLER:
/* Subtable: Memory Controller Structure */
+ DbgPrint (ASL_DEBUG_OUTPUT, "Compile PMTT_TYPE_CONTROLLER (1)\n");
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt1,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -948,31 +1572,13 @@
return (Status);
}
- ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
-
- PmttController = ACPI_CAST_PTR (ACPI_PMTT_CONTROLLER,
- (Subtable->Buffer - sizeof (ACPI_PMTT_HEADER)));
- DomainCount = PmttController->DomainCount;
-
- while (DomainCount)
- {
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt1a,
- &Subtable);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- DtInsertSubtable (ParentTable, Subtable);
- DomainCount--;
- }
break;
case ACPI_PMTT_TYPE_DIMM:
- /* Subtable: Physical Component Structure */
+ /* Subtable: Physical Component (DIMM) Structure */
+ DbgPrint (ASL_DEBUG_OUTPUT, "Compile PMTT_TYPE_DIMM (2)\n");
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt2,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -980,8 +1586,20 @@
return (Status);
}
- ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
+ break;
+
+ case ACPI_PMTT_TYPE_VENDOR:
+
+ /* Subtable: Vendor-specific Structure */
+
+ DbgPrint (ASL_DEBUG_OUTPUT, "Compile PMTT_TYPE_VENDOR(FF)\n");
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmttVendor,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
break;
default:
@@ -989,6 +1607,8 @@
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "PMTT");
return (AE_ERROR);
}
+
+ DtInsertSubtable (ParentTable, Subtable);
}
return (Status);
@@ -1019,6 +1639,7 @@
ACPI_DMTABLE_INFO *InfoTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
+ ACPI_TABLE_HEADER *PpttAcpiHeader;
ParentTable = DtPeekSubtable ();
@@ -1104,6 +1725,20 @@
}
break;
+ case ACPI_PPTT_TYPE_CACHE:
+
+ PpttAcpiHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ AslGbl_RootTable->Buffer);
+ if (PpttAcpiHeader->Revision < 3)
+ {
+ break;
+ }
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPptt1a,
+ &Subtable);
+ DtInsertSubtable (ParentTable, Subtable);
+ PpttHeader->Length += (UINT8)(Subtable->Length);
+ break;
+
default:
break;
@@ -1116,6 +1751,118 @@
/******************************************************************************
*
+ * FUNCTION: DtCompilePrmt
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile PRMT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompilePrmt (
+ void **List)
+{
+ ACPI_STATUS Status;
+ ACPI_TABLE_PRMT_HEADER *PrmtHeader;
+ ACPI_PRMT_MODULE_INFO *PrmtModuleInfo;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ UINT32 i, j;
+
+ ParentTable = DtPeekSubtable ();
+
+ /* Compile PRMT subtable header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtHdr,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+ PrmtHeader = ACPI_CAST_PTR (ACPI_TABLE_PRMT_HEADER, Subtable->Buffer);
+
+ for (i = 0; i < PrmtHeader->ModuleInfoCount; i++)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtModule,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+ PrmtModuleInfo = ACPI_CAST_PTR (ACPI_PRMT_MODULE_INFO, Subtable->Buffer);
+
+ for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; j++)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtHandler,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: DtCompileRgrt
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile RGRT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileRgrt (
+ void **List)
+{
+ ACPI_STATUS Status;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+
+
+ /* Compile the main table */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoRgrt,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Compile the "Subtable" -- actually just the binary (PNG) image */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoRgrt0,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ DtInsertSubtable (ParentTable, Subtable);
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompileRsdt
*
* PARAMETERS: List - Current field list pointer
@@ -1249,16 +1996,20 @@
DtCompileSdev (
void **List)
{
- ACPI_STATUS Status;
- ACPI_SDEV_HEADER *SdevHeader;
- DT_SUBTABLE *Subtable;
- DT_SUBTABLE *ParentTable;
- ACPI_DMTABLE_INFO *InfoTable;
- DT_FIELD **PFieldList = (DT_FIELD **) List;
- DT_FIELD *SubtableStart;
- ACPI_SDEV_PCIE *Pcie = NULL;
- ACPI_SDEV_NAMESPACE *Namesp = NULL;
- UINT32 EntryCount;
+ ACPI_STATUS Status;
+ ACPI_SDEV_HEADER *SdevHeader;
+ ACPI_SDEV_HEADER *SecureComponentHeader;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_DMTABLE_INFO *SecureComponentInfoTable = NULL;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ DT_FIELD *SubtableStart;
+ ACPI_SDEV_PCIE *Pcie = NULL;
+ ACPI_SDEV_NAMESPACE *Namesp = NULL;
+ UINT32 EntryCount;
+ ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL;
+ UINT16 ComponentLength = 0;
/* Subtables */
@@ -1288,6 +2039,8 @@
InfoTable = AcpiDmTableInfoSdev0;
Namesp = ACPI_CAST_PTR (ACPI_SDEV_NAMESPACE, Subtable->Buffer);
+ SecureComponent = ACPI_CAST_PTR (ACPI_SDEV_SECURE_COMPONENT,
+ ACPI_ADD_PTR (UINT8, Subtable->Buffer, sizeof(ACPI_SDEV_NAMESPACE)));
break;
case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE:
@@ -1319,6 +2072,86 @@
{
case ACPI_SDEV_TYPE_NAMESPACE_DEVICE:
+ /*
+ * Device Id Offset will be be calculated differently depending on
+ * the presence of secure access components.
+ */
+ Namesp->DeviceIdOffset = 0;
+ ComponentLength = 0;
+
+ /* If the secure access component exists, get the structures */
+
+ if (SdevHeader->Flags & ACPI_SDEV_SECURE_COMPONENTS_PRESENT)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoSdev0b,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ Namesp->DeviceIdOffset += sizeof (ACPI_SDEV_SECURE_COMPONENT);
+
+ /* Compile a secure access component header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoSdevSecCompHdr,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Compile the secure access component */
+
+ SecureComponentHeader = ACPI_CAST_PTR (ACPI_SDEV_HEADER, Subtable->Buffer);
+ switch (SecureComponentHeader->Type)
+ {
+ case ACPI_SDEV_TYPE_ID_COMPONENT:
+
+ SecureComponentInfoTable = AcpiDmTableInfoSdevSecCompId;
+ Namesp->DeviceIdOffset += sizeof (ACPI_SDEV_ID_COMPONENT);
+ ComponentLength = sizeof (ACPI_SDEV_ID_COMPONENT);
+ break;
+
+ case ACPI_SDEV_TYPE_MEM_COMPONENT:
+
+ SecureComponentInfoTable = AcpiDmTableInfoSdevSecCompMem;
+ Namesp->DeviceIdOffset += sizeof (ACPI_SDEV_MEM_COMPONENT);
+ ComponentLength = sizeof (ACPI_SDEV_MEM_COMPONENT);
+ break;
+
+ default:
+
+ /* Any other secure component types are undefined */
+
+ return (AE_ERROR);
+ }
+
+ Status = DtCompileTable (PFieldList, SecureComponentInfoTable,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ SecureComponent->SecureComponentOffset =
+ sizeof (ACPI_SDEV_NAMESPACE) + sizeof (ACPI_SDEV_SECURE_COMPONENT);
+ SecureComponent->SecureComponentLength = ComponentLength;
+
+
+ /*
+ * Add the secure component to the subtable to be added for the
+ * the namespace subtable's length
+ */
+ ComponentLength += sizeof (ACPI_SDEV_SECURE_COMPONENT);
+ }
+
/* Append DeviceId namespace string */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoSdev0a,
@@ -1336,7 +2169,8 @@
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
- Namesp->DeviceIdOffset = sizeof (ACPI_SDEV_NAMESPACE);
+ Namesp->DeviceIdOffset += sizeof (ACPI_SDEV_NAMESPACE);
+
Namesp->DeviceIdLength = (UINT16) Subtable->Length;
/* Append Vendor data */
@@ -1366,7 +2200,7 @@
/* Final size of entire namespace structure */
SdevHeader->Length = (UINT16)(sizeof(ACPI_SDEV_NAMESPACE) +
- Subtable->Length + Namesp->DeviceIdLength);
+ Subtable->Length + Namesp->DeviceIdLength) + ComponentLength;
}
}
@@ -1642,6 +2476,11 @@
InfoTable = AcpiDmTableInfoSrat5;
break;
+ case ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY:
+
+ InfoTable = AcpiDmTableInfoSrat6;
+ break;
+
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SRAT");
@@ -1718,6 +2557,62 @@
/******************************************************************************
*
+ * FUNCTION: DtCompileSvkl
+ *
+ * PARAMETERS: PFieldList - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile SVKL.
+ *
+ * NOTES: SVKL is essentially a flat table, with a small main table and
+ * a variable number of a single type of subtable.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileSvkl (
+ void **List)
+{
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ ACPI_STATUS Status;
+
+
+ /* Compile the main table */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoSvkl,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /* Compile each subtable */
+
+ while (*PFieldList)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoSvkl0,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompileTcpa
*
* PARAMETERS: PFieldList - Current field list pointer
@@ -2052,26 +2947,106 @@
/******************************************************************************
*
- * FUNCTION: DtCompileVrtc
+ * FUNCTION: DtCompileViot
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
- * DESCRIPTION: Compile VRTC.
+ * DESCRIPTION: Compile VIOT.
*
*****************************************************************************/
ACPI_STATUS
-DtCompileVrtc (
+DtCompileViot (
void **List)
{
ACPI_STATUS Status;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ DT_FIELD *SubtableStart;
+ ACPI_TABLE_VIOT *Viot;
+ ACPI_VIOT_HEADER *ViotHeader;
+ ACPI_DMTABLE_INFO *InfoTable;
+ UINT16 NodeCount;
+ ParentTable = DtPeekSubtable ();
- Status = DtCompileTwoSubtables (List,
- AcpiDmTableInfoVrtc, AcpiDmTableInfoVrtc0);
- return (Status);
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoViot, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+
+ /*
+ * Using ACPI_SUB_PTR, We needn't define a separate structure. Care
+ * should be taken to avoid accessing ACPI_TABLE_HEADER fields.
+ */
+ Viot = ACPI_SUB_PTR (ACPI_TABLE_VIOT, Subtable->Buffer,
+ sizeof (ACPI_TABLE_HEADER));
+
+ Viot->NodeOffset = sizeof (ACPI_TABLE_VIOT);
+
+ NodeCount = 0;
+ while (*PFieldList) {
+ SubtableStart = *PFieldList;
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoViotHeader,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ ViotHeader = ACPI_CAST_PTR (ACPI_VIOT_HEADER, Subtable->Buffer);
+
+ switch (ViotHeader->Type)
+ {
+ case ACPI_VIOT_NODE_PCI_RANGE:
+
+ InfoTable = AcpiDmTableInfoViot1;
+ break;
+
+ case ACPI_VIOT_NODE_MMIO:
+
+ InfoTable = AcpiDmTableInfoViot2;
+ break;
+
+ case ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI:
+
+ InfoTable = AcpiDmTableInfoViot3;
+ break;
+
+ case ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO:
+
+ InfoTable = AcpiDmTableInfoViot4;
+ break;
+
+ default:
+
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "VIOT");
+ return (AE_ERROR);
+ }
+
+ Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPopSubtable ();
+ NodeCount++;
+ }
+
+ Viot->NodeCount = NodeCount;
+ return (AE_OK);
}
@@ -2121,13 +3096,11 @@
DT_SUBTABLE *ParentTable;
ACPI_TABLE_WPBT *Table;
ACPI_STATUS Status;
- UINT16 Length;
/* Compile the main table */
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt,
- &Subtable);
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -2135,11 +3108,23 @@
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
+ Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
+
+ /*
+ * Exit now if there are no arguments specified. This is indicated by:
+ * The "Command-line Arguments" field has not been specified (if specified,
+ * it will be the last field in the field list -- after the main table).
+ * Set the Argument Length in the main table to zero.
+ */
+ if (!*PFieldList)
+ {
+ Table->ArgumentsLength = 0;
+ return (AE_OK);
+ }
/* Compile the argument list subtable */
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0,
- &Subtable);
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -2147,11 +3132,7 @@
/* Extract the length of the Arguments buffer, insert into main table */
- Length = (UINT16) Subtable->TotalLength;
- Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
- Table->ArgumentsLength = Length;
-
- ParentTable = DtPeekSubtable ();
+ Table->ArgumentsLength = (UINT16) Subtable->TotalLength;
DtInsertSubtable (ParentTable, Subtable);
return (AE_OK);
}
diff --git a/source/compiler/dttemplate.c b/source/compiler/dttemplate.c
index daca4a1..5a388a5 100644
--- a/source/compiler/dttemplate.c
+++ b/source/compiler/dttemplate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -143,6 +147,7 @@
if (AcpiGbl_Optind < 3)
{
+ fprintf (stderr, "Creating default template: [DSDT]\n");
Status = DtCreateOneTemplateFile (ACPI_SIG_DSDT, 0);
goto Exit;
}
@@ -528,7 +533,7 @@
{
fprintf (stderr,
"Created ACPI table templates for [%4.4s] "
- "and %u [SSDT], written to \"%s\"\n",
+ "and %u [SSDT] in same file, written to \"%s\"\n",
Signature, TableCount, DisasmFilename);
}
diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h
index 08a2a28..da10b51 100644
--- a/source/compiler/dttemplate.h
+++ b/source/compiler/dttemplate.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -43,6 +47,133 @@
/* Templates for ACPI data tables */
+const unsigned char TemplateAest[] =
+{
+ 0x41,0x45,0x53,0x54,0xCC,0x02,0x00,0x00, /* 00000000 "AEST...." */
+ 0x01,0x2A,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".*INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x04,0x06,0x21,0x20,0x00,0x80,0x00,0x00, /* 00000020 "..! ...." */
+ 0x2C,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 00000028 ",...D..." */
+ 0x74,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "t......." */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000038 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
+ 0xCD,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000058 "....gE#." */
+ 0x33,0x33,0x22,0x22,0x00,0x00,0x00,0x00, /* 00000060 "33""...." */
+ 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000068 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000070 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000090 "........" */
+ 0x01,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x78, /* 00000098 ".......x" */
+ 0x56,0x00,0x00,0x00,0x00,0x74,0x00,0x00, /* 000000A0 "V....t.." */
+ 0x2C,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 000000A8 ",...D..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 000000B8 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
+ 0x11,0x11,0x00,0x00,0x01,0x00,0x01,0x00, /* 000000D0 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 000000D8 "....gE#." */
+ 0x67,0x67,0x67,0x67,0x00,0x00,0x00,0x00, /* 000000E0 "gggg...." */
+ 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, /* 000000E8 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 000000F0 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000F8 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
+ 0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000110 "........" */
+ 0x01,0x60,0x00,0x00,0x2C,0x00,0x00,0x00, /* 00000118 ".`..,..." */
+ 0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "0......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
+ 0x00,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000138 "........" */
+ 0x67,0x45,0x23,0x01,0xAA,0xAA,0x00,0x00, /* 00000140 "gE#....." */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000148 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000150 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000168 "........" */
+ 0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000170 "........" */
+ 0x02,0x64,0x00,0x00,0x2C,0x00,0x00,0x00, /* 00000178 ".d..,..." */
+ 0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "4......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000188 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000190 "........" */
+ 0x00,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000198 "........" */
+ 0x67,0x45,0x23,0x01,0x55,0x55,0x55,0x55, /* 000001A0 "gE#.UUUU" */
+ 0x66,0x66,0x66,0x66,0x01,0x00,0x00,0x00, /* 000001A8 "ffff...." */
+ 0x03,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 000001B0 "........" */
+ 0x67,0x45,0x23,0x01,0x00,0x00,0x00,0x00, /* 000001B8 "gE#....." */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001C0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "........" */
+ 0x00,0x00,0x00,0x00,0x11,0x11,0x11,0x01, /* 000001D0 "........" */
+ 0x00,0x00,0x00,0x00,0x03,0x74,0x00,0x00, /* 000001D8 ".....t.." */
+ 0x2C,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 000001E0 ",...D..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F8 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000200 "....gE#." */
+ 0x33,0x33,0x33,0x33,0x44,0x44,0x44,0x44, /* 00000208 "3333DDDD" */
+ 0x12,0x23,0x34,0x45,0x56,0x67,0x78,0x89, /* 00000210 ".#4EVgx." */
+ 0x9A,0xAB,0xBC,0xCD,0xDE,0xEF,0xFF,0x55, /* 00000218 ".......U" */
+ 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000220 "........" */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000228 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000230 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000238 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000240 "........" */
+ 0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000248 "........" */
+ 0x04,0x7C,0x00,0x00,0x2C,0x00,0x00,0x00, /* 00000250 ".|..,..." */
+ 0x34,0x00,0x00,0x00,0x64,0x00,0x00,0x00, /* 00000258 "4...d..." */
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000260 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000268 "........" */
+ 0x00,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000270 "........" */
+ 0x67,0x45,0x23,0x01,0x03,0x00,0x00,0x00, /* 00000278 "gE#....." */
+ 0x88,0x88,0x77,0x77,0x00,0x00,0x00,0x00, /* 00000280 "..ww...." */
+ 0x03,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000288 "........" */
+ 0x67,0x45,0x23,0x01,0x00,0x00,0x00,0x00, /* 00000290 "gE#....." */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000298 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000002A0 "........" */
+ 0x00,0x00,0x00,0x00,0x11,0x11,0x11,0x01, /* 000002A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000002B0 "........" */
+ 0xBB,0xBB,0xAA,0xAA,0xCC,0x00,0x00,0x00, /* 000002B8 "........" */
+ 0x01,0x00,0x00,0x01,0xEF,0xCD,0xAB,0x78, /* 000002C0 ".......x" */
+ 0x56,0x00,0x00,0x00 /* 000002C8 "V..." */
+};
+
+const unsigned char TemplateAgdi[] =
+{
+ 0x41,0x47,0x44,0x49,0x30,0x00,0x00,0x00, /* 00000000 "AGDI0..." */
+ 0x01,0xE4,0x41,0x4D,0x50,0x45,0x52,0x45, /* 00000008 "..AMPERE" */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x05,0x01,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "..! ...." */
+ 0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00 /* 00000028 "...@...." */
+};
+
+const unsigned char TemplateApmt[] =
+{
+ 0x41,0x50,0x4D,0x54,0x94,0x00,0x00,0x00, /* 00000000 "APMT...." */
+ 0x00,0x79,0x4E,0x56,0x49,0x44,0x49,0x41, /* 00000008 ".yNVIDIA" */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x17,0x12,0x21,0x20,0x38,0x00,0x04,0x03, /* 00000020 "..! 8..." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 ". ......" */
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 ". ......" */
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x6B,0x03,0x00,0x00,0x38,0x00,0x06,0x03, /* 00000058 "k...8..." */
+ 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000070 ".0......" */
+ 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 ".0......" */
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x6B,0x03,0x00,0x00 /* 00000090 "k..." */
+};
+
const unsigned char TemplateAsf[] =
{
0x41,0x53,0x46,0x21,0x72,0x00,0x00,0x00, /* 00000000 "ASF!r..." */
@@ -62,6 +193,16 @@
0x01,0x00 /* 00000070 ".." */
};
+const unsigned char TemplateBdat[] =
+{
+ 0x42,0x44,0x41,0x54,0x30,0x00,0x00,0x00, /* 00000000 "BDAT0..." */
+ 0x01,0xED,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x31,0x03,0x21,0x20,0x01,0x08,0x00,0x01, /* 00000020 "1.! ...." */
+ 0xF0,0xDE,0xBC,0x9A,0x78,0x56,0x34,0x12 /* 00000028 "....xV4." */
+};
+
const unsigned char TemplateBgrt[] =
{
0x42,0x47,0x52,0x54,0x38,0x00,0x00,0x00, /* 00000000 "BGRT8..." */
@@ -92,6 +233,106 @@
0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00 /* 00000020 "(.. ...." */
};
+const unsigned char TemplateCcel[] =
+{
+ 0x43,0x43,0x45,0x4C,0x38,0x00,0x00,0x00, /* 00000000 "CCEL8..." */
+ 0x04,0x1C,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x30,0x09,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "0.! ...." */
+ 0xEF,0xCD,0xAB,0x78,0x56,0x34,0x12,0x00, /* 00000028 "...xV4.." */
+ 0x78,0x56,0x34,0x12,0xEF,0xCD,0xAB,0x00 /* 00000030 "xV4....." */
+};
+
+const unsigned char TemplateCedt[] =
+{
+ 0x43,0x45,0x44,0x54,0x9c,0x01,0x00,0x00, /* 00000000 "CEDT...." */
+ 0x01,0x87,0x49,0x4e,0x54,0x45,0x4c,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x45,0x4d,0x50,0x4c,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x00,0x00,0x00,0x00,0x49,0x4e,0x54,0x4c, /* 00000018 "....INTL" */
+ 0x17,0x12,0x21,0x20,0x00,0x00,0x20,0x00, /* 00000020 "..! .. ." */
+ 0x00,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000028 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000038 "..... .." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, /* 00000040 "...... ." */
+ 0x01,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000048 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000050 "..... .." */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000058 "..... .." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, /* 00000060 "...... ." */
+ 0x02,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000068 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00, /* 00000070 ".....0.." */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000078 "..... .." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, /* 00000080 "...... ." */
+ 0x03,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000088 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, /* 00000090 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000098 "..... .." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x28,0x00, /* 000000a0 "......(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000a8 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000b0 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000b8 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 000000c0 "........" */
+ 0x00,0x5e,0xba,0x00,0x01,0x00,0x28,0x00, /* 000000c8 ".^....(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000d0 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000d8 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000e0 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 000000e8 "........" */
+ 0x01,0x5e,0xba,0x00,0x01,0x00,0x28,0x00, /* 000000f0 ".^....(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000f8 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 00000110 "........" */
+ 0x02,0x5e,0xba,0x00,0x01,0x00,0x28,0x00, /* 00000118 ".^....(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 00000138 "........" */
+ 0x03,0x5e,0xba,0x00,0x01,0x00,0x2c,0x00, /* 00000140 ".^....,." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
+ 0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */
+ 0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 00000160 "........" */
+ 0x00,0x5e,0xba,0x00,0x01,0x5e,0xba,0x00, /* 00000160 ".^...^.." */
+ 0x01,0x00,0x2c,0x00,0x00,0x00,0x00,0x00, /* 00000170 "..,....." */
+ 0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00, /* 00000178 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 00000180 "........" */
+ 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, /* 00000188 "........" */
+ 0x0a,0x00,0x01,0x00,0x02,0x5e,0xba,0x00, /* 00000190 ".....^.." */
+ 0x03,0x5e,0xba,0x00 /* 00000198 ".^.." */
+};
+
+const unsigned char TemplateCdat[] =
+{
+ 0xE4,0x00,0x00,0x00,0x01,0x0C,0x00,0x00, /* 00000000 "........" */
+ 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, /* 00000008 "........" */
+ 0x03,0x00,0x08,0x00,0x04,0x56,0x00,0x00, /* 00000010 ".....V.." */
+ 0x00,0x00,0x18,0x00,0xEF,0x01,0x00,0x00, /* 00000018 "........" */
+ 0x89,0x67,0x45,0x23,0x01,0x00,0x00,0x00, /* 00000020 ".gE#...." */
+ 0xAB,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x03,0x00,0x08,0x00,0x04,0x56,0x00,0x00, /* 00000030 ".....V.." */
+ 0x01,0x00,0x18,0x00,0x44,0x04,0x64,0x00, /* 00000038 "....D.d." */
+ 0xCD,0xAB,0x89,0x67,0x45,0x23,0x01,0x00, /* 00000040 "...gE#.." */
+ 0x33,0x22,0x44,0x33,0x55,0x44,0x00,0x00, /* 00000048 "3"D3UD.." */
+ 0x02,0x00,0x14,0x00,0x99,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x00,0x00,0x00,0x00,0x78,0x56,0x34,0x12, /* 00000058 "....xV4." */
+ 0x55,0x55,0x44,0x44,0x04,0x00,0x18,0x00, /* 00000060 "UUDD...." */
+ 0x88,0x32,0x00,0x00,0x77,0x77,0x77,0x77, /* 00000068 ".2..wwww" */
+ 0x11,0x11,0x11,0x11,0x88,0x88,0x88,0x88, /* 00000070 "........" */
+ 0x22,0x22,0x22,0x22,0x05,0x00,0x20,0x00, /* 00000078 """"".. ." */
+ 0x04,0x00,0x00,0x00,0x44,0x44,0x44,0x44, /* 00000080 "....DDDD" */
+ 0x33,0x33,0x33,0x33,0x44,0x44,0x55,0x55, /* 00000088 "3333DDUU" */
+ 0x66,0x66,0x00,0x00,0x77,0x77,0x88,0x88, /* 00000090 "ff..ww.." */
+ 0x99,0x99,0x00,0x00,0x05,0x00,0x18,0x00, /* 00000098 "........" */
+ 0x04,0x00,0x00,0x00,0x22,0x22,0x22,0x22, /* 000000A0 "....""""" */
+ 0x11,0x11,0x11,0x11,0x34,0x12,0x56,0x78, /* 000000A8 "....4.Vx" */
+ 0x11,0x11,0x00,0x00,0x05,0x00,0x30,0x00, /* 000000B0 "......0." */
+ 0x08,0x00,0x00,0x00,0x66,0x66,0x66,0x66, /* 000000B8 "....ffff" */
+ 0x55,0x55,0x55,0x55,0x44,0x44,0x55,0x55, /* 000000C0 "UUUUDDUU" */
+ 0x66,0x66,0x00,0x00,0x77,0x77,0x88,0x88, /* 000000C8 "ff..ww.." */
+ 0x99,0x99,0x00,0x00,0xAA,0xAA,0xBB,0xBB, /* 000000D0 "........" */
+ 0xCC,0xCC,0x00,0x00,0x55,0x55,0x44,0x44, /* 000000D8 "....UUDD" */
+ 0x33,0x33,0x00,0x00 /* 000000E0 "33.." */
+};
+
const unsigned char TemplateCpep[] =
{
0x43,0x50,0x45,0x50,0x34,0x00,0x00,0x00, /* 00000000 "CPEP4..." */
@@ -189,11 +430,11 @@
const unsigned char TemplateDmar[] =
{
- 0x44,0x4D,0x41,0x52,0x8C,0x00,0x00,0x00, /* 00000000 "DMAR...." */
- 0x01,0x03,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x44,0x4D,0x41,0x52,0x9C,0x00,0x00,0x00, /* 00000000 "DMAR...." */
+ 0x01,0xB8,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x17,0x05,0x13,0x20,0x2F,0x01,0x00,0x00, /* 00000020 "... /..." */
+ 0x17,0x12,0x21,0x20,0x2F,0x01,0x00,0x00, /* 00000020 "..! /..." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x18,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -206,7 +447,9 @@
0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x03, /* 00000070 "........" */
0x03,0x00,0x14,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
- 0x00,0x00,0x00,0x00 /* 00000088 "...." */
+ 0x00,0x00,0x00,0x00,0x05,0x00,0x10,0x00, /* 00000088 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x08,0x00,0x00, /* 00000090 "........" */
+ 0x00,0x00,0x00,0x02 /* 00000098 "...." */
};
const unsigned char TemplateDrtm[] =
@@ -585,39 +828,39 @@
const unsigned char TemplateIort[] =
{
- 0x49,0x4F,0x52,0x54,0xF8,0x01,0x00,0x00, /* 00000000 "IORT...." */
- 0x00,0x72,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".rINTEL " */
+ 0x49,0x4F,0x52,0x54,0x3C,0x02,0x00,0x00, /* 00000000 "IORT<..." */
+ 0x05,0xCB,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x13,0x03,0x18,0x20,0x06,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x17,0x12,0x21,0x20,0x07,0x00,0x00,0x00, /* 00000020 "..! ...." */
0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "4......." */
- 0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00, /* 00000030 "........" */
+ 0x49,0x4F,0x52,0x54,0x00,0x18,0x00,0x01, /* 00000030 "IORT...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000040 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x04, /* 00000048 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000050 "........" */
0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "l......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43, /* 00000068 ".\_SB.PC" */
0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00, /* 00000070 "I0.DEV0." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x49,0x4F,0x52,0x54,0x3C,0x02,0x00,0x00, /* 00000078 "IORT<..." */
+ 0x03,0xF1,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000080 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000088 "Template" */
+ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000090 "....INTL" */
+ 0x05,0x01,0x21,0x20,0x07,0x00,0x00,0x00, /* 00000098 "..! ...." */
+ 0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "4......." */
+ 0x49,0x4F,0x52,0x54,0x00,0x18,0x00,0x01, /* 000000A8 "IORT...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
- 0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x00, /* 000000C8 ".....8.." */
+ 0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x04, /* 000000C8 ".....8.." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000D0 "........" */
0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "$......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
- 0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x01, /* 00000100 ".....`.." */
+ 0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x03, /* 00000100 ".....`.." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000108 "........" */
0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "L......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */
@@ -629,7 +872,7 @@
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
- 0x00,0x00,0x00,0x00,0x04,0x58,0x00,0x01, /* 00000160 ".....X.." */
+ 0x00,0x00,0x00,0x00,0x04,0x58,0x00,0x04, /* 00000160 ".....X.." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000168 "........" */
0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000170 "D......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
@@ -640,42 +883,93 @@
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B0 "........" */
- 0x00,0x00,0x00,0x00,0x05,0x3C,0x00,0x01, /* 000001B8 ".....<.." */
+ 0x00,0x00,0x00,0x00,0x05,0x3C,0x00,0x02, /* 000001B8 ".....<.." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001C0 "........" */
0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "(......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00 /* 000001F0 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001F0 "........" */
+ 0x06,0x44,0x00,0x03,0x00,0x00,0x00,0x00, /* 000001F8 ".D......" */
+ 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, /* 00000200 "....0..." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000208 "........" */
+ 0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000210 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000218 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000220 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000228 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000230 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000238 "...." */
};
const unsigned char TemplateIvrs[] =
{
- 0x49,0x56,0x52,0x53,0xBC,0x00,0x00,0x00, /* 00000000 "IVRS...." */
- 0x01,0x87,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x49,0x56,0x52,0x53,0x10,0x02,0x00,0x00, /* 00000000 "IVRS...." */
+ 0x02,0x6C,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".lINTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x31,0x03,0x21,0x20,0x41,0x30,0x20,0x00, /* 00000020 "1.! A0 ." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
- 0x10,0x14,0x34,0x00,0x00,0x00,0x00,0x00, /* 00000030 "..4....." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
- 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00, /* 00000048 "....@..." */
- 0x00,0x00,0x00,0x00,0x42,0x00,0x00,0x00, /* 00000050 "....B..." */
- 0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00, /* 00000058 "....H..." */
- 0x00,0x00,0x00,0x00,0x20,0x08,0x20,0x00, /* 00000060 ".... . ." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000070 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
- 0x00,0x00,0x00,0x00,0x21,0x04,0x20,0x00, /* 00000080 "....!. ." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
- 0x00,0x00,0x00,0x00,0x10,0x14,0x18,0x00, /* 000000A0 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
- 0x00,0x00,0x00,0x00 /* 000000B8 "...." */
+ 0x10,0xB0,0x64,0x00,0x02,0x00,0x40,0x00, /* 00000030 "..d...@." */
+ 0x00,0x00,0xF0,0xFD,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x6F,0x8F,0x04,0x80, /* 00000040 "....o..." */
+ 0x03,0x08,0x00,0x00,0x01,0x08,0x00,0x00, /* 00000048 "........" */
+ 0x02,0x08,0x00,0x00,0x04,0xFE,0xFF,0x00, /* 00000050 "........" */
+ 0x42,0x00,0xFF,0x00,0x00,0xA5,0x00,0x00, /* 00000058 "B......." */
+ 0x43,0x00,0xFF,0x00,0x00,0xA5,0x00,0x00, /* 00000060 "C......." */
+ 0x46,0x00,0xFF,0x00,0x44,0x33,0x22,0x11, /* 00000068 "F...D3"." */
+ 0x47,0x00,0xFF,0x00,0x44,0x33,0x22,0x11, /* 00000070 "G...D3"." */
+ 0x04,0xFF,0xFF,0x00,0x48,0x00,0x00,0x00, /* 00000078 "....H..." */
+ 0x00,0xA0,0x00,0x02,0x48,0x00,0x00,0xD7, /* 00000080 "....H..." */
+ 0x21,0xA0,0x00,0x01,0x48,0x00,0x00,0x00, /* 00000088 "!...H..." */
+ 0x22,0x01,0x00,0x01,0x11,0xB0,0x48,0x00, /* 00000090 "".....H." */
+ 0x02,0x00,0x40,0x00,0x00,0x00,0xF0,0xFD, /* 00000098 "..@....." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x02,0x04,0x00,0xDE,0x4A,0x25,0x22, /* 000000A8 ".....J%"" */
+ 0xEF,0x73,0x6D,0x20,0x00,0x00,0x00,0x00, /* 000000B0 ".sm ...." */
+ 0x00,0x00,0x00,0x00,0x03,0x08,0x00,0x00, /* 000000B8 "........" */
+ 0x04,0xFE,0xFF,0x00,0x43,0x00,0xFF,0x00, /* 000000C0 "....C..." */
+ 0x00,0xA5,0x00,0x00,0x04,0xFF,0xFF,0x00, /* 000000C8 "........" */
+ 0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00, /* 000000D0 "....H..." */
+ 0x00,0xA0,0x00,0x02,0x40,0xB0,0xD4,0x00, /* 000000D8 "....@..." */
+ 0x02,0x00,0x40,0x00,0x00,0x00,0xF0,0xFD, /* 000000E0 "..@....." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
+ 0x00,0x02,0x04,0x00,0xDE,0x4A,0x25,0x22, /* 000000F0 ".....J%"" */
+ 0xEF,0x73,0x6D,0x20,0x00,0x00,0x00,0x00, /* 000000F8 ".sm ...." */
+ 0x00,0x00,0x00,0x00,0x03,0x08,0x00,0x00, /* 00000100 "........" */
+ 0x04,0xFE,0xFF,0x00,0x43,0x00,0xFF,0x00, /* 00000108 "....C..." */
+ 0x00,0xA5,0x00,0x00,0x04,0xFF,0xFF,0x00, /* 00000110 "........" */
+ 0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00, /* 00000118 "....H..." */
+ 0x00,0xA0,0x00,0x02,0x48,0x00,0x00,0xD7, /* 00000120 "....H..." */
+ 0x21,0xA0,0x00,0x01,0x48,0x00,0x00,0x00, /* 00000128 "!...H..." */
+ 0x22,0x01,0x00,0x01,0xF0,0xA5,0x00,0x40, /* 00000130 ""......@" */
+ 0x49,0x4E,0x54,0x43,0x30,0x30,0x32,0x30, /* 00000138 "INTC0020" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 "........" */
+ 0x02,0x09,0x5C,0x5F,0x53,0x42,0x2E,0x44, /* 00000148 "..\_SB.D" */
+ 0x45,0x56,0x30,0xF0,0xA5,0x00,0x40,0x49, /* 00000150 "EV0...@I" */
+ 0x4E,0x54,0x43,0x30,0x30,0x32,0x30,0x00, /* 00000158 "NTC0020." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02, /* 00000160 "........" */
+ 0x09,0x5C,0x5F,0x53,0x42,0x2E,0x44,0x45, /* 00000168 ".\_SB.DE" */
+ 0x56,0x31,0xF0,0xA5,0x00,0x40,0x49,0x4E, /* 00000170 "V1...@IN" */
+ 0x54,0x43,0x30,0x30,0x32,0x30,0x00,0x00, /* 00000178 "TC0020.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x09, /* 00000180 "........" */
+ 0x5C,0x5F,0x53,0x42,0x2E,0x44,0x45,0x56, /* 00000188 "\_SB.DEV" */
+ 0x32,0xF0,0xA5,0x00,0x40,0x49,0x4E,0x54, /* 00000190 "2...@INT" */
+ 0x43,0x30,0x30,0x32,0x30,0x00,0x00,0x00, /* 00000198 "C0020..." */
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x09,0x5C, /* 000001A0 ".......\" */
+ 0x5F,0x53,0x42,0x2E,0x44,0x45,0x56,0x33, /* 000001A8 "_SB.DEV3" */
+ 0x20,0x0D,0x20,0x00,0x22,0x11,0x00,0x00, /* 000001B0 " . ."..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B8 "........" */
+ 0xCD,0xAB,0x78,0x56,0x34,0x12,0x00,0x00, /* 000001C0 "..xV4..." */
+ 0xDC,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "........" */
+ 0x21,0x0D,0x20,0x00,0x22,0x11,0x00,0x00, /* 000001D0 "!. ."..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D8 "........" */
+ 0xCD,0xAB,0x78,0x56,0x34,0x12,0x00,0x00, /* 000001E0 "..xV4..." */
+ 0xDC,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */
+ 0x22,0x0D,0x20,0x00,0x22,0x11,0x00,0x00, /* 000001F0 "". ."..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F8 "........" */
+ 0xCD,0xAB,0x78,0x56,0x34,0x12,0x00,0x00, /* 00000200 "..xV4..." */
+ 0xDC,0xFE,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000208 "........" */
};
const unsigned char TemplateLpit[] =
@@ -705,11 +999,11 @@
const unsigned char TemplateMadt[] =
{
- 0x41,0x50,0x49,0x43,0x5A,0x01,0x00,0x00, /* 00000000 "APICZ..." */
- 0x05,0xEF,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x41,0x50,0x49,0x43,0x6A,0x01,0x00,0x00, /* 00000000 "APICj..." */
+ 0x05,0x9D,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x08,0x01,0x19,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x13,0x11,0x20,0x20,0x00,0x00,0x00,0x00, /* 00000020 ".. ...." */
0x01,0x00,0x00,0x00,0x00,0x08,0x00,0x00, /* 00000028 "........" */
0x01,0x00,0x00,0x00,0x01,0x0C,0x01,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -748,7 +1042,9 @@
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x14, /* 00000140 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */
- 0x00,0x00 /* 00000158 ".." */
+ 0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
+ 0x00,0x00 /* 00000168 ".." */
};
const unsigned char TemplateMcfg[] =
@@ -844,105 +1140,164 @@
const unsigned char TemplateNfit[] =
{
- 0x4E,0x46,0x49,0x54,0x80,0x01,0x00,0x00, /* 00000000 "NFIT...." */
- 0x01,0x07,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x4E,0x46,0x49,0x54,0x88,0x01,0x00,0x00, /* 00000000 "NFIT...." */
+ 0x01,0x81,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x29,0x09,0x17,0x20,0x00,0x00,0x00,0x00, /* 00000020 ").. ...." */
- 0x00,0x00,0x38,0x00,0x01,0x00,0x00,0x00, /* 00000028 "..8....." */
+ 0x13,0x11,0x20,0x20,0x00,0x00,0x00,0x00, /* 00000020 ".. ...." */
+ 0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x00, /* 00000028 "..@....." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
0x30,0x05,0xAF,0x91,0x86,0x5D,0x0E,0x47, /* 00000038 "0....].G" */
0xA6,0xB0,0x0A,0x2D,0xB9,0x40,0x82,0x49, /* 00000040 "[email protected]" */
0x00,0x00,0x00,0x7C,0x03,0x00,0x00,0x00, /* 00000048 "...|...." */
0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, /* 00000050 "........" */
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
- 0x01,0x00,0x30,0x00,0x01,0x00,0x00,0x00, /* 00000060 "..0....." */
- 0x04,0x00,0x00,0x00,0x01,0x00,0x01,0x00, /* 00000068 "........" */
- 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00, /* 00000070 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
- 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00, /* 00000080 "........" */
- 0x01,0x00,0x03,0x00,0x2A,0x00,0x00,0x00, /* 00000088 "....*..." */
- 0x02,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000090 ".. ....." */
- 0x04,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 00000098 "........" */
- 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, /* 000000A0 "........" */
- 0x06,0x00,0x00,0x00,0x09,0x00,0x00,0x00, /* 000000A8 "........" */
- 0x03,0x00,0x28,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "..(....." */
- 0xB4,0x13,0x5D,0x40,0x91,0x0B,0x29,0x93, /* 000000B8 "..]@..)." */
- 0x67,0xE8,0x23,0x4C,0x00,0x00,0x00,0x88, /* 000000C0 "g.#L...." */
- 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77, /* 000000C8 ".."3DUfw" */
- 0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF, /* 000000D0 "........" */
- 0x04,0x00,0x50,0x00,0x01,0x00,0x86,0x80, /* 000000D8 "..P....." */
- 0x17,0x20,0x01,0x00,0x86,0x80,0x17,0x20, /* 000000E0 ". ..... " */
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
- 0x89,0x00,0x54,0x76,0x01,0x03,0x00,0x01, /* 000000F0 "..Tv...." */
- 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 ". ......" */
- 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
- 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
- 0x00,0x10,0x80,0x00,0x00,0x00,0x00,0x00, /* 00000110 "........" */
- 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
- 0x05,0x00,0x28,0x00,0x01,0x00,0x00,0x01, /* 00000128 "..(....." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
- 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000138 ". ......" */
- 0x00,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00, /* 00000140 "........" */
- 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00, /* 00000148 "........" */
- 0x06,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000150 ".. ....." */
- 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
- 0x00,0x00,0x00,0x18,0x04,0x00,0x00,0x00, /* 00000160 "........" */
- 0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00, /* 00000168 "........" */
- 0x07,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000170 "........" */
- 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000178 "........" */
+ 0x00,0xEF,0xCD,0xAB,0x78,0x56,0x34,0x12, /* 00000060 "....xV4." */
+ 0x01,0x00,0x30,0x00,0x01,0x00,0x00,0x00, /* 00000068 "..0....." */
+ 0x04,0x00,0x00,0x00,0x01,0x00,0x01,0x00, /* 00000070 "........" */
+ 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x01,0x00,0x03,0x00,0x2A,0x00,0x00,0x00, /* 00000090 "....*..." */
+ 0x02,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000098 ".. ....." */
+ 0x04,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x06,0x00,0x00,0x00,0x09,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x03,0x00,0x28,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "..(....." */
+ 0xB4,0x13,0x5D,0x40,0x91,0x0B,0x29,0x93, /* 000000C0 "..]@..)." */
+ 0x67,0xE8,0x23,0x4C,0x00,0x00,0x00,0x88, /* 000000C8 "g.#L...." */
+ 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77, /* 000000D0 ".."3DUfw" */
+ 0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF, /* 000000D8 "........" */
+ 0x04,0x00,0x50,0x00,0x01,0x00,0x86,0x80, /* 000000E0 "..P....." */
+ 0x17,0x20,0x01,0x00,0x86,0x80,0x17,0x20, /* 000000E8 ". ..... " */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */
+ 0x89,0x00,0x54,0x76,0x01,0x03,0x00,0x01, /* 000000F8 "..Tv...." */
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 ". ......" */
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
+ 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "........" */
+ 0x00,0x10,0x80,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */
+ 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
+ 0x05,0x00,0x28,0x00,0x01,0x00,0x00,0x01, /* 00000130 "..(....." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000138 "........" */
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 ". ......" */
+ 0x00,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00, /* 00000148 "........" */
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00, /* 00000150 "........" */
+ 0x06,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000158 ".. ....." */
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
+ 0x00,0x00,0x00,0x18,0x04,0x00,0x00,0x00, /* 00000168 "........" */
+ 0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00, /* 00000170 "........" */
+ 0x07,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
+ 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000180 "........" */
};
-const unsigned char TemplateMtmr[] =
+const unsigned char TemplateNhlt[] =
{
- 0x4D,0x54,0x4D,0x52,0x4C,0x00,0x00,0x00, /* 00000000 "MTMRL..." */
- 0x01,0xB0,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x4E,0x48,0x4C,0x54,0x1E,0x02,0x00,0x00, /* 00000000 "NHLT...." */
+ 0x01,0xF7,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
- 0x03,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x17,0x01,0x13,0x20,0x00,0x20,0x00,0x03, /* 00000020 "... . .." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
- 0x00,0x20,0x00,0x03,0x00,0x00,0x00,0x00, /* 00000038 ". ......" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
- 0x00,0x00,0x00,0x00 /* 00000048 "...." */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x30,0x09,0x21,0x20,0x04,0xAD,0x00,0x00, /* 00000020 "0.! ...." */
+ 0x00,0x02,0x06,0x07,0x00,0x30,0xAE,0x09, /* 00000028 ".....0.." */
+ 0x00,0x0A,0x00,0x00,0x00,0x02,0x03,0x0D, /* 00000030 "........" */
+ 0x38,0x00,0x00,0x00,0xCC,0x01,0x1F,0x02, /* 00000038 "8......." */
+ 0x04,0x00,0x13,0x00,0x09,0x00,0x11,0x00, /* 00000040 "........" */
+ 0x04,0x20,0x07,0x00,0x09,0x00,0x18,0x00, /* 00000048 ". ......" */
+ 0x22,0x00,0x11,0x00,0x15,0x00,0x05,0x03, /* 00000050 ""......." */
+ 0x13,0x00,0x09,0x00,0x11,0x00,0x04,0x20, /* 00000058 "....... " */
+ 0x07,0x00,0x09,0x00,0x18,0x00,0x22,0x00, /* 00000060 "......"." */
+ 0x11,0x00,0x15,0x00,0xAA,0xAA,0x99,0x99, /* 00000068 "........" */
+ 0x78,0x56,0x34,0x12,0x02,0xFE,0xFF,0x78, /* 00000070 "xV4....x" */
+ 0x56,0x44,0x33,0x00,0x00,0x66,0x55,0x00, /* 00000078 "VD3..fU." */
+ 0x00,0x00,0x80,0x16,0x00,0x32,0x00,0x04, /* 00000080 ".....2.." */
+ 0x00,0x99,0x99,0x88,0x88,0x6E,0x88,0x9F, /* 00000088 ".....n.." */
+ 0xA6,0xEB,0x6C,0x94,0x45,0xA4,0x1F,0x7B, /* 00000090 "..l.E..{" */
+ 0x5D,0xCE,0x24,0xC5,0x53,0x02,0x00,0x00, /* 00000098 "].$.S..." */
+ 0x00,0x30,0x40,0xFE,0xFF,0x78,0x56,0x44, /* 000000A0 "[email protected]" */
+ 0x33,0x00,0x00,0x66,0x55,0x00,0x00,0x00, /* 000000A8 "3..fU..." */
+ 0x80,0x16,0x00,0x32,0x00,0x04,0x00,0x99, /* 000000B0 "...2...." */
+ 0x99,0x88,0x88,0x6E,0x88,0x9F,0xA6,0xEB, /* 000000B8 "...n...." */
+ 0x6C,0x94,0x45,0xA4,0x1F,0x7B,0x5D,0xCE, /* 000000C0 "l.E..{]." */
+ 0x24,0xC5,0x53,0x03,0x00,0x00,0x00,0x50, /* 000000C8 "$.S....P" */
+ 0x60,0x70,0x48,0x00,0x00,0x00,0x05,0x06, /* 000000D0 "`pH....." */
+ 0x07,0x00,0x34,0xAE,0x09,0x00,0x0A,0x00, /* 000000D8 "..4....." */
+ 0x00,0x00,0x02,0x00,0x0D,0x02,0x00,0x00, /* 000000E0 "........" */
+ 0x00,0xCC,0x00,0x01,0xFE,0xFF,0x78,0x56, /* 000000E8 "......xV" */
+ 0x44,0x33,0x00,0x00,0x66,0x55,0x00,0x00, /* 000000F0 "D3..fU.." */
+ 0x00,0x80,0x16,0x00,0x32,0x00,0x04,0x00, /* 000000F8 "....2..." */
+ 0x99,0x99,0x88,0x88,0x6E,0x88,0x9F,0xA6, /* 00000100 "....n..." */
+ 0xEB,0x6C,0x94,0x45,0xA4,0x1F,0x7B,0x5D, /* 00000108 ".l.E..{]" */
+ 0xCE,0x24,0xC5,0x53,0x02,0x00,0x00,0x00, /* 00000110 ".$.S...." */
+ 0x70,0x80,0x80,0x00,0x00,0x00,0x02,0x06, /* 00000118 "p......." */
+ 0x07,0x00,0x30,0xAE,0x09,0x00,0x0A,0x00, /* 00000120 "..0....." */
+ 0x00,0x00,0x02,0x03,0x0D,0x07,0x00,0x00, /* 00000128 "........" */
+ 0x00,0xCC,0x03,0x09,0x34,0x12,0x28,0x01, /* 00000130 "....4.(." */
+ 0x02,0xFE,0xFF,0x78,0x56,0x44,0x33,0x00, /* 00000138 "...xVD3." */
+ 0x00,0x66,0x55,0x00,0x00,0x00,0x80,0x16, /* 00000140 ".fU....." */
+ 0x00,0x32,0x00,0x04,0x00,0x99,0x99,0x88, /* 00000148 ".2......" */
+ 0x88,0x6E,0x88,0x9F,0xA6,0xEB,0x6C,0x94, /* 00000150 ".n....l." */
+ 0x45,0xA4,0x1F,0x7B,0x5D,0xCE,0x24,0xC5, /* 00000158 "E..{].$." */
+ 0x53,0x04,0x00,0x00,0x00,0x70,0x80,0x90, /* 00000160 "S....p.." */
+ 0xA0,0xFE,0xFF,0x78,0x56,0x44,0x33,0x00, /* 00000168 "...xVD3." */
+ 0x00,0x66,0x55,0x00,0x00,0x00,0x80,0x16, /* 00000170 ".fU....." */
+ 0x00,0x32,0x00,0x04,0x00,0x99,0x99,0x88, /* 00000178 ".2......" */
+ 0x88,0x6E,0x88,0x9F,0xA6,0xEB,0x6C,0x94, /* 00000180 ".n....l." */
+ 0x45,0xA4,0x1F,0x7B,0x5D,0xCE,0x24,0xC5, /* 00000188 "E..{].$." */
+ 0x53,0x05,0x00,0x00,0x00,0x70,0x80,0x90, /* 00000190 "S....p.." */
+ 0xA0,0xB0,0x7C,0x00,0x00,0x00,0x05,0x06, /* 00000198 "..|....." */
+ 0x07,0x00,0x34,0xAE,0x09,0x00,0x0A,0x00, /* 000001A0 "..4....." */
+ 0x00,0x00,0x02,0x00,0x0D,0x02,0x00,0x00, /* 000001A8 "........" */
+ 0x00,0xCC,0x00,0x01,0xFE,0xFF,0x78,0x56, /* 000001B0 "......xV" */
+ 0x44,0x33,0x00,0x00,0x66,0x55,0x00,0x00, /* 000001B8 "D3..fU.." */
+ 0x00,0x80,0x16,0x00,0x32,0x00,0x04,0x00, /* 000001C0 "....2..." */
+ 0x99,0x99,0x88,0x88,0x6E,0x88,0x9F,0xA6, /* 000001C8 "....n..." */
+ 0xEB,0x6C,0x94,0x45,0xA4,0x1F,0x7B,0x5D, /* 000001D0 ".l.E..{]" */
+ 0xCE,0x24,0xC5,0x53,0x11,0x00,0x00,0x00, /* 000001D8 ".$.S...." */
+ 0x00,0x01,0x32,0x03,0x04,0x05,0x06,0x37, /* 000001E0 "..2....7" */
+ 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x3F, /* 000001E8 ".......?" */
+ 0x0A,0x01,0x00,0x01,0x32,0x03,0x04,0x05, /* 000001F0 "....2..." */
+ 0x06,0x37,0x08,0x09,0x0A,0x0B,0x0C,0x0D, /* 000001F8 ".7......" */
+ 0x0E,0x3F,0x44,0x9A,0x00,0x01,0x32,0x03, /* 00000200 ".?D...2." */
+ 0x04,0x05,0x06,0x37,0x08,0x09,0x0A,0x0B, /* 00000208 "...7...." */
+ 0x0C,0x0D,0x0E,0x3F,0x0A,0x0B,0x04,0x00, /* 00000210 "...?...." */
+ 0x00,0x00,0xEF,0xBE,0xAD,0xDE /* 00000218 "......" */
};
const unsigned char TemplatePcct[] =
{
- 0x50,0x43,0x43,0x54,0x4e,0x02,0x00,0x00, /* 00000000 "PCCTN..." */
- 0x01,0x47,0x49,0x4e,0x54,0x45,0x4c,0x20, /* 00000008 ".GINTEL " */
- 0x54,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65, /* 00000010 "Template" */
- 0x01,0x00,0x00,0x00,0x49,0x4e,0x54,0x4c, /* 00000018 "....INTL" */
- 0x03,0x03,0x17,0x20,0x01,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x50,0x43,0x43,0x54,0xAE,0x02,0x00,0x00, /* 00000000 "PCCT...." */
+ 0x01,0xE6,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x25,0x09,0x20,0x20,0x01,0x00,0x00,0x00, /* 00000020 "%. ...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
- 0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 ".>......" */
+ 0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 ".>......" */
0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, /* 00000038 "........" */
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, /* 00000040 """""""""" */
0x01,0x32,0x00,0x03,0x33,0x33,0x33,0x33, /* 00000048 ".2..3333" */
0x33,0x33,0x33,0x33,0x44,0x44,0x44,0x44, /* 00000050 "3333DDDD" */
0x44,0x44,0x44,0x44,0x55,0x55,0x55,0x55, /* 00000058 "DDDDUUUU" */
0x55,0x55,0x55,0x55,0x66,0x66,0x66,0x66, /* 00000060 "UUUUffff" */
- 0x77,0x77,0x77,0x77,0x88,0x88,0x01,0x3e, /* 00000068 "wwww...>" */
+ 0x77,0x77,0x77,0x77,0x88,0x88,0x01,0x3E, /* 00000068 "wwww...>" */
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000070 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x32, /* 00000080 ".......2" */
0x00,0x03,0x44,0x44,0x44,0x44,0x44,0x44, /* 00000088 "..DDDDDD" */
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 00000090 "DDDDDDDD" */
0x44,0x44,0x55,0x55,0x55,0x55,0x55,0x55, /* 00000098 "DDUUUUUU" */
- 0x55,0x55,0x66,0x66,0x66,0x66,0x77,0x77, /* 000000a0 "UUffffww" */
- 0x77,0x77,0x88,0x88,0x02,0x5a,0x01,0x00, /* 000000a8 "ww...Z.." */
- 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 000000b0 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000b8 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x32,0x00,0x03, /* 000000c0 ".....2.." */
- 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 000000c8 "DDDDDDDD" */
- 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 000000d0 "DDDDDDDD" */
- 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, /* 000000d8 "UUUUUUUU" */
- 0x66,0x66,0x66,0x66,0x77,0x77,0x77,0x77, /* 000000e0 "ffffwwww" */
- 0x88,0x88,0x01,0x32,0x00,0x03,0x33,0x33, /* 000000e8 "...2..33" */
- 0x33,0x33,0x33,0x33,0x33,0x33,0x44,0x44, /* 000000f0 "333333DD" */
- 0x44,0x44,0x44,0x44,0x44,0x44,0x55,0x55, /* 000000f8 "DDDDDDUU" */
- 0x55,0x55,0x55,0x55,0x55,0x55,0x03,0xa4, /* 00000100 "UUUUUU.." */
+ 0x55,0x55,0x66,0x66,0x66,0x66,0x77,0x77, /* 000000A0 "UUffffww" */
+ 0x77,0x77,0x88,0x88,0x02,0x5A,0x01,0x00, /* 000000A8 "ww...Z.." */
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x32,0x00,0x03, /* 000000C0 ".....2.." */
+ 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 000000C8 "DDDDDDDD" */
+ 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 000000D0 "DDDDDDDD" */
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, /* 000000D8 "UUUUUUUU" */
+ 0x66,0x66,0x66,0x66,0x77,0x77,0x77,0x77, /* 000000E0 "ffffwwww" */
+ 0x88,0x88,0x01,0x32,0x00,0x03,0x33,0x33, /* 000000E8 "...2..33" */
+ 0x33,0x33,0x33,0x33,0x33,0x33,0x44,0x44, /* 000000F0 "333333DD" */
+ 0x44,0x44,0x44,0x44,0x44,0x44,0x55,0x55, /* 000000F8 "DDDDDDUU" */
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x03,0xA4, /* 00000100 "UUUUUU.." */
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000108 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "........" */
0x00,0x00,0x01,0x32,0x00,0x03,0x33,0x33, /* 00000118 "...2..33" */
@@ -962,18 +1317,18 @@
0x33,0x33,0x33,0x33,0x33,0x33,0x44,0x44, /* 00000188 "333333DD" */
0x44,0x44,0x44,0x44,0x44,0x44,0x01,0x32, /* 00000190 "DDDDDD.2" */
0x00,0x03,0x33,0x33,0x33,0x33,0x33,0x33, /* 00000198 "..333333" */
- 0x33,0x33,0x55,0x55,0x55,0x55,0x55,0x55, /* 000001a0 "33UUUUUU" */
- 0x55,0x55,0x04,0xa4,0x01,0x00,0x00,0x00, /* 000001a8 "UU......" */
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001b0 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x32, /* 000001b8 ".......2" */
- 0x00,0x03,0x33,0x33,0x33,0x33,0x33,0x33, /* 000001c0 "..333333" */
- 0x33,0x33,0x44,0x44,0x44,0x44,0x44,0x44, /* 000001c8 "33DDDDDD" */
- 0x44,0x44,0x55,0x55,0x55,0x55,0x55,0x55, /* 000001d0 "DDUUUUUU" */
- 0x55,0x55,0x66,0x66,0x66,0x66,0x77,0x77, /* 000001d8 "UUffffww" */
- 0x77,0x77,0x88,0x88,0x88,0x88,0x01,0x32, /* 000001e0 "ww.....2" */
- 0x00,0x03,0x33,0x33,0x33,0x33,0x33,0x33, /* 000001e8 "..333333" */
- 0x33,0x33,0x99,0x99,0x99,0x99,0x99,0x99, /* 000001f0 "33......" */
- 0x99,0x99,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001f8 "........" */
+ 0x33,0x33,0x55,0x55,0x55,0x55,0x55,0x55, /* 000001A0 "33UUUUUU" */
+ 0x55,0x55,0x04,0xA4,0x01,0x00,0x00,0x00, /* 000001A8 "UU......" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x32, /* 000001B8 ".......2" */
+ 0x00,0x03,0x33,0x33,0x33,0x33,0x33,0x33, /* 000001C0 "..333333" */
+ 0x33,0x33,0x44,0x44,0x44,0x44,0x44,0x44, /* 000001C8 "33DDDDDD" */
+ 0x44,0x44,0x55,0x55,0x55,0x55,0x55,0x55, /* 000001D0 "DDUUUUUU" */
+ 0x55,0x55,0x66,0x66,0x66,0x66,0x77,0x77, /* 000001D8 "UUffffww" */
+ 0x77,0x77,0x88,0x88,0x88,0x88,0x01,0x32, /* 000001E0 "ww.....2" */
+ 0x00,0x03,0x33,0x33,0x33,0x33,0x33,0x33, /* 000001E8 "..333333" */
+ 0x33,0x33,0x99,0x99,0x99,0x99,0x99,0x99, /* 000001F0 "33......" */
+ 0x99,0x99,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000200 "........" */
0x00,0x00,0x01,0x32,0x00,0x03,0x33,0x33, /* 00000208 "...2..33" */
0x33,0x33,0x33,0x33,0x33,0x33,0x22,0x22, /* 00000210 "333333""" */
@@ -983,7 +1338,19 @@
0x33,0x33,0x44,0x44,0x44,0x44,0x44,0x44, /* 00000230 "33DDDDDD" */
0x44,0x44,0x01,0x32,0x00,0x03,0x33,0x33, /* 00000238 "DD.2..33" */
0x33,0x33,0x33,0x33,0x33,0x33,0x55,0x55, /* 00000240 "333333UU" */
- 0x55,0x55,0x55,0x55,0x55,0x55 /* 00000248 "UUUUUU| */
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x05,0x60, /* 00000248 "UUUUUU.`" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000250 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000258 "........" */
+ 0x00,0x00,0x01,0x32,0x00,0x03,0x33,0x33, /* 00000260 "...2..33" */
+ 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, /* 00000268 "33333333" */
+ 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, /* 00000270 "33333333" */
+ 0x33,0x33,0x33,0x33,0x33,0x33,0x01,0x32, /* 00000278 "333333.2" */
+ 0x00,0x03,0x33,0x33,0x33,0x33,0x33,0x33, /* 00000280 "..333333" */
+ 0x33,0x33,0x44,0x44,0x44,0x44,0x44,0x44, /* 00000288 "33DDDDDD" */
+ 0x44,0x44,0x01,0x32,0x00,0x03,0x33,0x33, /* 00000290 "DD.2..33" */
+ 0x33,0x33,0x33,0x33,0x33,0x33,0x55,0x55, /* 00000298 "333333UU" */
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x03,0x00, /* 000002A0 "UUUUUU.." */
+ 0x00,0x00,0x05,0x00,0x00,0x00 /* 000002A8 "......" */
};
const unsigned char TemplatePdtt[] =
@@ -997,31 +1364,57 @@
0xCC,0x01,0xDD,0x00 /* 00000030 "...." */
};
+const unsigned char TemplatePhat [] =
+{
+ 0x50,0x48,0x41,0x54,0xA2,0x00,0x00,0x00, /* 00000000 "PHAT...." */
+ 0x01,0xCA,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x31,0x03,0x22,0x20,0x00,0x00,0x28,0x00, /* 00000020 "1." ..(." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x30,0x05,0xAF,0x91,0x86,0x5D,0x0E,0x47, /* 00000030 "0....].G" */
+ 0xA6,0xB0,0x0A,0x2D,0xB9,0x40,0x82,0x49, /* 00000038 "[email protected]" */
+ 0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01, /* 00000040 "........" */
+ 0x0C,0x0B,0x0A,0x09,0x01,0x00,0x2E,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x00,0x00,0x30,0x05,0xAF,0x91, /* 00000050 "....0..." */
+ 0x86,0x5D,0x0E,0x47,0xA6,0xB0,0x0A,0x2D, /* 00000058 ".].G...-" */
+ 0xB9,0x40,0x82,0x49,0x2A,0x00,0x00,0x00, /* 00000060 "[email protected]*..." */
+ 0x41,0x00,0x42,0x00,0x43,0x00,0x44,0x00, /* 00000068 "A.B.C.D." */
+ 0x45,0x00,0x46,0x00,0x00,0x00,0x01,0x02, /* 00000070 "E.F....." */
+ 0x03,0x04,0x00,0x00,0x28,0x00,0x00,0x00, /* 00000078 "....(..." */
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x05, /* 00000080 "......0." */
+ 0xAF,0x91,0x86,0x5D,0x0E,0x47,0xA6,0xB0, /* 00000088 "...].G.." */
+ 0x0A,0x2D,0xB9,0x40,0x82,0x49,0x08,0x07, /* 00000090 "[email protected].." */
+ 0x06,0x05,0x04,0x03,0x02,0x01,0x0C,0x0B, /* 00000098 "........" */
+ 0x0A,0x09 /* 000000A0 ".." */
+};
+
const unsigned char TemplatePmtt[] =
{
- 0x50,0x4D,0x54,0x54,0xB4,0x00,0x00,0x00, /* 00000000 "PMTT...." */
- 0x01,0x3A,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".:INTEL " */
+ 0x50,0x4D,0x54,0x54,0xBB,0x00,0x00,0x00, /* 00000000 "PMTT...." */
+ 0x02,0x2E,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x26,0x08,0x11,0x20,0x00,0x00,0x00,0x00, /* 00000020 "&.. ...." */
- 0x00,0x00,0x80,0x00,0x01,0x00,0x00,0x00, /* 00000028 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x00,0x54,0x00, /* 00000030 "......T." */
- 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
- 0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
- 0x02,0x00,0x14,0x00,0x02,0x00,0x00,0x00, /* 00000060 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
- 0x00,0x00,0x00,0x00,0x02,0x00,0x14,0x00, /* 00000070 "........" */
- 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
- 0x01,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000088 ".. ....." */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
- 0x00,0x00,0x0C,0x00,0x01,0x00,0x00,0x00, /* 000000A8 "........" */
- 0x00,0x00,0x00,0x00 /* 000000B0 "...." */
+ 0x05,0x01,0x21,0x20,0x08,0x00,0x00,0x00, /* 00000020 "..! ...." */
+ 0x00,0x00,0x10,0x00,0x0D,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x01,0x00,0x10,0x00,0x04,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x02,0x00,0x00,0x00,0x44,0x44,0x00,0x00, /* 00000040 "....DD.." */
+ 0x02,0x00,0x10,0x00,0x04,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x01,0x00,0x00,0x00,0x78,0x56,0x34,0x12, /* 00000050 "....xV4." */
+ 0xFF,0x00,0x23,0x00,0x0D,0x00,0x00,0x00, /* 00000058 "..#....." */
+ 0x03,0x00,0x00,0x00,0x03,0x02,0x01,0x00, /* 00000060 "........" */
+ 0x08,0x04,0x07,0x06,0x08,0x09,0x0A,0x0B, /* 00000068 "........" */
+ 0x0C,0x0D,0x0E,0x0F,0x55,0x66,0x77,0x88, /* 00000070 "....Ufw." */
+ 0x11,0xAA,0xBB,0x00,0x00,0x10,0x00,0x0D, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x00, /* 00000088 "........" */
+ 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00, /* 00000090 "........" */
+ 0x00,0x00,0x00,0x02,0x00,0x10,0x00,0x04, /* 00000098 "........" */
+ 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x78, /* 000000A0 ".......x" */
+ 0x56,0x34,0x12,0x02,0x00,0x10,0x00,0x04, /* 000000A8 "V4......" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78, /* 000000B0 ".......x" */
+ 0x56,0x34,0x12 /* 000000B8 "V4." */
};
const unsigned char TemplatePptt[] =
@@ -1043,6 +1436,97 @@
0x00,0x00 /* 00000070 ".." */
};
+const unsigned char TemplatePrmt[] =
+{
+ 0x50,0x52,0x4D,0x54,0xB8,0x02,0x00,0x00, /* 00000000 "PRMT...." */
+ 0x00,0x13,0x4F,0x45,0x4D,0x43,0x41,0x20, /* 00000008 "..OEMCA " */
+ 0x4F,0x45,0x4D,0x43,0x41,0x20,0x20,0x20, /* 00000010 "OEMCA " */
+ 0x02,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x17,0x07,0x20,0x20,0xA5,0x61,0x6B,0xB6, /* 00000020 ".. .ak." */
+ 0x01,0xA1,0x46,0xED,0xA6,0xA3,0xCA,0xC1, /* 00000028 "..F....." */
+ 0xC4,0xD1,0x30,0x1E,0x3C,0x00,0x00,0x00, /* 00000030 "..0.<..." */
+ 0x04,0x00,0x00,0x00,0x00,0x00,0xAA,0x00, /* 00000038 "........" */
+ 0xC2,0xB3,0x52,0x16,0xA1,0xA7,0xAC,0x46, /* 00000040 "..R....F" */
+ 0xAF,0x93,0xDD,0x6D,0xEE,0x44,0x66,0x69, /* 00000048 "...m.Dfi" */
+ 0x01,0x00,0x00,0x00,0x03,0x00,0x26,0x00, /* 00000050 "......&." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x2C,0x00,0x5F,0xAD, /* 00000060 "....,._." */
+ 0xF2,0xD5,0x47,0xA3,0x3E,0x4D,0x87,0xBC, /* 00000068 "..G.>M.." */
+ 0xC2,0xCE,0x63,0x02,0x9C,0xC8,0x90,0xC2, /* 00000070 "..c....." */
+ 0x5E,0x8A,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "^......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x2C,0x00,0xC3,0xAD,0xE7,0xA9,0xD0,0x8C, /* 00000090 ",......." */
+ 0x9A,0x42,0x89,0x15,0x10,0x94,0x6E,0xBD, /* 00000098 ".B....n." */
+ 0xE3,0x18,0xC0,0xC2,0x5E,0x8A,0x00,0x00, /* 000000A0 "....^..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x00,0x00,0x00,0x00,0x2C,0x00,0x14,0xC2, /* 000000B8 "....,..." */
+ 0x88,0xB6,0x81,0x40,0xEB,0x4E,0x8D,0x26, /* 000000C0 "[email protected].&" */
+ 0x1E,0xB5,0xA3,0xBC,0xF1,0x1A,0xF0,0xC2, /* 000000C8 "........" */
+ 0x5E,0x8A,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "^......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
+ 0x52,0x00,0xA6,0x58,0x2A,0xDC,0x27,0x59, /* 000000E8 "R..X*.'Y" */
+ 0x76,0x47,0xB9,0x95,0xD1,0x18,0xA2,0x73, /* 000000F0 "vG.....s" */
+ 0x35,0xA2,0x01,0x00,0x00,0x00,0x01,0x00, /* 000000F8 "5......." */
+ 0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "&......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x00, /* 00000108 "......,." */
+ 0x13,0x2D,0x4F,0x2E,0x40,0x62,0xD0,0x4E, /* 00000110 "[email protected]" */
+ 0xA4,0x01,0xC7,0x23,0xFB,0xDC,0x34,0xE8, /* 00000118 "...#..4." */
+ 0x90,0x32,0x5E,0x8A,0x00,0x00,0x00,0x00, /* 00000120 ".2^....." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
+ 0xF8,0x7F,0x71,0x8A,0x00,0x00,0x00,0x00, /* 00000130 "..q....." */
+ 0x00,0x00,0x2E,0x01,0xD7,0x3E,0xF9,0x0E, /* 00000138 ".....>.." */
+ 0xAE,0x14,0x5B,0x42,0x92,0x8F,0xB8,0x5A, /* 00000140 "..[B...Z" */
+ 0x62,0x13,0xB5,0x7E,0x01,0x00,0x00,0x00, /* 00000148 "b..~...." */
+ 0x06,0x00,0x26,0x00,0x00,0x00,0xE0,0x3F, /* 00000150 "..&....?" */
+ 0x71,0x8A,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "q......." */
+ 0x2C,0x00,0x3C,0xCD,0x20,0x21,0x8B,0x84, /* 00000160 ",.<. !.." */
+ 0x8F,0x4D,0xAB,0xBB,0x4B,0x74,0xCE,0x64, /* 00000168 ".M..Kt.d" */
+ 0xAC,0x89,0x4C,0xA6,0x5D,0x8A,0x00,0x00, /* 00000170 "..L.]..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "........" */
+ 0x00,0x00,0x00,0x00,0x2C,0x00,0xA7,0x35, /* 00000188 "....,..5" */
+ 0x09,0xEA,0x6B,0x50,0x59,0x41,0xBB,0xBB, /* 00000190 "..kPYA.." */
+ 0x48,0xDE,0xEE,0xCB,0x6F,0x58,0x34,0xA7, /* 00000198 "H...oX4." */
+ 0x5D,0x8A,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A0 "]......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B0 "........" */
+ 0x2C,0x00,0xA9,0xBD,0xD1,0x1B,0x9A,0x90, /* 000001B8 ",......." */
+ 0x14,0x46,0x96,0x99,0x25,0xEC,0x0C,0x27, /* 000001C0 ".F..%..'" */
+ 0x83,0xF7,0x94,0xA7,0x5D,0x8A,0x00,0x00, /* 000001C8 "....]..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D8 "........" */
+ 0x00,0x00,0x00,0x00,0x2C,0x00,0xE7,0xB4, /* 000001E0 "....,..." */
+ 0x28,0x5D,0x67,0x38,0xEE,0x4A,0xAA,0x09, /* 000001E8 "(]g8.J.." */
+ 0x51,0xFC,0x28,0x2C,0x3B,0x22,0x9C,0xA6, /* 000001F0 "Q.(,;".." */
+ 0x5D,0x8A,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F8 "]......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000200 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000208 "........" */
+ 0x2C,0x00,0x02,0xB7,0x64,0x4B,0x2B,0x4D, /* 00000210 ",...dK+M" */
+ 0xFE,0x4D,0xAC,0x5A,0x0B,0x41,0x10,0xA2, /* 00000218 ".M.Z.A.." */
+ 0xCA,0x47,0x48,0xA7,0x5D,0x8A,0x00,0x00, /* 00000220 ".GH.]..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000228 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000230 "........" */
+ 0x00,0x00,0x00,0x00,0x2C,0x00,0xDE,0xFD, /* 00000238 "....,..." */
+ 0x0E,0x8A,0xD0,0x78,0xF0,0x45,0xAE,0xA0, /* 00000240 "...x.E.." */
+ 0xC2,0x82,0x45,0xC7,0xE1,0xDB,0x98,0xA7, /* 00000248 "..E....." */
+ 0x5D,0x8A,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000250 "]......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000258 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000260 "........" */
+ 0x52,0x00,0x2B,0xF4,0x6C,0x5A,0xB4,0x8B, /* 00000268 "R.+.lZ.." */
+ 0x2C,0x47,0xA2,0x33,0x5C,0x4D,0xC4,0x03, /* 00000270 ",G.3\M.." */
+ 0x3D,0xC7,0x01,0x00,0x00,0x00,0x01,0x00, /* 00000278 "=......." */
+ 0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000280 "&......." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x00, /* 00000288 "......,." */
+ 0x81,0x60,0x46,0xE1,0x62,0x75,0x0F,0x43, /* 00000290 ".`F.bu.C" */
+ 0x89,0x6B,0xB0,0xE5,0x23,0xDC,0x33,0x5A, /* 00000298 ".k..#.3Z" */
+ 0x90,0x12,0x5D,0x8A,0x00,0x00,0x00,0x00, /* 000002A0 "..]....." */
+ 0xE0,0x5F,0x71,0x8A,0x00,0x00,0x00,0x00, /* 000002A8 "._q....." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 000002B0 "........" */
+};
+
const unsigned char TemplateRasf[] =
{
0x52,0x41,0x53,0x46,0x30,0x00,0x00,0x00, /* 00000000 "RASF0..." */
@@ -1053,6 +1537,20 @@
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000028 "........" */
};
+const unsigned char TemplateRgrt[] =
+{
+ 0x52,0x47,0x52,0x54,0x50,0x00,0x00,0x00, /* 00000000 "RGRTP..." */
+ 0x01,0x33,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".3INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x31,0x03,0x21,0x20,0x01,0x00,0x01,0x00, /* 00000020 "1.! ...." */
+ 0xAA,0x01,0x02,0x03,0x04,0x05,0x06,0x07, /* 00000028 "........" */
+ 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, /* 00000030 "........" */
+ 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, /* 00000038 "........" */
+ 0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, /* 00000040 "........" */
+ 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 /* 00000048 " !"#$%&'" */
+};
+
const unsigned char TemplateRsdp[] =
{
0x52,0x53,0x44,0x20,0x50,0x54,0x52,0x20, /* 00000000 "RSD PTR " */
@@ -1107,21 +1605,24 @@
const unsigned char TemplateSdev[] =
{
- 0x53,0x44,0x45,0x56,0x72,0x00,0x00,0x00, /* 00000000 "SDEVr..." */
- 0x01,0x2F,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "./INTEL " */
+ 0x53,0x44,0x45,0x56,0x89,0x00,0x00,0x00, /* 00000000 "SDEV...." */
+ 0x01,0x6E,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".nINTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x31,0x08,0x17,0x20,0x00,0x01,0x2A,0x00, /* 00000020 "1.. ..*." */
- 0x0C,0x00,0x16,0x00,0x22,0x00,0x08,0x00, /* 00000028 "...."..." */
- 0x5C,0x5C,0x5F,0x53,0x42,0x5F,0x2E,0x50, /* 00000030 "\\_SB_.P" */
- 0x43,0x49,0x30,0x2E,0x55,0x53,0x42,0x31, /* 00000038 "CI0.USB1" */
- 0x2E,0x53,0x55,0x42,0x31,0x00,0x00,0x11, /* 00000040 ".SUB1..." */
- 0x22,0x33,0x44,0x55,0x66,0x77,0x01,0x01, /* 00000048 ""3DUfw.." */
- 0x24,0x00,0x10,0x00,0x20,0x00,0x10,0x00, /* 00000050 "$... ..." */
- 0x04,0x00,0x14,0x00,0x10,0x00,0x11,0x22, /* 00000058 "......."" */
- 0x33,0x44,0xEE,0xDD,0xCC,0xBB,0xAA,0x55, /* 00000060 "3D.....U" */
- 0x66,0x77,0x88,0x99,0xAA,0xBB,0xCC,0xDD, /* 00000068 "fw......" */
- 0xEE,0xFF /* 00000070 ".." */
+ 0x05,0x01,0x21,0x20,0x00,0x03,0x41,0x00, /* 00000020 "..! ..A." */
+ 0x23,0x00,0x16,0x00,0x39,0x00,0x08,0x00, /* 00000028 "#...9..." */
+ 0x10,0x00,0x13,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x01,0x00,0x03,0x02,0x05,0x04,0x07,0x06, /* 00000038 "........" */
+ 0x09,0x08,0x0A,0x0B,0x0C,0x0D,0x0E,0x5C, /* 00000040 ".......\" */
+ 0x5C,0x5F,0x53,0x42,0x5F,0x2E,0x50,0x43, /* 00000048 "\_SB_.PC" */
+ 0x49,0x30,0x2E,0x55,0x53,0x42,0x31,0x2E, /* 00000050 "I0.USB1." */
+ 0x53,0x55,0x42,0x31,0x00,0x00,0x11,0x22, /* 00000058 "SUB1..."" */
+ 0x33,0x44,0x55,0x66,0x77,0x01,0x01,0x24, /* 00000060 "3DUfw..$" */
+ 0x00,0x10,0x00,0x20,0x00,0x10,0x00,0x04, /* 00000068 "... ...." */
+ 0x00,0x14,0x00,0x10,0x00,0x11,0x22,0x33, /* 00000070 "......"3" */
+ 0x44,0xEE,0xDD,0xCC,0xBB,0xAA,0x55,0x66, /* 00000078 "D.....Uf" */
+ 0x77,0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE, /* 00000080 "w......." */
+ 0xFF /* 00000088 "." */
};
const unsigned char TemplateSlic[] =
@@ -1310,6 +1811,19 @@
0x31,0x2E,0x50,0x54,0x31,0x00 /* 00000078 "1.PT1." */
};
+const unsigned char TemplateSvkl[] =
+{
+ 0x53,0x56,0x4B,0x4C,0x48,0x00,0x00,0x00, /* 00000000 "SVKLH..." */
+ 0x04,0xDB,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x31,0x03,0x21,0x20,0x02,0x00,0x00,0x00, /* 00000020 "1.! ...." */
+ 0x00,0x00,0x00,0x00,0x21,0x43,0xAA,0xAA, /* 00000028 "....!C.." */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000030 "....gE#." */
+ 0x00,0x00,0x00,0x00,0x21,0x43,0xBB,0xBB, /* 00000038 "....!C.." */
+ 0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01 /* 00000040 "....gE#." */
+};
+
const unsigned char TemplateTcpa[] =
{
0x54,0x43,0x50,0x41,0x64,0x00,0x00,0x00, /* 00000000 "TCPAd..." */
@@ -1327,6 +1841,17 @@
0x01,0x01,0x01,0x01 /* 00000060 "...." */
};
+const unsigned char TemplateTdel[] =
+{
+ 0x54,0x44,0x45,0x4C,0x38,0x00,0x00,0x00, /* 00000000 "TDEL8..." */
+ 0x04,0x1C,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x30,0x09,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "0.! ...." */
+ 0xEF,0xCD,0xAB,0x78,0x56,0x34,0x12,0x00, /* 00000028 "...xV4.." */
+ 0x78,0x56,0x34,0x12,0xEF,0xCD,0xAB,0x00 /* 00000030 "xV4....." */
+};
+
const unsigned char TemplateTpm2[] =
{
0x54,0x50,0x4D,0x32,0x4C,0x00,0x00,0x00, /* 00000000 "TPM2L..." */
@@ -1352,17 +1877,24 @@
0x0C,0x0D,0x0E,0x0F,0x00,0x00 /* 00000030 "......" */
};
-const unsigned char TemplateVrtc[] =
+const unsigned char TemplateViot[] =
{
- 0x56,0x52,0x54,0x43,0x44,0x00,0x00,0x00, /* 00000000 "VRTCD..." */
- 0x01,0xEF,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
- 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
- 0x03,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x17,0x01,0x13,0x20,0x00,0x08,0x00,0x00, /* 00000020 "... ...." */
+ 0x56,0x49,0x4F,0x54,0x80,0x00,0x00,0x00, /* 00000000 "VIOT...." */
+ 0x00,0x52,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".RINTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x05,0x01,0x21,0x20,0x04,0x00,0x30,0x00, /* 00000020 "..! ..0." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00, /* 00000030 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
- 0x00,0x00,0x00,0x00 /* 00000040 "...." */
+ 0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF, /* 00000038 "........" */
+ 0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "`......." */
+ 0x02,0x00,0x18,0x00,0x00,0x00,0x01,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "p......." */
+ 0x03,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000070 "........" */
+ 0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x00 /* 00000078 "........" */
};
const unsigned char TemplateWaet[] =
diff --git a/source/compiler/dtutils.c b/source/compiler/dtutils.c
index 52ea3b2..1f85353 100644
--- a/source/compiler/dtutils.c
+++ b/source/compiler/dtutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -74,10 +78,20 @@
DT_FIELD *FieldObject,
char *ExtraMessage)
{
+ UINT32 Line = 0;
+
+
+ /* Field object could be NULL */
+
+ if (FieldObject)
+ {
+ Line = FieldObject->Line;
+ }
/* Check if user wants to ignore this exception */
- if (AslIsExceptionIgnored (Level, MessageId))
+ if (AslIsExceptionIgnored (AslGbl_Files[ASL_FILE_INPUT].Filename,
+ Line, Level, MessageId))
{
return;
}
@@ -289,6 +303,7 @@
case ACPI_DMT_FLAGS0:
case ACPI_DMT_FLAGS1:
case ACPI_DMT_FLAGS2:
+ case ACPI_DMT_FLAGS8_2:
case ACPI_DMT_FLAGS4:
case ACPI_DMT_FLAGS4_0:
case ACPI_DMT_FLAGS4_4:
@@ -304,6 +319,7 @@
case ACPI_DMT_NAME6:
case ACPI_DMT_NAME8:
case ACPI_DMT_STRING:
+ case ACPI_DMT_IVRS_UNTERMINATED_STRING:
Type = DT_FIELD_TYPE_STRING;
break;
@@ -314,8 +330,10 @@
case ACPI_DMT_BUF10:
case ACPI_DMT_BUF12:
case ACPI_DMT_BUF16:
+ case ACPI_DMT_BUF18:
case ACPI_DMT_BUF128:
case ACPI_DMT_PCI_PATH:
+ case ACPI_DMT_PMTT_VENDOR:
Type = DT_FIELD_TYPE_BUFFER;
break;
@@ -328,6 +346,7 @@
break;
case ACPI_DMT_UNICODE:
+ case ACPI_DMT_WPBT_UNICODE:
Type = DT_FIELD_TYPE_UNICODE;
break;
@@ -435,6 +454,7 @@
case ACPI_DMT_FLAGS0:
case ACPI_DMT_FLAGS1:
case ACPI_DMT_FLAGS2:
+ case ACPI_DMT_FLAGS8_2:
case ACPI_DMT_FLAGS4:
case ACPI_DMT_FLAGS4_0:
case ACPI_DMT_FLAGS4_4:
@@ -451,15 +471,29 @@
case ACPI_DMT_CHKSUM:
case ACPI_DMT_SPACEID:
case ACPI_DMT_ACCWIDTH:
+ case ACPI_DMT_CEDT:
case ACPI_DMT_IVRS:
+ case ACPI_DMT_IVRS_DE:
case ACPI_DMT_GTDT:
case ACPI_DMT_MADT:
+ case ACPI_DMT_NHLT1:
+ case ACPI_DMT_NHLT1a:
+ case ACPI_DMT_NHLT1b:
+ case ACPI_DMT_NHLT1c:
+ case ACPI_DMT_NHLT1d:
+ case ACPI_DMT_NHLT1f:
case ACPI_DMT_PCCT:
case ACPI_DMT_PMTT:
case ACPI_DMT_PPTT:
+ case ACPI_DMT_RGRT:
case ACPI_DMT_SDEV:
case ACPI_DMT_SRAT:
+ case ACPI_DMT_AEST:
+ case ACPI_DMT_AEST_RES:
+ case ACPI_DMT_AEST_XFACE:
+ case ACPI_DMT_AEST_XRUPT:
case ACPI_DMT_ASF:
+ case ACPI_DMT_CDAT:
case ACPI_DMT_HESTNTYP:
case ACPI_DMT_FADTPM:
case ACPI_DMT_EINJACT:
@@ -467,6 +501,7 @@
case ACPI_DMT_ERSTACT:
case ACPI_DMT_ERSTINST:
case ACPI_DMT_DMAR_SCOPE:
+ case ACPI_DMT_VIOT:
ByteLength = 1;
break;
@@ -476,7 +511,9 @@
case ACPI_DMT_HEST:
case ACPI_DMT_HMAT:
case ACPI_DMT_NFIT:
+ case ACPI_DMT_NHLT1e:
case ACPI_DMT_PCI_PATH:
+ case ACPI_DMT_PHAT:
ByteLength = 2;
break;
@@ -487,6 +524,8 @@
break;
case ACPI_DMT_UINT32:
+ case ACPI_DMT_AEST_CACHE:
+ case ACPI_DMT_AEST_GIC:
case ACPI_DMT_NAME4:
case ACPI_DMT_SIG:
case ACPI_DMT_LPIT:
@@ -534,6 +573,22 @@
}
break;
+ case ACPI_DMT_IVRS_UNTERMINATED_STRING:
+
+ Value = DtGetFieldValue (Field);
+ if (Value)
+ {
+ ByteLength = strlen (Value);
+ }
+ else
+ { /* At this point, this is a fatal error */
+
+ sprintf (AslGbl_MsgBuffer, "Expected \"%s\"", Info->Name);
+ DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
+ return (0);
+ }
+ break;
+
case ACPI_DMT_GAS:
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
@@ -551,6 +606,7 @@
case ACPI_DMT_BUFFER:
case ACPI_DMT_RAW_BUFFER:
+ case ACPI_DMT_PMTT_VENDOR:
Value = DtGetFieldValue (Field);
if (Value)
@@ -582,18 +638,24 @@
ByteLength = 16;
break;
+ case ACPI_DMT_BUF18:
+
+ ByteLength = 18;
+ break;
+
case ACPI_DMT_BUF128:
ByteLength = 128;
break;
case ACPI_DMT_UNICODE:
+ case ACPI_DMT_WPBT_UNICODE:
Value = DtGetFieldValue (Field);
/* TBD: error if Value is NULL? (as below?) */
- ByteLength = (strlen (Value) + 1) * sizeof(UINT16);
+ ByteLength = (strlen (Value) + 1) * sizeof (UINT16);
break;
default:
@@ -631,7 +693,7 @@
UINT8 *Sum = ReturnValue;
- Checksum = AcpiTbChecksum (Subtable->Buffer, Subtable->Length);
+ Checksum = AcpiUtChecksum (Subtable->Buffer, Subtable->Length);
*Sum = (UINT8) (*Sum + Checksum);
}
diff --git a/source/compiler/new_table.txt b/source/compiler/new_table.txt
new file mode 100644
index 0000000..1e48d38
--- /dev/null
+++ b/source/compiler/new_table.txt
@@ -0,0 +1,88 @@
+How to add a new ACPI table to ACPICA and the iASL compiler.
+------------------------------------------------------------
+
+There are four main tasks that are needed to provide support for a
+new ACPI table:
+ 1) Create a full definition of the table and any subtables
+ in the ACPICA headers.
+ 2) Add disassembler support for the new table
+ 3) Add iASL table compiler support for the new table
+ 4) Create a default template for the new table for iASL -T
+ option.
+
+Notes for each of these tasks provided below.
+
+
+1) Header Support
+-----------------
+
+New tables should be added to the appropriate header:
+ actbl2.h: Used for new tables that are not defined in the ACPI spec.
+ actbl3.h: Used for new tables that are defined in the ACPI spec.
+
+Use ACPI_TABLE_HEADER for the common ACPI table header.
+Subtables should be defined separately from the main table.
+Don't add placeholder fields for subtables and other multiple data items.
+ (Don't use xxxxx[1] for a field that can have multiple items.)
+ The disassembler and data table compiler depends on this.
+For tables not defined in the ACPI spec, add a comment to indicate where
+ the table came from.
+Use other table definitions for additional guidance.
+
+
+2) iASL Disassembler Support
+----------------------------
+
+Add definition of the table (and subtables) in common/dmtbinfo.c
+Add table access macro(s) of the form ACPI_xxxx_OFFSET
+Add ACPI_DMT_TERMINATOR at the end of every table/subtable definition
+
+Add externals for the table/subtable definitions in acdisasm.h
+Add an entry for the new table in the AcpiDmTableData in common/dmtable.c
+
+If there are no subtables, add the AcpiDmTableInfoXXXX name to the
+ AcpiDmTableData and it will automatically be disassembled.
+
+If there are subtables, a dump routine must be written:
+Add an AcpiDmDumpXXXX function to dmtbdump.c -- note, code for another
+ similar table can often be ported for the new table.
+Add an external for this function to acdisasm.h
+Add this function to the AcpiDmTableData entry for the new ACPI table
+
+Debug/Test: Either find an existing example of the new ACPI table, or
+ create one using the "generic ACPI table support" included in the
+ iASL data table compiler. Use the -G option to force a
+ generic compile. It is often best to create the table from scratch,
+ since this clearly exposes the dependencies (lengths, offsets, etc.)
+ that the Table Compiler support will need to generate.
+
+
+3) iASL Table Compiler Support
+------------------------------
+
+Simple tables do not require a compile routine. The definition of the
+ table in common/dmtbinfo.c (created in step 2 above) will suffice.
+
+Complex tables with subtables will require a compile routine with a name
+ of the form DtCompileXXXX.
+Add a DtCompileXXXX function to the dttable.c module.
+Add an external for this function in dtcompiler.h
+Add this function to the AcpiDmTableData entry for the new ACPI table
+ in common/dmtable.c
+
+
+4) Template Support (-T iASL option)
+------------------------------------
+
+Create an example of the new ACPI table. This example should create
+ multiple subtables (if supported), and multiple instances of any
+ variable length data.
+
+Compile the example file with the -sc option. This will create a C
+ array that contains the table contents.
+
+Add this array to the dttemplate.h file. Name the array TemplateXXXX.
+Add this array name to the AcpiDmTableData entry for the new ACPI table
+
+Debug/Test: Create the template file. Compile the file. Disassemble the file.
+ Compile the disassembly file.
diff --git a/source/compiler/preprocess.h b/source/compiler/preprocess.h
index 74c48d6..4343c67 100644
--- a/source/compiler/preprocess.h
+++ b/source/compiler/preprocess.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -243,7 +247,7 @@
/*
- * prutils - Preprocesor utilities
+ * prutils - Preprocessor utilities
*/
char *
PrGetNextToken (
diff --git a/source/compiler/prexpress.c b/source/compiler/prexpress.c
index 966632a..e5f5e68 100644
--- a/source/compiler/prexpress.c
+++ b/source/compiler/prexpress.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/prmacros.c b/source/compiler/prmacros.c
index d46688e..bbaef08 100644
--- a/source/compiler/prmacros.c
+++ b/source/compiler/prmacros.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/prparser.l b/source/compiler/prparser.l
index d1a42f2..c3ee42a 100644
--- a/source/compiler/prparser.l
+++ b/source/compiler/prparser.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -112,7 +116,7 @@
/*
* Local support functions
*/
-YY_BUFFER_STATE LexBuffer;
+static YY_BUFFER_STATE LexBuffer;
/******************************************************************************
diff --git a/source/compiler/prparser.y b/source/compiler/prparser.y
index 8630ef1..50243e2 100644
--- a/source/compiler/prparser.y
+++ b/source/compiler/prparser.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/prscan.c b/source/compiler/prscan.c
index a25613d..93d2a26 100644
--- a/source/compiler/prscan.c
+++ b/source/compiler/prscan.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/prutils.c b/source/compiler/prutils.c
index 97d09d3..52a85af 100644
--- a/source/compiler/prutils.c
+++ b/source/compiler/prutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/compiler/readme.txt b/source/compiler/readme.txt
new file mode 100644
index 0000000..12f4cd0
--- /dev/null
+++ b/source/compiler/readme.txt
@@ -0,0 +1,139 @@
+/*
+ * Miscellaneous instructions for building and using the iASL compiler.
+ */
+Last update 9 December 2013.
+
+
+1) Generating iASL from source
+------------------------------
+
+Generation of the ASL compiler from source code requires these items:
+
+ 1) The ACPICA source code tree.
+ 2) An ANSI C compiler.
+ 3) The Flex (or Lex) lexical analyzer generator.
+ 4) The Bison (or Yacc) parser generator.
+
+There are three major ACPICA source code components that are required to
+generate the compiler (Basically, the entire ACPICA source tree should
+be installed):
+
+ 1) The ASL compiler source.
+ 2) The ACPICA Core Subsystem source. In particular, the Namespace
+ Manager component is used to create an internal ACPI namespace
+ and symbol table, and the AML Interpreter is used to evaluate
+ constant expressions.
+ 3) The "common" source directory that is used for all ACPI components.
+
+
+1a) Notes for Linux/Unix generation
+-----------------------------------
+
+iASL has been generated with these versions of Flex/Bison:
+
+ flex: Version 2.5.32
+ bison: Version 2.6.2
+
+Other required packages:
+
+ make
+ gcc C compiler
+ m4 (macro processor required by bison)
+
+On Linux/Unix systems, the following commands will build the compiler:
+
+ cd acpica (or cd acpica/generate/unix)
+ make clean
+ make iasl
+
+
+1b) Notes for Windows generation
+--------------------------------
+
+On Windows, the Visual Studio 2008 project file appears in this directory:
+
+ generate/msvc9/AcpiComponents.sln
+
+The Windows versions of GNU Flex/Bison must be installed, and they must
+be installed in a directory that contains no embedded spaces in the
+pathname. They cannot be installed in the default "c:\Program Files"
+directory. This is a bug in Bison. The default Windows project file for
+iASL assumes that these tools are installed at this location:
+
+ c:\GnuWin32
+
+Once the tools are installed, ensure that this path is added to the
+default system $Path environment variable:
+
+ c:\GnuWin32\bin
+
+Goto: ControlPanel/System/AdvancedSystemSettings/EnvironmentVariables
+
+Important: Now Windows must be rebooted to make the system aware of
+the updated $Path. Otherwise, Bison will not be able to find the M4
+interpreter library and will fail.
+
+iASL has been generated with these versions of Flex/Bison for Windows:
+
+ Flex for Windows: V2.5.4a
+ Bison for Windows: V2.4.1
+
+Flex is available at: http://gnuwin32.sourceforge.net/packages/flex.htm
+Bison is available at: http://gnuwin32.sourceforge.net/packages/bison.htm
+
+
+
+2) Integration as a custom tool for Visual Studio
+-------------------------------------------------
+
+This procedure adds the iASL compiler as a custom tool that can be used
+to compile ASL source files. The output is sent to the VC output
+window.
+
+a) Select Tools->Customize.
+
+b) Select the "Tools" tab.
+
+c) Scroll down to the bottom of the "Menu Contents" window. There you
+ will see an empty rectangle. Click in the rectangle to enter a
+ name for this tool.
+
+d) Type "iASL Compiler" in the box and hit enter. You can now edit
+ the other fields for this new custom tool.
+
+e) Enter the following into the fields:
+
+ Command: C:\Acpi\iasl.exe
+ Arguments: -vi "$(FilePath)"
+ Initial Directory "$(FileDir)"
+ Use Output Window <Check this option>
+
+ "Command" must be the path to wherever you copied the compiler.
+ "-vi" instructs the compiler to produce messages appropriate for VC.
+ Quotes around FilePath and FileDir enable spaces in filenames.
+
+f) Select "Close".
+
+These steps will add the compiler to the tools menu as a custom tool.
+By enabling "Use Output Window", you can click on error messages in
+the output window and the source file and source line will be
+automatically displayed by VC. Also, you can use F4 to step through
+the messages and the corresponding source line(s).
+
+
+
+3) Integrating iASL into a Visual Studio ASL project build
+----------------------------------------------------------
+
+This procedure creates a project that compiles ASL files to AML.
+
+a) Create a new, empty project and add your .ASL files to the project
+
+b) For all ASL files in the project, specify a custom build (under
+Project/Settings/CustomBuild with the following settings (or similar):
+
+Commands:
+ c:\acpi\libraries\iasl.exe -vs -vi "$(InputPath)"
+
+Output:
+ $(InputDir)\$(InputPath).aml
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c
index 7d6192c..947a70a 100644
--- a/source/components/debugger/dbcmds.c
+++ b/source/components/debugger/dbcmds.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c
index 069187d..f335233 100644
--- a/source/components/debugger/dbconvert.c
+++ b/source/components/debugger/dbconvert.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c
index e0603f1..3937156 100644
--- a/source/components/debugger/dbdisply.c
+++ b/source/components/debugger/dbdisply.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -92,6 +96,8 @@
ACPI_ADR_SPACE_IPMI,
ACPI_ADR_SPACE_GPIO,
ACPI_ADR_SPACE_GSBUS,
+ ACPI_ADR_SPACE_PLATFORM_COMM,
+ ACPI_ADR_SPACE_PLATFORM_RT,
ACPI_ADR_SPACE_DATA_TABLE,
ACPI_ADR_SPACE_FIXED_HARDWARE
};
diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c
index 062ed4f..fc577d4 100644
--- a/source/components/debugger/dbexec.c
+++ b/source/components/debugger/dbexec.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -140,7 +144,8 @@
*
* RETURN: Status
*
- * DESCRIPTION: Execute a control method.
+ * DESCRIPTION: Execute a control method. Used to evaluate objects via the
+ * "EXECUTE" or "EVALUATE" commands.
*
******************************************************************************/
@@ -392,11 +397,12 @@
Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj);
+ AcpiGbl_MethodExecuting = FALSE;
+
AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n",
AcpiUtGetNodeName (Node),
AcpiFormatException (Status));
- AcpiGbl_MethodExecuting = FALSE;
return (AE_OK);
}
@@ -413,7 +419,8 @@
* RETURN: None
*
* DESCRIPTION: Execute a control method. Name is relative to the current
- * scope.
+ * scope. Function used for the "EXECUTE", "EVALUATE", and
+ * "ALL" commands
*
******************************************************************************/
@@ -457,6 +464,12 @@
return;
}
+ if ((Flags & EX_ALL) && (strlen (Name) > 4))
+ {
+ AcpiOsPrintf ("Input name (%s) must be a 4-char NameSeg\n", Name);
+ return;
+ }
+
NameString = ACPI_ALLOCATE (strlen (Name) + 1);
if (!NameString)
{
@@ -476,13 +489,27 @@
return;
}
- AcpiGbl_DbMethodInfo.Name = NameString;
- AcpiGbl_DbMethodInfo.Args = Args;
- AcpiGbl_DbMethodInfo.Types = Types;
- AcpiGbl_DbMethodInfo.Flags = Flags;
+ /* Command (ALL <nameseg>) to execute all methods of a particular name */
- ReturnObj.Pointer = NULL;
- ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ else if (Flags & EX_ALL)
+ {
+ AcpiGbl_DbMethodInfo.Name = NameString;
+ ReturnObj.Pointer = NULL;
+ ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ AcpiDbEvaluateAll (NameString);
+ ACPI_FREE (NameString);
+ return;
+ }
+ else
+ {
+ AcpiGbl_DbMethodInfo.Name = NameString;
+ AcpiGbl_DbMethodInfo.Args = Args;
+ AcpiGbl_DbMethodInfo.Types = Types;
+ AcpiGbl_DbMethodInfo.Flags = Flags;
+
+ ReturnObj.Pointer = NULL;
+ ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ }
Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
if (ACPI_FAILURE (Status))
@@ -543,6 +570,7 @@
(UINT32) ReturnObj.Length);
AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
+ AcpiOsPrintf ("\n");
/* Dump a _PLD buffer if present */
diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c
index 7bed369..d92dc83 100644
--- a/source/components/debugger/dbfileio.c
+++ b/source/components/debugger/dbfileio.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c
index 4dceb2f..6af4b92 100644
--- a/source/components/debugger/dbhistry.c
+++ b/source/components/debugger/dbhistry.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -63,7 +67,6 @@
static UINT16 AcpiGbl_LoHistory = 0;
static UINT16 AcpiGbl_NumHistory = 0;
static UINT16 AcpiGbl_NextHistoryIndex = 0;
-UINT32 AcpiGbl_NextCmdNum = 1;
/*******************************************************************************
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index cd4615c..a3bb18b 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -83,6 +87,7 @@
{
CMD_NOT_FOUND = 0,
CMD_NULL,
+ CMD_ALL,
CMD_ALLOCATIONS,
CMD_ARGS,
CMD_ARGUMENTS,
@@ -163,6 +168,7 @@
{
{"<NOT FOUND>", 0},
{"<NULL>", 0},
+ {"ALL", 1},
{"ALLOCATIONS", 0},
{"ARGS", 0},
{"ARGUMENTS", 0},
@@ -265,6 +271,7 @@
{1, " Type <Object>", "Display object type\n"},
{0, "\nControl Method Execution:", "\n"},
+ {1, " All <NameSeg>", "Evaluate all objects named NameSeg\n"},
{1, " Evaluate <Namepath> [Arguments]", "Evaluate object or control method\n"},
{1, " Execute <Namepath> [Arguments]", "Synonym for Evaluate\n"},
#ifdef ACPI_APPLICATION
@@ -487,7 +494,7 @@
}
else
{
- /* Display help for all commands that match the subtring */
+ /* Display help for all commands that match the substring */
AcpiDbDisplayCommandInfo (Command, TRUE);
}
@@ -525,19 +532,16 @@
return (NULL);
}
- /* Remove any spaces at the beginning */
+ /* Remove any spaces at the beginning, ignore blank lines */
- if (*String == ' ')
+ while (*String && isspace ((int) *String))
{
- while (*String && (*String == ' '))
- {
- String++;
- }
+ String++;
+ }
- if (!(*String))
- {
- return (NULL);
- }
+ if (!(*String))
+ {
+ return (NULL);
}
switch (*String)
@@ -642,7 +646,7 @@
/* Find end of token */
- while (*String && (*String != ' '))
+ while (*String && !isspace ((int) *String))
{
String++;
}
@@ -838,6 +842,13 @@
}
break;
+ case CMD_ALL:
+
+ AcpiOsPrintf ("Executing all objects with NameSeg: %s\n", AcpiGbl_DbArgs[1]);
+ AcpiDbExecute (AcpiGbl_DbArgs[1],
+ &AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_NO_SINGLE_STEP | EX_ALL);
+ break;
+
case CMD_ALLOCATIONS:
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c
index fa4985b..1c58333 100644
--- a/source/components/debugger/dbmethod.c
+++ b/source/components/debugger/dbmethod.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -58,6 +62,10 @@
void *Context,
void **ReturnValue);
+static ACPI_STATUS
+AcpiDbEvaluateObject (
+ ACPI_NAMESPACE_NODE *Node);
+
/*******************************************************************************
*
@@ -430,47 +438,30 @@
/*******************************************************************************
*
- * FUNCTION: AcpiDbWalkForExecute
+ * FUNCTION: AcpiDbEvaluateObject
*
- * PARAMETERS: Callback from WalkNamespace
+ * PARAMETERS: Node - Namespace node for the object
*
* RETURN: Status
*
- * DESCRIPTION: Batch execution module. Currently only executes predefined
- * ACPI names.
+ * DESCRIPTION: Main execution function for the Evaluate/Execute/All debugger
+ * commands.
*
******************************************************************************/
static ACPI_STATUS
-AcpiDbWalkForExecute (
- ACPI_HANDLE ObjHandle,
- UINT32 NestingLevel,
- void *Context,
- void **ReturnValue)
+AcpiDbEvaluateObject (
+ ACPI_NAMESPACE_NODE *Node)
{
- ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
- ACPI_DB_EXECUTE_WALK *Info = (ACPI_DB_EXECUTE_WALK *) Context;
- ACPI_BUFFER ReturnObj;
- ACPI_STATUS Status;
char *Pathname;
UINT32 i;
ACPI_DEVICE_INFO *ObjInfo;
ACPI_OBJECT_LIST ParamObjects;
ACPI_OBJECT Params[ACPI_METHOD_NUM_ARGS];
- const ACPI_PREDEFINED_INFO *Predefined;
+ ACPI_BUFFER ReturnObj;
+ ACPI_STATUS Status;
- Predefined = AcpiUtMatchPredefinedMethod (Node->Name.Ascii);
- if (!Predefined)
- {
- return (AE_OK);
- }
-
- if (Node->Type == ACPI_TYPE_LOCAL_SCOPE)
- {
- return (AE_OK);
- }
-
Pathname = AcpiNsGetExternalPathname (Node);
if (!Pathname)
{
@@ -479,7 +470,7 @@
/* Get the object info for number of method parameters */
- Status = AcpiGetObjectInfo (ObjHandle, &ObjInfo);
+ Status = AcpiGetObjectInfo (Node, &ObjInfo);
if (ACPI_FAILURE (Status))
{
ACPI_FREE (Pathname);
@@ -512,13 +503,70 @@
AcpiGbl_MethodExecuting = TRUE;
Status = AcpiEvaluateObject (Node, NULL, &ParamObjects, &ReturnObj);
+ AcpiGbl_MethodExecuting = FALSE;
AcpiOsPrintf ("%-32s returned %s\n", Pathname, AcpiFormatException (Status));
- AcpiGbl_MethodExecuting = FALSE;
+ if (ReturnObj.Length)
+ {
+ AcpiOsPrintf ("Evaluation of %s returned object %p, "
+ "external buffer length %X\n",
+ Pathname, ReturnObj.Pointer, (UINT32) ReturnObj.Length);
+
+ AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
+ AcpiOsPrintf ("\n");
+ }
+
ACPI_FREE (Pathname);
/* Ignore status from method execution */
+ return (AE_OK);
+
+ /* Update count, check if we have executed enough methods */
+
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbWalkForExecute
+ *
+ * PARAMETERS: Callback from WalkNamespace
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Batch execution function. Evaluates all "predefined" objects --
+ * the nameseg begins with an underscore.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbWalkForExecute (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
+ ACPI_DB_EXECUTE_WALK *Info = (ACPI_DB_EXECUTE_WALK *) Context;
+ ACPI_STATUS Status;
+ const ACPI_PREDEFINED_INFO *Predefined;
+
+
+ Predefined = AcpiUtMatchPredefinedMethod (Node->Name.Ascii);
+ if (!Predefined)
+ {
+ return (AE_OK);
+ }
+
+ if (Node->Type == ACPI_TYPE_LOCAL_SCOPE)
+ {
+ return (AE_OK);
+ }
+
+ AcpiDbEvaluateObject (Node);
+
+ /* Ignore status from object evaluation */
+
Status = AE_OK;
/* Update count, check if we have executed enough methods */
@@ -535,6 +583,56 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDbWalkForExecuteAll
+ *
+ * PARAMETERS: Callback from WalkNamespace
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Batch execution function. Evaluates all objects whose path ends
+ * with the nameseg "Info->NameSeg". Used for the "ALL" command.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbWalkForExecuteAll (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
+ ACPI_DB_EXECUTE_WALK *Info = (ACPI_DB_EXECUTE_WALK *) Context;
+ ACPI_STATUS Status;
+
+
+ if (!ACPI_COMPARE_NAMESEG (Node->Name.Ascii, Info->NameSeg))
+ {
+ return (AE_OK);
+ }
+
+ if (Node->Type == ACPI_TYPE_LOCAL_SCOPE)
+ {
+ return (AE_OK);
+ }
+
+ /* Now evaluate the input object (node) */
+
+ AcpiDbEvaluateObject (Node);
+
+ /* Ignore status from method execution */
+
+ Status = AE_OK;
+
+ /* Update count of executed methods/objects */
+
+ Info->Count++;
+ return (Status);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbEvaluatePredefinedNames
*
* PARAMETERS: None
@@ -563,3 +661,38 @@
AcpiOsPrintf ("Evaluated %u predefined names in the namespace\n", Info.Count);
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbEvaluateAll
+ *
+ * PARAMETERS: NoneAcpiGbl_DbMethodInfo
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Namespace batch execution. Implements the "ALL" command.
+ * Execute all namepaths whose final nameseg matches the
+ * input nameseg.
+ *
+ ******************************************************************************/
+
+void
+AcpiDbEvaluateAll (
+ char *NameSeg)
+{
+ ACPI_DB_EXECUTE_WALK Info;
+
+
+ Info.Count = 0;
+ Info.MaxCount = ACPI_UINT32_MAX;
+ ACPI_COPY_NAMESEG (Info.NameSeg, NameSeg);
+ Info.NameSeg[ACPI_NAMESEG_SIZE] = 0;
+
+ /* Search all nodes in namespace */
+
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
+ AcpiDbWalkForExecuteAll, NULL, (void *) &Info, NULL);
+
+ AcpiOsPrintf ("Evaluated %u names in the namespace\n", Info.Count);
+}
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c
index c03a3fe..5a3c535 100644
--- a/source/components/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c
index 06d0049..df0c18a 100644
--- a/source/components/debugger/dbobject.c
+++ b/source/components/debugger/dbobject.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -89,7 +93,7 @@
/* Ignore control codes, they are not errors */
- if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
+ if (ACPI_CNTL_EXCEPTION (Status))
{
return;
}
diff --git a/source/components/debugger/dbstats.c b/source/components/debugger/dbstats.c
index 80880dc..4782b49 100644
--- a/source/components/debugger/dbstats.c
+++ b/source/components/debugger/dbstats.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c
index 240b805..1eb36a5 100644
--- a/source/components/debugger/dbtest.c
+++ b/source/components/debugger/dbtest.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c
index bf6e12c..b5ef45c 100644
--- a/source/components/debugger/dbutils.c
+++ b/source/components/debugger/dbutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c
index 3e66bfe..c742667 100644
--- a/source/components/debugger/dbxface.c
+++ b/source/components/debugger/dbxface.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -482,6 +486,7 @@
AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT;
AcpiGbl_DbOpt_NoIniMethods = FALSE;
+ AcpiGbl_DbOpt_NoRegionSupport = FALSE;
AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
if (!AcpiGbl_DbBuffer)
diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c
index 2fd645c..3fc0bfb 100644
--- a/source/components/disassembler/dmbuffer.c
+++ b/source/components/disassembler/dmbuffer.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -288,6 +292,10 @@
/* Buffer size is the buffer argument */
SizeOp = Op->Common.Value.Arg;
+ if (!SizeOp)
+ {
+ return (FALSE);
+ }
/* Next, the initializer byte list to examine */
@@ -378,6 +386,10 @@
{
AcpiOsPrintf (" /* %s */", Description);
}
+ else
+ {
+ AcpiOsPrintf (" /* Unknown UUID */");
+ }
}
@@ -408,6 +420,10 @@
/* Buffer size is the buffer argument */
SizeOp = Op->Common.Value.Arg;
+ if (!SizeOp)
+ {
+ return (FALSE);
+ }
/* Next, the initializer byte list to examine */
@@ -484,6 +500,10 @@
/* Buffer size is the buffer argument */
SizeOp = Op->Common.Value.Arg;
+ if (!SizeOp)
+ {
+ return (FALSE);
+ }
/* Next, the initializer byte list to examine */
@@ -563,13 +583,18 @@
UINT64 InitializerSize;
+ if (!Op)
+ {
+ return (FALSE);
+ }
+
/*
* Get the BufferSize argument - Buffer(BufferSize)
* If the buffer was generated by the ToPld macro, it must
* be a BYTE constant.
*/
SizeOp = Op->Common.Value.Arg;
- if (SizeOp->Common.AmlOpcode != AML_BYTE_OP)
+ if (!SizeOp || SizeOp->Common.AmlOpcode != AML_BYTE_OP)
{
return (FALSE);
}
diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c
index 15b935a..60aa1c7 100644
--- a/source/components/disassembler/dmcstyle.c
+++ b/source/components/disassembler/dmcstyle.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -632,7 +636,7 @@
* Only a small subset of ASL/AML operators can be optimized.
* Can only optimize/fold if there is no target (or targets)
* specified for the operator. And of course, the operator
- * is surrrounded by a Store() operator.
+ * is surrounded by a Store() operator.
*/
switch (StoreArgument->Common.AmlOpcode)
{
diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c
index 071cd17..088ad26 100644
--- a/source/components/disassembler/dmdeferred.c
+++ b/source/components/disassembler/dmdeferred.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c
index 8de5ee2..af6263d 100644
--- a/source/components/disassembler/dmnames.c
+++ b/source/components/disassembler/dmnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c
index b7cba20..3cf9774 100644
--- a/source/components/disassembler/dmopcode.c
+++ b/source/components/disassembler/dmopcode.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index 2f7022f..c0e4357 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c
index 018da83..7102d61 100644
--- a/source/components/disassembler/dmresrcl.c
+++ b/source/components/disassembler/dmresrcl.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c
index 1f0c6d0..ff241d3 100644
--- a/source/components/disassembler/dmresrcl2.c
+++ b/source/components/disassembler/dmresrcl2.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -48,6 +52,13 @@
/* Local prototypes */
static void
+AcpiDmCsi2SerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
+ AML_RESOURCE *Resource,
+ UINT32 Length,
+ UINT32 Level);
+
+static void
AcpiDmI2cSerialBusDescriptor (
ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
@@ -88,7 +99,8 @@
NULL,
AcpiDmI2cSerialBusDescriptor,
AcpiDmSpiSerialBusDescriptor,
- AcpiDmUartSerialBusDescriptor
+ AcpiDmUartSerialBusDescriptor,
+ AcpiDmCsi2SerialBusDescriptor
};
@@ -562,6 +574,15 @@
sizeof (AML_RESOURCE_UART_SERIALBUS));
break;
+ case AML_RESOURCE_CSI2_SERIALBUSTYPE:
+
+ VendorLength = Resource->CommonSerialBus.TypeDataLength -
+ AML_RESOURCE_CSI2_MIN_DATA_LEN;
+
+ VendorData = ACPI_ADD_PTR (UINT8, Resource,
+ sizeof (AML_RESOURCE_CSI2_SERIALBUS));
+ break;
+
default:
return;
@@ -575,6 +596,75 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiDmCsi2SerialBusDescriptor
+ *
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
+ * Length - Length of the descriptor in bytes
+ * Level - Current source code indentation level
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Decode a CSI2 serial bus descriptor
+ *
+ ******************************************************************************/
+
+static void
+AcpiDmCsi2SerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
+ AML_RESOURCE *Resource,
+ UINT32 Length,
+ UINT32 Level)
+{
+ UINT32 ResourceSourceOffset;
+ char *DeviceName;
+
+
+ /* SlaveMode, PhyType, LocalPortInstance */
+
+ AcpiDmIndent (Level);
+ AcpiOsPrintf ("Csi2Bus (%s,",
+ AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->Csi2SerialBus.Flags)]);
+
+ AcpiOsPrintf (" 0x%2.2X, 0x%2.2X,\n",
+ Resource->Csi2SerialBus.TypeSpecificFlags & 0x03,
+ Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC);
+
+ /* ResourceSource is a required field */
+
+ ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
+ Resource->CommonSerialBus.TypeDataLength;
+
+ AcpiDmIndent (Level + 1);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset);
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
+
+ /* ResourceSourceIndex, ResourceUsage */
+
+ AcpiOsPrintf (",\n");
+ AcpiDmIndent (Level + 1);
+ AcpiOsPrintf ("0x%2.2X, ", Resource->Csi2SerialBus.ResSourceIndex);
+
+ AcpiOsPrintf ("%s, ",
+ AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->Csi2SerialBus.Flags, 1)]);
+
+ /* Insert a descriptor name */
+
+ AcpiDmDescriptorName ();
+
+ /* Dump the vendor data */
+
+ AcpiOsPrintf (",\n");
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpSerialBusVendorData (Resource, Level);
+ AcpiOsPrintf (")\n");
+
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmI2cSerialBusDescriptor
*
* PARAMETERS: Info - Extra resource info
@@ -827,7 +917,7 @@
*
* RETURN: None
*
- * DESCRIPTION: Decode a I2C/SPI/UART serial bus descriptor
+ * DESCRIPTION: Decode a I2C/SPI/UART/CSI2 serial bus descriptor
*
******************************************************************************/
diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c
index c4c8570..8178782 100644
--- a/source/components/disassembler/dmresrcs.c
+++ b/source/components/disassembler/dmresrcs.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmutils.c b/source/components/disassembler/dmutils.c
index 71d2a66..2c9f1c6 100644
--- a/source/components/disassembler/dmutils.c
+++ b/source/components/disassembler/dmutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index 22c04a9..06a5742 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -288,7 +292,7 @@
return (BLOCK_NONE);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case AML_PACKAGE_OP:
case AML_VARIABLE_PACKAGE_OP:
@@ -310,7 +314,7 @@
return (BLOCK_NONE);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -576,7 +580,7 @@
return (AE_OK);
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -660,7 +664,7 @@
AcpiDmNamestring (NextOp->Common.Value.Name);
AcpiOsPrintf (", ");
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -847,7 +851,15 @@
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
ASL_CV_CLOSE_PAREN (Op, Level);
- /* Emit description comment for Name() with a predefined ACPI name */
+ if (Op->Asl.Parent->Common.AmlOpcode == AML_NAME_OP)
+ {
+ /*
+ * Emit description comment showing the full ACPI name
+ * of the ResourceTemplate only if it was defined using a
+ * Name statement.
+ */
+ AcpiDmPredefinedDescription (Op->Asl.Parent);
+ }
AcpiDmPredefinedDescription (Op->Asl.Parent);
diff --git a/source/components/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c
index ddb161d..a1ae4d2 100644
--- a/source/components/dispatcher/dsargs.c
+++ b/source/components/dispatcher/dsargs.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c
index eaa3f9d..84206f2 100644
--- a/source/components/dispatcher/dscontrol.c
+++ b/source/components/dispatcher/dscontrol.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -98,7 +102,7 @@
}
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case AML_IF_OP:
/*
diff --git a/source/components/dispatcher/dsdebug.c b/source/components/dispatcher/dsdebug.c
index 0bf05c3..f0109eb 100644
--- a/source/components/dispatcher/dsdebug.c
+++ b/source/components/dispatcher/dsdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -142,7 +146,7 @@
/* Ignore control codes, they are not errors */
- if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
+ if (ACPI_CNTL_EXCEPTION (Status))
{
return_VOID;
}
diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index f5224e3..16d93e9 100644
--- a/source/components/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -229,7 +233,12 @@
Status = AcpiNsLookup (WalkState->ScopeInfo,
Arg->Common.Value.String, ACPI_TYPE_ANY,
ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
- if (ACPI_FAILURE (Status))
+ if ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) &&
+ Status == AE_ALREADY_EXISTS)
+ {
+ Status = AE_OK;
+ }
+ else if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
Arg->Common.Value.String, Status);
@@ -570,12 +579,21 @@
Info.RegionNode = RegionNode;
Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
- if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM &&
- !(RegionNode->Object->Field.InternalPccBuffer
- = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length)))
+ if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (AE_NO_MEMORY);
+ return_ACPI_STATUS (Status);
}
+
+ if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)
+ {
+ RegionNode->Object->Field.InternalPccBuffer =
+ ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length);
+ if (!RegionNode->Object->Field.InternalPccBuffer)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+ }
+
return_ACPI_STATUS (Status);
}
@@ -671,7 +689,7 @@
}
#ifdef ACPI_EXEC_APP
- Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
+ Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
#endif
/*
* Walk the list of entries in the FieldList
diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c
index 6e1cdc5..3c38cb5 100644
--- a/source/components/dispatcher/dsinit.c
+++ b/source/components/dispatcher/dsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c
index dd9b966..2d6b239 100644
--- a/source/components/dispatcher/dsmethod.c
+++ b/source/components/dispatcher/dsmethod.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c
index 4430d72..c52d753 100644
--- a/source/components/dispatcher/dsmthdat.c
+++ b/source/components/dispatcher/dsmthdat.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c
index 835fbce..f6bfd55 100644
--- a/source/components/dispatcher/dsobject.c
+++ b/source/components/dispatcher/dsobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c
index ae6ba5b..debde09 100644
--- a/source/components/dispatcher/dsopcode.c
+++ b/source/components/dispatcher/dsopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -595,6 +599,7 @@
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
ObjDesc->Region.Length = Table->Length;
+ ObjDesc->Region.Pointer = Table;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
diff --git a/source/components/dispatcher/dspkginit.c b/source/components/dispatcher/dspkginit.c
index a831045..116a0d1 100644
--- a/source/components/dispatcher/dspkginit.c
+++ b/source/components/dispatcher/dspkginit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c
index c5aab3a..9a369c5 100644
--- a/source/components/dispatcher/dsutils.c
+++ b/source/components/dispatcher/dsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c
index d448117..06dac0c 100644
--- a/source/components/dispatcher/dswexec.c
+++ b/source/components/dispatcher/dswexec.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -46,7 +50,9 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acdebug.h"
-
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dswexec")
@@ -59,7 +65,7 @@
AcpiExOpcode_0A_0T_1R,
AcpiExOpcode_1A_0T_0R,
AcpiExOpcode_1A_0T_1R,
- AcpiExOpcode_1A_1T_0R,
+ NULL, /* Was: AcpiExOpcode_1A_0T_0R (Was for Load operator) */
AcpiExOpcode_1A_1T_1R,
AcpiExOpcode_2A_0T_0R,
AcpiExOpcode_2A_0T_1R,
@@ -392,7 +398,10 @@
UINT32 OpClass;
ACPI_PARSE_OBJECT *NextOp;
ACPI_PARSE_OBJECT *FirstArg;
-
+#ifdef ACPI_EXEC_APP
+ char *Namepath;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+#endif
ACPI_FUNCTION_TRACE_PTR (DsExecEndOp, WalkState);
@@ -605,6 +614,29 @@
}
Status = AcpiDsEvalBufferFieldOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+
+#ifdef ACPI_EXEC_APP
+ /*
+ * AcpiExec support for namespace initialization file (initialize
+ * BufferFields in this code.)
+ */
+ Namepath = AcpiNsGetExternalPathname (Op->Common.Node);
+ Status = AeLookupInitFileEntry (Namepath, &ObjDesc);
+ if (ACPI_SUCCESS (Status))
+ {
+ Status = AcpiExWriteDataToField (ObjDesc, Op->Common.Node->Object, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "While writing to buffer field"));
+ }
+ }
+ ACPI_FREE (Namepath);
+ Status = AE_OK;
+#endif
break;
@@ -632,8 +664,7 @@
break;
}
- /* Fall through */
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case AML_INT_EVAL_SUBTREE_OP:
diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c
index 8a14eb5..203fb9c 100644
--- a/source/components/dispatcher/dswload.c
+++ b/source/components/dispatcher/dswload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -44,7 +48,6 @@
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
-
#ifdef ACPI_ASL_COMPILER
#include "acdisasm.h"
#endif
@@ -264,7 +267,7 @@
break;
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -443,7 +446,6 @@
ACPI_PARSE_OBJECT *Op;
ACPI_OBJECT_TYPE ObjectType;
ACPI_STATUS Status = AE_OK;
-
#ifdef ACPI_ASL_COMPILER
UINT8 ParamCount;
#endif
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c
index 385c5f9..6cb1c42 100644
--- a/source/components/dispatcher/dswload2.c
+++ b/source/components/dispatcher/dswload2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -45,6 +49,9 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dswload2")
@@ -251,7 +258,7 @@
break;
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -419,6 +426,10 @@
ACPI_NAMESPACE_NODE *NewNode;
UINT32 i;
UINT8 RegionSpace;
+#ifdef ACPI_EXEC_APP
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ char *Namepath;
+#endif
ACPI_FUNCTION_TRACE (DsLoad2EndOp);
@@ -515,6 +526,11 @@
* be evaluated later during the execution phase
*/
Status = AcpiDsCreateBufferField (Op, WalkState);
+ if ACPI_FAILURE (Status)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "CreateBufferField failure"));
+ goto Cleanup;
+ }
break;
case AML_TYPE_NAMED_FIELD:
@@ -654,6 +670,31 @@
case AML_NAME_OP:
Status = AcpiDsCreateNode (WalkState, Node, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+#ifdef ACPI_EXEC_APP
+ /*
+ * AcpiExec support for namespace initialization file (initialize
+ * Name opcodes in this code.)
+ */
+ Namepath = AcpiNsGetExternalPathname (Node);
+ Status = AeLookupInitFileEntry (Namepath, &ObjDesc);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Detach any existing object, attach new object */
+
+ if (Node->Object)
+ {
+ AcpiNsDetachObject (Node);
+ }
+ AcpiNsAttachObject (Node, ObjDesc, ObjDesc->Common.Type);
+ }
+ ACPI_FREE (Namepath);
+ Status = AE_OK;
+#endif
break;
case AML_METHOD_OP:
diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c
index fce2bc9..ce9fea5 100644
--- a/source/components/dispatcher/dswscope.c
+++ b/source/components/dispatcher/dswscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c
index 8bb2e0b..7b8d3c9 100644
--- a/source/components/dispatcher/dswstate.c
+++ b/source/components/dispatcher/dswstate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evevent.c b/source/components/events/evevent.c
index f8e4b09..e8b3582 100644
--- a/source/components/events/evevent.c
+++ b/source/components/events/evevent.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -187,7 +191,7 @@
/*
* Initialize the structure that keeps track of fixed event handlers and
- * enable the fixed events.
+ * disable all of the fixed events.
*/
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{
@@ -200,7 +204,8 @@
{
Status = AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[i].EnableRegisterId,
- ACPI_DISABLE_EVENT);
+ (i == ACPI_EVENT_PCIE_WAKE) ?
+ ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -249,6 +254,11 @@
return (IntStatus);
}
+ if (FixedEnable & ACPI_BITMASK_PCIEXP_WAKE_DISABLE)
+ FixedEnable &= ~ACPI_BITMASK_PCIEXP_WAKE_DISABLE;
+ else
+ FixedEnable |= ACPI_BITMASK_PCIEXP_WAKE_DISABLE;
+
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
"Fixed Event Block: Enable %08X Status %08X\n",
FixedEnable, FixedStatus));
@@ -319,7 +329,8 @@
{
(void) AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- ACPI_DISABLE_EVENT);
+ (Event == ACPI_EVENT_PCIE_WAKE) ?
+ ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT);
ACPI_ERROR ((AE_INFO,
"No installed handler for fixed event - %s (%u), disabling",
diff --git a/source/components/events/evglock.c b/source/components/events/evglock.c
index 8db3469..c47399c 100644
--- a/source/components/events/evglock.c
+++ b/source/components/events/evglock.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c
index 03cff94..5de5259 100644
--- a/source/components/events/evgpe.c
+++ b/source/components/events/evgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c
index 6806dd3..c43fd5c 100644
--- a/source/components/events/evgpeblk.c
+++ b/source/components/events/evgpeblk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c
index 9f5cfb3..f5680c3 100644
--- a/source/components/events/evgpeinit.c
+++ b/source/components/events/evgpeinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evgpeutil.c b/source/components/events/evgpeutil.c
index 96e3abb..63eeab0 100644
--- a/source/components/events/evgpeutil.c
+++ b/source/components/events/evgpeutil.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c
index 2fda12b..81d9d93 100644
--- a/source/components/events/evhandler.c
+++ b/source/components/events/evhandler.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -451,7 +455,7 @@
case ACPI_ADR_SPACE_DATA_TABLE:
Handler = AcpiExDataTableSpaceHandler;
- Setup = NULL;
+ Setup = AcpiEvDataTableRegionSetup;
break;
default:
@@ -565,6 +569,13 @@
/* Init handler obj */
+ Status = AcpiOsCreateMutex (&HandlerObj->AddressSpace.ContextMutex);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiUtRemoveReference (HandlerObj);
+ goto UnlockAndExit;
+ }
+
HandlerObj->AddressSpace.SpaceId = (UINT8) SpaceId;
HandlerObj->AddressSpace.HandlerFlags = Flags;
HandlerObj->AddressSpace.RegionList = NULL;
diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c
index f21ad46..f5cfa38 100644
--- a/source/components/events/evmisc.c
+++ b/source/components/events/evmisc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 60cb374..86a2d7e 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -52,8 +56,10 @@
/* Local prototypes */
static void
-AcpiEvOrphanEcRegMethod (
- ACPI_NAMESPACE_NODE *EcDeviceNode);
+AcpiEvExecuteOrphanRegMethod (
+ ACPI_NAMESPACE_NODE *DeviceNode,
+ ACPI_ADR_SPACE_TYPE SpaceId);
+
static ACPI_STATUS
AcpiEvRegRun (
@@ -156,6 +162,8 @@
ACPI_OPERAND_OBJECT *RegionObj2;
void *RegionContext = NULL;
ACPI_CONNECTION_INFO *Context;
+ ACPI_MUTEX ContextMutex;
+ BOOLEAN ContextLocked;
ACPI_PHYSICAL_ADDRESS Address;
@@ -182,6 +190,8 @@
}
Context = HandlerDesc->AddressSpace.Context;
+ ContextMutex = HandlerDesc->AddressSpace.ContextMutex;
+ ContextLocked = FALSE;
/*
* It may be the case that the region has never been initialized.
@@ -202,6 +212,23 @@
return_ACPI_STATUS (AE_NOT_EXIST);
}
+ if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)
+ {
+ ACPI_PCC_INFO *Ctx = HandlerDesc->AddressSpace.Context;
+
+ Ctx->InternalBuffer = FieldObj->Field.InternalPccBuffer;
+ Ctx->Length = (UINT16) RegionObj->Region.Length;
+ Ctx->SubspaceId = (UINT8) RegionObj->Region.Address;
+ }
+
+ if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)
+ {
+ ACPI_FFH_INFO *Ctx = HandlerDesc->AddressSpace.Context;
+
+ Ctx->Length = RegionObj->Region.Length;
+ Ctx->Offset = RegionObj->Region.Address;
+ }
+
/*
* We must exit the interpreter because the region setup will
* potentially execute control methods (for example, the _REG method
@@ -248,43 +275,6 @@
Handler = HandlerDesc->AddressSpace.Handler;
Address = (RegionObj->Region.Address + RegionOffset);
- /*
- * Special handling for GenericSerialBus and GeneralPurposeIo:
- * There are three extra parameters that must be passed to the
- * handler via the context:
- * 1) Connection buffer, a resource template from Connection() op
- * 2) Length of the above buffer
- * 3) Actual access length from the AccessAs() op
- *
- * In addition, for GeneralPurposeIo, the Address and BitWidth fields
- * are defined as follows:
- * 1) Address is the pin number index of the field (bit offset from
- * the previous Connection)
- * 2) BitWidth is the actual bit length of the field (number of pins)
- */
- if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS) &&
- Context &&
- FieldObj)
- {
- /* Get the Connection (ResourceTemplate) buffer */
-
- Context->Connection = FieldObj->Field.ResourceBuffer;
- Context->Length = FieldObj->Field.ResourceLength;
- Context->AccessLength = FieldObj->Field.AccessLength;
- }
- if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO) &&
- Context &&
- FieldObj)
- {
- /* Get the Connection (ResourceTemplate) buffer */
-
- Context->Connection = FieldObj->Field.ResourceBuffer;
- Context->Length = FieldObj->Field.ResourceLength;
- Context->AccessLength = FieldObj->Field.AccessLength;
- Address = FieldObj->Field.PinNumberIndex;
- BitWidth = FieldObj->Field.BitLength;
- }
-
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&RegionObj->Region.Handler->AddressSpace, Handler,
@@ -302,11 +292,62 @@
AcpiExExitInterpreter();
}
+ /*
+ * Special handling for GenericSerialBus and GeneralPurposeIo:
+ * There are three extra parameters that must be passed to the
+ * handler via the context:
+ * 1) Connection buffer, a resource template from Connection() op
+ * 2) Length of the above buffer
+ * 3) Actual access length from the AccessAs() op
+ *
+ * Since we pass these extra parameters via the context, which is
+ * shared between threads, we must lock the context to avoid these
+ * parameters being changed from another thread before the handler
+ * has completed running.
+ *
+ * In addition, for GeneralPurposeIo, the Address and BitWidth fields
+ * are defined as follows:
+ * 1) Address is the pin number index of the field (bit offset from
+ * the previous Connection)
+ * 2) BitWidth is the actual bit length of the field (number of pins)
+ */
+ if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
+ RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO) &&
+ Context &&
+ FieldObj)
+ {
+
+ Status = AcpiOsAcquireMutex (ContextMutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ReEnterInterpreter;
+ }
+
+ ContextLocked = TRUE;
+
+ /* Get the Connection (ResourceTemplate) buffer */
+
+ Context->Connection = FieldObj->Field.ResourceBuffer;
+ Context->Length = FieldObj->Field.ResourceLength;
+ Context->AccessLength = FieldObj->Field.AccessLength;
+
+ if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO)
+ {
+ Address = FieldObj->Field.PinNumberIndex;
+ BitWidth = FieldObj->Field.BitLength;
+ }
+ }
+
/* Call the handler */
Status = Handler (Function, Address, BitWidth, Value, Context,
RegionObj2->Extra.RegionContext);
+ if (ContextLocked)
+ {
+ AcpiOsReleaseMutex (ContextMutex);
+ }
+
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status, "Returned by Handler for [%s]",
@@ -324,6 +365,7 @@
}
}
+ReEnterInterpreter:
if (!(HandlerDesc->AddressSpace.HandlerFlags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
{
@@ -757,11 +799,13 @@
(void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL, &Info, NULL);
- /* Special case for EC: handle "orphan" _REG methods with no region */
-
- if (SpaceId == ACPI_ADR_SPACE_EC)
+ /*
+ * Special case for EC and GPIO: handle "orphan" _REG methods with
+ * no region.
+ */
+ if (SpaceId == ACPI_ADR_SPACE_EC || SpaceId == ACPI_ADR_SPACE_GPIO)
{
- AcpiEvOrphanEcRegMethod (Node);
+ AcpiEvExecuteOrphanRegMethod (Node, SpaceId);
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES,
@@ -842,32 +886,29 @@
/*******************************************************************************
*
- * FUNCTION: AcpiEvOrphanEcRegMethod
+ * FUNCTION: AcpiEvExecuteOrphanRegMethod
*
- * PARAMETERS: EcDeviceNode - Namespace node for an EC device
+ * PARAMETERS: DeviceNode - Namespace node for an ACPI device
+ * SpaceId - The address space ID
*
* RETURN: None
*
- * DESCRIPTION: Execute an "orphan" _REG method that appears under the EC
+ * DESCRIPTION: Execute an "orphan" _REG method that appears under an ACPI
* device. This is a _REG method that has no corresponding region
- * within the EC device scope. The orphan _REG method appears to
- * have been enabled by the description of the ECDT in the ACPI
- * specification: "The availability of the region space can be
- * detected by providing a _REG method object underneath the
- * Embedded Controller device."
- *
- * To quickly access the EC device, we use the EcDeviceNode used
- * during EC handler installation. Otherwise, we would need to
- * perform a time consuming namespace walk, executing _HID
- * methods to find the EC device.
+ * within the device's scope. ACPI tables depending on these
+ * "orphan" _REG methods have been seen for both EC and GPIO
+ * Operation Regions. Presumably the Windows ACPI implementation
+ * always calls the _REG method independent of the presence of
+ * an actual Operation Region with the correct address space ID.
*
* MUTEX: Assumes the namespace is locked
*
******************************************************************************/
static void
-AcpiEvOrphanEcRegMethod (
- ACPI_NAMESPACE_NODE *EcDeviceNode)
+AcpiEvExecuteOrphanRegMethod (
+ ACPI_NAMESPACE_NODE *DeviceNode,
+ ACPI_ADR_SPACE_TYPE SpaceId)
{
ACPI_HANDLE RegMethod;
ACPI_NAMESPACE_NODE *NextNode;
@@ -876,10 +917,10 @@
ACPI_OBJECT Objects[2];
- ACPI_FUNCTION_TRACE (EvOrphanEcRegMethod);
+ ACPI_FUNCTION_TRACE (EvExecuteOrphanRegMethod);
- if (!EcDeviceNode)
+ if (!DeviceNode)
{
return_VOID;
}
@@ -890,7 +931,7 @@
/* Get a handle to a _REG method immediately under the EC device */
- Status = AcpiGetHandle (EcDeviceNode, METHOD_NAME__REG, &RegMethod);
+ Status = AcpiGetHandle (DeviceNode, METHOD_NAME__REG, &RegMethod);
if (ACPI_FAILURE (Status))
{
goto Exit; /* There is no _REG method present */
@@ -903,25 +944,25 @@
* with other space IDs to be present; but the code below will then
* execute the _REG method with the EmbeddedControl SpaceID argument.
*/
- NextNode = AcpiNsGetNextNode (EcDeviceNode, NULL);
+ NextNode = AcpiNsGetNextNode (DeviceNode, NULL);
while (NextNode)
{
if ((NextNode->Type == ACPI_TYPE_REGION) &&
(NextNode->Object) &&
- (NextNode->Object->Region.SpaceId == ACPI_ADR_SPACE_EC))
+ (NextNode->Object->Region.SpaceId == SpaceId))
{
goto Exit; /* Do not execute the _REG */
}
- NextNode = AcpiNsGetNextNode (EcDeviceNode, NextNode);
+ NextNode = AcpiNsGetNextNode (DeviceNode, NextNode);
}
- /* Evaluate the _REG(EmbeddedControl,Connect) method */
+ /* Evaluate the _REG(SpaceId,Connect) method */
Args.Count = 2;
Args.Pointer = Objects;
Objects[0].Type = ACPI_TYPE_INTEGER;
- Objects[0].Integer.Value = ACPI_ADR_SPACE_EC;
+ Objects[0].Integer.Value = SpaceId;
Objects[1].Type = ACPI_TYPE_INTEGER;
Objects[1].Integer.Value = ACPI_REG_CONNECT;
diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c
index 587ebae..dc41d4c 100644
--- a/source/components/events/evrgnini.c
+++ b/source/components/events/evrgnini.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -71,6 +75,7 @@
{
ACPI_OPERAND_OBJECT *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle;
ACPI_MEM_SPACE_CONTEXT *LocalRegionContext;
+ ACPI_MEM_MAPPING *Mm;
ACPI_FUNCTION_TRACE (EvSystemMemoryRegionSetup);
@@ -82,12 +87,14 @@
{
LocalRegionContext = (ACPI_MEM_SPACE_CONTEXT *) *RegionContext;
- /* Delete a cached mapping if present */
+ /* Delete memory mappings if present */
- if (LocalRegionContext->MappedLength)
+ while (LocalRegionContext->FirstMm)
{
- AcpiOsUnmapMemory (LocalRegionContext->MappedLogicalAddress,
- LocalRegionContext->MappedLength);
+ Mm = LocalRegionContext->FirstMm;
+ LocalRegionContext->FirstMm = Mm->NextMm;
+ AcpiOsUnmapMemory(Mm->LogicalAddress, Mm->Length);
+ ACPI_FREE(Mm);
}
ACPI_FREE (LocalRegionContext);
*RegionContext = NULL;
@@ -486,6 +493,64 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiEvDataTableRegionSetup
+ *
+ * PARAMETERS: Handle - Region we are interested in
+ * Function - Start or stop
+ * HandlerContext - Address space handler context
+ * RegionContext - Region specific context
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Setup a DataTableRegion
+ *
+ * MUTEX: Assumes namespace is not locked
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEvDataTableRegionSetup (
+ ACPI_HANDLE Handle,
+ UINT32 Function,
+ void *HandlerContext,
+ void **RegionContext)
+{
+ ACPI_OPERAND_OBJECT *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle;
+ ACPI_DATA_TABLE_MAPPING *LocalRegionContext;
+
+
+ ACPI_FUNCTION_TRACE (EvDataTableRegionSetup);
+
+
+ if (Function == ACPI_REGION_DEACTIVATE)
+ {
+ if (*RegionContext)
+ {
+ ACPI_FREE (*RegionContext);
+ *RegionContext = NULL;
+ }
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /* Create a new context */
+
+ LocalRegionContext = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_DATA_TABLE_MAPPING));
+ if (!(LocalRegionContext))
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ /* Save the data table pointer for use in the handler */
+
+ LocalRegionContext->Pointer = RegionDesc->Region.Pointer;
+
+ *RegionContext = LocalRegionContext;
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiEvDefaultRegionSetup
*
* PARAMETERS: Handle - Region we are interested in
diff --git a/source/components/events/evsci.c b/source/components/events/evsci.c
index de01a1b..e1f7601 100644
--- a/source/components/events/evsci.c
+++ b/source/components/events/evsci.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c
index 7a5e60b..67273bc 100644
--- a/source/components/events/evxface.c
+++ b/source/components/events/evxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c
index 3403e46..e810890 100644
--- a/source/components/events/evxfevnt.c
+++ b/source/components/events/evxfevnt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c
index 68f8b1a..420f638 100644
--- a/source/components/events/evxfgpe.c
+++ b/source/components/events/evxfgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -953,6 +957,44 @@
ACPI_EXPORT_SYMBOL (AcpiEnableAllWakeupGpes)
+/******************************************************************************
+ *
+ * FUNCTION: AcpiAnyGpeStatusSet
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Whether or not the status bit is set for any GPE
+ *
+ * DESCRIPTION: Check the status bits of all enabled GPEs and return TRUE if any
+ * of them is set or FALSE otherwise.
+ *
+ ******************************************************************************/
+
+UINT32
+AcpiAnyGpeStatusSet (
+ void)
+{
+ ACPI_STATUS Status;
+ UINT8 Ret;
+
+
+ ACPI_FUNCTION_TRACE (AcpiAnyGpeStatusSet);
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return (FALSE);
+ }
+
+ Ret = AcpiHwCheckAllGpes ();
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+
+ return (Ret);
+}
+
+ACPI_EXPORT_SYMBOL(AcpiAnyGpeStatusSet)
+
+
/*******************************************************************************
*
* FUNCTION: AcpiInstallGpeBlock
diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c
index 281f538..180c05d 100644
--- a/source/components/events/evxfregn.c
+++ b/source/components/events/evxfregn.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -250,6 +254,7 @@
/* Now we can delete the handler object */
+ AcpiOsReleaseMutex (HandlerObj->AddressSpace.ContextMutex);
AcpiUtRemoveReference (HandlerObj);
goto UnlockAndExit;
}
diff --git a/source/components/executer/exconcat.c b/source/components/executer/exconcat.c
index 0c30e88..7f7df07 100644
--- a/source/components/executer/exconcat.c
+++ b/source/components/executer/exconcat.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c
index e04b288..029371b 100644
--- a/source/components/executer/exconfig.c
+++ b/source/components/executer/exconfig.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -131,6 +135,7 @@
ACPI_NAMESPACE_NODE *ParentNode;
ACPI_NAMESPACE_NODE *StartNode;
ACPI_NAMESPACE_NODE *ParameterNode = NULL;
+ ACPI_OPERAND_OBJECT *ReturnObj;
ACPI_OPERAND_OBJECT *DdbHandle;
UINT32 TableIndex;
@@ -138,6 +143,16 @@
ACPI_FUNCTION_TRACE (ExLoadTableOp);
+ /* Create the return object */
+
+ ReturnObj = AcpiUtCreateIntegerObject ((UINT64) 0);
+ if (!ReturnObj)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ *ReturnDesc = ReturnObj;
+
/* Find the ACPI table in the RSDT/XSDT */
AcpiExExitInterpreter ();
@@ -155,13 +170,6 @@
/* Table not found, return an Integer=0 and AE_OK */
- DdbHandle = AcpiUtCreateIntegerObject ((UINT64) 0);
- if (!DdbHandle)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- *ReturnDesc = DdbHandle;
return_ACPI_STATUS (AE_OK);
}
@@ -252,7 +260,13 @@
}
}
- *ReturnDesc = DdbHandle;
+ /* Remove the reference to DdbHandle created by AcpiExAddTable above */
+
+ AcpiUtRemoveReference (DdbHandle);
+
+ /* Return -1 (non-zero) indicates success */
+
+ ReturnObj->Integer.Value = 0xFFFFFFFFFFFFFFFF;
return_ACPI_STATUS (Status);
}
@@ -310,7 +324,7 @@
*
* PARAMETERS: ObjDesc - Region or Buffer/Field where the table will be
* obtained
- * Target - Where a handle to the table will be stored
+ * Target - Where the status of the load will be stored
* WalkState - Current state
*
* RETURN: Status
@@ -342,6 +356,18 @@
ACPI_FUNCTION_TRACE (ExLoadOp);
+ if (Target->Common.DescriptorType == ACPI_DESC_TYPE_NAMED)
+ {
+ Target = AcpiNsGetAttachedObject (ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Target));
+ }
+ if (Target->Common.Type != ACPI_TYPE_INTEGER)
+ {
+ ACPI_ERROR ((AE_INFO, "Type not integer: %X", Target->Common.Type));
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ Target->Integer.Value = 0;
+
/* Source Object can be either an OpRegion or a Buffer/Field */
switch (ObjDesc->Common.Type)
@@ -483,7 +509,7 @@
ACPI_INFO (("Dynamic OEM Table Load:"));
AcpiExExitInterpreter ();
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
- ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, &TableIndex);
+ ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table, TRUE, &TableIndex);
AcpiExEnterInterpreter ();
if (ACPI_FAILURE (Status))
{
@@ -503,8 +529,6 @@
Status = AcpiExAddTable (TableIndex, &DdbHandle);
if (ACPI_FAILURE (Status))
{
- /* On error, TablePtr was deallocated above */
-
return_ACPI_STATUS (Status);
}
@@ -514,22 +538,13 @@
AcpiNsInitializeObjects ();
AcpiExEnterInterpreter ();
- /* Store the DdbHandle into the Target operand */
-
- Status = AcpiExStore (DdbHandle, Target, WalkState);
- if (ACPI_FAILURE (Status))
- {
- (void) AcpiExUnloadTable (DdbHandle);
-
- /* TablePtr was deallocated above */
-
- AcpiUtRemoveReference (DdbHandle);
- return_ACPI_STATUS (Status);
- }
-
- /* Remove the reference by added by AcpiExStore above */
+ /* Remove the reference to DdbHandle created by AcpiExAddTable above */
AcpiUtRemoveReference (DdbHandle);
+
+ /* Return -1 (non-zero) indicates success */
+
+ Target->Integer.Value = 0xFFFFFFFFFFFFFFFF;
return_ACPI_STATUS (Status);
}
diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c
index 7369b5d..593741b 100644
--- a/source/components/executer/exconvrt.c
+++ b/source/components/executer/exconvrt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c
index bff4fe9..17bc567 100644
--- a/source/components/executer/excreate.c
+++ b/source/components/executer/excreate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -338,6 +342,7 @@
ObjDesc->Region.SpaceId = SpaceId;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
+ ObjDesc->Region.Pointer = NULL;
ObjDesc->Region.Node = Node;
ObjDesc->Region.Handler = NULL;
ObjDesc->Common.Flags &=
diff --git a/source/components/executer/exdebug.c b/source/components/executer/exdebug.c
index 2e9613a..72d7c17 100644
--- a/source/components/executer/exdebug.c
+++ b/source/components/executer/exdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c
index 7f2eff2..5e2b386 100644
--- a/source/components/executer/exdump.c
+++ b/source/components/executer/exdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c
index a68ac67..54887f6 100644
--- a/source/components/executer/exfield.c
+++ b/source/components/executer/exfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -55,7 +59,7 @@
#define ACPI_INVALID_PROTOCOL_ID 0x80
#define ACPI_MAX_PROTOCOL_ID 0x0F
-const UINT8 AcpiProtocolLengths[] =
+static const UINT8 AcpiProtocolLengths[] =
{
ACPI_INVALID_PROTOCOL_ID, /* 0 - reserved */
ACPI_INVALID_PROTOCOL_ID, /* 1 - reserved */
@@ -183,7 +187,9 @@
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
- ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
{
/* SMBus, GSBus, IPMI serial */
@@ -355,7 +361,9 @@
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
- ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
{
/* SMBus, GSBus, IPMI serial */
@@ -378,9 +386,7 @@
ObjDesc->Field.BaseByteOffset,
SourceDesc->Buffer.Pointer, DataLength);
- if ((ObjDesc->Field.RegionObj->Region.Address == PCC_MASTER_SUBSPACE &&
- MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset)) ||
- GENERIC_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset))
+ if (MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset))
{
/* Perform the write */
diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c
index bb390d4..13904bb 100644
--- a/source/components/executer/exfldio.c
+++ b/source/components/executer/exfldio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -150,7 +154,7 @@
#ifdef ACPI_UNDER_DEVELOPMENT
/*
* If the Field access is AnyAcc, we can now compute the optimal
- * access (because we know know the length of the parent region)
+ * access (because we know the length of the parent region)
*/
if (!(ObjDesc->Common.Flags & AOPOBJ_DATA_VALID))
{
@@ -504,7 +508,7 @@
* RegionField case and write the datum to the Operation Region
*/
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_TYPE_LOCAL_REGION_FIELD:
/*
diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c
index 3c36d48..f9b7231 100644
--- a/source/components/executer/exmisc.c
+++ b/source/components/executer/exmisc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c
index 5b5d878..6a7f874 100644
--- a/source/components/executer/exmutex.c
+++ b/source/components/executer/exmutex.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exnames.c b/source/components/executer/exnames.c
index f0cc497..3296d2c 100644
--- a/source/components/executer/exnames.c
+++ b/source/components/executer/exnames.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c
index 86d716a..2da0c15 100644
--- a/source/components/executer/exoparg1.c
+++ b/source/components/executer/exoparg1.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -211,6 +215,7 @@
}
+#ifdef _OBSOLETE_CODE /* Was originally used for Load() operator */
/*******************************************************************************
*
* FUNCTION: AcpiExOpcode_1A_1T_0R
@@ -240,10 +245,12 @@
switch (WalkState->Opcode)
{
+#ifdef _OBSOLETE_CODE
case AML_LOAD_OP:
Status = AcpiExLoadOp (Operand[0], Operand[1], WalkState);
break;
+#endif
default: /* Unknown opcode */
@@ -258,7 +265,7 @@
return_ACPI_STATUS (Status);
}
-
+#endif
/*******************************************************************************
*
@@ -270,6 +277,8 @@
*
* DESCRIPTION: Execute opcode with one argument, one target, and a
* return value.
+ * January 2022: Added Load operator, with new ACPI 6.4
+ * semantics.
*
******************************************************************************/
@@ -299,6 +308,7 @@
case AML_FIND_SET_LEFT_BIT_OP:
case AML_FIND_SET_RIGHT_BIT_OP:
case AML_FROM_BCD_OP:
+ case AML_LOAD_OP:
case AML_TO_BCD_OP:
case AML_CONDITIONAL_REF_OF_OP:
@@ -400,6 +410,18 @@
}
break;
+ case AML_LOAD_OP: /* Result1 = Load (Operand[0], Result1) */
+
+ ReturnDesc->Integer.Value = 0;
+ Status = AcpiExLoadOp (Operand[0], ReturnDesc, WalkState);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Return -1 (non-zero) indicates success */
+
+ ReturnDesc->Integer.Value = 0xFFFFFFFFFFFFFFFF;
+ }
+ break;
+
case AML_TO_BCD_OP: /* ToBcd (Operand, Result) */
ReturnDesc->Integer.Value = 0;
@@ -1081,7 +1103,7 @@
WalkState, ReturnDesc, &TempDesc);
if (ACPI_FAILURE (Status))
{
- goto Cleanup;
+ return_ACPI_STATUS (Status);
}
ReturnDesc = TempDesc;
diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c
index 4831d63..3808438 100644
--- a/source/components/executer/exoparg2.c
+++ b/source/components/executer/exoparg2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c
index fa3a1f7..b100e0b 100644
--- a/source/components/executer/exoparg3.c
+++ b/source/components/executer/exoparg3.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exoparg6.c b/source/components/executer/exoparg6.c
index 010dd7e..a3e2afa 100644
--- a/source/components/executer/exoparg6.c
+++ b/source/components/executer/exoparg6.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c
index c86ba04..8ef2de0 100644
--- a/source/components/executer/exprep.c
+++ b/source/components/executer/exprep.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -539,10 +543,6 @@
}
}
- /* An additional reference for the container */
-
- AcpiUtAddReference (ObjDesc->Field.RegionObj);
-
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
ObjDesc->Field.StartFieldBitOffset,
diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c
index 2c3ca37..247cc7a 100644
--- a/source/components/executer/exregion.c
+++ b/source/components/executer/exregion.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -76,6 +80,7 @@
ACPI_STATUS Status = AE_OK;
void *LogicalAddrPtr = NULL;
ACPI_MEM_SPACE_CONTEXT *MemInfo = RegionContext;
+ ACPI_MEM_MAPPING *Mm = MemInfo->CurMm;
UINT32 Length;
ACPI_SIZE MapLength;
ACPI_SIZE PageBoundaryMapLength;
@@ -135,21 +140,46 @@
* Is 1) Address below the current mapping? OR
* 2) Address beyond the current mapping?
*/
- if ((Address < MemInfo->MappedPhysicalAddress) ||
- (((UINT64) Address + Length) >
- ((UINT64)
- MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
+ if (!Mm || (Address < Mm->PhysicalAddress) ||
+ ((UINT64) Address + Length > (UINT64) Mm->PhysicalAddress + Mm->Length))
{
/*
- * The request cannot be resolved by the current memory mapping;
- * Delete the existing mapping and create a new one.
+ * The request cannot be resolved by the current memory mapping.
+ *
+ * Look for an existing saved mapping covering the address range
+ * at hand. If found, save it as the current one and carry out
+ * the access.
*/
- if (MemInfo->MappedLength)
+ for (Mm = MemInfo->FirstMm; Mm; Mm = Mm->NextMm)
{
- /* Valid mapping, delete it */
+ if (Mm == MemInfo->CurMm)
+ {
+ continue;
+ }
- AcpiOsUnmapMemory (MemInfo->MappedLogicalAddress,
- MemInfo->MappedLength);
+ if (Address < Mm->PhysicalAddress)
+ {
+ continue;
+ }
+
+ if ((UINT64) Address + Length > (UINT64) Mm->PhysicalAddress + Mm->Length)
+ {
+ continue;
+ }
+
+ MemInfo->CurMm = Mm;
+ goto access;
+ }
+
+ /* Create a new mappings list entry */
+
+ Mm = ACPI_ALLOCATE_ZEROED(sizeof(*Mm));
+ if (!Mm)
+ {
+ ACPI_ERROR((AE_INFO,
+ "Unable to save memory mapping at 0x%8.8X%8.8X, size %u",
+ ACPI_FORMAT_UINT64(Address), Length));
+ return_ACPI_STATUS(AE_NO_MEMORY);
}
/*
@@ -185,28 +215,38 @@
/* Create a new mapping starting at the address given */
- MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength);
- if (!MemInfo->MappedLogicalAddress)
+ LogicalAddrPtr = AcpiOsMapMemory(Address, MapLength);
+ if (!LogicalAddrPtr)
{
ACPI_ERROR ((AE_INFO,
"Could not map memory at 0x%8.8X%8.8X, size %u",
ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength));
- MemInfo->MappedLength = 0;
+ ACPI_FREE(Mm);
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Save the physical address and mapping size */
- MemInfo->MappedPhysicalAddress = Address;
- MemInfo->MappedLength = MapLength;
+ Mm->LogicalAddress = LogicalAddrPtr;
+ Mm->PhysicalAddress = Address;
+ Mm->Length = MapLength;
+
+ /*
+ * Add the new entry to the mappigs list and save it as the
+ * current mapping.
+ */
+ Mm->NextMm = MemInfo->FirstMm;
+ MemInfo->FirstMm = Mm;
+ MemInfo->CurMm = Mm;
}
+access:
/*
* Generate a logical pointer corresponding to the address we want to
* access
*/
- LogicalAddrPtr = MemInfo->MappedLogicalAddress +
- ((UINT64) Address - (UINT64) MemInfo->MappedPhysicalAddress);
+ LogicalAddrPtr = Mm->LogicalAddress +
+ ((UINT64) Address - (UINT64) Mm->PhysicalAddress);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
@@ -544,9 +584,17 @@
void *HandlerContext,
void *RegionContext)
{
+ ACPI_DATA_TABLE_MAPPING *Mapping;
+ char *Pointer;
+
+
ACPI_FUNCTION_TRACE (ExDataTableSpaceHandler);
+ Mapping = (ACPI_DATA_TABLE_MAPPING *) RegionContext;
+ Pointer = ACPI_CAST_PTR (char, Mapping->Pointer) +
+ (Address - ACPI_PTR_TO_PHYSADDR (Mapping->Pointer));
+
/*
* Perform the memory read or write. The BitWidth was already
* validated.
@@ -555,14 +603,12 @@
{
case ACPI_READ:
- memcpy (ACPI_CAST_PTR (char, Value), ACPI_PHYSADDR_TO_PTR (Address),
- ACPI_DIV_8 (BitWidth));
+ memcpy (ACPI_CAST_PTR (char, Value), Pointer, ACPI_DIV_8 (BitWidth));
break;
case ACPI_WRITE:
- memcpy (ACPI_PHYSADDR_TO_PTR (Address), ACPI_CAST_PTR (char, Value),
- ACPI_DIV_8 (BitWidth));
+ memcpy (Pointer, ACPI_CAST_PTR (char, Value), ACPI_DIV_8 (BitWidth));
break;
default:
diff --git a/source/components/executer/exresnte.c b/source/components/executer/exresnte.c
index a3452c1..dbe66dc 100644
--- a/source/components/executer/exresnte.c
+++ b/source/components/executer/exresnte.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c
index 7ca7b33..8fdfb6f 100644
--- a/source/components/executer/exresolv.c
+++ b/source/components/executer/exresolv.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c
index 29d8114..7bc4cd0 100644
--- a/source/components/executer/exresop.c
+++ b/source/components/executer/exresop.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -246,7 +250,7 @@
TargetOp = AML_DEBUG_OP;
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_REFCLASS_ARG:
case ACPI_REFCLASS_LOCAL:
@@ -310,7 +314,7 @@
* Else not a string - fall through to the normal Reference
* case below
*/
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ARGI_REFERENCE: /* References: */
case ARGI_INTEGER_REF:
diff --git a/source/components/executer/exserial.c b/source/components/executer/exserial.c
index ea5b1a5..507ad1b 100644
--- a/source/components/executer/exserial.c
+++ b/source/components/executer/exserial.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -241,6 +245,12 @@
Function = ACPI_READ | (AccessorType << 16);
break;
+ case ACPI_ADR_SPACE_PLATFORM_RT:
+
+ BufferLength = ACPI_PRM_INPUT_BUFFER_SIZE;
+ Function = ACPI_READ;
+ break;
+
default:
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
@@ -360,6 +370,18 @@
Function = ACPI_WRITE | (AccessorType << 16);
break;
+ case ACPI_ADR_SPACE_PLATFORM_RT:
+
+ BufferLength = ACPI_PRM_INPUT_BUFFER_SIZE;
+ Function = ACPI_WRITE;
+ break;
+
+ case ACPI_ADR_SPACE_FIXED_HARDWARE:
+
+ BufferLength = ACPI_FFH_INPUT_BUFFER_SIZE;
+ Function = ACPI_WRITE;
+ break;
+
default:
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c
index 4070847..fc40511 100644
--- a/source/components/executer/exstore.c
+++ b/source/components/executer/exstore.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -136,7 +140,7 @@
return_ACPI_STATUS (AE_OK);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -473,7 +477,7 @@
break;
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_EVENT:
diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c
index 85b9770..ce8e3d4 100644
--- a/source/components/executer/exstoren.c
+++ b/source/components/executer/exstoren.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exstorob.c b/source/components/executer/exstorob.c
index 719ad5e..cc33347 100644
--- a/source/components/executer/exstorob.c
+++ b/source/components/executer/exstorob.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c
index f7d8676..38574ba 100644
--- a/source/components/executer/exsystem.c
+++ b/source/components/executer/exsystem.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -153,7 +157,7 @@
*
* FUNCTION: AcpiExSystemDoStall
*
- * PARAMETERS: HowLong - The amount of time to stall,
+ * PARAMETERS: HowLongUs - The amount of time to stall,
* in microseconds
*
* RETURN: Status
@@ -168,7 +172,7 @@
ACPI_STATUS
AcpiExSystemDoStall (
- UINT32 HowLong)
+ UINT32 HowLongUs)
{
ACPI_STATUS Status = AE_OK;
@@ -176,21 +180,26 @@
ACPI_FUNCTION_ENTRY ();
- if (HowLong > 255) /* 255 microseconds */
+ if (HowLongUs > 255)
{
/*
- * Longer than 255 usec, this is an error
+ * Longer than 255 microseconds, this is an error
*
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
ACPI_ERROR ((AE_INFO,
- "Time parameter is too large (%u)", HowLong));
+ "Time parameter is too large (%u)", HowLongUs));
Status = AE_AML_OPERAND_VALUE;
}
else
{
- AcpiOsStall (HowLong);
+ if (HowLongUs > 100)
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Time parameter %u us > 100 us violating ACPI spec, please fix the firmware.", HowLongUs));
+ }
+ AcpiOsStall (HowLongUs);
}
return (Status);
@@ -201,7 +210,7 @@
*
* FUNCTION: AcpiExSystemDoSleep
*
- * PARAMETERS: HowLong - The amount of time to sleep,
+ * PARAMETERS: HowLongMs - The amount of time to sleep,
* in milliseconds
*
* RETURN: None
@@ -212,7 +221,7 @@
ACPI_STATUS
AcpiExSystemDoSleep (
- UINT64 HowLong)
+ UINT64 HowLongMs)
{
ACPI_FUNCTION_ENTRY ();
@@ -225,12 +234,12 @@
* For compatibility with other ACPI implementations and to prevent
* accidental deep sleeps, limit the sleep time to something reasonable.
*/
- if (HowLong > ACPI_MAX_SLEEP)
+ if (HowLongMs > ACPI_MAX_SLEEP)
{
- HowLong = ACPI_MAX_SLEEP;
+ HowLongMs = ACPI_MAX_SLEEP;
}
- AcpiOsSleep (HowLong);
+ AcpiOsSleep (HowLongMs);
/* And now we must get the interpreter again */
diff --git a/source/components/executer/extrace.c b/source/components/executer/extrace.c
index 3cb989e..8bcd176 100644
--- a/source/components/executer/extrace.c
+++ b/source/components/executer/extrace.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c
index 0c45219..9e4af5d 100644
--- a/source/components/executer/exutils.c
+++ b/source/components/executer/exutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c
index cb9e84e..4bae0c9 100644
--- a/source/components/hardware/hwacpi.c
+++ b/source/components/hardware/hwacpi.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c
index 37c5a5c..aa52cdd 100644
--- a/source/components/hardware/hwesleep.c
+++ b/source/components/hardware/hwesleep.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -149,7 +153,10 @@
/* Flush caches, as per ACPI specification */
- ACPI_FLUSH_CPU_CACHE ();
+ if (SleepState < ACPI_STATE_S4)
+ {
+ ACPI_FLUSH_CPU_CACHE ();
+ }
Status = AcpiOsEnterSleep (SleepState, SleepControl, 0);
if (Status == AE_CTRL_TERMINATE)
@@ -200,18 +207,15 @@
AcpiHwExtendedWakePrep (
UINT8 SleepState)
{
- ACPI_STATUS Status;
UINT8 SleepTypeValue;
ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
- Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
- if (ACPI_SUCCESS (Status))
+ if (AcpiGbl_SleepTypeAS0 != ACPI_SLEEP_TYPE_INVALID)
{
- SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
+ SleepTypeValue = ((AcpiGbl_SleepTypeAS0 << ACPI_X_SLEEP_TYPE_POSITION) &
ACPI_X_SLEEP_TYPE_MASK);
(void) AcpiWrite ((UINT64) (SleepTypeValue | ACPI_X_SLEEP_ENABLE),
diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c
index 0e17fa8..99000a5 100644
--- a/source/components/hardware/hwgpe.c
+++ b/source/components/hardware/hwgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -142,7 +146,7 @@
return (AE_BAD_PARAMETER);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_GPE_ENABLE:
@@ -525,6 +529,58 @@
/******************************************************************************
*
+ * FUNCTION: AcpiHwGetGpeBlockStatus
+ *
+ * PARAMETERS: GpeXruptInfo - GPE Interrupt info
+ * GpeBlock - Gpe Block info
+ *
+ * RETURN: Success
+ *
+ * DESCRIPTION: Produce a combined GPE status bits mask for the given block.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiHwGetGpeBlockStatus(
+ ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
+ ACPI_GPE_BLOCK_INFO *GpeBlock,
+ void *RetPtr)
+{
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
+ UINT64 InEnable;
+ UINT64 InStatus;
+ ACPI_STATUS Status;
+ UINT8 *Ret = RetPtr;
+ UINT32 i;
+
+
+ /* Examine each GPE Register within the block */
+
+ for (i = 0; i < GpeBlock->RegisterCount; i++)
+ {
+ GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
+
+ Status = AcpiHwRead (&InEnable, &GpeRegisterInfo->EnableAddress);
+ if (ACPI_FAILURE (Status))
+ {
+ continue;
+ }
+
+ Status = AcpiHwRead (&InStatus, &GpeRegisterInfo->StatusAddress);
+ if (ACPI_FAILURE (Status))
+ {
+ continue;
+ }
+
+ *Ret |= InEnable & InStatus;
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: AcpiHwDisableAllGpes
*
* PARAMETERS: None
@@ -603,4 +659,31 @@
return_ACPI_STATUS (Status);
}
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiHwCheckAllGpes
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Combined status of all GPEs
+ *
+ * DESCRIPTION: Check all enabled GPEs in all GPE blocks and return TRUE if the
+ * status bit is set for at least one of them of FALSE otherwise.
+ *
+ ******************************************************************************/
+
+UINT8
+AcpiHwCheckAllGpes (
+ void)
+{
+ UINT8 Ret = 0;
+
+
+ ACPI_FUNCTION_TRACE (AcpiHwCheckAllGpes);
+
+ (void) AcpiEvWalkGpeList (AcpiHwGetGpeBlockStatus, &Ret);
+ return (Ret != 0);
+}
+
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c
index 8b98fa9..d358067 100644
--- a/source/components/hardware/hwpci.c
+++ b/source/components/hardware/hwpci.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c
index e557492..cd49e09 100644
--- a/source/components/hardware/hwregs.c
+++ b/source/components/hardware/hwregs.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -521,7 +525,7 @@
* RETURN: Status
*
* DESCRIPTION: Write the PM1 A/B control registers. These registers are
- * different than than the PM1 A/B status and enable registers
+ * different than the PM1 A/B status and enable registers
* in that different values can be written to the A/B registers.
* Most notably, the SLP_TYP bits can be different, as per the
* values returned from the _Sx predefined methods.
diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c
index e6dcc83..acc7639 100644
--- a/source/components/hardware/hwsleep.c
+++ b/source/components/hardware/hwsleep.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -137,7 +141,7 @@
arg.acpi_transition_s_state.target_s_state = SleepState;
arg.acpi_transition_s_state.sleep_type_a = AcpiGbl_SleepTypeA;
arg.acpi_transition_s_state.sleep_type_b = AcpiGbl_SleepTypeB;
- zx_status_t zx_status = zx_system_powerctl(get_root_resource(),
+ zx_status_t zx_status = zx_system_powerctl(get_root_resource(),
ZX_SYSTEM_POWERCTL_ACPI_TRANSITION_S_STATE, &arg);
if (zx_status == ZX_OK) {
Status = AE_OK;
@@ -190,7 +194,10 @@
/* Flush caches, as per ACPI specification */
- ACPI_FLUSH_CPU_CACHE ();
+ if (SleepState < ACPI_STATE_S4)
+ {
+ ACPI_FLUSH_CPU_CACHE ();
+ }
Status = AcpiOsEnterSleep (SleepState, Pm1aControl, Pm1bControl);
if (Status == AE_CTRL_TERMINATE)
@@ -267,7 +274,7 @@
AcpiHwLegacyWakePrep (
UINT8 SleepState)
{
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
UINT32 Pm1aControl;
@@ -281,9 +288,7 @@
* This is unclear from the ACPI Spec, but it is required
* by some machines.
*/
- Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
- if (ACPI_SUCCESS (Status))
+ if (AcpiGbl_SleepTypeAS0 != ACPI_SLEEP_TYPE_INVALID)
{
SleepTypeRegInfo =
AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_TYPE);
@@ -304,9 +309,9 @@
/* Insert the SLP_TYP bits */
- Pm1aControl |= (AcpiGbl_SleepTypeA <<
+ Pm1aControl |= (AcpiGbl_SleepTypeAS0 <<
SleepTypeRegInfo->BitPosition);
- Pm1bControl |= (AcpiGbl_SleepTypeB <<
+ Pm1bControl |= (AcpiGbl_SleepTypeBS0 <<
SleepTypeRegInfo->BitPosition);
/* Write the control registers and ignore any errors */
@@ -392,6 +397,26 @@
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
ACPI_CLEAR_STATUS);
+ /* Enable sleep button */
+
+ (void) AcpiWriteBitRegister (
+ AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].EnableRegisterId,
+ ACPI_ENABLE_EVENT);
+
+ (void) AcpiWriteBitRegister (
+ AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].StatusRegisterId,
+ ACPI_CLEAR_STATUS);
+
+ /* Enable pcie wake event if support */
+ if ((AcpiGbl_FADT.Flags & ACPI_FADT_PCI_EXPRESS_WAKE)) {
+ (void) AcpiWriteBitRegister (
+ AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].EnableRegisterId,
+ ACPI_DISABLE_EVENT);
+ (void) AcpiWriteBitRegister (
+ AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].StatusRegisterId,
+ ACPI_CLEAR_STATUS);
+ }
+
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
return_ACPI_STATUS (Status);
}
diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c
index 1fd843a..7e9887e 100644
--- a/source/components/hardware/hwtimer.c
+++ b/source/components/hardware/hwtimer.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/hardware/hwvalid.c b/source/components/hardware/hwvalid.c
index 55230b7..19cc9a5 100644
--- a/source/components/hardware/hwvalid.c
+++ b/source/components/hardware/hwvalid.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c
index 1544528..933efd9 100644
--- a/source/components/hardware/hwxface.c
+++ b/source/components/hardware/hwxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c
index e2ab3da..55101f6 100644
--- a/source/components/hardware/hwxfsleep.c
+++ b/source/components/hardware/hwxfsleep.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -241,8 +245,6 @@
return_ACPI_STATUS (Status);
}
- ACPI_FLUSH_CPU_CACHE ();
-
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
if (ACPI_FAILURE (Status))
@@ -359,6 +361,12 @@
return_ACPI_STATUS (Status);
}
+ Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
+ &AcpiGbl_SleepTypeAS0, &AcpiGbl_SleepTypeBS0);
+ if (ACPI_FAILURE (Status)) {
+ AcpiGbl_SleepTypeAS0 = ACPI_SLEEP_TYPE_INVALID;
+ }
+
/* Execute the _PTS method (Prepare To Sleep) */
ArgList.Count = 1;
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c
index 4ab0c97..61507fb 100644
--- a/source/components/namespace/nsaccess.c
+++ b/source/components/namespace/nsaccess.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -139,14 +143,13 @@
* predefined names are at the root level. It is much easier to
* just create and link the new node(s) here.
*/
- NewNode = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_NAMESPACE_NODE));
+ NewNode = AcpiNsCreateNode (*ACPI_CAST_PTR (UINT32, InitVal->Name));
if (!NewNode)
{
Status = AE_NO_MEMORY;
goto UnlockAndExit;
}
- ACPI_COPY_NAMESEG (NewNode->Name.Ascii, InitVal->Name);
NewNode->DescriptorType = ACPI_DESC_TYPE_NAMED;
NewNode->Type = InitVal->Type;
diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c
index 7fa7f86..3afd4de 100644
--- a/source/components/namespace/nsalloc.c
+++ b/source/components/namespace/nsalloc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -369,7 +373,7 @@
NodeToDelete = NextNode;
NextNode = NextNode->Peer;
AcpiNsDeleteNode (NodeToDelete);
- };
+ }
/* Clear the parent's child pointer */
diff --git a/source/components/namespace/nsarguments.c b/source/components/namespace/nsarguments.c
index 5aee419..ecb773e 100644
--- a/source/components/namespace/nsarguments.c
+++ b/source/components/namespace/nsarguments.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -93,7 +97,9 @@
ArgType = METHOD_GET_NEXT_TYPE (ArgTypeList);
UserArgType = Info->Parameters[i]->Common.Type;
- if (UserArgType != ArgType)
+ /* No typechecking for ACPI_TYPE_ANY */
+
+ if ((UserArgType != ArgType) && (ArgType != ACPI_TYPE_ANY))
{
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, ACPI_WARN_ALWAYS,
"Argument #%u type mismatch - "
diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c
index 6eefd41..a7be29d 100644
--- a/source/components/namespace/nsconvert.c
+++ b/source/components/namespace/nsconvert.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c
index 181a6a1..1beee08 100644
--- a/source/components/namespace/nsdump.c
+++ b/source/components/namespace/nsdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c
index aefd0ee..c53bd0f 100644
--- a/source/components/namespace/nsdumpdv.c
+++ b/source/components/namespace/nsdumpdv.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c
index cbdfde6..b4d48ac 100644
--- a/source/components/namespace/nseval.c
+++ b/source/components/namespace/nseval.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c
index c9102ba..591c28a 100644
--- a/source/components/namespace/nsinit.c
+++ b/source/components/namespace/nsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c
index 31bbcf7..d149b85 100644
--- a/source/components/namespace/nsload.c
+++ b/source/components/namespace/nsload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c
index b90292b..48e4a6f 100644
--- a/source/components/namespace/nsnames.c
+++ b/source/components/namespace/nsnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -46,12 +50,6 @@
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME ("nsnames")
-/* Local Prototypes */
-
-static void
-AcpiNsNormalizePathname (
- char *OriginalPath);
-
/*******************************************************************************
*
@@ -224,7 +222,7 @@
/* Build the path in the caller buffer */
(void) AcpiNsBuildNormalizedPath (Node, Buffer->Pointer,
- RequiredSize, NoTrailing);
+ (UINT32) RequiredSize, NoTrailing);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X]\n",
(char *) Buffer->Pointer, (UINT32) RequiredSize));
@@ -397,7 +395,7 @@
/* Build the path in the allocated buffer */
- (void) AcpiNsBuildNormalizedPath (Node, NameBuffer, Size, NoTrailing);
+ (void) AcpiNsBuildNormalizedPath (Node, NameBuffer, (UINT32) Size, NoTrailing);
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "%s: Path \"%s\"\n",
ACPI_GET_FUNCTION_NAME, NameBuffer));
@@ -430,7 +428,7 @@
char *FullPath = NULL;
char *ExternalPath = NULL;
char *PrefixPath = NULL;
- UINT32 PrefixPathLength = 0;
+ ACPI_SIZE PrefixPathLength = 0;
/* If there is a prefix, get the pathname to it */
@@ -504,7 +502,7 @@
*
******************************************************************************/
-static void
+void
AcpiNsNormalizePathname (
char *OriginalPath)
{
diff --git a/source/components/namespace/nsobject.c b/source/components/namespace/nsobject.c
index 6e48955..6637bc8 100644
--- a/source/components/namespace/nsobject.c
+++ b/source/components/namespace/nsobject.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c
index 4116870..b1ea8fd 100644
--- a/source/components/namespace/nsparse.c
+++ b/source/components/namespace/nsparse.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c
index 1f8d058..09907f4 100644
--- a/source/components/namespace/nspredef.c
+++ b/source/components/namespace/nspredef.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -111,13 +115,14 @@
ACPI_STATUS Status;
const ACPI_PREDEFINED_INFO *Predefined;
+ ACPI_FUNCTION_TRACE (NsCheckReturnValue);
/* If not a predefined name, we cannot validate the return object */
Predefined = Info->Predefined;
if (!Predefined)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
/*
@@ -127,7 +132,7 @@
if ((ReturnStatus != AE_OK) &&
(ReturnStatus != AE_CTRL_RETURN_VALUE))
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
/*
@@ -147,7 +152,7 @@
(!Predefined->Info.ExpectedBtypes) ||
(Predefined->Info.ExpectedBtypes == ACPI_RTYPE_ALL))
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
/*
@@ -213,7 +218,7 @@
Node->Flags |= ANOBJ_EVALUATED;
}
- return (Status);
+ return_ACPI_STATUS (Status);
}
diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c
index 33a9dfb..4851acf 100644
--- a/source/components/namespace/nsprepkg.c
+++ b/source/components/namespace/nsprepkg.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -102,7 +106,7 @@
UINT32 i;
- ACPI_FUNCTION_NAME (NsCheckPackage);
+ ACPI_FUNCTION_TRACE (NsCheckPackage);
/* The package info for this name is in the next table entry */
@@ -133,13 +137,13 @@
{
if (Package->RetInfo.Type == ACPI_PTYPE1_VAR)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
"Return Package has no elements (empty)"));
- return (AE_AML_OPERAND_VALUE);
+ return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
/*
@@ -193,7 +197,7 @@
Package->RetInfo.ObjectType1, i);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
Elements++;
@@ -226,7 +230,7 @@
Package->RetInfo3.ObjectType[i], i);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
}
else
@@ -237,7 +241,7 @@
Package->RetInfo3.TailObjectType, i);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
}
@@ -253,7 +257,7 @@
Info, Elements, ACPI_RTYPE_INTEGER, 0);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
Elements++;
@@ -272,7 +276,7 @@
Info, Elements, ACPI_RTYPE_INTEGER, 0);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
/*
@@ -316,7 +320,7 @@
Info, ReturnObject, ReturnObjectPtr);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
/* Update locals to point to the new package (of 1 element) */
@@ -354,7 +358,7 @@
Package->RetInfo.ObjectType1, 0);
if (ACPI_FAILURE(Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
/* Validate length of the UUID buffer */
@@ -363,14 +367,14 @@
{
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
Info->NodeFlags, "Invalid length for UUID Buffer"));
- return (AE_AML_OPERAND_VALUE);
+ return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
Status = AcpiNsCheckObjectType(Info, Elements + 1,
Package->RetInfo.ObjectType2, 0);
if (ACPI_FAILURE(Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
Elements += 2;
@@ -386,10 +390,10 @@
"Invalid internal return type in table entry: %X",
Package->RetInfo.Type));
- return (AE_AML_INTERNAL);
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
- return (Status);
+ return_ACPI_STATUS (Status);
PackageTooSmall:
@@ -400,7 +404,7 @@
"Return Package is too small - found %u elements, expected %u",
Count, ExpectedCount));
- return (AE_AML_OPERAND_VALUE);
+ return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
@@ -753,6 +757,8 @@
UINT32 i;
+ ACPI_FUNCTION_TRACE (NsCheckPackageElements);
+
/*
* Up to two groups of package elements are supported by the data
* structure. All elements in each group must be of the same type.
@@ -764,7 +770,7 @@
Type1, i + StartIndex);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
ThisElement++;
@@ -776,11 +782,11 @@
Type2, (i + Count1 + StartIndex));
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
ThisElement++;
}
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c
index d48103e..f0abe33 100644
--- a/source/components/namespace/nsrepair.c
+++ b/source/components/namespace/nsrepair.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c
index 67a259f..350bbe6 100644
--- a/source/components/namespace/nsrepair2.c
+++ b/source/components/namespace/nsrepair2.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -209,16 +213,18 @@
ACPI_STATUS Status;
+ ACPI_FUNCTION_TRACE (NsComplexRepairs);
+
/* Check if this name is in the list of repairable names */
Predefined = AcpiNsMatchComplexRepair (Node);
if (!Predefined)
{
- return (ValidateStatus);
+ return_ACPI_STATUS (ValidateStatus);
}
Status = Predefined->RepairFunction (Info, ReturnObjectPtr);
- return (Status);
+ return_ACPI_STATUS (Status);
}
@@ -414,20 +420,21 @@
UINT16 OriginalRefCount;
UINT32 i;
+ ACPI_FUNCTION_TRACE (NsRepair_CID);
/* Check for _CID as a simple string */
if (ReturnObject->Common.Type == ACPI_TYPE_STRING)
{
Status = AcpiNsRepair_HID (Info, ReturnObjectPtr);
- return (Status);
+ return_ACPI_STATUS (Status);
}
/* Exit if not a Package */
if (ReturnObject->Common.Type != ACPI_TYPE_PACKAGE)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
/* Examine each element of the _CID package */
@@ -441,7 +448,7 @@
Status = AcpiNsRepair_HID (Info, ElementPtr);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
if (OriginalElement != *ElementPtr)
@@ -450,12 +457,19 @@
(*ElementPtr)->Common.ReferenceCount =
OriginalRefCount;
+
+ /*
+ * The OriginalElement holds a reference from the package object
+ * that represents _HID. Since a new element was created by _HID,
+ * remove the reference from the _CID package.
+ */
+ AcpiUtRemoveReference (OriginalElement);
}
ElementPtr++;
}
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
@@ -587,7 +601,7 @@
if (ReturnObject->Common.Type != ACPI_TYPE_STRING)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
if (ReturnObject->String.Length == 0)
@@ -599,7 +613,7 @@
/* Return AE_OK anyway, let driver handle it */
Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
/* It is simplest to always create a new string object */
@@ -607,7 +621,7 @@
NewString = AcpiUtCreateStringObject (ReturnObject->String.Length);
if (!NewString)
{
- return (AE_NO_MEMORY);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
/*
@@ -641,7 +655,7 @@
AcpiUtRemoveReference (ReturnObject);
*ReturnObjectPtr = NewString;
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c
index a4be4eb..03284b1 100644
--- a/source/components/namespace/nssearch.c
+++ b/source/components/namespace/nssearch.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c
index 51004de..03fe99f 100644
--- a/source/components/namespace/nsutils.c
+++ b/source/components/namespace/nsutils.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c
index 944aec3..9e36a84 100644
--- a/source/components/namespace/nswalk.c
+++ b/source/components/namespace/nswalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -210,6 +214,10 @@
if (StartNode == ACPI_ROOT_OBJECT)
{
StartNode = AcpiGbl_RootNode;
+ if (!StartNode)
+ {
+ return_ACPI_STATUS (AE_NO_NAMESPACE);
+ }
}
/* Null child means "get first node" */
diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c
index 1002f06..e0cd976 100644
--- a/source/components/namespace/nsxfeval.c
+++ b/source/components/namespace/nsxfeval.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c
index 68719d4..64fdee8 100644
--- a/source/components/namespace/nsxfname.c
+++ b/source/components/namespace/nsxfname.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -602,7 +606,7 @@
MethodFlags = *ParserState.Aml++;
AmlStart = ParserState.Aml;
- AmlLength = ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart);
+ AmlLength = (UINT32) ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart);
/*
* Allocate resources up-front. We don't want to have to delete a new
diff --git a/source/components/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c
index fcc3d64..f0c5e01 100644
--- a/source/components/namespace/nsxfobj.c
+++ b/source/components/namespace/nsxfobj.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -57,7 +61,8 @@
*
* RETURN: Status
*
- * DESCRIPTION: This routine returns the type associatd with a particular handle
+ * DESCRIPTION: This routine returns the type associated with a particular
+ * handle
*
******************************************************************************/
diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c
index 948d2d1..4e21658 100644
--- a/source/components/parser/psargs.c
+++ b/source/components/parser/psargs.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c
index 00ca944..0291ed4 100644
--- a/source/components/parser/psloop.c
+++ b/source/components/parser/psloop.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -298,8 +302,7 @@
*/
WalkState->Op = NULL;
Status = AcpiDsGetPredicateValue (WalkState, ACPI_TO_POINTER (TRUE));
- if (ACPI_FAILURE (Status) &&
- ((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
+ if (ACPI_FAILURE (Status) && !ACPI_CNTL_EXCEPTION (Status))
{
if (Status == AE_AML_NO_RETURN_VALUE)
{
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c
index c716a8c..a175b8b 100644
--- a/source/components/parser/psobject.c
+++ b/source/components/parser/psobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/psopcode.c b/source/components/parser/psopcode.c
index 0b030f2..6a19240 100644
--- a/source/components/parser/psopcode.c
+++ b/source/components/parser/psopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -263,7 +267,7 @@
/* 47 */ ACPI_OP ("Event", ARGP_EVENT_OP, ARGI_EVENT_OP, ACPI_TYPE_EVENT, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
/* 48 */ ACPI_OP ("CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R),
/* 49 */ ACPI_OP ("CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_FIELD | AML_CREATE),
-/* 4A */ ACPI_OP ("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_0R, AML_FLAGS_EXEC_1A_1T_0R),
+/* 4A */ ACPI_OP ("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R),
/* 4B */ ACPI_OP ("Stall", ARGP_STALL_OP, ARGI_STALL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R),
/* 4C */ ACPI_OP ("Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R),
/* 4D */ ACPI_OP ("Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R),
diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c
index 91265ac..52ee150 100644
--- a/source/components/parser/psopinfo.c
+++ b/source/components/parser/psopinfo.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c
index 2104594..62fa90c 100644
--- a/source/components/parser/psparse.c
+++ b/source/components/parser/psparse.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -421,7 +425,7 @@
default:
Status = CallbackStatus;
- if ((CallbackStatus & AE_CODE_MASK) == AE_CODE_CONTROL)
+ if (ACPI_CNTL_EXCEPTION (CallbackStatus))
{
Status = AE_OK;
}
@@ -550,8 +554,8 @@
}
/*
- * If the transfer to the new method method call worked
- *, a new walk state was created -- get it
+ * If the transfer to the new method method call worked,
+ * a new walk state was created -- get it
*/
WalkState = AcpiDsGetCurrentWalkState (Thread);
continue;
diff --git a/source/components/parser/psscope.c b/source/components/parser/psscope.c
index 29450ac..7df09a6 100644
--- a/source/components/parser/psscope.c
+++ b/source/components/parser/psscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/pstree.c b/source/components/parser/pstree.c
index 4363c16..41a2bf9 100644
--- a/source/components/parser/pstree.c
+++ b/source/components/parser/pstree.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/psutils.c b/source/components/parser/psutils.c
index 7e2a8b2..edb00d9 100644
--- a/source/components/parser/psutils.c
+++ b/source/components/parser/psutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c
index 7b60a81..5c28784 100644
--- a/source/components/parser/pswalk.c
+++ b/source/components/parser/pswalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c
index bc0166a..394084e 100644
--- a/source/components/parser/psxface.c
+++ b/source/components/parser/psxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c
index 2f08732..5169095 100644
--- a/source/components/resources/rsaddr.c
+++ b/source/components/resources/rsaddr.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c
index 5e531f7..f8b4de4 100644
--- a/source/components/resources/rscalc.c
+++ b/source/components/resources/rscalc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -704,9 +708,9 @@
*SizeNeeded += BufferSize;
ACPI_DEBUG_PRINT ((ACPI_DB_RESOURCES,
- "Type %.2X, AmlLength %.2X InternalLength %.2X\n",
+ "Type %.2X, AmlLength %.2X InternalLength %.2X%8X\n",
AcpiUtGetResourceType (AmlBuffer),
- AcpiUtGetDescriptorLength (AmlBuffer), BufferSize));
+ AcpiUtGetDescriptorLength (AmlBuffer), ACPI_FORMAT_UINT64(*SizeNeeded)));
/*
* Point to the next resource within the AML stream using the length
diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c
index 4c6d7e1..9bd4c47 100644
--- a/source/components/resources/rscreate.c
+++ b/source/components/resources/rscreate.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c
index 21f6026..1cebf32 100644
--- a/source/components/resources/rsdump.c
+++ b/source/components/resources/rsdump.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -165,6 +169,11 @@
ResourceList->Type);
return;
}
+ else if (!ResourceList->Type)
+ {
+ ACPI_ERROR ((AE_INFO, "Invalid Zero Resource Type"));
+ return;
+ }
/* Sanity check the length. It must not be zero, or we loop forever */
@@ -348,6 +357,11 @@
AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]);
break;
+ case ACPI_RSD_6BITFLAG:
+
+ AcpiRsOutInteger8 (Name, (ACPI_GET8 (Target) & 0x3F));
+ break;
+
case ACPI_RSD_SHORTLIST:
/*
* Short byte list (single line output) for DMA and IRQ resources
diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c
index 09b80b4..1e3c04b 100644
--- a/source/components/resources/rsdumpinfo.c
+++ b/source/components/resources/rsdumpinfo.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -342,6 +346,21 @@
ACPI_RS_DUMP_COMMON_SERIAL_BUS
};
+ACPI_RSDUMP_INFO AcpiRsDumpCsi2SerialBus[11] =
+{
+ {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpCsi2SerialBus), "Camera Serial Bus", NULL},
+ {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Csi2SerialBus.RevisionId), "RevisionId", NULL},
+ {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Csi2SerialBus.Type), "Type", AcpiGbl_SbtDecode},
+ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Csi2SerialBus.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode},
+ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Csi2SerialBus.SlaveMode), "SlaveMode", AcpiGbl_SmDecode},
+ {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Csi2SerialBus.PhyType), "PhyType", AcpiGbl_PhyDecode},
+ {ACPI_RSD_6BITFLAG, ACPI_RSD_OFFSET (Csi2SerialBus.LocalPortInstance), "LocalPortInstance", NULL},
+ {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Csi2SerialBus.TypeRevisionId), "TypeRevisionId", NULL},
+ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Csi2SerialBus.VendorLength), "VendorLength", NULL},
+ {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (Csi2SerialBus.VendorData), "VendorData", NULL},
+ {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Csi2SerialBus.ResourceSource), "ResourceSource", NULL},
+};
+
ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[14] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpI2cSerialBus), "I2C Serial Bus", NULL},
diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c
index e5b352b..4620c6d 100644
--- a/source/components/resources/rsinfo.c
+++ b/source/components/resources/rsinfo.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -133,7 +137,7 @@
AcpiRsConvertPinGroupConfig, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */
};
-/* Subtype table for SerialBus -- I2C, SPI, and UART */
+/* Subtype table for SerialBus -- I2C, SPI, UART, and CSI2 */
ACPI_RSCONVERT_INFO *AcpiGbl_ConvertResourceSerialBusDispatch[] =
{
@@ -141,6 +145,7 @@
AcpiRsConvertI2cSerialBus,
AcpiRsConvertSpiSerialBus,
AcpiRsConvertUartSerialBus,
+ AcpiRsConvertCsi2SerialBus
};
@@ -183,6 +188,7 @@
AcpiRsDumpI2cSerialBus, /* AML_RESOURCE_I2C_BUS_TYPE */
AcpiRsDumpSpiSerialBus, /* AML_RESOURCE_SPI_BUS_TYPE */
AcpiRsDumpUartSerialBus, /* AML_RESOURCE_UART_BUS_TYPE */
+ AcpiRsDumpCsi2SerialBus, /* AML_RESOURCE_CSI2_BUS_TYPE */
};
#endif
@@ -272,6 +278,7 @@
sizeof (AML_RESOURCE_I2C_SERIALBUS),
sizeof (AML_RESOURCE_SPI_SERIALBUS),
sizeof (AML_RESOURCE_UART_SERIALBUS),
+ sizeof (AML_RESOURCE_CSI2_SERIALBUS),
};
const UINT8 AcpiGbl_ResourceStructSerialBusSizes[] =
@@ -280,4 +287,5 @@
ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
+ ACPI_RS_SIZE (ACPI_RESOURCE_CSI2_SERIALBUS),
};
diff --git a/source/components/resources/rsio.c b/source/components/resources/rsio.c
index 1c473c5..bfe2b74 100644
--- a/source/components/resources/rsio.c
+++ b/source/components/resources/rsio.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rsirq.c b/source/components/resources/rsirq.c
index 9f41e51..caee277 100644
--- a/source/components/resources/rsirq.c
+++ b/source/components/resources/rsirq.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c
index d1f58e4..ef2ffd2 100644
--- a/source/components/resources/rslist.c
+++ b/source/components/resources/rslist.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -104,7 +108,7 @@
}
else
{
- /* This is an I2C, SPI, or UART SerialBus descriptor */
+ /* This is an I2C, SPI, UART, or CSI2 SerialBus descriptor */
ConversionTable = AcpiGbl_ConvertResourceSerialBusDispatch [
AmlResource->CommonSerialBus.Type];
@@ -134,6 +138,12 @@
return_ACPI_STATUS (Status);
}
+ if (!Resource->Length)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Zero-length resource returned from RsConvertAmlToResource"));
+ }
+
ACPI_DEBUG_PRINT ((ACPI_DB_RESOURCES,
"Type %.2X, AmlLength %.2X InternalLength %.2X\n",
AcpiUtGetResourceType (Aml), Length,
@@ -214,7 +224,7 @@
}
else
{
- /* This is an I2C, SPI, or UART SerialBus descriptor */
+ /* This is an I2C, SPI, UART or CSI2 SerialBus descriptor */
ConversionTable = AcpiGbl_ConvertResourceSerialBusDispatch[
Resource->Data.CommonSerialBus.Type];
diff --git a/source/components/resources/rsmemory.c b/source/components/resources/rsmemory.c
index 6b4daaf..54102bd 100644
--- a/source/components/resources/rsmemory.c
+++ b/source/components/resources/rsmemory.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rsmisc.c b/source/components/resources/rsmisc.c
index 9dc5822..7e8d190 100644
--- a/source/components/resources/rsmisc.c
+++ b/source/components/resources/rsmisc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -113,6 +117,8 @@
Count = INIT_TABLE_LENGTH (Info);
while (Count)
{
+ Target = NULL;
+
/*
* Source is the external AML byte stream buffer,
* destination is the internal resource descriptor
@@ -163,6 +169,14 @@
((ACPI_GET8 (Source) >> Info->Value) & 0x07));
break;
+ case ACPI_RSC_6BITFLAG:
+ /*
+ * Mask and shift the flag bits
+ */
+ ACPI_SET8 (Destination,
+ ((ACPI_GET8 (Source) >> Info->Value) & 0x3F));
+ break;
+
case ACPI_RSC_COUNT:
ItemCount = ACPI_GET8 (Source);
@@ -542,6 +556,14 @@
((ACPI_GET8 (Source) & 0x07) << Info->Value));
break;
+ case ACPI_RSC_6BITFLAG:
+ /*
+ * Mask and shift the flag bits
+ */
+ ACPI_SET_BIT (*ACPI_CAST8 (Destination), (UINT8)
+ ((ACPI_GET8 (Source) & 0x3F) << Info->Value));
+ break;
+
case ACPI_RSC_COUNT:
ItemCount = ACPI_GET8 (Source);
diff --git a/source/components/resources/rsserial.c b/source/components/resources/rsserial.c
index 2994f03..de6429d 100644
--- a/source/components/resources/rsserial.c
+++ b/source/components/resources/rsserial.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -217,6 +221,76 @@
/*******************************************************************************
*
+ * AcpiRsConvertCsi2SerialBus
+ *
+ ******************************************************************************/
+
+ACPI_RSCONVERT_INFO AcpiRsConvertCsi2SerialBus[14] =
+{
+ {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
+ ACPI_RS_SIZE (ACPI_RESOURCE_CSI2_SERIALBUS),
+ ACPI_RSC_TABLE_SIZE (AcpiRsConvertCsi2SerialBus)},
+
+ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS,
+ sizeof (AML_RESOURCE_CSI2_SERIALBUS),
+ 0},
+
+ {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
+ AML_OFFSET (CommonSerialBus.RevisionId),
+ 1},
+
+ {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Csi2SerialBus.Type),
+ AML_OFFSET (Csi2SerialBus.Type),
+ 1},
+
+ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.ProducerConsumer),
+ AML_OFFSET (Csi2SerialBus.Flags),
+ 1},
+
+ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.SlaveMode),
+ AML_OFFSET (Csi2SerialBus.Flags),
+ 0},
+
+ {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.PhyType),
+ AML_OFFSET (Csi2SerialBus.TypeSpecificFlags),
+ 0},
+
+ {ACPI_RSC_6BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.LocalPortInstance),
+ AML_OFFSET (Csi2SerialBus.TypeSpecificFlags),
+ 2},
+
+ {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Csi2SerialBus.TypeRevisionId),
+ AML_OFFSET (Csi2SerialBus.TypeRevisionId),
+ 1},
+
+ /* Vendor data */
+
+ {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.Csi2SerialBus.VendorLength),
+ AML_OFFSET (Csi2SerialBus.TypeDataLength),
+ AML_RESOURCE_CSI2_MIN_DATA_LEN},
+
+ {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.Csi2SerialBus.VendorData),
+ 0,
+ sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
+
+ /* Resource Source */
+
+ {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.Index),
+ AML_OFFSET (Csi2SerialBus.ResSourceIndex),
+ 1},
+
+ {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.StringLength),
+ AML_OFFSET (Csi2SerialBus.TypeDataLength),
+ sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
+
+ {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.StringPtr),
+ AML_OFFSET (Csi2SerialBus.TypeDataLength),
+ sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
+};
+
+
+/*******************************************************************************
+ *
* AcpiRsConvertI2cSerialBus
*
******************************************************************************/
diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c
index ae25d92..0a6c12b 100644
--- a/source/components/resources/rsutils.c
+++ b/source/components/resources/rsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c
index 04a6263..0adcb33 100644
--- a/source/components/resources/rsxface.c
+++ b/source/components/resources/rsxface.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c
index 099ce07..7a56bff 100644
--- a/source/components/tables/tbdata.c
+++ b/source/components/tables/tbdata.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -131,14 +135,28 @@
{
/*
- * Initialize the table descriptor. Set the pointer to NULL, since the
- * table is not fully mapped at this time.
+ * Initialize the table descriptor. Set the pointer to NULL for external
+ * tables, since the table is not fully mapped at this time.
*/
memset (TableDesc, 0, sizeof (ACPI_TABLE_DESC));
TableDesc->Address = Address;
TableDesc->Length = Table->Length;
TableDesc->Flags = Flags;
ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature);
+
+ switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
+ {
+ case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
+ case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
+
+ TableDesc->Pointer = Table;
+ break;
+
+ case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL:
+ default:
+
+ break;
+ }
}
@@ -178,8 +196,7 @@
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
- Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
- ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
+ Table = TableDesc->Pointer;
break;
default:
@@ -247,6 +264,8 @@
* PARAMETERS: TableDesc - Table descriptor to be acquired
* Address - Address of the table
* Flags - Allocation flags of the table
+ * Table - Pointer to the table (required for virtual
+ * origins, optional for physical)
*
* RETURN: Status
*
@@ -261,9 +280,10 @@
AcpiTbAcquireTempTable (
ACPI_TABLE_DESC *TableDesc,
ACPI_PHYSICAL_ADDRESS Address,
- UINT8 Flags)
+ UINT8 Flags,
+ ACPI_TABLE_HEADER *Table)
{
- ACPI_TABLE_HEADER *TableHeader;
+ BOOLEAN MappedTable = FALSE;
switch (Flags & ACPI_TABLE_ORIGIN_MASK)
@@ -272,37 +292,43 @@
/* Get the length of the full table from the header */
- TableHeader = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
- if (!TableHeader)
+ if (!Table)
{
- return (AE_NO_MEMORY);
+ Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
+ if (!Table)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ MappedTable = TRUE;
}
- AcpiTbInitTableDescriptor (TableDesc, Address, Flags, TableHeader);
- AcpiOsUnmapMemory (TableHeader, sizeof (ACPI_TABLE_HEADER));
- return (AE_OK);
+ break;
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
- TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
- ACPI_PHYSADDR_TO_PTR (Address));
- if (!TableHeader)
+ if (!Table)
{
- return (AE_NO_MEMORY);
+ return (AE_BAD_PARAMETER);
}
- AcpiTbInitTableDescriptor (TableDesc, Address, Flags, TableHeader);
- return (AE_OK);
+ break;
default:
- break;
+ /* Table is not valid yet */
+
+ return (AE_NO_MEMORY);
}
- /* Table is not valid yet */
+ AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table);
+ if (MappedTable)
+ {
+ AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
+ }
- return (AE_NO_MEMORY);
+ return (AE_OK);
}
@@ -401,7 +427,20 @@
AcpiTbReleaseTable (TableDesc->Pointer, TableDesc->Length,
TableDesc->Flags);
- TableDesc->Pointer = NULL;
+
+ switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
+ {
+ case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL:
+
+ TableDesc->Pointer = NULL;
+ break;
+
+ case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
+ case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
+ default:
+
+ break;
+ }
return_VOID;
}
@@ -577,7 +616,7 @@
{
/* Verify the checksum */
- Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
+ Status = AcpiUtVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
@@ -1107,6 +1146,9 @@
*
* PARAMETERS: Address - Physical address of the table
* Flags - Allocation flags of the table
+ * Table - Pointer to the table (required for
+ * virtual origins, optional for
+ * physical)
* Override - Whether override should be performed
* TableIndex - Where table index is returned
*
@@ -1120,6 +1162,7 @@
AcpiTbInstallAndLoadTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
+ ACPI_TABLE_HEADER *Table,
BOOLEAN Override,
UINT32 *TableIndex)
{
@@ -1132,7 +1175,7 @@
/* Install the table and load it into the namespace */
- Status = AcpiTbInstallStandardTable (Address, Flags, TRUE,
+ Status = AcpiTbInstallStandardTable (Address, Flags, Table, TRUE,
Override, &i);
if (ACPI_FAILURE (Status))
{
diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c
index f9d018f..ff72fad 100644
--- a/source/components/tables/tbfadt.c
+++ b/source/components/tables/tbfadt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -360,7 +364,7 @@
* Validate the FADT checksum before we copy the table. Ignore
* checksum error as we want to try to get the DSDT and FACS.
*/
- (void) AcpiTbVerifyChecksum (Table, Length);
+ (void) AcpiUtVerifyChecksum (Table, Length);
/* Create a local copy of the FADT in common ACPI 2.0+ format */
@@ -374,7 +378,7 @@
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt,
- ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_DsdtIndex);
/* If Hardware Reduced flag is set, there is no FACS */
@@ -385,14 +389,14 @@
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
- ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_FacsIndex);
}
if (AcpiGbl_FADT.XFacs)
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
- ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_XFacsIndex);
}
}
diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c
index c171475..58a4428 100644
--- a/source/components/tables/tbfind.c
+++ b/source/components/tables/tbfind.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c
index 90256fb..155f238 100644
--- a/source/components/tables/tbinstal.c
+++ b/source/components/tables/tbinstal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -115,6 +119,8 @@
* PARAMETERS: Address - Address of the table (might be a virtual
* address depending on the TableFlags)
* Flags - Flags for the table
+ * Table - Pointer to the table (required for virtual
+ * origins, optional for physical)
* Reload - Whether reload should be performed
* Override - Whether override should be performed
* TableIndex - Where the table index is returned
@@ -133,6 +139,7 @@
AcpiTbInstallStandardTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
+ ACPI_TABLE_HEADER *Table,
BOOLEAN Reload,
BOOLEAN Override,
UINT32 *TableIndex)
@@ -147,7 +154,7 @@
/* Acquire a temporary table descriptor for validation */
- Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags);
+ Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags, Table);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
@@ -257,7 +264,7 @@
if (ACPI_SUCCESS (Status) && Table)
{
AcpiTbAcquireTempTable (&NewTableDesc, ACPI_PTR_TO_PHYSADDR (Table),
- ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL);
+ ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, Table);
ACPI_ERROR_ONLY (OverrideType = "Logical");
goto FinishOverride;
}
@@ -269,7 +276,7 @@
if (ACPI_SUCCESS (Status) && Address && Length)
{
AcpiTbAcquireTempTable (&NewTableDesc, Address,
- ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL);
ACPI_ERROR_ONLY (OverrideType = "Physical");
goto FinishOverride;
}
@@ -345,7 +352,8 @@
if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
{
- ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
+ ACPI_FREE (TableDesc->Pointer);
+ TableDesc->Pointer = NULL;
}
TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL);
diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c
index d057907..82bbcd8 100644
--- a/source/components/tables/tbprint.c
+++ b/source/components/tables/tbprint.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -40,6 +44,8 @@
#include "acpi.h"
#include "accommon.h"
#include "actables.h"
+#include "acdisasm.h"
+#include "acutils.h"
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbprint")
@@ -80,7 +86,7 @@
while (Length && *String)
{
- if (!isprint ((int) *String))
+ if (!isprint ((int) (UINT8) *String))
{
*String = '?';
}
@@ -149,7 +155,8 @@
Header->Signature, ACPI_FORMAT_UINT64 (Address),
Header->Length));
}
- else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature))
+ else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP,
+ Header)->Signature))
{
/* RSDP has no common fields */
@@ -180,89 +187,3 @@
}
}
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiTbValidateChecksum
- *
- * PARAMETERS: Table - ACPI table to verify
- * Length - Length of entire table
- *
- * RETURN: Status
- *
- * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
- * exception on bad checksum.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiTbVerifyChecksum (
- ACPI_TABLE_HEADER *Table,
- UINT32 Length)
-{
- UINT8 Checksum;
-
-
- /*
- * FACS/S3PT:
- * They are the odd tables, have no standard ACPI header and no checksum
- */
-
- if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) ||
- ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
- {
- return (AE_OK);
- }
-
- /* Compute the checksum on the table */
-
- Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Length);
-
- /* Checksum ok? (should be zero) */
-
- if (Checksum)
- {
- ACPI_BIOS_WARNING ((AE_INFO,
- "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
- "should be 0x%2.2X",
- Table->Signature, Table->Checksum,
- (UINT8) (Table->Checksum - Checksum)));
-
-#if (ACPI_CHECKSUM_ABORT)
- return (AE_BAD_CHECKSUM);
-#endif
- }
-
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiTbChecksum
- *
- * PARAMETERS: Buffer - Pointer to memory region to be checked
- * Length - Length of this memory region
- *
- * RETURN: Checksum (UINT8)
- *
- * DESCRIPTION: Calculates circular checksum of memory region.
- *
- ******************************************************************************/
-
-UINT8
-AcpiTbChecksum (
- UINT8 *Buffer,
- UINT32 Length)
-{
- UINT8 Sum = 0;
- UINT8 *End = Buffer + Length;
-
-
- while (Buffer < End)
- {
- Sum = (UINT8) (Sum + *(Buffer++));
- }
-
- return (Sum);
-}
diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c
index 18fff11..58b8bee 100644
--- a/source/components/tables/tbutils.c
+++ b/source/components/tables/tbutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -362,7 +366,7 @@
/* Validate the root table checksum */
- Status = AcpiTbVerifyChecksum (Table, Length);
+ Status = AcpiUtVerifyChecksum (Table, Length);
if (ACPI_FAILURE (Status))
{
AcpiOsUnmapMemory (Table, Length);
@@ -391,7 +395,8 @@
}
Status = AcpiTbInstallStandardTable (Address,
- ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex);
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
+ &TableIndex);
if (ACPI_SUCCESS (Status) &&
ACPI_COMPARE_NAMESEG (
diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c
index aa06b16..4233711 100644
--- a/source/components/tables/tbxface.c
+++ b/source/components/tables/tbxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -256,14 +260,14 @@
*
* PARAMETERS: Signature - ACPI signature of needed table
* Instance - Which instance (for SSDTs)
- * OutTableHeader - The pointer to the table header to fill
+ * OutTableHeader - The pointer to the where the table header
+ * is returned
*
- * RETURN: Status and pointer to mapped table header
+ * RETURN: Status and a copy of the table header
*
- * DESCRIPTION: Finds an ACPI table header.
- *
- * NOTE: Caller is responsible in unmapping the header with
- * AcpiOsUnmapMemory
+ * DESCRIPTION: Finds and returns an ACPI table header. Caller provides the
+ * memory where a copy of the header is to be returned
+ * (fixed length).
*
******************************************************************************/
diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c
index 8625920..ffd30ee 100644
--- a/source/components/tables/tbxfload.c
+++ b/source/components/tables/tbxfload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -284,9 +288,7 @@
*
* FUNCTION: AcpiInstallTable
*
- * PARAMETERS: Address - Address of the ACPI table to be installed.
- * Physical - Whether the address is a physical table
- * address or not
+ * PARAMETERS: Table - Pointer to the ACPI table to be installed.
*
* RETURN: Status
*
@@ -298,28 +300,17 @@
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
- ACPI_PHYSICAL_ADDRESS Address,
- BOOLEAN Physical)
+ ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
- UINT8 Flags;
UINT32 TableIndex;
ACPI_FUNCTION_TRACE (AcpiInstallTable);
- if (Physical)
- {
- Flags = ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL;
- }
- else
- {
- Flags = ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL;
- }
-
- Status = AcpiTbInstallStandardTable (Address, Flags,
- FALSE, FALSE, &TableIndex);
+ Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),
+ ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, Table, FALSE, FALSE, &TableIndex);
return_ACPI_STATUS (Status);
}
@@ -329,6 +320,40 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiInstallPhysicalTable
+ *
+ * PARAMETERS: Address - Address of the ACPI table to be installed.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Dynamically install an ACPI table.
+ * Note: This function should only be invoked after
+ * AcpiInitializeTables() and before AcpiLoadTables().
+ *
+ ******************************************************************************/
+
+ACPI_STATUS ACPI_INIT_FUNCTION
+AcpiInstallPhysicalTable (
+ ACPI_PHYSICAL_ADDRESS Address)
+{
+ ACPI_STATUS Status;
+ UINT32 TableIndex;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallPhysicalTable);
+
+
+ Status = AcpiTbInstallStandardTable (Address,
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, FALSE, &TableIndex);
+
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL_INIT (AcpiInstallPhysicalTable)
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiLoadTable
*
* PARAMETERS: Table - Pointer to a buffer containing the ACPI
@@ -369,7 +394,7 @@
ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
- ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
+ ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, Table, FALSE, &TableIndex);
if (TableIdx)
{
*TableIdx = TableIndex;
diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c
index 287be9b..5028a1d 100644
--- a/source/components/tables/tbxfroot.c
+++ b/source/components/tables/tbxfroot.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -115,7 +119,7 @@
/* Check the standard checksum */
- if (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0)
+ if (AcpiUtChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0)
{
return (AE_BAD_CHECKSUM);
}
@@ -123,7 +127,7 @@
/* Check extended checksum if table version >= 2 */
if ((Rsdp->Revision >= 2) &&
- (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0))
+ (AcpiUtChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0))
{
return (AE_BAD_CHECKSUM);
}
@@ -159,6 +163,7 @@
UINT8 *TablePtr;
UINT8 *MemRover;
UINT32 PhysicalAddress;
+ UINT32 EbdaWindowSize;
ACPI_FUNCTION_TRACE (AcpiFindRootPointer);
@@ -187,27 +192,40 @@
/* EBDA present? */
- if (PhysicalAddress > 0x400)
+ /*
+ * Check that the EBDA pointer from memory is sane and does not point
+ * above valid low memory
+ */
+ if (PhysicalAddress > 0x400 &&
+ PhysicalAddress < 0xA0000)
{
/*
- * 1b) Search EBDA paragraphs (EBDA is required to be a
- * minimum of 1K length)
+ * Calculate the scan window size
+ * The EBDA is not guaranteed to be larger than a KiB and in case
+ * that it is smaller, the scanning function would leave the low
+ * memory and continue to the VGA range.
+ */
+ EbdaWindowSize = ACPI_MIN(ACPI_EBDA_WINDOW_SIZE,
+ 0xA0000 - PhysicalAddress);
+
+ /*
+ * 1b) Search EBDA paragraphs
*/
TablePtr = AcpiOsMapMemory (
(ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
- ACPI_EBDA_WINDOW_SIZE);
+ EbdaWindowSize);
if (!TablePtr)
{
ACPI_ERROR ((AE_INFO,
"Could not map memory at 0x%8.8X for length %u",
- PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
+ PhysicalAddress, EbdaWindowSize));
return_ACPI_STATUS (AE_NO_MEMORY);
}
MemRover = AcpiTbScanMemoryForRsdp (
- TablePtr, ACPI_EBDA_WINDOW_SIZE);
- AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
+ TablePtr, EbdaWindowSize);
+ AcpiOsUnmapMemory (TablePtr, EbdaWindowSize);
if (MemRover)
{
diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c
index f2d7d9f..16e3f01 100644
--- a/source/components/utilities/utaddress.c
+++ b/source/components/utilities/utaddress.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c
index b9cf18d..3bcfb7c 100644
--- a/source/components/utilities/utalloc.c
+++ b/source/components/utilities/utalloc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utascii.c b/source/components/utilities/utascii.c
index 0e69557..32a0ee2 100644
--- a/source/components/utilities/utascii.c
+++ b/source/components/utilities/utascii.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c
index 9541cd8..504e539 100644
--- a/source/components/utilities/utbuffer.c
+++ b/source/components/utilities/utbuffer.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c
index dc77c3d..9456fb7 100644
--- a/source/components/utilities/utcache.c
+++ b/source/components/utilities/utcache.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utcksum.c b/source/components/utilities/utcksum.c
new file mode 100644
index 0000000..49625a8
--- /dev/null
+++ b/source/components/utilities/utcksum.c
@@ -0,0 +1,227 @@
+/******************************************************************************
+ *
+ * Module Name: utcksum - Support generating table checksums
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2022, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "acpi.h"
+#include "accommon.h"
+#include "acdisasm.h"
+#include "acutils.h"
+
+
+/* This module used for application-level code only */
+
+#define _COMPONENT ACPI_CA_DISASSEMBLER
+ ACPI_MODULE_NAME ("utcksum")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtVerifyChecksum
+ *
+ * PARAMETERS: Table - ACPI table to verify
+ * Length - Length of entire table
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
+ * exception on bad checksum.
+ * Note: We don't have to check for a CDAT here, since CDAT is
+ * not in the RSDT/XSDT, and the CDAT table is never installed
+ * via ACPICA.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtVerifyChecksum (
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length)
+{
+ UINT8 Checksum;
+
+
+ /*
+ * FACS/S3PT:
+ * They are the odd tables, have no standard ACPI header and no checksum
+ */
+ if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) ||
+ ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
+ {
+ return (AE_OK);
+ }
+
+ /* Compute the checksum on the table */
+
+ Length = Table->Length;
+ Checksum = AcpiUtGenerateChecksum (ACPI_CAST_PTR (UINT8, Table), Length, Table->Checksum);
+
+ /* Computed checksum matches table? */
+
+ if (Checksum != Table->Checksum)
+ {
+ ACPI_BIOS_WARNING ((AE_INFO,
+ "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
+ "should be 0x%2.2X",
+ Table->Signature, Table->Checksum,
+ Table->Checksum - Checksum));
+
+#if (ACPI_CHECKSUM_ABORT)
+ return (AE_BAD_CHECKSUM);
+#endif
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtVerifyCdatChecksum
+ *
+ * PARAMETERS: Table - CDAT ACPI table to verify
+ * Length - Length of entire table
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Verifies that the CDAT table checksums to zero. Optionally
+ * returns an exception on bad checksum.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtVerifyCdatChecksum (
+ ACPI_TABLE_CDAT *CdatTable,
+ UINT32 Length)
+{
+ UINT8 Checksum;
+
+
+ /* Compute the checksum on the table */
+
+ Checksum = AcpiUtGenerateChecksum (ACPI_CAST_PTR (UINT8, CdatTable),
+ CdatTable->Length, CdatTable->Checksum);
+
+ /* Computed checksum matches table? */
+
+ if (Checksum != CdatTable->Checksum)
+ {
+ ACPI_BIOS_WARNING ((AE_INFO,
+ "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
+ "should be 0x%2.2X",
+ AcpiGbl_CDAT, CdatTable->Checksum, Checksum));
+
+#if (ACPI_CHECKSUM_ABORT)
+ return (AE_BAD_CHECKSUM);
+#endif
+ }
+
+ CdatTable->Checksum = Checksum;
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtGenerateChecksum
+ *
+ * PARAMETERS: Table - Pointer to table to be checksummed
+ * Length - Length of the table
+ * OriginalChecksum - Value of the checksum field
+ *
+ * RETURN: 8 bit checksum of buffer
+ *
+ * DESCRIPTION: Computes an 8 bit checksum of the table.
+ *
+ ******************************************************************************/
+
+UINT8
+AcpiUtGenerateChecksum (
+ void *Table,
+ UINT32 Length,
+ UINT8 OriginalChecksum)
+{
+ UINT8 Checksum;
+
+
+ /* Sum the entire table as-is */
+
+ Checksum = AcpiUtChecksum ((UINT8 *) Table, Length);
+
+ /* Subtract off the existing checksum value in the table */
+
+ Checksum = (UINT8) (Checksum - OriginalChecksum);
+
+ /* Compute and return the final checksum */
+
+ Checksum = (UINT8) (0 - Checksum);
+ return (Checksum);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtChecksum
+ *
+ * PARAMETERS: Buffer - Pointer to memory region to be checked
+ * Length - Length of this memory region
+ *
+ * RETURN: Checksum (UINT8)
+ *
+ * DESCRIPTION: Calculates circular checksum of memory region.
+ *
+ ******************************************************************************/
+
+UINT8
+AcpiUtChecksum (
+ UINT8 *Buffer,
+ UINT32 Length)
+{
+ UINT8 Sum = 0;
+ UINT8 *End = Buffer + Length;
+
+
+ while (Buffer < End)
+ {
+ Sum = (UINT8) (Sum + *(Buffer++));
+ }
+
+ return (Sum);
+}
diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c
index 80975bb..d2e8e65 100644
--- a/source/components/utilities/utclib.c
+++ b/source/components/utilities/utclib.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c
index de451f7..b507e8b 100644
--- a/source/components/utilities/utcopy.c
+++ b/source/components/utilities/utcopy.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c
index c87cca0..9f61f36 100644
--- a/source/components/utilities/utdebug.c
+++ b/source/components/utilities/utdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c
index 43e7232..a5c5225 100644
--- a/source/components/utilities/utdecode.c
+++ b/source/components/utilities/utdecode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -102,17 +106,18 @@
const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
{
- "SystemMemory", /* 0x00 */
- "SystemIO", /* 0x01 */
- "PCI_Config", /* 0x02 */
- "EmbeddedControl", /* 0x03 */
- "SMBus", /* 0x04 */
- "SystemCMOS", /* 0x05 */
- "PCIBARTarget", /* 0x06 */
- "IPMI", /* 0x07 */
- "GeneralPurposeIo", /* 0x08 */
- "GenericSerialBus", /* 0x09 */
- "PlatformCommChannel"/* 0x0A */
+ "SystemMemory", /* 0x00 */
+ "SystemIO", /* 0x01 */
+ "PCI_Config", /* 0x02 */
+ "EmbeddedControl", /* 0x03 */
+ "SMBus", /* 0x04 */
+ "SystemCMOS", /* 0x05 */
+ "PCIBARTarget", /* 0x06 */
+ "IPMI", /* 0x07 */
+ "GeneralPurposeIo", /* 0x08 */
+ "GenericSerialBus", /* 0x09 */
+ "PCC", /* 0x0A */
+ "PlatformRtMechanism" /* 0x0B */
};
diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c
index 1ff7c44..ed52d22 100644
--- a/source/components/utilities/utdelete.c
+++ b/source/components/utilities/utdelete.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -154,7 +158,7 @@
(void) AcpiEvDeleteGpeBlock (Object->Device.GpeBlock);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_THERMAL:
@@ -331,6 +335,14 @@
}
break;
+ case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
+ "***** Address handler %p\n", Object));
+
+ AcpiOsDeleteMutex (Object->AddressSpace.ContextMutex);
+ break;
+
default:
break;
@@ -474,6 +486,7 @@
ACPI_WARNING ((AE_INFO,
"Obj %p, Reference Count is already zero, cannot decrement\n",
Object));
+ return;
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ALLOCATIONS,
@@ -514,13 +527,13 @@
*
* FUNCTION: AcpiUtUpdateObjectReference
*
- * PARAMETERS: Object - Increment ref count for this object
- * and all sub-objects
+ * PARAMETERS: Object - Increment or decrement the ref count for
+ * this object and all sub-objects
* Action - Either REF_INCREMENT or REF_DECREMENT
*
* RETURN: Status
*
- * DESCRIPTION: Increment the object reference count
+ * DESCRIPTION: Increment or decrement the object reference count
*
* Object references are incremented when:
* 1) An object is attached to a Node (namespace object)
@@ -559,7 +572,7 @@
}
/*
- * All sub-objects must have their reference count incremented
+ * All sub-objects must have their reference count updated
* also. Different object types have different subobjects.
*/
switch (Object->Common.Type)
@@ -628,6 +641,7 @@
break;
}
}
+
NextObject = NULL;
break;
@@ -636,11 +650,6 @@
NextObject = Object->BufferField.BufferObj;
break;
- case ACPI_TYPE_LOCAL_REGION_FIELD:
-
- NextObject = Object->Field.RegionObj;
- break;
-
case ACPI_TYPE_LOCAL_BANK_FIELD:
NextObject = Object->BankField.BankObj;
@@ -676,6 +685,7 @@
}
break;
+ case ACPI_TYPE_LOCAL_REGION_FIELD:
case ACPI_TYPE_REGION:
default:
diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c
index 1c2b7af..f5f13f7 100644
--- a/source/components/utilities/uterror.c
+++ b/source/components/utilities/uterror.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c
index 8d35d59..2589627 100644
--- a/source/components/utilities/uteval.c
+++ b/source/components/utilities/uteval.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utexcep.c b/source/components/utilities/utexcep.c
index a66311a..7e98896 100644
--- a/source/components/utilities/utexcep.c
+++ b/source/components/utilities/utexcep.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c
index 782efa9..d8ad20f 100644
--- a/source/components/utilities/utglobal.c
+++ b/source/components/utilities/utglobal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -175,6 +179,7 @@
/* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_ENABLE},
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE},
+ /* ACPI_EVENT_PCIE_WAKE */ {ACPI_BITREG_PCIEXP_WAKE_STATUS, ACPI_BITREG_PCIEXP_WAKE_DISABLE, ACPI_BITMASK_PCIEXP_WAKE_STATUS, ACPI_BITMASK_PCIEXP_WAKE_DISABLE},
};
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c
index 863b316..96c02d9 100644
--- a/source/components/utilities/uthex.c
+++ b/source/components/utilities/uthex.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c
index 241d27a..d0a5051 100644
--- a/source/components/utilities/utids.c
+++ b/source/components/utilities/utids.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -323,7 +327,7 @@
* 3) Size of the actual CID strings
*/
CidListSize = sizeof (ACPI_PNP_DEVICE_ID_LIST) +
- ((Count - 1) * sizeof (ACPI_PNP_DEVICE_ID)) +
+ (Count * sizeof (ACPI_PNP_DEVICE_ID)) +
StringAreaSize;
CidList = ACPI_ALLOCATE_ZEROED (CidListSize);
diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c
index 163a54c..339bbb1 100644
--- a/source/components/utilities/utinit.c
+++ b/source/components/utilities/utinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utlock.c b/source/components/utilities/utlock.c
index 6da1ac1..fad8337 100644
--- a/source/components/utilities/utlock.c
+++ b/source/components/utilities/utlock.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c
index 57443bb..f405db9 100644
--- a/source/components/utilities/utmath.c
+++ b/source/components/utilities/utmath.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c
index 8e1029b..95516f7 100644
--- a/source/components/utilities/utmisc.c
+++ b/source/components/utilities/utmisc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c
index e73ef0b..98e5533 100644
--- a/source/components/utilities/utmutex.c
+++ b/source/components/utilities/utmutex.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utnonansi.c b/source/components/utilities/utnonansi.c
index 1575b63..5494864 100644
--- a/source/components/utilities/utnonansi.c
+++ b/source/components/utilities/utnonansi.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c
index 4ebed72..5e5a841 100644
--- a/source/components/utilities/utobject.c
+++ b/source/components/utilities/utobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -80,7 +84,7 @@
*
* NOTE: We always allocate the worst-case object descriptor because
* these objects are cached, and we want them to be
- * one-size-satisifies-any-request. This in itself may not be
+ * one-size-satisfies-any-request. This in itself may not be
* the most memory efficient, but the efficiency of the object
* cache should more than make up for this!
*
diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c
index 11cf8b0..c5a293a 100644
--- a/source/components/utilities/utosi.c
+++ b/source/components/utilities/utosi.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -108,6 +112,8 @@
{"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */
{"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */
{"Windows 2019", NULL, 0, ACPI_OSI_WIN_10_19H1}, /* Windows 10 version 1903 - Added 08/2019 */
+ {"Windows 2020", NULL, 0, ACPI_OSI_WIN_10_20H1}, /* Windows 10 version 2004 - Added 08/2021 */
+ {"Windows 2021", NULL, 0, ACPI_OSI_WIN_11}, /* Windows 11 - Added 01/2022 */
/* Feature Group Strings */
diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c
index c15c7e8..439455a 100644
--- a/source/components/utilities/utownerid.c
+++ b/source/components/utilities/utownerid.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c
index dca1662..96344f4 100644
--- a/source/components/utilities/utpredef.c
+++ b/source/components/utilities/utpredef.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -205,7 +209,7 @@
static const char *UtExternalTypeNames[] = /* Indexed by ACPI_TYPE_* */
{
- ", UNSUPPORTED-TYPE",
+ ", Type_ANY",
", Integer",
", String",
", Buffer",
@@ -387,7 +391,7 @@
{
ThisArgumentType = METHOD_GET_NEXT_TYPE (ArgumentTypes);
- if (!ThisArgumentType || (ThisArgumentType > METHOD_MAX_ARG_TYPE))
+ if (ThisArgumentType > METHOD_MAX_ARG_TYPE)
{
printf ("**** Invalid argument type (%u) "
"in predefined info structure\n", ThisArgumentType);
diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c
index 6af7f98..bea2da1 100644
--- a/source/components/utilities/utprint.c
+++ b/source/components/utilities/utprint.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -448,7 +452,13 @@
Pos = String;
- End = String + Size;
+
+
+ if (Size != ACPI_UINT32_MAX) {
+ End = String + Size;
+ } else {
+ End = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
+ }
for (; *Format; ++Format)
{
@@ -612,7 +622,7 @@
case 'X':
Type |= ACPI_FORMAT_UPPER;
- /* FALLTHROUGH */
+ ACPI_FALLTHROUGH;
case 'x':
diff --git a/source/components/utilities/utresdecode.c b/source/components/utilities/utresdecode.c
index f1e42c7..fc7a6fd 100644
--- a/source/components/utilities/utresdecode.c
+++ b/source/components/utilities/utresdecode.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -128,6 +132,14 @@
"AddressRangeNVS"
};
+const char *AcpiGbl_PhyDecode[] =
+{
+ "Type C",
+ "Type D",
+ "Unknown Type",
+ "Unknown Type"
+};
+
const char *AcpiGbl_RngDecode[] =
{
"InvalidRanges",
@@ -219,7 +231,8 @@
"/* UNKNOWN serial bus type */",
"I2C",
"SPI",
- "UART"
+ "UART",
+ "CSI2"
};
/* I2C serial bus access mode */
diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c
index c2d7394..e2d809a 100644
--- a/source/components/utilities/utresrc.c
+++ b/source/components/utilities/utresrc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -100,6 +104,7 @@
ACPI_AML_SIZE_LARGE (AML_RESOURCE_I2C_SERIALBUS),
ACPI_AML_SIZE_LARGE (AML_RESOURCE_SPI_SERIALBUS),
ACPI_AML_SIZE_LARGE (AML_RESOURCE_UART_SERIALBUS),
+ ACPI_AML_SIZE_LARGE (AML_RESOURCE_CSI2_SERIALBUS),
};
diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c
index 97596a4..0f6a5eb 100644
--- a/source/components/utilities/utstate.c
+++ b/source/components/utilities/utstate.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c
index bc8e92c..d8f39c6 100644
--- a/source/components/utilities/utstring.c
+++ b/source/components/utilities/utstring.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -196,7 +200,7 @@
return;
}
- ACPI_COPY_NAMESEG (&OriginalName, Name);
+ ACPI_COPY_NAMESEG (&OriginalName, &Name[0]);
/* Check each character in the name */
@@ -209,10 +213,10 @@
/*
* Replace a bad character with something printable, yet technically
- * still invalid. This prevents any collisions with existing "good"
+ * "odd". This prevents any collisions with existing "good"
* names in the namespace.
*/
- Name[i] = '*';
+ Name[i] = '_';
FoundBadChar = TRUE;
}
@@ -223,8 +227,8 @@
if (!AcpiGbl_EnableInterpreterSlack)
{
ACPI_WARNING ((AE_INFO,
- "Invalid character(s) in name (0x%.8X), repaired: [%4.4s]",
- OriginalName, Name));
+ "Invalid character(s) in name (0x%.8X) %p, repaired: [%4.4s]",
+ OriginalName, Name, &Name[0]));
}
else
{
diff --git a/source/components/utilities/utstrsuppt.c b/source/components/utilities/utstrsuppt.c
index 27834d5..ccffdcb 100644
--- a/source/components/utilities/utstrsuppt.c
+++ b/source/components/utilities/utstrsuppt.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -95,10 +99,16 @@
while (*String)
{
- /* Character must be ASCII 0-7, otherwise terminate with no error */
-
+ /*
+ * Character must be ASCII 0-7, otherwise:
+ * 1) Runtime: terminate with no error, per the ACPI spec
+ * 2) Compiler: return an error
+ */
if (!(ACPI_IS_OCTAL_DIGIT (*String)))
{
+#ifdef ACPI_ASL_COMPILER
+ Status = AE_BAD_OCTAL_CONSTANT;
+#endif
break;
}
@@ -151,10 +161,16 @@
while (*String)
{
- /* Character must be ASCII 0-9, otherwise terminate with no error */
-
- if (!isdigit (*String))
+ /*
+ * Character must be ASCII 0-9, otherwise:
+ * 1) Runtime: terminate with no error, per the ACPI spec
+ * 2) Compiler: return an error
+ */
+ if (!isdigit ((int) *String))
{
+#ifdef ACPI_ASL_COMPILER
+ Status = AE_BAD_DECIMAL_CONSTANT;
+#endif
break;
}
@@ -207,10 +223,16 @@
while (*String)
{
- /* Must be ASCII A-F, a-f, or 0-9, otherwise terminate with no error */
-
- if (!isxdigit (*String))
+ /*
+ * Character must be ASCII A-F, a-f, or 0-9, otherwise:
+ * 1) Runtime: terminate with no error, per the ACPI spec
+ * 2) Compiler: return an error
+ */
+ if (!isxdigit ((int) *String))
{
+#ifdef ACPI_ASL_COMPILER
+ Status = AE_BAD_HEX_CONSTANT;
+#endif
break;
}
diff --git a/source/components/utilities/utstrtoul64.c b/source/components/utilities/utstrtoul64.c
index 6ce6364..c8c7e9a 100644
--- a/source/components/utilities/utstrtoul64.c
+++ b/source/components/utilities/utstrtoul64.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c
index 928537a..380640c 100644
--- a/source/components/utilities/uttrack.c
+++ b/source/components/utilities/uttrack.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c
index 9f64da0..0242a08 100644
--- a/source/components/utilities/utuuid.c
+++ b/source/components/utilities/utuuid.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -96,4 +100,52 @@
InString[AcpiGbl_MapToUuidOffset[i] + 1]);
}
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtConvertUuidToString
+ *
+ * PARAMETERS: UuidBuffer - 16-byte UUID buffer
+ * OutString - 36-byte formatted UUID string
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert 16-byte UUID buffer to 36-byte formatted UUID string
+ * OutString must be 37 bytes to include null terminator.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtConvertUuidToString (
+ char *UuidBuffer,
+ char *OutString)
+{
+ UINT32 i;
+
+
+ if (!UuidBuffer || !OutString)
+ {
+ return (AE_BAD_PARAMETER);
+ }
+
+ for (i = 0; i < UUID_BUFFER_LENGTH; i++)
+ {
+ OutString[AcpiGbl_MapToUuidOffset[i]] =
+ AcpiUtHexToAsciiChar (UuidBuffer[i], 4);
+
+ OutString[AcpiGbl_MapToUuidOffset[i] + 1] =
+ AcpiUtHexToAsciiChar (UuidBuffer[i], 0);
+ }
+
+ /* Insert required hyphens (dashes) */
+
+ OutString[UUID_HYPHEN1_OFFSET] =
+ OutString[UUID_HYPHEN2_OFFSET] =
+ OutString[UUID_HYPHEN3_OFFSET] =
+ OutString[UUID_HYPHEN4_OFFSET] = '-';
+
+ OutString[UUID_STRING_LENGTH] = 0; /* Null terminate */
+ return (AE_OK);
+}
#endif
diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c
index 086c206..2073795 100644
--- a/source/components/utilities/utxface.c
+++ b/source/components/utilities/utxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c
index 0db8bb5..01d3ae9 100644
--- a/source/components/utilities/utxferror.c
+++ b/source/components/utilities/utxferror.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c
index 1171acd..91aa7f7 100644
--- a/source/components/utilities/utxfinit.c
+++ b/source/components/utilities/utxfinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c
index 3f684d6..fedbc25 100644
--- a/source/components/utilities/utxfmutex.c
+++ b/source/components/utilities/utxfmutex.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acapps.h b/source/include/acapps.h
index afd1630..b77de8c 100644
--- a/source/include/acapps.h
+++ b/source/include/acapps.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -47,7 +51,7 @@
/* Common info for tool signons */
#define ACPICA_NAME "Intel ACPI Component Architecture"
-#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2020 Intel Corporation"
+#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2022 Intel Corporation"
#if ACPI_MACHINE_WIDTH == 64
#define ACPI_WIDTH " (64-bit version)"
diff --git a/source/include/acbuffer.h b/source/include/acbuffer.h
index 264997d..2d62ea5 100644
--- a/source/include/acbuffer.h
+++ b/source/include/acbuffer.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -247,5 +251,14 @@
#define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)
#define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */
+/* Panel position defined in _PLD section of ACPI Specification 6.3 */
+
+#define ACPI_PLD_PANEL_TOP 0
+#define ACPI_PLD_PANEL_BOTTOM 1
+#define ACPI_PLD_PANEL_LEFT 2
+#define ACPI_PLD_PANEL_RIGHT 3
+#define ACPI_PLD_PANEL_FRONT 4
+#define ACPI_PLD_PANEL_BACK 5
+#define ACPI_PLD_PANEL_UNKNOWN 6
#endif /* ACBUFFER_H */
diff --git a/source/include/acclib.h b/source/include/acclib.h
index 561c27d..df9dd9a 100644
--- a/source/include/acclib.h
+++ b/source/include/acclib.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/accommon.h b/source/include/accommon.h
index 0f459c5..d16c578 100644
--- a/source/include/accommon.h
+++ b/source/include/accommon.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -43,7 +47,7 @@
/*
* Common set of includes for all ACPICA source files.
* We put them here because we don't want to duplicate them
- * in the the source code again and again.
+ * in the source code again and again.
*
* Note: The order of these include files is important.
*/
diff --git a/source/include/acconfig.h b/source/include/acconfig.h
index 14ea36f..c162ee4 100644
--- a/source/include/acconfig.h
+++ b/source/include/acconfig.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -154,7 +158,7 @@
*
*****************************************************************************/
-/* Method info (in WALK_STATE), containing local variables and argumetns */
+/* Method info (in WALK_STATE), containing local variables and arguments */
#define ACPI_METHOD_NUM_LOCALS 8
#define ACPI_METHOD_MAX_LOCAL 7
@@ -221,6 +225,9 @@
#define ACPI_MAX_GSBUS_DATA_SIZE 255
#define ACPI_MAX_GSBUS_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_MAX_GSBUS_DATA_SIZE
+#define ACPI_PRM_INPUT_BUFFER_SIZE 26
+
+#define ACPI_FFH_INPUT_BUFFER_SIZE 256
/* _SxD and _SxW control methods */
diff --git a/source/include/acconvert.h b/source/include/acconvert.h
index a827694..b652072 100644
--- a/source/include/acconvert.h
+++ b/source/include/acconvert.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -125,8 +129,7 @@
void
CvInitFileTree (
ACPI_TABLE_HEADER *Table,
- UINT8 *AmlStart,
- UINT32 AmlLength);
+ FILE *RootFile);
void
CvClearOpComments (
diff --git a/source/include/acdebug.h b/source/include/acdebug.h
index f7aa1cb..9668ded 100644
--- a/source/include/acdebug.h
+++ b/source/include/acdebug.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -75,6 +79,7 @@
{
UINT32 Count;
UINT32 MaxCount;
+ char NameSeg[ACPI_NAMESEG_SIZE + 1];
} ACPI_DB_EXECUTE_WALK;
@@ -83,6 +88,7 @@
#define EX_NO_SINGLE_STEP 1
#define EX_SINGLE_STEP 2
+#define EX_ALL 4
/*
@@ -233,6 +239,10 @@
AcpiDbEvaluatePredefinedNames (
void);
+void
+AcpiDbEvaluateAll (
+ char *NameSeg);
+
/*
* dbnames - namespace commands
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index c15048a..863d466 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -94,6 +98,7 @@
ACPI_DMT_FLAGS0,
ACPI_DMT_FLAGS1,
ACPI_DMT_FLAGS2,
+ ACPI_DMT_FLAGS8_2,
ACPI_DMT_FLAGS4,
ACPI_DMT_FLAGS4_0,
ACPI_DMT_FLAGS4_4,
@@ -112,6 +117,7 @@
ACPI_DMT_BUF10,
ACPI_DMT_BUF12,
ACPI_DMT_BUF16,
+ ACPI_DMT_BUF18,
ACPI_DMT_BUF128,
ACPI_DMT_SIG,
ACPI_DMT_STRING,
@@ -138,7 +144,16 @@
/* Types that are specific to particular ACPI tables */
+ ACPI_DMT_AEST,
+ ACPI_DMT_AEST_CACHE,
+ ACPI_DMT_AEST_GIC,
+ ACPI_DMT_AEST_RES,
+ ACPI_DMT_AEST_XFACE,
+ ACPI_DMT_AEST_XRUPT,
+ ACPI_DMT_AGDI,
ACPI_DMT_ASF,
+ ACPI_DMT_CDAT,
+ ACPI_DMT_CEDT,
ACPI_DMT_DMAR,
ACPI_DMT_DMAR_SCOPE,
ACPI_DMT_EINJACT,
@@ -153,17 +168,31 @@
ACPI_DMT_HMAT,
ACPI_DMT_IORTMEM,
ACPI_DMT_IVRS,
+ ACPI_DMT_IVRS_DE,
+ ACPI_DMT_IVRS_UNTERMINATED_STRING,
ACPI_DMT_LPIT,
ACPI_DMT_MADT,
ACPI_DMT_NFIT,
+ ACPI_DMT_NHLT1,
+ ACPI_DMT_NHLT1a,
+ ACPI_DMT_NHLT1b,
+ ACPI_DMT_NHLT1c,
+ ACPI_DMT_NHLT1d,
+ ACPI_DMT_NHLT1e,
+ ACPI_DMT_NHLT1f,
ACPI_DMT_PCCT,
+ ACPI_DMT_PHAT,
ACPI_DMT_PMTT,
+ ACPI_DMT_PMTT_VENDOR,
ACPI_DMT_PPTT,
+ ACPI_DMT_RGRT,
ACPI_DMT_SDEI,
ACPI_DMT_SDEV,
ACPI_DMT_SLIC,
ACPI_DMT_SRAT,
ACPI_DMT_TPM2,
+ ACPI_DMT_VIOT,
+ ACPI_DMT_WPBT_UNICODE,
/* Special opcodes */
@@ -241,6 +270,19 @@
extern const char *AcpiGbl_UpdateRules[];
extern const char *AcpiGbl_MatchOps[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestProcError[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestCacheRsrc[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestTlbRsrc[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGenRsrc[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestMemError[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestSmmuError[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAgdi[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoApmtNode[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
@@ -249,9 +291,24 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatTableHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatHeader[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat3[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat4[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatEntries[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1_te[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt0[];
@@ -273,6 +330,7 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar4[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar5[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm0a[];
@@ -339,18 +397,28 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3c[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort6[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort6a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortAcc[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortMap[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortPad[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHware1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHware23[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsMemory[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8b[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8c[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsCidString[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsCidInteger[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHid[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsUidString[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsUidInteger[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHidString[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHidInteger[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt1[];
@@ -368,6 +436,8 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt13[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt14[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt15[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt16[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt17[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
@@ -380,8 +450,6 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfitHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit0[];
@@ -395,12 +463,35 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt4[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5b[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5c[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6b[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7b[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt9[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1b[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttVendor[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
@@ -409,13 +500,21 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct4[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPpttHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtModule[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHandler[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
@@ -428,6 +527,10 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0b[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompId[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompMem[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1b[];
@@ -443,19 +546,27 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaClient[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoTdel[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm211[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm23[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm23a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoViotHeader[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot3[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWaet[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[];
@@ -528,10 +639,30 @@
UINT32 ByteLength);
void
+AcpiDmDumpAest (
+ ACPI_TABLE_HEADER *Table);
+
+void
+AcpiDmDumpApmt (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpAsf (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpCcel (
+ ACPI_TABLE_HEADER *Table);
+
+void
+AcpiDmDumpCdat (
+ ACPI_TABLE_HEADER *Table);
+
+void
+AcpiDmDumpCedt (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpCpep (
ACPI_TABLE_HEADER *Table);
@@ -608,11 +739,11 @@
ACPI_TABLE_HEADER *Table);
void
-AcpiDmDumpMtmr (
+AcpiDmDumpNfit (
ACPI_TABLE_HEADER *Table);
void
-AcpiDmDumpNfit (
+AcpiDmDumpNhlt (
ACPI_TABLE_HEADER *Table);
void
@@ -624,6 +755,10 @@
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpPhat (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpPmtt (
ACPI_TABLE_HEADER *Table);
@@ -631,6 +766,14 @@
AcpiDmDumpPptt (
ACPI_TABLE_HEADER *Table);
+void
+AcpiDmDumpPrmt (
+ ACPI_TABLE_HEADER *Table);
+
+void
+AcpiDmDumpRgrt (
+ ACPI_TABLE_HEADER *Table);
+
UINT32
AcpiDmDumpRsdp (
ACPI_TABLE_HEADER *Table);
@@ -664,15 +807,23 @@
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpSvkl (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpTcpa (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpTdel (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpTpm2 (
ACPI_TABLE_HEADER *Table);
void
-AcpiDmDumpVrtc (
+AcpiDmDumpViot (
ACPI_TABLE_HEADER *Table);
void
diff --git a/source/include/acdispat.h b/source/include/acdispat.h
index e354260..dfb237f 100644
--- a/source/include/acdispat.h
+++ b/source/include/acdispat.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acevents.h b/source/include/acevents.h
index 22fd73e..7e0e845 100644
--- a/source/include/acevents.h
+++ b/source/include/acevents.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -346,6 +350,13 @@
void **RegionContext);
ACPI_STATUS
+AcpiEvDataTableRegionSetup (
+ ACPI_HANDLE Handle,
+ UINT32 Function,
+ void *HandlerContext,
+ void **RegionContext);
+
+ACPI_STATUS
AcpiEvDefaultRegionSetup (
ACPI_HANDLE Handle,
UINT32 Function,
diff --git a/source/include/acexcep.h b/source/include/acexcep.h
index 141ba21..f70e0d8 100644
--- a/source/include/acexcep.h
+++ b/source/include/acexcep.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -72,12 +76,12 @@
{
char *Name;
-#ifdef ACPI_HELP_APP
+#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER)
char *Description;
#endif
} ACPI_EXCEPTION_INFO;
-#ifdef ACPI_HELP_APP
+#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER)
#define EXCEP_TXT(Name,Description) {Name, Description}
#else
#define EXCEP_TXT(Name,Description) {Name}
@@ -92,11 +96,11 @@
#define AE_OK (ACPI_STATUS) 0x0000
-#define ACPI_ENV_EXCEPTION(Status) (Status & AE_CODE_ENVIRONMENTAL)
-#define ACPI_AML_EXCEPTION(Status) (Status & AE_CODE_AML)
-#define ACPI_PROG_EXCEPTION(Status) (Status & AE_CODE_PROGRAMMER)
-#define ACPI_TABLE_EXCEPTION(Status) (Status & AE_CODE_ACPI_TABLES)
-#define ACPI_CNTL_EXCEPTION(Status) (Status & AE_CODE_CONTROL)
+#define ACPI_ENV_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_ENVIRONMENTAL)
+#define ACPI_AML_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_AML)
+#define ACPI_PROG_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_PROGRAMMER)
+#define ACPI_TABLE_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_ACPI_TABLES)
+#define ACPI_CNTL_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_CONTROL)
/*
diff --git a/source/include/acglobal.h b/source/include/acglobal.h
index a9a837a..ac667b5 100644
--- a/source/include/acglobal.h
+++ b/source/include/acglobal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -55,6 +59,7 @@
ACPI_GLOBAL (ACPI_TABLE_HEADER *, AcpiGbl_DSDT);
ACPI_GLOBAL (ACPI_TABLE_HEADER, AcpiGbl_OriginalDsdtHeader);
+ACPI_INIT_GLOBAL (char *, AcpiGbl_CDAT, NULL);
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_DsdtIndex, ACPI_INVALID_TABLE_INDEX);
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_FacsIndex, ACPI_INVALID_TABLE_INDEX);
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_XFacsIndex, ACPI_INVALID_TABLE_INDEX);
@@ -253,6 +258,8 @@
extern ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeA);
ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeB);
+ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeAS0);
+ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeBS0);
/*****************************************************************************
@@ -324,6 +331,7 @@
#ifdef ACPI_DEBUGGER
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE);
ACPI_INIT_GLOBAL (ACPI_THREAD_ID, AcpiGbl_DbThreadId, ACPI_INVALID_THREAD_ID);
+ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NextCmdNum, 1);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoIniMethods);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport);
diff --git a/source/include/achware.h b/source/include/achware.h
index 51186b7..8747bbb 100644
--- a/source/include/achware.h
+++ b/source/include/achware.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -203,6 +207,10 @@
AcpiHwEnableAllWakeupGpes (
void);
+UINT8
+AcpiHwCheckAllGpes (
+ void);
+
ACPI_STATUS
AcpiHwEnableRuntimeGpeBlock (
ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
diff --git a/source/include/acinterp.h b/source/include/acinterp.h
index ec360fe..eb26d61 100644
--- a/source/include/acinterp.h
+++ b/source/include/acinterp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/aclocal.h b/source/include/aclocal.h
index acc58de..ae2e4ac 100644
--- a/source/include/aclocal.h
+++ b/source/include/aclocal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acmacros.h b/source/include/acmacros.h
index d020e24..77cd7e9 100644
--- a/source/include/acmacros.h
+++ b/source/include/acmacros.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -513,7 +517,7 @@
#define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) CvPrintOneCommentType (a,b,c,d);
#define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) CvPrintOneCommentList (a,b);
#define ASL_CV_FILE_HAS_SWITCHED(a) CvFileHasSwitched(a)
-#define ASL_CV_INIT_FILETREE(a,b,c) CvInitFileTree(a,b,c);
+#define ASL_CV_INIT_FILETREE(a,b) CvInitFileTree(a,b);
#else
@@ -528,7 +532,7 @@
#define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d)
#define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b)
#define ASL_CV_FILE_HAS_SWITCHED(a) 0
-#define ASL_CV_INIT_FILETREE(a,b,c)
+#define ASL_CV_INIT_FILETREE(a,b)
#endif
diff --git a/source/include/acnames.h b/source/include/acnames.h
index e6ada4c..52bbf36 100644
--- a/source/include/acnames.h
+++ b/source/include/acnames.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -50,6 +54,7 @@
#define METHOD_NAME__CLS "_CLS"
#define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__DDN "_DDN"
+#define METHOD_NAME__DIS "_DIS"
#define METHOD_NAME__DMA "_DMA"
#define METHOD_NAME__HID "_HID"
#define METHOD_NAME__INI "_INI"
diff --git a/source/include/acnamesp.h b/source/include/acnamesp.h
index 71a9085..893dbe3 100644
--- a/source/include/acnamesp.h
+++ b/source/include/acnamesp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -375,6 +379,10 @@
UINT32 PathSize,
BOOLEAN NoTrailing);
+void
+AcpiNsNormalizePathname (
+ char *OriginalPath);
+
char *
AcpiNsGetNormalizedPathname (
ACPI_NAMESPACE_NODE *Node,
diff --git a/source/include/acobject.h b/source/include/acobject.h
index ece72eb..c0acbcf 100644
--- a/source/include/acobject.h
+++ b/source/include/acobject.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -201,6 +205,7 @@
union acpi_operand_object *Next;
ACPI_PHYSICAL_ADDRESS Address;
UINT32 Length;
+ void *Pointer; /* Only for data table regions */
} ACPI_OBJECT_REGION;
@@ -409,6 +414,7 @@
ACPI_ADR_SPACE_HANDLER Handler;
ACPI_NAMESPACE_NODE *Node; /* Parent device */
void *Context;
+ ACPI_MUTEX ContextMutex;
ACPI_ADR_SPACE_SETUP Setup;
union acpi_operand_object *RegionList; /* Regions using this handler */
union acpi_operand_object *Next;
diff --git a/source/include/acopcode.h b/source/include/acopcode.h
index 4800404..5c97771 100644
--- a/source/include/acopcode.h
+++ b/source/include/acopcode.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acoutput.h b/source/include/acoutput.h
index 0938b5d..e386423 100644
--- a/source/include/acoutput.h
+++ b/source/include/acoutput.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -396,7 +400,7 @@
*
* A less-safe version of the macros is provided for optional use if the
* compiler uses excessive CPU stack (for example, this may happen in the
- * debug case if code optimzation is disabled.)
+ * debug case if code optimization is disabled.)
*/
/* Exit trace helper macro */
@@ -449,7 +453,7 @@
/* Conditional execution */
#define ACPI_DEBUG_EXEC(a) a
-#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
+#define ACPI_DEBUG_ONLY_MEMBERS(a) a
#define _VERBOSE_STRUCTURES
diff --git a/source/include/acparser.h b/source/include/acparser.h
index b925d73..f442d31 100644
--- a/source/include/acparser.h
+++ b/source/include/acparser.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acpi.h b/source/include/acpi.h
index 2b86d91..0fc53f2 100644
--- a/source/include/acpi.h
+++ b/source/include/acpi.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acpiosxf.h b/source/include/acpiosxf.h
index 1fc4367..ea8e719 100644
--- a/source/include/acpiosxf.h
+++ b/source/include/acpiosxf.h
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,10 +25,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/acpixf.h b/source/include/acpixf.h
index 7b3d9c0..981f708 100644
--- a/source/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -42,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20200110
+#define ACPI_CA_VERSION 0x20221020
#include "acconfig.h"
#include "actypes.h"
@@ -546,8 +550,12 @@
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
- ACPI_PHYSICAL_ADDRESS Address,
- BOOLEAN Physical))
+ ACPI_TABLE_HEADER *Table))
+
+ACPI_EXTERNAL_RETURN_STATUS (
+ACPI_STATUS ACPI_INIT_FUNCTION
+AcpiInstallPhysicalTable (
+ ACPI_PHYSICAL_ADDRESS Address))
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
@@ -997,6 +1005,10 @@
AcpiEnableAllWakeupGpes (
void))
+ACPI_HW_DEPENDENT_RETURN_UINT32 (
+ UINT32 AcpiAnyGpeStatusSet (
+ void))
+
ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetGpeDevice (
diff --git a/source/include/acpredef.h b/source/include/acpredef.h
index dddeabc..e1458c9 100644
--- a/source/include/acpredef.h
+++ b/source/include/acpredef.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -134,7 +138,7 @@
/* Support macros for users of the predefined info table */
-#define METHOD_PREDEF_ARGS_MAX 4
+#define METHOD_PREDEF_ARGS_MAX 5
#define METHOD_ARG_BIT_WIDTH 3
#define METHOD_ARG_MASK 0x0007
#define ARG_COUNT_IS_MINIMUM 0x8000
@@ -150,6 +154,7 @@
#define METHOD_2ARGS(a1,a2) (2 | (a1 << 3) | (a2 << 6))
#define METHOD_3ARGS(a1,a2,a3) (3 | (a1 << 3) | (a2 << 6) | (a3 << 9))
#define METHOD_4ARGS(a1,a2,a3,a4) (4 | (a1 << 3) | (a2 << 6) | (a3 << 9) | (a4 << 12))
+#define METHOD_5ARGS(a1,a2,a3,a4,a5) (5 | (a1 << 3) | (a2 << 6) | (a3 << 9) | (a4 << 12) | (a5 << 15))
#define METHOD_RETURNS(type) (type)
#define METHOD_NO_RETURN_VALUE 0
@@ -359,6 +364,17 @@
{{"_BMS", METHOD_1ARGS (ACPI_TYPE_INTEGER),
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
+ {{"_BPC", METHOD_0ARGS,
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4,0,0,0),
+
+ {{"_BPS", METHOD_0ARGS,
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (5 Int) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5,0,0,0),
+
+ {{"_BPT", METHOD_1ARGS (ACPI_TYPE_PACKAGE),
+ METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
+
{{"_BQC", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
@@ -378,6 +394,10 @@
{{"_CBA", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, /* See PCI firmware spec 3.0 */
+ {{"_CBR", METHOD_0ARGS,
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3,0,0,0),
+
{{"_CCA", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, /* ACPI 5.1 */
@@ -657,10 +677,10 @@
{{"_NIC", METHOD_0ARGS, /* ACPI 6.3 */
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
- {{"_NIG", METHOD_1ARGS (ACPI_TYPE_BUFFER), /* ACPI 6.3 */
+ {{"_NIG", METHOD_0ARGS, /* ACPI 6.3 */
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
- {{"_NIH", METHOD_0ARGS, /* ACPI 6.3 */
+ {{"_NIH", METHOD_1ARGS (ACPI_TYPE_BUFFER), /* ACPI 6.3 */
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
{{"_NTT", METHOD_0ARGS,
@@ -911,9 +931,29 @@
{{"_S4W", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
+ {{"_SBA", METHOD_0ARGS,
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4,0,0,0),
+
+ {{"_SBI", METHOD_0ARGS,
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int, 1 Buf) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 1, ACPI_RTYPE_BUFFER,1,0),
+
+ {{"_SBR", METHOD_3ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1,0),
+
{{"_SBS", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
+ {{"_SBT", METHOD_4ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_ANY),
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int, 1 Buf | Int) */
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1,0),
+
+ {{"_SBW", METHOD_5ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_ANY),
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}},
+ PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1, 0,0,0),
+
{{"_SCP", METHOD_1ARGS (ACPI_TYPE_INTEGER) | ARG_COUNT_IS_MINIMUM,
METHOD_NO_RETURN_VALUE}}, /* Acpi 1.0 allowed 1 integer arg. Acpi 3.0 expanded to 3 args. Allow both. */
diff --git a/source/include/acresrc.h b/source/include/acresrc.h
index 531cda9..978cea2 100644
--- a/source/include/acresrc.h
+++ b/source/include/acresrc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -79,6 +83,7 @@
ACPI_RSC_1BITFLAG,
ACPI_RSC_2BITFLAG,
ACPI_RSC_3BITFLAG,
+ ACPI_RSC_6BITFLAG,
ACPI_RSC_ADDRESS,
ACPI_RSC_BITMASK,
ACPI_RSC_BITMASK16,
@@ -139,6 +144,7 @@
ACPI_RSD_1BITFLAG,
ACPI_RSD_2BITFLAG,
ACPI_RSD_3BITFLAG,
+ ACPI_RSD_6BITFLAG,
ACPI_RSD_ADDRESS,
ACPI_RSD_DWORDLIST,
ACPI_RSD_LITERAL,
@@ -382,6 +388,7 @@
extern ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertGpio[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedDma[];
+extern ACPI_RSCONVERT_INFO AcpiRsConvertCsi2SerialBus[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[];
@@ -437,6 +444,7 @@
extern ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[];
extern ACPI_RSDUMP_INFO AcpiRsDumpFixedDma[];
extern ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[];
+extern ACPI_RSDUMP_INFO AcpiRsDumpCsi2SerialBus[];
extern ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[];
extern ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[];
extern ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[];
diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h
index f0a9fb6..ade2a53 100644
--- a/source/include/acrestyp.h
+++ b/source/include/acrestyp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -481,7 +485,7 @@
#define ACPI_IO_RESTRICT_NONE_PRESERVE 3
-/* Common structure for I2C, SPI, and UART serial descriptors */
+/* Common structure for I2C, SPI, UART, CSI2 serial descriptors */
#define ACPI_RESOURCE_SERIAL_COMMON \
UINT8 RevisionId; \
@@ -506,6 +510,7 @@
#define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
#define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
#define ACPI_RESOURCE_SERIAL_TYPE_UART 3
+#define ACPI_RESOURCE_SERIAL_TYPE_CSI2 4
/* Values for SlaveMode field above */
@@ -620,6 +625,14 @@
#define ACPI_UART_CLEAR_TO_SEND (1<<6)
#define ACPI_UART_REQUEST_TO_SEND (1<<7)
+typedef struct acpi_resource_csi2_serialbus
+{
+ ACPI_RESOURCE_SERIAL_COMMON
+ UINT8 LocalPortInstance;
+ UINT8 PhyType;
+
+} ACPI_RESOURCE_CSI2_SERIALBUS;
+
typedef struct acpi_resource_pin_function
{
UINT8 RevisionId;
@@ -760,6 +773,7 @@
ACPI_RESOURCE_I2C_SERIALBUS I2cSerialBus;
ACPI_RESOURCE_SPI_SERIALBUS SpiSerialBus;
ACPI_RESOURCE_UART_SERIALBUS UartSerialBus;
+ ACPI_RESOURCE_CSI2_SERIALBUS Csi2SerialBus;
ACPI_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
ACPI_RESOURCE_PIN_FUNCTION PinFunction;
ACPI_RESOURCE_PIN_CONFIG PinConfig;
diff --git a/source/include/acstruct.h b/source/include/acstruct.h
index 8661a97..6d7a0b1 100644
--- a/source/include/acstruct.h
+++ b/source/include/acstruct.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/actables.h b/source/include/actables.h
index 14c027e..ba9b0e0 100644
--- a/source/include/actables.h
+++ b/source/include/actables.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -81,7 +85,8 @@
AcpiTbAcquireTempTable (
ACPI_TABLE_DESC *TableDesc,
ACPI_PHYSICAL_ADDRESS Address,
- UINT8 Flags);
+ UINT8 Flags,
+ ACPI_TABLE_HEADER *Table);
void
AcpiTbReleaseTempTable (
@@ -167,6 +172,7 @@
AcpiTbInstallStandardTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
+ ACPI_TABLE_HEADER *Table,
BOOLEAN Reload,
BOOLEAN Override,
UINT32 *TableIndex);
@@ -184,6 +190,7 @@
AcpiTbInstallAndLoadTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
+ ACPI_TABLE_HEADER *Table,
BOOLEAN Override,
UINT32 *TableIndex);
@@ -230,16 +237,6 @@
ACPI_PHYSICAL_ADDRESS Address,
ACPI_TABLE_HEADER *Header);
-UINT8
-AcpiTbChecksum (
- UINT8 *Buffer,
- UINT32 Length);
-
-ACPI_STATUS
-AcpiTbVerifyChecksum (
- ACPI_TABLE_HEADER *Table,
- UINT32 Length);
-
void
AcpiTbCheckDsdtHeader (
void);
diff --git a/source/include/actbinfo.h b/source/include/actbinfo.h
index d95a8c9..cf99fb0 100644
--- a/source/include/actbinfo.h
+++ b/source/include/actbinfo.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -40,13 +44,16 @@
/*
* Macros used to generate offsets to specific table fields
*/
+#define ACPI_AGDI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_AGDI,f)
#define ACPI_FACS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_FACS,f)
#define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
#define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
#define ACPI_RSDP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RSDP,f)
+#define ACPI_BDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BDAT,f)
#define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f)
#define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
#define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
+#define ACPI_CCEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CCEL,f)
#define ACPI_CPEP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
#define ACPI_DBG2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBG2,f)
#define ACPI_DBGP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
@@ -67,10 +74,12 @@
#define ACPI_MPST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MPST,f)
#define ACPI_MSCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
#define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f)
+#define ACPI_NHLT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NHLT,f)
#define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
#define ACPI_PDTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PDTT,f)
#define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
#define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f)
+#define ACPI_RGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RGRT,f)
#define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
#define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f)
#define ACPI_SDEI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SDEI,f)
@@ -80,20 +89,36 @@
#define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
#define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f)
#define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f)
+#define ACPI_SVKL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SVKL,f)
#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f)
+#define ACPI_TDEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TDEL,f)
#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
#define ACPI_TPM23_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM23,f)
#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
+#define ACPI_VIOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_VIOT,f)
#define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f)
#define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
#define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
#define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
#define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f)
+#define ACPI_WPBT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WPBT_UNICODE,f)
#define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f)
#define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f)
/* Subtables */
+#define ACPI_AESTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_HEADER,f)
+#define ACPI_AEST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR,f)
+#define ACPI_AEST0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_CACHE,f)
+#define ACPI_AEST0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_TLB,f)
+#define ACPI_AEST0C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_GENERIC,f)
+#define ACPI_AEST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_MEMORY,f)
+#define ACPI_AEST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_SMMU,f)
+#define ACPI_AEST3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_VENDOR,f)
+#define ACPI_AEST4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_GIC,f)
+#define ACPI_AEST0D_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_NODE_INTERFACE,f)
+#define ACPI_AEST0E_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_NODE_INTERRUPT,f)
+#define ACPI_APMTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_APMT_NODE,f)
#define ACPI_ASF0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_INFO,f)
#define ACPI_ASF1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT,f)
#define ACPI_ASF1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f)
@@ -101,6 +126,19 @@
#define ACPI_ASF2a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f)
#define ACPI_ASF3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f)
#define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
+#define ACPI_CDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CDAT,f)
+#define ACPI_CDATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_HEADER,f)
+#define ACPI_CDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSMAS,f)
+#define ACPI_CDAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSLBIS,f)
+#define ACPI_CDAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSMSCIS,f)
+#define ACPI_CDAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSIS,f)
+#define ACPI_CDAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSEMTS,f)
+#define ACPI_CDAT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_SSLBIS,f)
+#define ACPI_CDATE_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_SSLBE,f)
+#define ACPI_CEDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_HEADER, f)
+#define ACPI_CEDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CHBS, f)
+#define ACPI_CEDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CFMWS, f)
+#define ACPI_CEDT1_TE_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CFMWS_TARGET_ELEMENT, f)
#define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
#define ACPI_CSRT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f)
#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f)
@@ -112,6 +150,7 @@
#define ACPI_DMAR2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
#define ACPI_DMAR3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
#define ACPI_DMAR4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_ANDD,f)
+#define ACPI_DMAR5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_SATC,f)
#define ACPI_DRTM0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST,f)
#define ACPI_DRTM1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST,f)
#define ACPI_DRTM1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_RESOURCE,f)
@@ -148,16 +187,20 @@
#define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f)
#define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f)
#define ACPI_IORT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_PMCG,f)
+#define ACPI_IORT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_RMR,f)
+#define ACPI_IORT6A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_RMR_DESC,f)
#define ACPI_IORTA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f)
#define ACPI_IORTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f)
#define ACPI_IORTM_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f)
#define ACPI_IVRSH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HEADER,f)
-#define ACPI_IVRS0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f)
+#define ACPI_IVRS0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE1,f)
+#define ACPI_IVRS01_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE2,f)
#define ACPI_IVRS1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_MEMORY,f)
#define ACPI_IVRSD_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f)
#define ACPI_IVRS8A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f)
#define ACPI_IVRS8B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f)
#define ACPI_IVRS8C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f)
+#define ACPI_IVRSHID_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE_HID,f)
#define ACPI_LPITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_HEADER,f)
#define ACPI_LPIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_NATIVE,f)
#define ACPI_MADT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f)
@@ -176,6 +219,8 @@
#define ACPI_MADT13_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_MSI_FRAME,f)
#define ACPI_MADT14_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_REDISTRIBUTOR,f)
#define ACPI_MADT15_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_TRANSLATOR,f)
+#define ACPI_MADT16_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_MULTIPROC_WAKEUP,f)
+#define ACPI_MADT17_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_OEM_DATA,f)
#define ACPI_MADTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_MCFG0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
#define ACPI_MPST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f)
@@ -184,7 +229,6 @@
#define ACPI_MPST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f)
#define ACPI_MPST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f)
#define ACPI_MSCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
-#define ACPI_MTMR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MTMR_ENTRY,f)
#define ACPI_NFITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_HEADER,f)
#define ACPI_NFIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_SYSTEM_ADDRESS,f)
#define ACPI_NFIT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_MEMORY_MAP,f)
@@ -194,26 +238,54 @@
#define ACPI_NFIT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_DATA_REGION,f)
#define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
#define ACPI_NFIT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CAPABILITIES,f)
+#define ACPI_NHLT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_ENDPOINT,f)
+#define ACPI_NHLT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG,f)
+#define ACPI_NHLT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_WAVE_EXTENSIBLE,f)
+#define ACPI_NHLT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_FORMAT_CONFIG,f)
+#define ACPI_NHLT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_FORMATS_CONFIG,f)
+#define ACPI_NHLT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG,f)
+#define ACPI_NHLT5A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A,f)
+#define ACPI_NHLT5B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B,f)
+#define ACPI_NHLT5C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C,f)
+#define ACPI_NHLT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_VENDOR_MIC_CONFIG,f)
+#define ACPI_NHLT6A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_VENDOR_MIC_COUNT,f)
+#define ACPI_NHLT6B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG,f)
+#define ACPI_NHLT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_INFO_COUNT,f)
+#define ACPI_NHLT7A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_INFO,f)
+#define ACPI_NHLT9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION,f)
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
#define ACPI_PCCT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_MASTER,f)
#define ACPI_PCCT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_SLAVE,f)
+#define ACPI_PCCT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REG,f)
#define ACPI_PDTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PDTT_CHANNEL,f)
+#define ACPI_PHATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_HEADER,f)
+#define ACPI_PHAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_VERSION_DATA,f)
+#define ACPI_PHAT0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_VERSION_ELEMENT,f)
+#define ACPI_PHAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_HEALTH_DATA,f)
#define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
#define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
-#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
#define ACPI_PMTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
+#define ACPI_PMTT_VENDOR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_VENDOR_SPECIFIC,f)
#define ACPI_PMTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
#define ACPI_PPTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_PPTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_PROCESSOR,f)
#define ACPI_PPTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE,f)
+#define ACPI_PPTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE_V1,f)
#define ACPI_PPTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_ID,f)
+#define ACPI_PRMTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PRMT_HEADER,f)
+#define ACPI_PRMT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PRMT_MODULE_INFO,f)
+#define ACPI_PRMT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PRMT_HANDLER_INFO,f)
#define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
#define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
#define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
#define ACPI_SDEVH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_HEADER,f)
#define ACPI_SDEV0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_NAMESPACE,f)
+#define ACPI_SDEV0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_SECURE_COMPONENT,f)
+#define ACPI_SDEVCH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_HEADER,f)
+#define ACPI_SDEVC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_ID_COMPONENT, f)
+#define ACPI_SDEVC1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_MEM_COMPONENT, f)
#define ACPI_SDEV1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_PCIE,f)
#define ACPI_SDEV1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_PCIE_PATH,f)
#define ACPI_SLIC_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f)
@@ -224,12 +296,17 @@
#define ACPI_SRAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GICC_AFFINITY,f)
#define ACPI_SRAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GIC_ITS_AFFINITY,f)
#define ACPI_SRAT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GENERIC_AFFINITY,f)
+#define ACPI_SVKL0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SVKL_KEY,f)
#define ACPI_TCPA_CLIENT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_CLIENT,f)
#define ACPI_TCPA_SERVER_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_SERVER,f)
#define ACPI_TPM2A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_TRAILER,f)
#define ACPI_TPM211_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_ARM_SMC,f)
#define ACPI_TPM23A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM23_TRAILER,f)
-#define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f)
+#define ACPI_VIOTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_HEADER,f)
+#define ACPI_VIOT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_PCI_RANGE,f)
+#define ACPI_VIOT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_MMIO,f)
+#define ACPI_VIOT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_VIRTIO_IOMMU_PCI,f)
+#define ACPI_VIOT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_VIRTIO_IOMMU_MMIO,f)
#define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
/*
@@ -239,6 +316,11 @@
/* Flags */
+#define ACPI_AEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_PROCESSOR,f,o)
+#define ACPI_AEST0D_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERFACE,f,o)
+#define ACPI_AEST0E_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERRUPT,f,o)
+#define ACPI_AGDI_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_AGDI,f,o)
+#define ACPI_APMTN_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_APMT_NODE,f,o)
#define ACPI_BGRT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_BGRT,f,o)
#define ACPI_DRTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_DRTM,f,o)
#define ACPI_DRTM1a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_DRTM_RESOURCE,f,o)
@@ -247,6 +329,7 @@
#define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_HPET,f,o)
#define ACPI_PPTT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_PROCESSOR,f,o)
#define ACPI_PPTT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_CACHE,f,o)
+#define ACPI_PPTT1A_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_CACHE_V1,f,o)
#define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o)
#define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o)
#define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o)
@@ -261,8 +344,11 @@
#define ACPI_IORT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o)
#define ACPI_IORT3a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_GSI,f,o)
#define ACPI_IORT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o)
+#define ACPI_IORT6_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_RMR,f,o)
#define ACPI_IORTA_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o)
#define ACPI_IORTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o)
+#define ACPI_IVRS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IVRS_HEADER,f,o)
+#define ACPI_IVRSDE_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IVRS_DE_HEADER,f,o)
#define ACPI_LPITH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_LPIT_HEADER,f,o)
#define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_MADT,f,o)
#define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC,f,o)
diff --git a/source/include/actbl.h b/source/include/actbl.h
index 87b26a1..bfc8d79 100644
--- a/source/include/actbl.h
+++ b/source/include/actbl.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index 7eba1f3..f277266 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -56,10 +60,12 @@
* file. Useful because they make it more difficult to inadvertently type in
* the wrong signature.
*/
+#define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */
#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
+#define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */
#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
@@ -75,6 +81,7 @@
#define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
+#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table*/
#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
@@ -380,6 +387,279 @@
} ACPI_TABLE_BOOT;
+
+/*******************************************************************************
+ *
+ * CDAT - Coherent Device Attribute Table
+ * Version 1
+ *
+ * Conforms to the "Coherent Device Attribute Table (CDAT) Specification
+ " (Revision 1.01, October 2020.)
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_cdat
+{
+ UINT32 Length; /* Length of table in bytes, including this header */
+ UINT8 Revision; /* ACPI Specification minor version number */
+ UINT8 Checksum; /* To make sum of entire table == 0 */
+ UINT8 Reserved[6];
+ UINT32 Sequence; /* Used to detect runtime CDAT table changes */
+
+} ACPI_TABLE_CDAT;
+
+
+/* CDAT common subtable header */
+
+typedef struct acpi_cdat_header
+{
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
+
+} ACPI_CDAT_HEADER;
+
+/* Values for Type field above */
+
+enum AcpiCdatType
+{
+ ACPI_CDAT_TYPE_DSMAS = 0,
+ ACPI_CDAT_TYPE_DSLBIS = 1,
+ ACPI_CDAT_TYPE_DSMSCIS = 2,
+ ACPI_CDAT_TYPE_DSIS = 3,
+ ACPI_CDAT_TYPE_DSEMTS = 4,
+ ACPI_CDAT_TYPE_SSLBIS = 5,
+ ACPI_CDAT_TYPE_RESERVED = 6 /* 6 through 0xFF are reserved */
+};
+
+
+/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
+
+typedef struct acpi_cadt_dsmas
+{
+ UINT8 DsmadHandle;
+ UINT8 Flags;
+ UINT16 Reserved;
+ UINT64 DpaBaseAddress;
+ UINT64 DpaLength;
+
+} ACPI_CDAT_DSMAS;
+
+/* Flags for subtable above */
+
+#define ACPI_CEDT_DSMAS_NON_VOLATILE (1 << 2)
+
+
+/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
+
+typedef struct acpi_cdat_dslbis
+{
+ UINT8 Handle;
+ UINT8 Flags; /* If Handle matches a DSMAS handle, the definition of this field matches
+ * Flags field in HMAT System Locality Latency */
+ UINT8 DataType;
+ UINT8 Reserved;
+ UINT64 EntryBaseUnit;
+ UINT16 Entry[3];
+ UINT16 Reserved2;
+
+} ACPI_CDAT_DSLBIS;
+
+
+/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
+
+typedef struct acpi_cdat_dsmscis
+{
+ UINT8 DsmasHandle;
+ UINT8 Reserved[3];
+ UINT64 SideCacheSize;
+ UINT32 CacheAttributes;
+
+} ACPI_CDAT_DSMSCIS;
+
+
+/* Subtable 3: Device Scoped Initiator Structure (DSIS) */
+
+typedef struct acpi_cdat_dsis
+{
+ UINT8 Flags;
+ UINT8 Handle;
+ UINT16 Reserved;
+
+} ACPI_CDAT_DSIS;
+
+/* Flags for above subtable */
+
+#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0)
+
+
+/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
+
+typedef struct acpi_cdat_dsemts
+{
+ UINT8 DsmasHandle;
+ UINT8 MemoryType;
+ UINT16 Reserved;
+ UINT64 DpaOffset;
+ UINT64 RangeLength;
+
+} ACPI_CDAT_DSEMTS;
+
+
+/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
+
+typedef struct acpi_cdat_sslbis
+{
+ UINT8 DataType;
+ UINT8 Reserved[3];
+ UINT64 EntryBaseUnit;
+
+} ACPI_CDAT_SSLBIS;
+
+
+/* Sub-subtable for above, SslbeEntries field */
+
+typedef struct acpi_cdat_sslbe
+{
+ UINT16 PortxId;
+ UINT16 PortyId;
+ UINT16 LatencyOrBandwidth;
+ UINT16 Reserved;
+
+} ACPI_CDAT_SSLBE;
+
+
+/*******************************************************************************
+ *
+ * CEDT - CXL Early Discovery Table
+ * Version 1
+ *
+ * Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020)
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_cedt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_CEDT;
+
+/* CEDT subtable header (Performance Record Structure) */
+
+typedef struct acpi_cedt_header
+{
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
+
+} ACPI_CEDT_HEADER;
+
+/* Values for Type field above */
+
+enum AcpiCedtType
+{
+ ACPI_CEDT_TYPE_CHBS = 0,
+ ACPI_CEDT_TYPE_CFMWS = 1,
+ ACPI_CEDT_TYPE_CXIMS = 2,
+ ACPI_CEDT_TYPE_RDPAS = 3,
+ ACPI_CEDT_TYPE_RESERVED = 4,
+};
+
+/* Values for version field above */
+
+#define ACPI_CEDT_CHBS_VERSION_CXL11 (0)
+#define ACPI_CEDT_CHBS_VERSION_CXL20 (1)
+
+/* Values for length field above */
+
+#define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000)
+#define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000)
+
+/*
+ * CEDT subtables
+ */
+
+/* 0: CXL Host Bridge Structure */
+
+typedef struct acpi_cedt_chbs
+{
+ ACPI_CEDT_HEADER Header;
+ UINT32 Uid;
+ UINT32 CxlVersion;
+ UINT32 Reserved;
+ UINT64 Base;
+ UINT64 Length;
+
+} ACPI_CEDT_CHBS;
+
+
+/* 1: CXL Fixed Memory Window Structure */
+
+typedef struct acpi_cedt_cfmws
+{
+ ACPI_CEDT_HEADER Header;
+ UINT32 Reserved1;
+ UINT64 BaseHpa;
+ UINT64 WindowSize;
+ UINT8 InterleaveWays;
+ UINT8 InterleaveArithmetic;
+ UINT16 Reserved2;
+ UINT32 Granularity;
+ UINT16 Restrictions;
+ UINT16 QtgId;
+ UINT32 InterleaveTargets[];
+
+} ACPI_CEDT_CFMWS;
+
+typedef struct acpi_cedt_cfmws_target_element
+{
+ UINT32 InterleaveTarget;
+
+} ACPI_CEDT_CFMWS_TARGET_ELEMENT;
+
+/* Values for Interleave Arithmetic field above */
+
+#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
+#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1)
+
+/* Values for Restrictions field above */
+
+#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
+#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
+#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
+#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
+#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
+
+/* 2: CXL XOR Interleave Math Structure */
+
+struct acpi_cedt_cxims {
+ ACPI_CEDT_HEADER Header;
+ UINT16 Reserved1;
+ UINT8 Hbig;
+ UINT8 NrXormaps;
+ UINT64 XormapList[];
+};
+
+/* 3: CXL RCEC Downstream Port Association Structure */
+
+struct acpi_cedt_rdpas {
+ ACPI_CEDT_HEADER Header;
+ UINT8 Reserved1;
+ UINT16 Length;
+ UINT16 Segment;
+ UINT16 Bdf;
+ UINT8 Protocol;
+ UINT64 Address;
+};
+
+/* Masks for bdf field above */
+#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00
+#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8
+#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007
+
+#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0)
+#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1)
+
/*******************************************************************************
*
* CPEP - Corrected Platform Error Polling table (ACPI 4.0)
@@ -495,7 +775,7 @@
* DBG2 - Debug Port Table 2
* Version 0 (Both main table and subtables)
*
- * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
+ * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020
*
******************************************************************************/
@@ -552,11 +832,24 @@
#define ACPI_DBG2_16550_COMPATIBLE 0x0000
#define ACPI_DBG2_16550_SUBSET 0x0001
+#define ACPI_DBG2_MAX311XE_SPI 0x0002
#define ACPI_DBG2_ARM_PL011 0x0003
+#define ACPI_DBG2_MSM8X60 0x0004
+#define ACPI_DBG2_16550_NVIDIA 0x0005
+#define ACPI_DBG2_TI_OMAP 0x0006
+#define ACPI_DBG2_APM88XXXX 0x0008
+#define ACPI_DBG2_MSM8974 0x0009
+#define ACPI_DBG2_SAM5250 0x000A
+#define ACPI_DBG2_INTEL_USIF 0x000B
+#define ACPI_DBG2_IMX6 0x000C
#define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
#define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
#define ACPI_DBG2_ARM_DCC 0x000F
#define ACPI_DBG2_BCM2835 0x0010
+#define ACPI_DBG2_SDM845_1_8432MHZ 0x0011
+#define ACPI_DBG2_16550_WITH_GAS 0x0012
+#define ACPI_DBG2_SDM845_7_372MHZ 0x0013
+#define ACPI_DBG2_INTEL_LPSS 0x0014
#define ACPI_DBG2_1394_STANDARD 0x0000
@@ -627,7 +920,8 @@
ACPI_DMAR_TYPE_ROOT_ATS = 2,
ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
ACPI_DMAR_TYPE_NAMESPACE = 4,
- ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
+ ACPI_DMAR_TYPE_SATC = 5,
+ ACPI_DMAR_TYPE_RESERVED = 6 /* 6 and greater are reserved */
};
@@ -742,6 +1036,18 @@
} ACPI_DMAR_ANDD;
+/* 5: SoC Integrated Address Translation Cache (SATC) */
+
+typedef struct acpi_dmar_satc
+{
+ ACPI_DMAR_HEADER Header;
+ UINT8 Flags;
+ UINT8 Reserved;
+ UINT16 Segment;
+
+} ACPI_DMAR_SATC
+
+;
/*******************************************************************************
*
* DRTM - Dynamic Root of Trust for Measurement table
@@ -1037,7 +1343,7 @@
enum AcpiErstCommandStatus
{
- ACPI_ERST_SUCESS = 0,
+ ACPI_ERST_SUCCESS = 0,
ACPI_ERST_NO_SPACE = 1,
ACPI_ERST_NOT_AVAILABLE = 2,
ACPI_ERST_FAILURE = 3,
@@ -1655,8 +1961,7 @@
/*******************************************************************************
*
- * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
- * Version 1
+ * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3)
*
******************************************************************************/
@@ -1698,7 +2003,7 @@
ACPI_HMAT_STRUCTURE Header;
UINT16 Flags;
UINT16 Reserved1;
- UINT32 ProcessorPD; /* Processor proximity domain */
+ UINT32 InitiatorPD; /* Attached Initiator proximity domain */
UINT32 MemoryPD; /* Memory proximity domain */
UINT32 Reserved2;
UINT64 Reserved3;
@@ -1708,9 +2013,7 @@
/* Masks for Flags field above */
-#define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: ProcessorPD field is valid */
-#define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: MemoryPD field is valid */
-#define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
+#define ACPI_HMAT_INITIATOR_PD_VALID (1) /* 1: InitiatorPD field is valid */
/* 1: System locality latency and bandwidth information */
@@ -1720,7 +2023,8 @@
ACPI_HMAT_STRUCTURE Header;
UINT8 Flags;
UINT8 DataType;
- UINT16 Reserved1;
+ UINT8 MinTransferSize;
+ UINT8 Reserved1;
UINT32 NumberOfInitiatorPDs;
UINT32 NumberOfTargetPDs;
UINT32 Reserved2;
@@ -1730,15 +2034,17 @@
/* Masks for Flags field above */
-#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F)
+#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */
-/* Values for Memory Hierarchy flag */
+/* Values for Memory Hierarchy flags */
#define ACPI_HMAT_MEMORY 0
-#define ACPI_HMAT_LAST_LEVEL_CACHE 1
-#define ACPI_HMAT_1ST_LEVEL_CACHE 2
-#define ACPI_HMAT_2ND_LEVEL_CACHE 3
-#define ACPI_HMAT_3RD_LEVEL_CACHE 4
+#define ACPI_HMAT_1ST_LEVEL_CACHE 1
+#define ACPI_HMAT_2ND_LEVEL_CACHE 2
+#define ACPI_HMAT_3RD_LEVEL_CACHE 3
+#define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */
+#define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */
+
/* Values for DataType field above */
diff --git a/source/include/actbl2.h b/source/include/actbl2.h
index f92e964..0bd0e16 100644
--- a/source/include/actbl2.h
+++ b/source/include/actbl2.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -56,6 +60,11 @@
* file. Useful because they make it more difficult to inadvertently type in
* the wrong signature.
*/
+#define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
+#define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */
+#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
+#define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */
+#define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
@@ -63,18 +72,22 @@
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
-#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
-#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
+#define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */
#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
#define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
+#define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */
#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
#define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
+#define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */
#define ACPI_SIG_RASF "RASF" /* RAS Feature table */
+#define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */
#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
+#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
+#define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */
/*
@@ -98,10 +111,334 @@
/*******************************************************************************
*
+ * AEST - Arm Error Source Table
+ *
+ * Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document
+ * September 2020.
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_aest
+{
+ ACPI_TABLE_HEADER Header;
+ void *NodeArray[];
+
+} ACPI_TABLE_AEST;
+
+/* Common Subtable header - one per Node Structure (Subtable) */
+
+typedef struct acpi_aest_hdr
+{
+ UINT8 Type;
+ UINT16 Length;
+ UINT8 Reserved;
+ UINT32 NodeSpecificOffset;
+ UINT32 NodeInterfaceOffset;
+ UINT32 NodeInterruptOffset;
+ UINT32 NodeInterruptCount;
+ UINT64 TimestampRate;
+ UINT64 Reserved1;
+ UINT64 ErrorInjectionRate;
+
+} ACPI_AEST_HEADER;
+
+/* Values for Type above */
+
+#define ACPI_AEST_PROCESSOR_ERROR_NODE 0
+#define ACPI_AEST_MEMORY_ERROR_NODE 1
+#define ACPI_AEST_SMMU_ERROR_NODE 2
+#define ACPI_AEST_VENDOR_ERROR_NODE 3
+#define ACPI_AEST_GIC_ERROR_NODE 4
+#define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */
+
+
+/*
+ * AEST subtables (Error nodes)
+ */
+
+/* 0: Processor Error */
+
+typedef struct acpi_aest_processor
+{
+ UINT32 ProcessorId;
+ UINT8 ResourceType;
+ UINT8 Reserved;
+ UINT8 Flags;
+ UINT8 Revision;
+ UINT64 ProcessorAffinity;
+
+} ACPI_AEST_PROCESSOR;
+
+/* Values for ResourceType above, related structs below */
+
+#define ACPI_AEST_CACHE_RESOURCE 0
+#define ACPI_AEST_TLB_RESOURCE 1
+#define ACPI_AEST_GENERIC_RESOURCE 2
+#define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */
+
+/* 0R: Processor Cache Resource Substructure */
+
+typedef struct acpi_aest_processor_cache
+{
+ UINT32 CacheReference;
+ UINT32 Reserved;
+
+} ACPI_AEST_PROCESSOR_CACHE;
+
+/* Values for CacheType above */
+
+#define ACPI_AEST_CACHE_DATA 0
+#define ACPI_AEST_CACHE_INSTRUCTION 1
+#define ACPI_AEST_CACHE_UNIFIED 2
+#define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */
+
+/* 1R: Processor TLB Resource Substructure */
+
+typedef struct acpi_aest_processor_tlb
+{
+ UINT32 TlbLevel;
+ UINT32 Reserved;
+
+} ACPI_AEST_PROCESSOR_TLB;
+
+/* 2R: Processor Generic Resource Substructure */
+
+typedef struct acpi_aest_processor_generic
+{
+ UINT32 Resource;
+
+} ACPI_AEST_PROCESSOR_GENERIC;
+
+/* 1: Memory Error */
+
+typedef struct acpi_aest_memory
+{
+ UINT32 SratProximityDomain;
+
+} ACPI_AEST_MEMORY;
+
+/* 2: Smmu Error */
+
+typedef struct acpi_aest_smmu
+{
+ UINT32 IortNodeReference;
+ UINT32 SubcomponentReference;
+
+} ACPI_AEST_SMMU;
+
+/* 3: Vendor Defined */
+
+typedef struct acpi_aest_vendor
+{
+ UINT32 AcpiHid;
+ UINT32 AcpiUid;
+ UINT8 VendorSpecificData[16];
+
+} ACPI_AEST_VENDOR;
+
+/* 4: Gic Error */
+
+typedef struct acpi_aest_gic
+{
+ UINT32 InterfaceType;
+ UINT32 InstanceId;
+
+} ACPI_AEST_GIC;
+
+/* Values for InterfaceType above */
+
+#define ACPI_AEST_GIC_CPU 0
+#define ACPI_AEST_GIC_DISTRIBUTOR 1
+#define ACPI_AEST_GIC_REDISTRIBUTOR 2
+#define ACPI_AEST_GIC_ITS 3
+#define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */
+
+
+/* Node Interface Structure */
+
+typedef struct acpi_aest_node_interface
+{
+ UINT8 Type;
+ UINT8 Reserved[3];
+ UINT32 Flags;
+ UINT64 Address;
+ UINT32 ErrorRecordIndex;
+ UINT32 ErrorRecordCount;
+ UINT64 ErrorRecordImplemented;
+ UINT64 ErrorStatusReporting;
+ UINT64 AddressingMode;
+
+} ACPI_AEST_NODE_INTERFACE;
+
+/* Values for Type field above */
+
+#define ACPI_AEST_NODE_SYSTEM_REGISTER 0
+#define ACPI_AEST_NODE_MEMORY_MAPPED 1
+#define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */
+
+/* Node Interrupt Structure */
+
+typedef struct acpi_aest_node_interrupt
+{
+ UINT8 Type;
+ UINT8 Reserved[2];
+ UINT8 Flags;
+ UINT32 Gsiv;
+ UINT8 IortId;
+ UINT8 Reserved1[3];
+
+} ACPI_AEST_NODE_INTERRUPT;
+
+/* Values for Type field above */
+
+#define ACPI_AEST_NODE_FAULT_HANDLING 0
+#define ACPI_AEST_NODE_ERROR_RECOVERY 1
+#define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */
+
+
+/*******************************************************************************
+ * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
+ *
+ * Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
+ * ARM DEN0093 v1.1
+ *
+ ******************************************************************************/
+typedef struct acpi_table_agdi
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 Flags;
+ UINT8 Reserved[3];
+ UINT32 SdeiEvent;
+ UINT32 Gsiv;
+
+} ACPI_TABLE_AGDI;
+
+/* Mask for Flags field above */
+
+#define ACPI_AGDI_SIGNALING_MODE (1)
+
+
+/*******************************************************************************
+ *
+ * APMT - ARM Performance Monitoring Unit Table
+ *
+ * Conforms to:
+ * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
+ * ARM DEN0117 v1.0 November 25, 2021
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_apmt {
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+} ACPI_TABLE_APMT;
+
+#define ACPI_APMT_NODE_ID_LENGTH 4
+
+/*
+ * APMT subtables
+ */
+typedef struct acpi_apmt_node {
+ UINT16 Length;
+ UINT8 Flags;
+ UINT8 Type;
+ UINT32 Id;
+ UINT64 InstPrimary;
+ UINT32 InstSecondary;
+ UINT64 BaseAddress0;
+ UINT64 BaseAddress1;
+ UINT32 OvflwIrq;
+ UINT32 Reserved;
+ UINT32 OvflwIrqFlags;
+ UINT32 ProcAffinity;
+ UINT32 ImplId;
+} ACPI_APMT_NODE;
+
+/* Masks for Flags field above */
+
+#define ACPI_APMT_FLAGS_DUAL_PAGE (1<<0)
+#define ACPI_APMT_FLAGS_AFFINITY (1<<1)
+#define ACPI_APMT_FLAGS_ATOMIC (1<<2)
+
+/* Values for Flags dual page field above */
+
+#define ACPI_APMT_FLAGS_DUAL_PAGE_NSUPP (0<<0)
+#define ACPI_APMT_FLAGS_DUAL_PAGE_SUPP (1<<0)
+
+/* Values for Flags processor affinity field above */
+#define ACPI_APMT_FLAGS_AFFINITY_PROC (0<<1)
+#define ACPI_APMT_FLAGS_AFFINITY_PROC_CONTAINER (1<<1)
+
+/* Values for Flags 64-bit atomic field above */
+#define ACPI_APMT_FLAGS_ATOMIC_NSUPP (0<<2)
+#define ACPI_APMT_FLAGS_ATOMIC_SUPP (1<<2)
+
+/* Values for Type field above */
+
+enum acpi_apmt_node_type {
+ ACPI_APMT_NODE_TYPE_MC = 0x00,
+ ACPI_APMT_NODE_TYPE_SMMU = 0x01,
+ ACPI_APMT_NODE_TYPE_PCIE_ROOT = 0x02,
+ ACPI_APMT_NODE_TYPE_ACPI = 0x03,
+ ACPI_APMT_NODE_TYPE_CACHE = 0x04,
+ ACPI_APMT_NODE_TYPE_COUNT
+};
+
+/* Masks for ovflw_irq_flags field above */
+
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE (1<<0)
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE (1<<1)
+
+/* Values for ovflw_irq_flags mode field above */
+
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_LEVEL (0<<0)
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_EDGE (1<<0)
+
+/* Values for ovflw_irq_flags type field above */
+
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE_WIRED (0<<1)
+
+
+/*******************************************************************************
+ *
+ * BDAT - BIOS Data ACPI Table
+ *
+ * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5
+ * Nov 2020
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_bdat
+{
+ ACPI_TABLE_HEADER Header;
+ ACPI_GENERIC_ADDRESS Gas;
+
+} ACPI_TABLE_BDAT;
+
+/*******************************************************************************
+ *
+ * CCEL - CC-Event Log
+ * From: "Guest-Host-Communication Interface (GHCI) for Intel
+ * Trust Domain Extensions (Intel TDX)". Feb 2022
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_ccel
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 CCType;
+ UINT8 CCSubType;
+ UINT16 Reserved;
+ UINT64 LogAreaMinimumLength;
+ UINT64 LogAreaStartAddress;
+
+} ACPI_TABLE_CCEL;
+
+/*******************************************************************************
+ *
* IORT - IO Remapping Table
*
* Conforms to "IO Remapping Table System Software on ARM Platforms",
- * Document number: ARM DEN 0049D, March 2018
+ * Document number: ARM DEN 0049E.e, Sep 2022
*
******************************************************************************/
@@ -123,7 +460,7 @@
UINT8 Type;
UINT16 Length;
UINT8 Revision;
- UINT32 Reserved;
+ UINT32 Identifier;
UINT32 MappingCount;
UINT32 MappingOffset;
char NodeData[1];
@@ -139,7 +476,8 @@
ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
ACPI_IORT_NODE_SMMU = 0x03,
ACPI_IORT_NODE_SMMU_V3 = 0x04,
- ACPI_IORT_NODE_PMCG = 0x05
+ ACPI_IORT_NODE_PMCG = 0x05,
+ ACPI_IORT_NODE_RMR = 0x06,
};
@@ -216,15 +554,19 @@
UINT32 AtsAttribute;
UINT32 PciSegmentNumber;
UINT8 MemoryAddressLimit; /* Memory address size limit */
- UINT8 Reserved[3]; /* Reserved, must be zero */
+ UINT16 PasidCapabilities; /* PASID Capabilities */
+ UINT8 Reserved[1]; /* Reserved, must be zero */
} ACPI_IORT_ROOT_COMPLEX;
-/* Values for AtsAttribute field above */
+/* Masks for AtsAttribute field above */
-#define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
-#define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
+#define ACPI_IORT_ATS_SUPPORTED (1) /* The root complex ATS support */
+#define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */
+#define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */
+/* Masks for PasidCapabilities field above */
+#define ACPI_IORT_PASID_MAX_WIDTH (0x1F) /* Bits 0-4 */
typedef struct acpi_iort_smmu
{
@@ -294,6 +636,7 @@
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
+#define ACPI_IORT_SMMU_V3_DEVICEID_VALID (1<<4)
typedef struct acpi_iort_pmcg
{
@@ -304,6 +647,38 @@
} ACPI_IORT_PMCG;
+typedef struct acpi_iort_rmr {
+ UINT32 Flags;
+ UINT32 RmrCount;
+ UINT32 RmrOffset;
+
+} ACPI_IORT_RMR;
+
+/* Masks for Flags field above */
+#define ACPI_IORT_RMR_REMAP_PERMITTED (1)
+#define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1<<1)
+
+/*
+ * Macro to access the Access Attributes in flags field above:
+ * Access Attributes is encoded in bits 9:2
+ */
+#define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF)
+
+/* Values for above Access Attributes */
+
+#define ACPI_IORT_RMR_ATTR_DEVICE_NGNRNE 0x00
+#define ACPI_IORT_RMR_ATTR_DEVICE_NGNRE 0x01
+#define ACPI_IORT_RMR_ATTR_DEVICE_NGRE 0x02
+#define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03
+#define ACPI_IORT_RMR_ATTR_NORMAL_NC 0x04
+#define ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB 0x05
+
+typedef struct acpi_iort_rmr_desc {
+ UINT64 BaseAddress;
+ UINT64 Length;
+ UINT32 Reserved;
+
+} ACPI_IORT_RMR_DESC;
/*******************************************************************************
*
@@ -345,7 +720,9 @@
enum AcpiIvrsType
{
- ACPI_IVRS_TYPE_HARDWARE = 0x10,
+ ACPI_IVRS_TYPE_HARDWARE1 = 0x10,
+ ACPI_IVRS_TYPE_HARDWARE2 = 0x11,
+ ACPI_IVRS_TYPE_HARDWARE3 = 0x40,
ACPI_IVRS_TYPE_MEMORY1 = 0x20,
ACPI_IVRS_TYPE_MEMORY2 = 0x21,
ACPI_IVRS_TYPE_MEMORY3 = 0x22
@@ -373,16 +750,30 @@
/* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
-typedef struct acpi_ivrs_hardware
+typedef struct acpi_ivrs_hardware_10
{
ACPI_IVRS_HEADER Header;
UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
UINT64 BaseAddress; /* IOMMU control registers */
UINT16 PciSegmentGroup;
UINT16 Info; /* MSI number and unit ID */
- UINT32 Reserved;
+ UINT32 FeatureReporting;
-} ACPI_IVRS_HARDWARE;
+} ACPI_IVRS_HARDWARE1;
+
+/* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */
+
+typedef struct acpi_ivrs_hardware_11
+{
+ ACPI_IVRS_HEADER Header;
+ UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
+ UINT64 BaseAddress; /* IOMMU control registers */
+ UINT16 PciSegmentGroup;
+ UINT16 Info; /* MSI number and unit ID */
+ UINT32 Attributes;
+ UINT64 EfrRegisterImage;
+ UINT64 Reserved;
+} ACPI_IVRS_HARDWARE2;
/* Masks for Info field above */
@@ -428,7 +819,11 @@
ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
- ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
+ ACPI_IVRS_TYPE_SPECIAL = 72, /* Uses ACPI_IVRS_DEVICE8C */
+
+ /* Variable-length device entries */
+
+ ACPI_IVRS_TYPE_HID = 240 /* Uses ACPI_IVRS_DEVICE_HID */
};
/* Values for Data field above */
@@ -489,6 +884,23 @@
#define ACPI_IVHD_IOAPIC 1
#define ACPI_IVHD_HPET 2
+/* Type 240: variable-length device entry */
+
+typedef struct acpi_ivrs_device_hid
+{
+ ACPI_IVRS_DE_HEADER Header;
+ UINT64 AcpiHid;
+ UINT64 AcpiCid;
+ UINT8 UidType;
+ UINT8 UidLength;
+
+} ACPI_IVRS_DEVICE_HID;
+
+/* Values for UidType above */
+
+#define ACPI_IVRS_UID_NOT_PRESENT 0
+#define ACPI_IVRS_UID_IS_INTEGER 1
+#define ACPI_IVRS_UID_IS_STRING 2
/* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
@@ -606,7 +1018,16 @@
ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
- ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */
+ ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
+ ACPI_MADT_TYPE_CORE_PIC = 17,
+ ACPI_MADT_TYPE_LIO_PIC = 18,
+ ACPI_MADT_TYPE_HT_PIC = 19,
+ ACPI_MADT_TYPE_EIO_PIC = 20,
+ ACPI_MADT_TYPE_MSI_PIC = 21,
+ ACPI_MADT_TYPE_BIO_PIC = 22,
+ ACPI_MADT_TYPE_LPC_PIC = 23,
+ ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */
+ ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */
};
@@ -862,6 +1283,168 @@
} ACPI_MADT_GENERIC_TRANSLATOR;
+/* 16: Multiprocessor wakeup (ACPI 6.4) */
+
+typedef struct acpi_madt_multiproc_wakeup
+{
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 MailboxVersion;
+ UINT32 Reserved; /* reserved - must be zero */
+ UINT64 BaseAddress;
+
+} ACPI_MADT_MULTIPROC_WAKEUP;
+
+#define ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE 2032
+#define ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE 2048
+
+typedef struct acpi_madt_multiproc_wakeup_mailbox
+{
+ UINT16 Command;
+ UINT16 Reserved; /* reserved - must be zero */
+ UINT32 ApicId;
+ UINT64 WakeupVector;
+ UINT8 ReservedOs[ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE]; /* reserved for OS use */
+ UINT8 ReservedFirmware[ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE]; /* reserved for firmware use */
+
+} ACPI_MADT_MULTIPROC_WAKEUP_MAILBOX;
+
+#define ACPI_MP_WAKE_COMMAND_WAKEUP 1
+
+/* 17: CPU Core Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_core_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT32 ProcessorId;
+ UINT32 CoreId;
+ UINT32 Flags;
+} ACPI_MADT_CORE_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtCorePicVersion {
+ ACPI_MADT_CORE_PIC_VERSION_NONE = 0,
+ ACPI_MADT_CORE_PIC_VERSION_V1 = 1,
+ ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 18: Legacy I/O Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_lio_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT64 Address;
+ UINT16 Size;
+ UINT8 Cascade[2];
+ UINT32 CascadeMap[2];
+} ACPI_MADT_LIO_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtLioPicVersion {
+ ACPI_MADT_LIO_PIC_VERSION_NONE = 0,
+ ACPI_MADT_LIO_PIC_VERSION_V1 = 1,
+ ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 19: HT Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_ht_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT64 Address;
+ UINT16 Size;
+ UINT8 Cascade[8];
+} ACPI_MADT_HT_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtHtPicVersion {
+ ACPI_MADT_HT_PIC_VERSION_NONE = 0,
+ ACPI_MADT_HT_PIC_VERSION_V1 = 1,
+ ACPI_MADT_HT_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 20: Extend I/O Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_eio_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT8 Cascade;
+ UINT8 Node;
+ UINT64 NodeMap;
+} ACPI_MADT_EIO_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtEioPicVersion {
+ ACPI_MADT_EIO_PIC_VERSION_NONE = 0,
+ ACPI_MADT_EIO_PIC_VERSION_V1 = 1,
+ ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 21: MSI Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_msi_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT64 MsgAddress;
+ UINT32 Start;
+ UINT32 Count;
+} ACPI_MADT_MSI_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtMsiPicVersion {
+ ACPI_MADT_MSI_PIC_VERSION_NONE = 0,
+ ACPI_MADT_MSI_PIC_VERSION_V1 = 1,
+ ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 22: Bridge I/O Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_bio_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT64 Address;
+ UINT16 Size;
+ UINT16 Id;
+ UINT16 GsiBase;
+} ACPI_MADT_BIO_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtBioPicVersion {
+ ACPI_MADT_BIO_PIC_VERSION_NONE = 0,
+ ACPI_MADT_BIO_PIC_VERSION_V1 = 1,
+ ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 23: LPC Interrupt Controller (ACPI 6.5) */
+
+typedef struct acpi_madt_lpc_pic {
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Version;
+ UINT64 Address;
+ UINT16 Size;
+ UINT8 Cascade;
+} ACPI_MADT_LPC_PIC;
+
+/* Values for Version field above */
+
+enum AcpiMadtLpcPicVersion {
+ ACPI_MADT_LPC_PIC_VERSION_NONE = 0,
+ ACPI_MADT_LPC_PIC_VERSION_V1 = 1,
+ ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+/* 80: OEM data */
+
+typedef struct acpi_madt_oem_data
+{
+ UINT8 OemData[0];
+} ACPI_MADT_OEM_DATA;
+
/*
* Common flags fields for MADT subtables
@@ -870,6 +1453,7 @@
/* MADT Local APIC flags */
#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
+#define ACPI_MADT_ONLINE_CAPABLE (2) /* 01: System HW supports enabling processor at runtime */
/* MADT MPS INTI flags (IntiFlags) */
@@ -1118,34 +1702,6 @@
/*******************************************************************************
*
- * MTMR - MID Timer Table
- * Version 1
- *
- * Conforms to "Simple Firmware Interface Specification",
- * Draft 0.8.2, Oct 19, 2010
- * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
- *
- ******************************************************************************/
-
-typedef struct acpi_table_mtmr
-{
- ACPI_TABLE_HEADER Header; /* Common ACPI table header */
-
-} ACPI_TABLE_MTMR;
-
-/* MTMR entry */
-
-typedef struct acpi_mtmr_entry
-{
- ACPI_GENERIC_ADDRESS PhysicalAddress;
- UINT32 Frequency;
- UINT32 Irq;
-
-} ACPI_MTMR_ENTRY;
-
-
-/*******************************************************************************
- *
* NFIT - NVDIMM Interface Table (ACPI 6.0+)
* Version 1
*
@@ -1200,6 +1756,7 @@
UINT64 Address;
UINT64 Length;
UINT64 MemoryMapping;
+ UINT64 LocationCookie; /* ACPI 6.4 */
} ACPI_NFIT_SYSTEM_ADDRESS;
@@ -1207,6 +1764,7 @@
#define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
#define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
+#define ACPI_NFIT_LOCATION_COOKIE_VALID (1<<2) /* 02: SPA location cookie valid (ACPI 6.4) */
/* Range Type GUIDs appear in the include/acuuid.h file */
@@ -1404,6 +1962,323 @@
/*******************************************************************************
*
+ * NHLT - Non HD Audio Link Table
+ *
+ * Conforms to: Intel Smart Sound Technology NHLT Specification
+ * Version 0.8.1, January 2020.
+ *
+ ******************************************************************************/
+
+/* Main table */
+
+typedef struct acpi_table_nhlt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 EndpointCount;
+
+} ACPI_TABLE_NHLT;
+
+typedef struct acpi_table_nhlt_endpoint_count
+{
+ UINT8 EndpointCount;
+
+} ACPI_TABLE_NHLT_ENDPOINT_COUNT;
+
+typedef struct acpi_nhlt_endpoint
+{
+ UINT32 DescriptorLength;
+ UINT8 LinkType;
+ UINT8 InstanceId;
+ UINT16 VendorId;
+ UINT16 DeviceId;
+ UINT16 RevisionId;
+ UINT32 SubsystemId;
+ UINT8 DeviceType;
+ UINT8 Direction;
+ UINT8 VirtualBusId;
+
+} ACPI_NHLT_ENDPOINT;
+
+/* Types for LinkType field above */
+
+#define ACPI_NHLT_RESERVED_HD_AUDIO 0
+#define ACPI_NHLT_RESERVED_DSP 1
+#define ACPI_NHLT_PDM 2
+#define ACPI_NHLT_SSP 3
+#define ACPI_NHLT_RESERVED_SLIMBUS 4
+#define ACPI_NHLT_RESERVED_SOUNDWIRE 5
+#define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */
+
+/* All other values above are reserved */
+
+/* Values for DeviceId field above */
+
+#define ACPI_NHLT_PDM_DMIC 0xAE20
+#define ACPI_NHLT_BT_SIDEBAND 0xAE30
+#define ACPI_NHLT_I2S_TDM_CODECS 0xAE23
+
+/* Values for DeviceType field above */
+
+/* SSP Link */
+
+#define ACPI_NHLT_LINK_BT_SIDEBAND 0
+#define ACPI_NHLT_LINK_FM 1
+#define ACPI_NHLT_LINK_MODEM 2
+/* 3 is reserved */
+#define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4
+
+/* PDM Link */
+
+#define ACPI_NHLT_PDM_ON_CAVS_1P8 0
+#define ACPI_NHLT_PDM_ON_CAVS_1P5 1
+
+/* Values for Direction field above */
+
+#define ACPI_NHLT_DIR_RENDER 0
+#define ACPI_NHLT_DIR_CAPTURE 1
+#define ACPI_NHLT_DIR_RENDER_LOOPBACK 2
+#define ACPI_NHLT_DIR_RENDER_FEEDBACK 3
+#define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */
+
+/* Capabilities = 2 */
+
+typedef struct acpi_nhlt_device_specific_config
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG;
+
+/* Capabilities = 3 */
+
+typedef struct acpi_nhlt_device_specific_config_a
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+ UINT8 ArrayType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A;
+
+/* Capabilities = 3 */
+
+typedef struct acpi_nhlt_device_specific_config_d
+{
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+ UINT8 ArrayType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D;
+
+/* Values for Config Type above */
+
+#define ACPI_NHLT_CONFIG_TYPE_GENERIC 0x00
+#define ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY 0x01
+#define ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK 0x03
+#define ACPI_NHLT_CONFIG_TYPE_RESERVED 0x04 /* 4 and above are reserved */
+
+/* Capabilities = 0 */
+
+typedef struct acpi_nhlt_device_specific_config_b
+{
+ UINT32 CapabilitiesSize;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B;
+
+/* Capabilities = 1 */
+
+typedef struct acpi_nhlt_device_specific_config_c
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C;
+
+typedef struct acpi_nhlt_render_device_specific_config
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+
+} ACPI_NHLT_RENDER_DEVICE_SPECIFIC_CONFIG;
+
+typedef struct acpi_nhlt_wave_extensible
+{
+ UINT16 FormatTag;
+ UINT16 ChannelCount;
+ UINT32 SamplesPerSec;
+ UINT32 AvgBytesPerSec;
+ UINT16 BlockAlign;
+ UINT16 BitsPerSample;
+ UINT16 ExtraFormatSize;
+ UINT16 ValidBitsPerSample;
+ UINT32 ChannelMask;
+ UINT8 SubFormatGuid[16];
+
+} ACPI_NHLT_WAVE_EXTENSIBLE;
+
+/* Values for ChannelMask above */
+
+#define ACPI_NHLT_SPKR_FRONT_LEFT 0x1
+#define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2
+#define ACPI_NHLT_SPKR_FRONT_CENTER 0x4
+#define ACPI_NHLT_SPKR_LOW_FREQ 0x8
+#define ACPI_NHLT_SPKR_BACK_LEFT 0x10
+#define ACPI_NHLT_SPKR_BACK_RIGHT 0x20
+#define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40
+#define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80
+#define ACPI_NHLT_SPKR_BACK_CENTER 0x100
+#define ACPI_NHLT_SPKR_SIDE_LEFT 0x200
+#define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400
+#define ACPI_NHLT_SPKR_TOP_CENTER 0x800
+#define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000
+#define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000
+#define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000
+#define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000
+#define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000
+#define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000
+
+typedef struct acpi_nhlt_format_config
+{
+ ACPI_NHLT_WAVE_EXTENSIBLE Format;
+ UINT32 CapabilitySize;
+ UINT8 Capabilities[];
+
+} ACPI_NHLT_FORMAT_CONFIG;
+
+typedef struct acpi_nhlt_formats_config
+{
+ UINT8 FormatsCount;
+
+} ACPI_NHLT_FORMATS_CONFIG;
+
+typedef struct acpi_nhlt_device_specific_hdr
+{
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_HDR;
+
+/* Types for ConfigType above */
+
+#define ACPI_NHLT_GENERIC 0
+#define ACPI_NHLT_MIC 1
+#define ACPI_NHLT_RENDER 3
+
+typedef struct acpi_nhlt_mic_device_specific_config
+{
+ ACPI_NHLT_DEVICE_SPECIFIC_HDR DeviceConfig;
+ UINT8 ArrayTypeExt;
+
+} ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG;
+
+/* Values for ArrayTypeExt above */
+
+#define ACPI_NHLT_ARRAY_TYPE_RESERVED 0x09 /* 9 and below are reserved */
+#define ACPI_NHLT_SMALL_LINEAR_2ELEMENT 0x0A
+#define ACPI_NHLT_BIG_LINEAR_2ELEMENT 0x0B
+#define ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C
+#define ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT 0x0D
+#define ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E
+#define ACPI_NHLT_VENDOR_DEFINED 0x0F
+#define ACPI_NHLT_ARRAY_TYPE_MASK 0x0F
+#define ACPI_NHLT_ARRAY_TYPE_EXT_MASK 0x10
+
+#define ACPI_NHLT_NO_EXTENSION 0x0
+#define ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT (1<<4)
+
+typedef struct acpi_nhlt_vendor_mic_count
+{
+ UINT8 MicrophoneCount;
+
+} ACPI_NHLT_VENDOR_MIC_COUNT;
+
+typedef struct acpi_nhlt_vendor_mic_config
+{
+ UINT8 Type;
+ UINT8 Panel;
+ UINT16 SpeakerPositionDistance; /* mm */
+ UINT16 HorizontalOffset; /* mm */
+ UINT16 VerticalOffset; /* mm */
+ UINT8 FrequencyLowBand; /* 5*Hz */
+ UINT8 FrequencyHighBand; /* 500*Hz */
+ UINT16 DirectionAngle; /* -180 - + 180 */
+ UINT16 ElevationAngle; /* -180 - + 180 */
+ UINT16 WorkVerticalAngleBegin; /* -180 - + 180 with 2 deg step */
+ UINT16 WorkVerticalAngleEnd; /* -180 - + 180 with 2 deg step */
+ UINT16 WorkHorizontalAngleBegin; /* -180 - + 180 with 2 deg step */
+ UINT16 WorkHorizontalAngleEnd; /* -180 - + 180 with 2 deg step */
+
+} ACPI_NHLT_VENDOR_MIC_CONFIG;
+
+/* Values for Type field above */
+
+#define ACPI_NHLT_MIC_OMNIDIRECTIONAL 0
+#define ACPI_NHLT_MIC_SUBCARDIOID 1
+#define ACPI_NHLT_MIC_CARDIOID 2
+#define ACPI_NHLT_MIC_SUPER_CARDIOID 3
+#define ACPI_NHLT_MIC_HYPER_CARDIOID 4
+#define ACPI_NHLT_MIC_8_SHAPED 5
+#define ACPI_NHLT_MIC_RESERVED6 6 /* 6 is reserved */
+#define ACPI_NHLT_MIC_VENDOR_DEFINED 7
+#define ACPI_NHLT_MIC_RESERVED 8 /* 8 and above are reserved */
+
+/* Values for Panel field above */
+
+#define ACPI_NHLT_MIC_POSITION_TOP 0
+#define ACPI_NHLT_MIC_POSITION_BOTTOM 1
+#define ACPI_NHLT_MIC_POSITION_LEFT 2
+#define ACPI_NHLT_MIC_POSITION_RIGHT 3
+#define ACPI_NHLT_MIC_POSITION_FRONT 4
+#define ACPI_NHLT_MIC_POSITION_BACK 5
+#define ACPI_NHLT_MIC_POSITION_RESERVED 6 /* 6 and above are reserved */
+
+typedef struct acpi_nhlt_vendor_mic_device_specific_config
+{
+ ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG MicArrayDeviceConfig;
+ UINT8 NumberOfMicrophones;
+ ACPI_NHLT_VENDOR_MIC_CONFIG MicConfig[]; /* Indexed by NumberOfMicrophones */
+
+} ACPI_NHLT_VENDOR_MIC_DEVICE_SPECIFIC_CONFIG;
+
+/* Microphone SNR and Sensitivity extension */
+
+typedef struct acpi_nhlt_mic_snr_sensitivity_extension
+{
+ UINT32 SNR;
+ UINT32 Sensitivity;
+
+} ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION;
+
+/* Render device with feedback */
+
+typedef struct acpi_nhlt_render_feedback_device_specific_config
+{
+ UINT8 FeedbackVirtualSlot; /* Render slot in case of capture */
+ UINT16 FeedbackChannels; /* Informative only */
+ UINT16 FeedbackValidBitsPerSample;
+
+} ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG;
+
+/* Non documented structures */
+
+typedef struct acpi_nhlt_device_info_count
+{
+ UINT8 StructureCount;
+
+} ACPI_NHLT_DEVICE_INFO_COUNT;
+
+typedef struct acpi_nhlt_device_info
+{
+ UINT8 DeviceId[16];
+ UINT8 DeviceInstanceId;
+ UINT8 DevicePortId;
+
+} ACPI_NHLT_DEVICE_INFO;
+
+
+/*******************************************************************************
+ *
* PCCT - Platform Communications Channel Table (ACPI 5.0)
* Version 2 (ACPI 6.2)
*
@@ -1430,7 +2305,8 @@
ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */
ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */
- ACPI_PCCT_TYPE_RESERVED = 5 /* 5 and greater are reserved */
+ ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE = 5, /* ACPI 6.4 */
+ ACPI_PCCT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
};
/*
@@ -1559,6 +2435,26 @@
} ACPI_PCCT_EXT_PCC_SLAVE;
+/* 5: HW Registers based Communications Subspace */
+
+typedef struct acpi_pcct_hw_reg
+{
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 Version;
+ UINT64 BaseAddress;
+ UINT64 Length;
+ ACPI_GENERIC_ADDRESS DoorbellRegister;
+ UINT64 DoorbellPreserve;
+ UINT64 DoorbellWrite;
+ ACPI_GENERIC_ADDRESS CmdCompleteRegister;
+ UINT64 CmdCompleteMask;
+ ACPI_GENERIC_ADDRESS ErrorStatusRegister;
+ UINT64 ErrorStatusMask;
+ UINT32 NominalLatency;
+ UINT32 MinTurnaroundTime;
+
+} ACPI_PCCT_HW_REG;
+
/* Values for doorbell flags above */
@@ -1631,6 +2527,79 @@
/*******************************************************************************
*
+ * PHAT - Platform Health Assessment Table (ACPI 6.4)
+ * Version 1
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_phat
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_PHAT;
+
+/* Common header for PHAT subtables that follow main table */
+
+typedef struct acpi_phat_header
+{
+ UINT16 Type;
+ UINT16 Length;
+ UINT8 Revision;
+
+} ACPI_PHAT_HEADER;
+
+
+/* Values for Type field above */
+
+#define ACPI_PHAT_TYPE_FW_VERSION_DATA 0
+#define ACPI_PHAT_TYPE_FW_HEALTH_DATA 1
+#define ACPI_PHAT_TYPE_RESERVED 2 /* 0x02-0xFFFF are reserved */
+
+/*
+ * PHAT subtables, correspond to Type in ACPI_PHAT_HEADER
+ */
+
+/* 0: Firmware Version Data Record */
+
+typedef struct acpi_phat_version_data
+{
+ ACPI_PHAT_HEADER Header;
+ UINT8 Reserved[3];
+ UINT32 ElementCount;
+
+} ACPI_PHAT_VERSION_DATA;
+
+typedef struct acpi_phat_version_element
+{
+ UINT8 Guid[16];
+ UINT64 VersionValue;
+ UINT32 ProducerId;
+
+} ACPI_PHAT_VERSION_ELEMENT;
+
+
+/* 1: Firmware Health Data Record */
+
+typedef struct acpi_phat_health_data
+{
+ ACPI_PHAT_HEADER Header;
+ UINT8 Reserved[2];
+ UINT8 Health;
+ UINT8 DeviceGuid[16];
+ UINT32 DeviceSpecificOffset; /* Zero if no Device-specific data */
+
+} ACPI_PHAT_HEALTH_DATA;
+
+/* Values for Health field above */
+
+#define ACPI_PHAT_ERRORS_FOUND 0
+#define ACPI_PHAT_NO_ERRORS 1
+#define ACPI_PHAT_UNKNOWN_ERRORS 2
+#define ACPI_PHAT_ADVISORY 3
+
+
+/*******************************************************************************
+ *
* PMTT - Platform Memory Topology Table (ACPI 5.0)
* Version 1
*
@@ -1639,7 +2608,11 @@
typedef struct acpi_table_pmtt
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
- UINT32 Reserved;
+ UINT32 MemoryDeviceCount;
+ /*
+ * Immediately followed by:
+ * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
+ */
} ACPI_TABLE_PMTT;
@@ -1653,6 +2626,12 @@
UINT16 Length;
UINT16 Flags;
UINT16 Reserved2;
+ UINT32 MemoryDeviceCount; /* Zero means no memory device structs follow */
+ /*
+ * Immediately followed by:
+ * UINT8 TypeSpecificData[]
+ * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
+ */
} ACPI_PMTT_HEADER;
@@ -1661,7 +2640,8 @@
#define ACPI_PMTT_TYPE_SOCKET 0
#define ACPI_PMTT_TYPE_CONTROLLER 1
#define ACPI_PMTT_TYPE_DIMM 2
-#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
+#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFE are reserved */
+#define ACPI_PMTT_TYPE_VENDOR 0xFF
/* Values for Flags field above */
@@ -1684,6 +2664,10 @@
UINT16 Reserved;
} ACPI_PMTT_SOCKET;
+ /*
+ * Immediately followed by:
+ * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
+ */
/* 1: Memory Controller subtable */
@@ -1691,24 +2675,14 @@
typedef struct acpi_pmtt_controller
{
ACPI_PMTT_HEADER Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 AccessWidth;
- UINT16 Alignment;
+ UINT16 ControllerId;
UINT16 Reserved;
- UINT16 DomainCount;
} ACPI_PMTT_CONTROLLER;
-
-/* 1a: Proximity Domain substructure */
-
-typedef struct acpi_pmtt_domain
-{
- UINT32 ProximityDomain;
-
-} ACPI_PMTT_DOMAIN;
+ /*
+ * Immediately followed by:
+ * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
+ */
/* 2: Physical Component Identifier (DIMM) */
@@ -1716,14 +2690,27 @@
typedef struct acpi_pmtt_physical_component
{
ACPI_PMTT_HEADER Header;
- UINT16 ComponentId;
- UINT16 Reserved;
- UINT32 MemorySize;
UINT32 BiosHandle;
} ACPI_PMTT_PHYSICAL_COMPONENT;
+/* 0xFF: Vendor Specific Data */
+
+typedef struct acpi_pmtt_vendor_specific
+{
+ ACPI_PMTT_HEADER Header;
+ UINT8 TypeUuid[16];
+ UINT8 Specific[];
+ /*
+ * Immediately followed by:
+ * UINT8 VendorSpecificData[];
+ * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
+ */
+
+} ACPI_PMTT_VENDOR_SPECIFIC;
+
+
/*******************************************************************************
*
* PPTT - Processor Properties Topology Table (ACPI 6.2)
@@ -1786,6 +2773,15 @@
} ACPI_PPTT_CACHE;
+/* 1: Cache Type Structure for PPTT version 3 */
+
+typedef struct acpi_pptt_cache_v1
+{
+ UINT32 CacheId;
+
+} ACPI_PPTT_CACHE_V1;
+
+
/* Flags */
#define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */
@@ -1795,6 +2791,7 @@
#define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */
#define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */
#define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */
+#define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */
/* Masks for Attributes */
@@ -1834,6 +2831,59 @@
/*******************************************************************************
*
+ * PRMT - Platform Runtime Mechanism Table
+ * Version 1
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_prmt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_PRMT;
+
+typedef struct acpi_table_prmt_header
+{
+ UINT8 PlatformGuid[16];
+ UINT32 ModuleInfoOffset;
+ UINT32 ModuleInfoCount;
+
+} ACPI_TABLE_PRMT_HEADER;
+
+typedef struct acpi_prmt_module_header
+{
+ UINT16 Revision;
+ UINT16 Length;
+
+} ACPI_PRMT_MODULE_HEADER;
+
+typedef struct acpi_prmt_module_info
+{
+ UINT16 Revision;
+ UINT16 Length;
+ UINT8 ModuleGuid[16];
+ UINT16 MajorRev;
+ UINT16 MinorRev;
+ UINT16 HandlerInfoCount;
+ UINT32 HandlerInfoOffset;
+ UINT64 MmioListPointer;
+
+} ACPI_PRMT_MODULE_INFO;
+
+typedef struct acpi_prmt_handler_info
+{
+ UINT16 Revision;
+ UINT16 Length;
+ UINT8 HandlerGuid[16];
+ UINT64 HandlerAddress;
+ UINT64 StaticDataBufferAddress;
+ UINT64 AcpiParamBufferAddress;
+
+} ACPI_PRMT_HANDLER_INFO;
+
+
+/*******************************************************************************
+ *
* RASF - RAS Feature Table (ACPI 5.0)
* Version 1
*
@@ -1943,6 +2993,36 @@
/*******************************************************************************
*
+ * RGRT - Regulatory Graphics Resource Table
+ * Version 1
+ *
+ * Conforms to "ACPI RGRT" available at:
+ * https://microsoft.github.io/mu/dyn/mu_plus/MsCorePkg/AcpiRGRT/feature_acpi_rgrt/
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_rgrt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT16 Version;
+ UINT8 ImageType;
+ UINT8 Reserved;
+ UINT8 Image[];
+
+} ACPI_TABLE_RGRT;
+
+/* ImageType values */
+
+enum AcpiRgrtImageType
+{
+ ACPI_RGRT_TYPE_RESERVED0 = 0,
+ ACPI_RGRT_IMAGE_TYPE_PNG = 1,
+ ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+
+/*******************************************************************************
+ *
* SBST - Smart Battery Specification Table
* Version 1
*
@@ -2009,6 +3089,7 @@
/* Values for flags above */
#define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1)
+#define ACPI_SDEV_SECURE_COMPONENTS_PRESENT (1<<1)
/*
* SDEV subtables
@@ -2026,6 +3107,58 @@
} ACPI_SDEV_NAMESPACE;
+typedef struct acpi_sdev_secure_component
+{
+ UINT16 SecureComponentOffset;
+ UINT16 SecureComponentLength;
+
+} ACPI_SDEV_SECURE_COMPONENT;
+
+
+/*
+ * SDEV sub-subtables ("Components") for above
+ */
+typedef struct acpi_sdev_component
+{
+ ACPI_SDEV_HEADER Header;
+
+} ACPI_SDEV_COMPONENT;
+
+
+/* Values for sub-subtable type above */
+
+enum AcpiSacType
+{
+ ACPI_SDEV_TYPE_ID_COMPONENT = 0,
+ ACPI_SDEV_TYPE_MEM_COMPONENT = 1
+};
+
+typedef struct acpi_sdev_id_component
+{
+ ACPI_SDEV_HEADER Header;
+ UINT16 HardwareIdOffset;
+ UINT16 HardwareIdLength;
+ UINT16 SubsystemIdOffset;
+ UINT16 SubsystemIdLength;
+ UINT16 HardwareRevision;
+ UINT8 HardwareRevPresent;
+ UINT8 ClassCodePresent;
+ UINT8 PciBaseClass;
+ UINT8 PciSubClass;
+ UINT8 PciProgrammingXface;
+
+} ACPI_SDEV_ID_COMPONENT;
+
+typedef struct acpi_sdev_mem_component
+{
+ ACPI_SDEV_HEADER Header;
+ UINT32 Reserved;
+ UINT64 MemoryBaseAddress;
+ UINT64 MemoryLength;
+
+} ACPI_SDEV_MEM_COMPONENT;
+
+
/* 1: PCIe Endpoint Device Based Device Structure */
typedef struct acpi_sdev_pcie
@@ -2050,6 +3183,62 @@
} ACPI_SDEV_PCIE_PATH;
+/*******************************************************************************
+ *
+ * SVKL - Storage Volume Key Location Table (ACPI 6.4)
+ * From: "Guest-Host-Communication Interface (GHCI) for Intel
+ * Trust Domain Extensions (Intel TDX)".
+ * Version 1
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_svkl
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 Count;
+
+} ACPI_TABLE_SVKL;
+
+typedef struct acpi_svkl_key
+{
+ UINT16 Type;
+ UINT16 Format;
+ UINT32 Size;
+ UINT64 Address;
+
+} ACPI_SVKL_KEY;
+
+enum acpi_svkl_type
+{
+ ACPI_SVKL_TYPE_MAIN_STORAGE = 0,
+ ACPI_SVKL_TYPE_RESERVED = 1 /* 1 and greater are reserved */
+};
+
+enum acpi_svkl_format
+{
+ ACPI_SVKL_FORMAT_RAW_BINARY = 0,
+ ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */
+};
+
+
+/*******************************************************************************
+ *
+ * TDEL - TD-Event Log
+ * From: "Guest-Host-Communication Interface (GHCI) for Intel
+ * Trust Domain Extensions (Intel TDX)".
+ * September 2020
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_tdel
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 Reserved;
+ UINT64 LogAreaMinimumLength;
+ UINT64 LogAreaStartAddress;
+
+} ACPI_TABLE_TDEL;
+
/* Reset to default packing */
#pragma pack()
diff --git a/source/include/actbl3.h b/source/include/actbl3.h
index 9b46264..60ad385 100644
--- a/source/include/actbl3.h
+++ b/source/include/actbl3.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -65,13 +69,13 @@
#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
-#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
+#define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Translation Table */
#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
-#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */
+#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */
#define ACPI_SIG_XENV "XENV" /* Xen Environment table */
#define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
@@ -240,7 +244,8 @@
ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */
- ACPI_SRAT_TYPE_RESERVED = 6 /* 5 and greater are reserved */
+ ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
+ ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
};
/*
@@ -335,8 +340,11 @@
} ACPI_SRAT_GIC_ITS_AFFINITY;
-
-/* 5: Generic Initiator Affinity Structure (ACPI 6.3) */
+/*
+ * Common structure for SRAT subtable types:
+ * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
+ * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
+ */
typedef struct acpi_srat_generic_affinity
{
@@ -352,7 +360,8 @@
/* Flags for ACPI_SRAT_GENERIC_AFFINITY */
-#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
+#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
+#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */
/*******************************************************************************
*
@@ -573,29 +582,82 @@
/*******************************************************************************
*
- * VRTC - Virtual Real Time Clock Table
+ * VIOT - Virtual I/O Translation Table
* Version 1
*
- * Conforms to "Simple Firmware Interface Specification",
- * Draft 0.8.2, Oct 19, 2010
- * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
- *
******************************************************************************/
-typedef struct acpi_table_vrtc
+typedef struct acpi_table_viot
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT16 NodeCount;
+ UINT16 NodeOffset;
+ UINT8 Reserved[8];
-} ACPI_TABLE_VRTC;
+} ACPI_TABLE_VIOT;
-/* VRTC entry */
+/* VIOT subtable header */
-typedef struct acpi_vrtc_entry
+typedef struct acpi_viot_header
{
- ACPI_GENERIC_ADDRESS PhysicalAddress;
- UINT32 Irq;
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
-} ACPI_VRTC_ENTRY;
+} ACPI_VIOT_HEADER;
+
+/* Values for Type field above */
+
+enum AcpiViotNodeType
+{
+ ACPI_VIOT_NODE_PCI_RANGE = 0x01,
+ ACPI_VIOT_NODE_MMIO = 0x02,
+ ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
+ ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
+ ACPI_VIOT_RESERVED = 0x05
+};
+
+/* VIOT subtables */
+
+typedef struct acpi_viot_pci_range
+{
+ ACPI_VIOT_HEADER Header;
+ UINT32 EndpointStart;
+ UINT16 SegmentStart;
+ UINT16 SegmentEnd;
+ UINT16 BdfStart;
+ UINT16 BdfEnd;
+ UINT16 OutputNode;
+ UINT8 Reserved[6];
+
+} ACPI_VIOT_PCI_RANGE;
+
+typedef struct acpi_viot_mmio
+{
+ ACPI_VIOT_HEADER Header;
+ UINT32 Endpoint;
+ UINT64 BaseAddress;
+ UINT16 OutputNode;
+ UINT8 Reserved[6];
+
+} ACPI_VIOT_MMIO;
+
+typedef struct acpi_viot_virtio_iommu_pci
+{
+ ACPI_VIOT_HEADER Header;
+ UINT16 Segment;
+ UINT16 Bdf;
+ UINT8 Reserved[8];
+
+} ACPI_VIOT_VIRTIO_IOMMU_PCI;
+
+typedef struct acpi_viot_virtio_iommu_mmio
+{
+ ACPI_VIOT_HEADER Header;
+ UINT8 Reserved[4];
+ UINT64 BaseAddress;
+
+} ACPI_VIOT_VIRTIO_IOMMU_MMIO;
/*******************************************************************************
@@ -789,13 +851,19 @@
} ACPI_TABLE_WPBT;
+typedef struct acpi_wpbt_unicode
+{
+ UINT16 *UnicodeString;
+
+} ACPI_WPBT_UNICODE;
+
/*******************************************************************************
*
- * WSMT - Windows SMM Security Migrations Table
+ * WSMT - Windows SMM Security Mitigations Table
* Version 1
*
- * Conforms to "Windows SMM Security Migrations Table",
+ * Conforms to "Windows SMM Security Mitigations Table",
* Version 1.0, April 18, 2016
*
******************************************************************************/
diff --git a/source/include/actypes.h b/source/include/actypes.h
index 11b361e..a8b206b 100644
--- a/source/include/actypes.h
+++ b/source/include/actypes.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -546,15 +550,12 @@
/* Pointer/Integer type conversions */
#define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (ACPI_SIZE) (i))
+#ifndef ACPI_TO_INTEGER
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0)
-#ifdef __Fuchsia__
-// Use offsetof() to avoid taking the offset of a nullptr, which is undefined
-// behavior.
-#define ACPI_OFFSET(d, f) offsetof(d, f)
-#else
+#endif
+#ifndef ACPI_OFFSET
#define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0)
#endif
-#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
/* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */
@@ -577,12 +578,18 @@
strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE)
/*
- * Algorithm to obtain access bit width.
- * Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of
+ * Algorithm to obtain access bit or byte width.
+ * Can be used with AccessSize field of ACPI_GENERIC_ADDRESS and
* ACPI_RESOURCE_GENERIC_REGISTER.
*/
-#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2))
-
+#define ACPI_ACCESS_BIT_SHIFT 2
+#define ACPI_ACCESS_BYTE_SHIFT -1
+#define ACPI_ACCESS_BIT_MAX (31 - ACPI_ACCESS_BIT_SHIFT)
+#define ACPI_ACCESS_BYTE_MAX (31 - ACPI_ACCESS_BYTE_SHIFT)
+#define ACPI_ACCESS_BIT_DEFAULT (8 - ACPI_ACCESS_BIT_SHIFT)
+#define ACPI_ACCESS_BYTE_DEFAULT (8 - ACPI_ACCESS_BYTE_SHIFT)
+#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + ACPI_ACCESS_BIT_SHIFT))
+#define ACPI_ACCESS_BYTE_WIDTH(size) (1 << ((size) + ACPI_ACCESS_BYTE_SHIFT))
/*******************************************************************************
*
@@ -758,7 +765,8 @@
#define ACPI_EVENT_POWER_BUTTON 2
#define ACPI_EVENT_SLEEP_BUTTON 3
#define ACPI_EVENT_RTC 4
-#define ACPI_EVENT_MAX 4
+#define ACPI_EVENT_PCIE_WAKE 5
+#define ACPI_EVENT_MAX 5
#define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1
/*
@@ -861,15 +869,16 @@
#define ACPI_ADR_SPACE_GPIO (ACPI_ADR_SPACE_TYPE) 8
#define ACPI_ADR_SPACE_GSBUS (ACPI_ADR_SPACE_TYPE) 9
#define ACPI_ADR_SPACE_PLATFORM_COMM (ACPI_ADR_SPACE_TYPE) 10
+#define ACPI_ADR_SPACE_PLATFORM_RT (ACPI_ADR_SPACE_TYPE) 11
-#define ACPI_NUM_PREDEFINED_REGIONS 11
+#define ACPI_NUM_PREDEFINED_REGIONS 12
/*
* Special Address Spaces
*
* Note: A Data Table region is a special type of operation region
* that has its own AML opcode. However, internally, the AML
- * interpreter simply creates an operation region with an an address
+ * interpreter simply creates an operation region with an address
* space type of ACPI_ADR_SPACE_DATA_TABLE.
*/
#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 0x7E /* Internal to ACPICA only */
@@ -1211,6 +1220,20 @@
} ACPI_CONNECTION_INFO;
+/* Special Context data for PCC Opregion (ACPI 6.3) */
+
+typedef struct acpi_pcc_info {
+ UINT8 SubspaceId;
+ UINT16 Length;
+ UINT8 *InternalBuffer;
+} ACPI_PCC_INFO;
+
+/* Special Context data for FFH Opregion (ACPI 6.5) */
+
+typedef struct acpi_ffh_info {
+ UINT64 Offset;
+ UINT64 Length;
+} ACPI_FFH_INFO;
typedef
ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (
@@ -1271,7 +1294,7 @@
{
UINT32 Count; /* Number of IDs in Ids array */
UINT32 ListSize; /* Size of list, including ID strings */
- ACPI_PNP_DEVICE_ID Ids[1]; /* ID array */
+ ACPI_PNP_DEVICE_ID Ids[]; /* ID array */
} ACPI_PNP_DEVICE_ID_LIST;
@@ -1332,16 +1355,30 @@
} ACPI_PCI_ID;
+typedef struct acpi_mem_mapping
+{
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress;
+ UINT8 *LogicalAddress;
+ ACPI_SIZE Length;
+ struct acpi_mem_mapping *NextMm;
+
+} ACPI_MEM_MAPPING;
+
typedef struct acpi_mem_space_context
{
UINT32 Length;
ACPI_PHYSICAL_ADDRESS Address;
- ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress;
- UINT8 *MappedLogicalAddress;
- ACPI_SIZE MappedLength;
+ ACPI_MEM_MAPPING *CurMm;
+ ACPI_MEM_MAPPING *FirstMm;
} ACPI_MEM_SPACE_CONTEXT;
+typedef struct acpi_data_table_space_context
+{
+ void *Pointer;
+
+} ACPI_DATA_TABLE_MAPPING;
+
/*
* ACPI_MEMORY_LIST is used only if the ACPICA local cache is enabled
@@ -1415,11 +1452,18 @@
#define ACPI_OSI_WIN_10_RS4 0x12
#define ACPI_OSI_WIN_10_RS5 0x13
#define ACPI_OSI_WIN_10_19H1 0x14
+#define ACPI_OSI_WIN_10_20H1 0x15
+#define ACPI_OSI_WIN_11 0x16
/* Definitions of getopt */
#define ACPI_OPT_END -1
+/* Definitions for explicit fallthrough */
+
+#ifndef ACPI_FALLTHROUGH
+#define ACPI_FALLTHROUGH do {} while(0)
+#endif
#endif /* __ACTYPES_H__ */
diff --git a/source/include/acutils.h b/source/include/acutils.h
index f52c226..8193ce0 100644
--- a/source/include/acutils.h
+++ b/source/include/acutils.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -59,6 +63,7 @@
extern const char *AcpiGbl_MemDecode[];
extern const char *AcpiGbl_MinDecode[];
extern const char *AcpiGbl_MtpDecode[];
+extern const char *AcpiGbl_PhyDecode[];
extern const char *AcpiGbl_RngDecode[];
extern const char *AcpiGbl_RwDecode[];
extern const char *AcpiGbl_ShrDecode[];
@@ -205,6 +210,31 @@
/*
+ * utcksum - Checksum utilities
+ */
+UINT8
+AcpiUtGenerateChecksum (
+ void *Table,
+ UINT32 Length,
+ UINT8 OriginalChecksum);
+
+UINT8
+AcpiUtChecksum (
+ UINT8 *Buffer,
+ UINT32 Length);
+
+ACPI_STATUS
+AcpiUtVerifyCdatChecksum (
+ ACPI_TABLE_CDAT *CdatTable,
+ UINT32 Length);
+
+ACPI_STATUS
+AcpiUtVerifyChecksum (
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length);
+
+
+/*
* utnonansi - Non-ANSI C library functions
*/
void
@@ -1155,6 +1185,11 @@
AcpiUtConvertStringToUuid (
char *InString,
UINT8 *UuidBuffer);
+
+ACPI_STATUS
+AcpiUtConvertUuidToString (
+ char *UuidBuffer,
+ char *OutString);
#endif
#endif /* _ACUTILS_H */
diff --git a/source/include/acuuid.h b/source/include/acuuid.h
index e965bea..29fb3dc 100644
--- a/source/include/acuuid.h
+++ b/source/include/acuuid.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -57,6 +61,10 @@
#define UUID_PCI_HOST_BRIDGE "33db4d5b-1ff7-401c-9657-7441c03dd766"
#define UUID_I2C_DEVICE "3cdff6f7-4267-4555-ad05-b30a3d8938de"
#define UUID_POWER_BUTTON "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c"
+#define UUID_MEMORY_DEVICE "03b19910-f473-11dd-87af-0800200c9a66"
+#define UUID_GENERIC_BUTTONS_DEVICE "fa6bd625-9ce8-470d-a2c7-b3ca36c4282e"
+#define UUID_NVDIMM_ROOT_DEVICE "2f10e7a4-9e91-11e4-89d3-123b93f75cba"
+#define UUID_CONTROL_METHOD_BATTERY "f18fc78b-0f15-4978-b793-53f833a1d35b"
/* Interfaces */
@@ -65,6 +73,7 @@
/* NVDIMM - NFIT table */
+#define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66"
#define UUID_VOLATILE_MEMORY "7305944f-fdda-44e3-b16c-3f22d252e5d0"
#define UUID_PERSISTENT_MEMORY "66f0d379-b4f3-4074-ac43-0d3318b78cdb"
#define UUID_CONTROL_REGION "92f701f6-13b4-405d-910b-299367e8234c"
@@ -73,6 +82,10 @@
#define UUID_VOLATILE_VIRTUAL_CD "3d5abd30-4175-87ce-6d64-d2ade523c4bb"
#define UUID_PERSISTENT_VIRTUAL_DISK "5cea02c9-4d07-69d3-269f-4496fbe096f9"
#define UUID_PERSISTENT_VIRTUAL_CD "08018188-42cd-bb48-100f-5387d53ded3d"
+#define UUID_NFIT_DIMM_N_MSFT "1ee68b36-d4bd-4a1a-9a16-4f8e53d46e05"
+#define UUID_NFIT_DIMM_N_HPE1 "9002c334-acf3-4c0e-9642-a235f0d53bc6"
+#define UUID_NFIT_DIMM_N_HPE2 "5008664b-b758-41a0-a03c-27c2f2d04f7e"
+#define UUID_NFIT_DIMM_N_HYPERV "5746c5f2-a9a2-4264-ad0e-e4ddc9e09e80"
/* Processor Properties (ACPI 6.2) */
@@ -86,6 +99,10 @@
#define UUID_BATTERY_THERMAL_LIMIT "4c2067e3-887d-475c-9720-4af1d3ed602e"
#define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"
#define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"
-
-
-#endif /* __AUUID_H__ */
+#define UUID_DEVICE_GRAPHS "ab02a46b-74c7-45a2-bd68-f7d344ef2153"
+#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
+#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
+#define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a"
+#define UUID_1ST_FUNCTION_ID "893f00a6-660c-494e-bcfd-3043f4fb67c0"
+#define UUID_2ND_FUNCTION_ID "107ededd-d381-4fd7-8da9-08e9a6c79644"
+#endif /* __ACUUID_H__ */
diff --git a/source/include/amlcode.h b/source/include/amlcode.h
index 0d54cb7..5abe8db 100644
--- a/source/include/amlcode.h
+++ b/source/include/amlcode.h
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,10 +25,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/amlresrc.h b/source/include/amlresrc.h
index ffce1aa..b474454 100644
--- a/source/include/amlresrc.h
+++ b/source/include/amlresrc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -71,6 +75,7 @@
#define ACPI_RESTAG_IORESTRICTION "_IOR"
#define ACPI_RESTAG_LENGTH "_LEN"
#define ACPI_RESTAG_LINE "_LIN"
+#define ACPI_RESTAG_LOCALPORT "_PRT"
#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
#define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
#define ACPI_RESTAG_MAXADDR "_MAX"
@@ -80,6 +85,7 @@
#define ACPI_RESTAG_MODE "_MOD"
#define ACPI_RESTAG_PARITY "_PAR"
#define ACPI_RESTAG_PHASE "_PHA"
+#define ACPI_RESTAG_PHYTYPE "_PHY"
#define ACPI_RESTAG_PIN "_PIN"
#define ACPI_RESTAG_PINCONFIG "_PPI"
#define ACPI_RESTAG_PINCONFIG_TYPE "_TYP"
@@ -456,7 +462,8 @@
#define AML_RESOURCE_I2C_SERIALBUSTYPE 1
#define AML_RESOURCE_SPI_SERIALBUSTYPE 2
#define AML_RESOURCE_UART_SERIALBUSTYPE 3
-#define AML_RESOURCE_MAX_SERIALBUSTYPE 3
+#define AML_RESOURCE_CSI2_SERIALBUSTYPE 4
+#define AML_RESOURCE_MAX_SERIALBUSTYPE 4
#define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */
typedef struct aml_resource_common_serialbus
@@ -466,6 +473,24 @@
} AML_RESOURCE_COMMON_SERIALBUS;
+
+typedef struct aml_resource_csi2_serialbus
+{
+ AML_RESOURCE_LARGE_HEADER_COMMON
+ AML_RESOURCE_SERIAL_COMMON
+
+ /*
+ * Optional fields follow immediately:
+ * 1) Vendor Data bytes
+ * 2) Resource Source String
+ */
+
+} AML_RESOURCE_CSI2_SERIALBUS;
+
+#define AML_RESOURCE_CSI2_REVISION 1 /* ACPI 6.4 */
+#define AML_RESOURCE_CSI2_TYPE_REVISION 1 /* ACPI 6.4 */
+#define AML_RESOURCE_CSI2_MIN_DATA_LEN 0 /* ACPI 6.4 */
+
typedef struct aml_resource_i2c_serialbus
{
AML_RESOURCE_LARGE_HEADER_COMMON
@@ -505,7 +530,6 @@
#define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_SPI_MIN_DATA_LEN 9
-
typedef struct aml_resource_uart_serialbus
{
AML_RESOURCE_LARGE_HEADER_COMMON
@@ -680,6 +704,7 @@
AML_RESOURCE_I2C_SERIALBUS I2cSerialBus;
AML_RESOURCE_SPI_SERIALBUS SpiSerialBus;
AML_RESOURCE_UART_SERIALBUS UartSerialBus;
+ AML_RESOURCE_CSI2_SERIALBUS Csi2SerialBus;
AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
AML_RESOURCE_PIN_FUNCTION PinFunction;
AML_RESOURCE_PIN_CONFIG PinConfig;
diff --git a/source/include/platform/accygwin.h b/source/include/platform/accygwin.h
index b015712..e762a02 100644
--- a/source/include/platform/accygwin.h
+++ b/source/include/platform/accygwin.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acdragonfly.h b/source/include/platform/acdragonfly.h
index 1cdb10e..5ea0ff2 100644
--- a/source/include/platform/acdragonfly.h
+++ b/source/include/platform/acdragonfly.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acdragonflyex.h b/source/include/platform/acdragonflyex.h
index 8fad983..3a501df 100644
--- a/source/include/platform/acdragonflyex.h
+++ b/source/include/platform/acdragonflyex.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acefi.h b/source/include/platform/acefi.h
index 11a2573..ca27b09 100644
--- a/source/include/platform/acefi.h
+++ b/source/include/platform/acefi.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acefiex.h b/source/include/platform/acefiex.h
index 8ab8d4e..9696d84 100644
--- a/source/include/platform/acefiex.h
+++ b/source/include/platform/acefiex.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h
index ee737a6..a6e4a3d 100644
--- a/source/include/platform/acenv.h
+++ b/source/include/platform/acenv.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acenvex.h b/source/include/platform/acenvex.h
index adfadbb..e9bd1ca 100644
--- a/source/include/platform/acenvex.h
+++ b/source/include/platform/acenvex.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acfreebsd.h b/source/include/platform/acfreebsd.h
index 1fb48ad..48ca63c 100644
--- a/source/include/platform/acfreebsd.h
+++ b/source/include/platform/acfreebsd.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -54,6 +58,9 @@
#define ACPI_UINTPTR_T uintptr_t
+#define ACPI_TO_INTEGER(p) ((uintptr_t)(p))
+#define ACPI_OFFSET(d, f) __offsetof(d, f)
+
#define ACPI_USE_DO_WHILE_0
#define ACPI_USE_LOCAL_CACHE
#define ACPI_USE_NATIVE_DIVIDE
@@ -99,6 +106,7 @@
#if __STDC_HOSTED__
#include <ctype.h>
+#include <unistd.h>
#endif
#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (pthread))
diff --git a/source/include/platform/acgcc.h b/source/include/platform/acgcc.h
index d379a66..20d2798 100644
--- a/source/include/platform/acgcc.h
+++ b/source/include/platform/acgcc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -84,4 +88,19 @@
#define ACPI_USE_NATIVE_MATH64
+/* GCC did not support __has_attribute until 5.1. */
+
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+/*
+ * Explicitly mark intentional explicit fallthrough to silence
+ * -Wimplicit-fallthrough in GCC 7.1+.
+ */
+
+#if __has_attribute(__fallthrough__)
+#define ACPI_FALLTHROUGH __attribute__((__fallthrough__))
+#endif
+
#endif /* __ACGCC_H__ */
diff --git a/source/include/platform/acgccex.h b/source/include/platform/acgccex.h
index e72a15b..059d39e 100644
--- a/source/include/platform/acgccex.h
+++ b/source/include/platform/acgccex.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/achaiku.h b/source/include/platform/achaiku.h
index 05436b4..4015a5b 100644
--- a/source/include/platform/achaiku.h
+++ b/source/include/platform/achaiku.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acintel.h b/source/include/platform/acintel.h
index c3bfdcf..4608c34 100644
--- a/source/include/platform/acintel.h
+++ b/source/include/platform/acintel.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
index cc4670b..2c70db1 100644
--- a/source/include/platform/aclinux.h
+++ b/source/include/platform/aclinux.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -140,6 +144,11 @@
#define ACPI_SPINLOCK spinlock_t *
#define ACPI_CPU_FLAGS unsigned long
+#define ACPI_UINTPTR_T uintptr_t
+
+#define ACPI_TO_INTEGER(p) ((uintptr_t)(p))
+#define ACPI_OFFSET(d, f) offsetof(d, f)
+
/* Use native linux version of AcpiOsAllocateZeroed */
#define USE_NATIVE_ALLOCATE_ZEROED
@@ -212,7 +221,8 @@
#if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\
defined(__aarch64__) || defined(__PPC64__) ||\
- defined(__s390x__)
+ defined(__s390x__) ||\
+ (defined(__riscv) && (defined(__LP64__) || defined(_LP64)))
#define ACPI_MACHINE_WIDTH 64
#define COMPILER_DEPENDENT_INT64 long
#define COMPILER_DEPENDENT_UINT64 unsigned long
diff --git a/source/include/platform/aclinuxex.h b/source/include/platform/aclinuxex.h
index 3c1ab73..b7615ee 100644
--- a/source/include/platform/aclinuxex.h
+++ b/source/include/platform/aclinuxex.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acmacosx.h b/source/include/platform/acmacosx.h
index 7758c5e..d3ddf89 100644
--- a/source/include/platform/acmacosx.h
+++ b/source/include/platform/acmacosx.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acmsvc.h b/source/include/platform/acmsvc.h
index 46665c8..97396cf 100644
--- a/source/include/platform/acmsvc.h
+++ b/source/include/platform/acmsvc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -163,6 +167,9 @@
/* warn C4131: uses old-style declarator (iASL compiler only) */
#pragma warning(disable:4459)
+/* warn c4200: allow flexible arrays (of zero length) */
+#pragma warning(disable:4200)
+
#if _MSC_VER > 1200 /* Versions above VC++ 6 */
#pragma warning( disable : 4295 ) /* needed for acpredef.h array */
#endif
diff --git a/source/include/platform/acmsvcex.h b/source/include/platform/acmsvcex.h
index 1afa87f..50c3432 100644
--- a/source/include/platform/acmsvcex.h
+++ b/source/include/platform/acmsvcex.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acnetbsd.h b/source/include/platform/acnetbsd.h
index 326ac55..98e1db2 100644
--- a/source/include/platform/acnetbsd.h
+++ b/source/include/platform/acnetbsd.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acos2.h b/source/include/platform/acos2.h
index 092d835..1ee47ae 100644
--- a/source/include/platform/acos2.h
+++ b/source/include/platform/acos2.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acqnx.h b/source/include/platform/acqnx.h
index 7623734..8fd153d 100644
--- a/source/include/platform/acqnx.h
+++ b/source/include/platform/acqnx.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acwin.h b/source/include/platform/acwin.h
index f7be362..d676462 100644
--- a/source/include/platform/acwin.h
+++ b/source/include/platform/acwin.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/include/platform/acwin64.h b/source/include/platform/acwin64.h
index cdbc032..0d4e21b 100644
--- a/source/include/platform/acwin64.h
+++ b/source/include/platform/acwin64.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/osbsdtbl.c b/source/os_specific/service_layers/osbsdtbl.c
index c031060..af809ed 100644
--- a/source/os_specific/service_layers/osbsdtbl.c
+++ b/source/os_specific/service_layers/osbsdtbl.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/osgendbg.c b/source/os_specific/service_layers/osgendbg.c
index 377e191..7cf5582 100644
--- a/source/os_specific/service_layers/osgendbg.c
+++ b/source/os_specific/service_layers/osgendbg.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c
index 35f24af..73dddcd 100644
--- a/source/os_specific/service_layers/oslinuxtbl.c
+++ b/source/os_specific/service_layers/oslinuxtbl.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -80,7 +84,6 @@
OslReadTableFromFile (
char *Filename,
ACPI_SIZE FileOffset,
- char *Signature,
ACPI_TABLE_HEADER **Table);
static ACPI_STATUS
@@ -176,7 +179,7 @@
*
* RETURN: Status; Converted from errno.
*
- * DESCRIPTION: Get last errno and conver it to ACPI_STATUS.
+ * DESCRIPTION: Get last errno and convert it to ACPI_STATUS.
*
*****************************************************************************/
@@ -1378,8 +1381,6 @@
*
* PARAMETERS: Filename - File that contains the desired table
* FileOffset - Offset of the table in file
- * Signature - Optional ACPI Signature for desired table.
- * A null terminated 4-character string.
* Table - Where a pointer to the table is returned
*
* RETURN: Status; Table buffer is returned if AE_OK.
@@ -1392,7 +1393,6 @@
OslReadTableFromFile (
char *Filename,
ACPI_SIZE FileOffset,
- char *Signature,
ACPI_TABLE_HEADER **Table)
{
FILE *TableFile;
@@ -1424,6 +1424,8 @@
goto Exit;
}
+#ifdef ACPI_OBSOLETE_FUNCTIONS
+
/* If signature is specified, it must match the table */
if (Signature)
@@ -1445,6 +1447,7 @@
goto Exit;
}
}
+#endif
TableLength = ApGetTableLength (&Header);
if (TableLength == 0)
@@ -1576,7 +1579,7 @@
/* There is no physical address saved for customized tables, use zero */
*Address = 0;
- Status = OslReadTableFromFile (TableFilename, 0, NULL, Table);
+ Status = OslReadTableFromFile (TableFilename, 0, Table);
return (Status);
}
diff --git a/source/os_specific/service_layers/osunixdir.c b/source/os_specific/service_layers/osunixdir.c
index bd0ac8f..10213ab 100644
--- a/source/os_specific/service_layers/osunixdir.c
+++ b/source/os_specific/service_layers/osunixdir.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/osunixmap.c b/source/os_specific/service_layers/osunixmap.c
index beeb14c..99dc47b 100644
--- a/source/os_specific/service_layers/osunixmap.c
+++ b/source/os_specific/service_layers/osunixmap.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/osunixxf.c b/source/os_specific/service_layers/osunixxf.c
index 09f116f..06af582 100644
--- a/source/os_specific/service_layers/osunixxf.c
+++ b/source/os_specific/service_layers/osunixxf.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/oswindir.c b/source/os_specific/service_layers/oswindir.c
index 437a11e..9e83fa6 100644
--- a/source/os_specific/service_layers/oswindir.c
+++ b/source/os_specific/service_layers/oswindir.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/os_specific/service_layers/oswintbl.c b/source/os_specific/service_layers/oswintbl.c
index ee85801..d2b4277 100644
--- a/source/os_specific/service_layers/oswintbl.c
+++ b/source/os_specific/service_layers/oswintbl.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -67,20 +71,17 @@
static char ErrorBuffer[LOCAL_BUFFER_SIZE];
/*
- * Tables supported in the Windows registry. Zero or more SSDTs are assumed to
- * follow these tables.
+ * List of table signatures reported by EnumSystemFirmwareTables ()
*/
-static char *SupportedTables[] =
-{
- "DSDT",
- "RSDT",
- "FACS",
- "FACP"
-};
+UINT32 *Gbl_AvailableTableSignatures;
+UINT32 Gbl_TableCount = 0;
+UINT32 Gbl_SsdtInstance = 0;
-/* Number of table names for the table above. */
+BOOLEAN Gbl_TableListInitialized = FALSE;
-#define ACPI_OS_NUM_TABLE_ENTRIES 4
+static ACPI_STATUS
+OslTableInitialize (
+ void);
/******************************************************************************
@@ -152,7 +153,8 @@
* DESCRIPTION: Get an ACPI table via an index value (0 through n). Returns
* AE_LIMIT when an invalid index is reached. Index is not
* necessarily an index into the RSDT/XSDT.
- * Table is obtained from the Windows registry.
+ * SSDT tables are obtained from the Windows registry. All other
+ * tables are obtained through GetSystemFirmwareTable ().
*
* NOTE: Cannot get the physical address from the windows registry;
* zero is returned instead.
@@ -168,32 +170,324 @@
{
ACPI_STATUS Status;
char *Signature;
+ UINT32 CurrentInstance;
- if (Index < ACPI_OS_NUM_TABLE_ENTRIES)
+ /* Enumerate all ACPI table signatures on first invocation of this function */
+
+ Status = OslTableInitialize ();
+ if (ACPI_FAILURE (Status))
{
- Signature = SupportedTables[Index];
- Index = 0;
+ return (Status);
+ }
+
+ /* Validate Index */
+
+ if (Index < Gbl_TableCount)
+ {
+ Signature = malloc (ACPI_NAMESEG_SIZE + 1);
+ if (!Signature)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ Signature = memmove (Signature, &Gbl_AvailableTableSignatures[Index], ACPI_NAMESEG_SIZE);
}
else
{
- Signature = ACPI_SIG_SSDT;
- Index -= ACPI_OS_NUM_TABLE_ENTRIES;
+ return (AE_LIMIT);
}
- Status = AcpiOsGetTableByName (Signature, Index, Table, Address);
+ if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT))
+ {
+ CurrentInstance = Gbl_SsdtInstance;
+ Gbl_SsdtInstance++;
+ }
+ else
+ {
+ CurrentInstance = 0;
+ }
+ Status = AcpiOsGetTableByName (Signature, CurrentInstance, Table, Address);
if (ACPI_SUCCESS (Status))
{
- *Instance = Index;
+ *Instance = CurrentInstance;
}
else if (Status == AE_NOT_FOUND &&
ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT))
{
/* Treat SSDTs that are not found as invalid index. */
- Status = (AE_LIMIT);
+ Status = AE_LIMIT;
}
+ free (Signature);
+ return (Status);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION: OslTableInitialize
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Initialize ACPI table data. Enumerate all ACPI table signatures
+ * and save them to a global list.
+ *
+ *****************************************************************************/
+static ACPI_STATUS
+OslTableInitialize (
+ void)
+{
+ UINT32 ResultSize;
+ UINT32 DataSize;
+
+ if (Gbl_TableListInitialized)
+ {
+ return (AE_OK);
+ }
+
+ /*
+ * ACPI table signatures are always 4 characters. Therefore, the data size
+ * buffer should be a multiple of 4
+ */
+ DataSize = EnumSystemFirmwareTables ('ACPI', NULL, 0);
+ if (DataSize % ACPI_NAMESEG_SIZE)
+ {
+ return (AE_ERROR);
+ }
+
+ /*
+ * EnumSystemFirmwareTables () does not report the DSDT or XSDT. Work around this
+ * by adding these entries manually.
+ */
+ Gbl_TableCount = 2 + DataSize / ACPI_NAMESEG_SIZE;
+ Gbl_AvailableTableSignatures = malloc (Gbl_TableCount * ACPI_NAMESEG_SIZE);
+ if (!Gbl_AvailableTableSignatures)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ ResultSize = EnumSystemFirmwareTables ('ACPI', Gbl_AvailableTableSignatures, DataSize);
+ if (ResultSize > DataSize)
+ {
+ return (AE_ERROR);
+ }
+
+ /* Insert the DSDT and XSDT tables signatures */
+
+ Gbl_AvailableTableSignatures [Gbl_TableCount - 1] = 'TDSD';
+ Gbl_AvailableTableSignatures [Gbl_TableCount - 2] = 'TDSX';
+
+ Gbl_TableListInitialized = TRUE;
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: WindowsGetTableFromRegistry
+ *
+ * PARAMETERS: Signature - ACPI Signature for desired table. Must be
+ * a null terminated 4-character string.
+ * Instance - For SSDTs (0...n). Use 0 otherwise.
+ * Table - Where a pointer to the table is returned
+ * Address - Where the table physical address is returned
+ *
+ * RETURN: Status; Table buffer and physical address returned if AE_OK.
+ * AE_LIMIT: Instance is beyond valid limit
+ * AE_NOT_FOUND: A table with the signature was not found
+ *
+ * DESCRIPTION: Get an ACPI table via a table signature (4 ASCII characters).
+ * Returns AE_LIMIT when an invalid instance is reached.
+ * Table is obtained from the Windows registry.
+ *
+ * NOTE: Assumes the input signature is uppercase.
+ * Cannot get the physical address from the windows registry;
+ * zero is returned instead.
+ *
+ *****************************************************************************/
+
+static ACPI_STATUS
+WindowsGetTableFromRegistry (
+ char *Signature,
+ UINT32 Instance,
+ ACPI_TABLE_HEADER **Table,
+ ACPI_PHYSICAL_ADDRESS *Address)
+{
+ HKEY Handle = NULL;
+ LONG WinStatus;
+ ULONG Type;
+ ULONG NameSize;
+ ULONG DataSize;
+ HKEY SubKey;
+ ULONG i;
+ ACPI_TABLE_HEADER *ReturnTable;
+ ACPI_STATUS Status = AE_OK;
+
+
+ /* Get a handle to the table key */
+
+ while (1)
+ {
+ strcpy(KeyBuffer, "HARDWARE\\ACPI\\");
+ if (AcpiUtSafeStrcat(KeyBuffer, sizeof(KeyBuffer), Signature))
+ {
+ return (AE_BUFFER_OVERFLOW);
+ }
+
+ /*
+ * Windows stores SSDT at SSDT, SSD1, ..., SSD9, SSDA, ..., SSDS, SSDT,
+ * SSDU, ..., SSDY. If the first (0th) and the 29th tables have the same
+ * OEM ID, Table ID and Revision, then the 29th entry will overwrite the
+ * first entry... Let's hope that we do not have that many entries.
+ */
+ if (Instance > 0 && ACPI_COMPARE_NAMESEG(Signature, ACPI_SIG_SSDT))
+ {
+ if (Instance < 10)
+ {
+ KeyBuffer[strlen(KeyBuffer) - 1] = '0' + (char)Instance;
+ }
+ else if (Instance < 29)
+ {
+ KeyBuffer[strlen(KeyBuffer) - 1] = 'A' + (char)(Instance - 10);
+ }
+ else
+ {
+ return (AE_LIMIT);
+ }
+ }
+
+ WinStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, KeyBuffer,
+ 0L, KEY_READ, &Handle);
+
+ if (WinStatus != ERROR_SUCCESS)
+ {
+ /*
+ * Somewhere along the way, MS changed the registry entry for
+ * the FADT from
+ * HARDWARE/ACPI/FACP to
+ * HARDWARE/ACPI/FADT.
+ *
+ * This code allows for both.
+ */
+ if (ACPI_COMPARE_NAMESEG(Signature, "FACP"))
+ {
+ Signature = "FADT";
+ }
+ else if (ACPI_COMPARE_NAMESEG(Signature, "XSDT"))
+ {
+ Signature = "RSDT";
+ }
+ else if (ACPI_COMPARE_NAMESEG(Signature, ACPI_SIG_SSDT))
+ {
+ /*
+ * SSDT may not be present on older Windows versions, but it is
+ * also possible that the index is not found.
+ */
+ return (AE_NOT_FOUND);
+ }
+ else
+ {
+ fprintf(stderr,
+ "Could not find %s in registry at %s: %s (WinStatus=0x%X)\n",
+ Signature, KeyBuffer, WindowsFormatException(WinStatus), WinStatus);
+ return (AE_NOT_FOUND);
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ /* Actual data for the table is down a couple levels */
+
+ for (i = 0; ;)
+ {
+ WinStatus = RegEnumKey(Handle, i, KeyBuffer, sizeof(KeyBuffer));
+ i++;
+ if (WinStatus == ERROR_NO_MORE_ITEMS)
+ {
+ break;
+ }
+
+ WinStatus = RegOpenKey(Handle, KeyBuffer, &SubKey);
+ if (WinStatus != ERROR_SUCCESS)
+ {
+ fprintf(stderr, "Could not open %s entry: %s\n",
+ Signature, WindowsFormatException(WinStatus));
+ Status = AE_ERROR;
+ goto Cleanup;
+ }
+
+ RegCloseKey(Handle);
+ Handle = SubKey;
+ i = 0;
+ }
+
+ /* Find the (binary) table entry */
+
+ for (i = 0; ; i++)
+ {
+ NameSize = sizeof(KeyBuffer);
+ WinStatus = RegEnumValue(Handle, i, KeyBuffer, &NameSize, NULL,
+ &Type, NULL, 0);
+ if (WinStatus != ERROR_SUCCESS)
+ {
+ fprintf(stderr, "Could not get %s registry entry: %s\n",
+ Signature, WindowsFormatException(WinStatus));
+ Status = AE_ERROR;
+ goto Cleanup;
+ }
+
+ if (Type == REG_BINARY)
+ {
+ break;
+ }
+ }
+
+ /* Get the size of the table */
+
+ WinStatus = RegQueryValueEx(Handle, KeyBuffer, NULL, NULL,
+ NULL, &DataSize);
+ if (WinStatus != ERROR_SUCCESS)
+ {
+ fprintf(stderr, "Could not read the %s table size: %s\n",
+ Signature, WindowsFormatException(WinStatus));
+ Status = AE_ERROR;
+ goto Cleanup;
+ }
+
+ /* Allocate a new buffer for the table */
+
+ ReturnTable = malloc(DataSize);
+ if (!ReturnTable)
+ {
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ /* Get the actual table from the registry */
+
+ WinStatus = RegQueryValueEx(Handle, KeyBuffer, NULL, NULL,
+ (UCHAR *)ReturnTable, &DataSize);
+
+ if (WinStatus != ERROR_SUCCESS)
+ {
+ fprintf(stderr, "Could not read %s data: %s\n",
+ Signature, WindowsFormatException(WinStatus));
+ free(ReturnTable);
+ Status = AE_ERROR;
+ goto Cleanup;
+ }
+
+ *Table = ReturnTable;
+ *Address = 0;
+
+Cleanup:
+ RegCloseKey(Handle);
return (Status);
}
@@ -223,21 +517,17 @@
*****************************************************************************/
ACPI_STATUS
-AcpiOsGetTableByName (
+AcpiOsGetTableByName(
char *Signature,
UINT32 Instance,
ACPI_TABLE_HEADER **Table,
ACPI_PHYSICAL_ADDRESS *Address)
{
- HKEY Handle = NULL;
- LONG WinStatus;
- ULONG Type;
- ULONG NameSize;
- ULONG DataSize;
- HKEY SubKey;
- ULONG i;
- ACPI_TABLE_HEADER *ReturnTable;
+ LONG Result;
ACPI_STATUS Status = AE_OK;
+ UINT32 DataSize;
+ ACPI_TABLE_HEADER *ReturnTable;
+ UINT32 UIntSignature = 0;
/* Multiple instances are only supported for SSDT tables. */
@@ -247,164 +537,39 @@
return (AE_LIMIT);
}
- /* Get a handle to the table key */
-
- while (1)
+ if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT))
{
- strcpy (KeyBuffer, "HARDWARE\\ACPI\\");
- if (AcpiUtSafeStrcat (KeyBuffer, sizeof (KeyBuffer), Signature))
- {
- return (AE_BUFFER_OVERFLOW);
- }
-
- /*
- * Windows stores SSDT at SSDT, SSD1, ..., SSD9, SSDA, ..., SSDS, SSDT,
- * SSDU, ..., SSDY. If the first (0th) and the 29th tables have the same
- * OEM ID, Table ID and Revision, then the 29th entry will overwrite the
- * first entry... Let's hope that we do not have that many entries.
- */
- if (Instance > 0 && ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT))
- {
- if (Instance < 10)
- {
- KeyBuffer[strlen (KeyBuffer) - 1] = '0' + (char) Instance;
- }
- else if (Instance < 29)
- {
- KeyBuffer[strlen (KeyBuffer) - 1] = 'A' + (char) (Instance - 10);
- }
- else
- {
- return (AE_LIMIT);
- }
- }
-
- WinStatus = RegOpenKeyEx (HKEY_LOCAL_MACHINE, KeyBuffer,
- 0L, KEY_READ, &Handle);
-
- if (WinStatus != ERROR_SUCCESS)
- {
- /*
- * Somewhere along the way, MS changed the registry entry for
- * the FADT from
- * HARDWARE/ACPI/FACP to
- * HARDWARE/ACPI/FADT.
- *
- * This code allows for both.
- */
- if (ACPI_COMPARE_NAMESEG (Signature, "FACP"))
- {
- Signature = "FADT";
- }
- else if (ACPI_COMPARE_NAMESEG (Signature, "XSDT"))
- {
- Signature = "RSDT";
- }
- else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT))
- {
- /* SSDT may not be present on older Windows versions, but it is
- * also possible that the index is not found. */
- return (AE_NOT_FOUND);
- }
- else
- {
- fprintf (stderr,
- "Could not find %s in registry at %s: %s (WinStatus=0x%X)\n",
- Signature, KeyBuffer, WindowsFormatException (WinStatus), WinStatus);
- return (AE_NOT_FOUND);
- }
- }
- else
- {
- break;
- }
+ Status = WindowsGetTableFromRegistry ("SSDT", Instance, Table, Address);
+ return (Status);
}
- /* Actual data for the table is down a couple levels */
+ /* GetSystemFirmwareTable requires the table signature to be UINT32 */
- for (i = 0; ;)
+ UIntSignature = *ACPI_CAST_PTR (UINT32, Signature);
+ DataSize = GetSystemFirmwareTable('ACPI', UIntSignature, NULL, 0);
+ if (!DataSize)
{
- WinStatus = RegEnumKey (Handle, i, KeyBuffer, sizeof (KeyBuffer));
- i++;
- if (WinStatus == ERROR_NO_MORE_ITEMS)
- {
- break;
- }
-
- WinStatus = RegOpenKey (Handle, KeyBuffer, &SubKey);
- if (WinStatus != ERROR_SUCCESS)
- {
- fprintf (stderr, "Could not open %s entry: %s\n",
- Signature, WindowsFormatException (WinStatus));
- Status = AE_ERROR;
- goto Cleanup;
- }
-
- RegCloseKey (Handle);
- Handle = SubKey;
- i = 0;
+ fprintf(stderr, "The table signature %s does not exist.", Signature);
+ return (AE_ERROR);
}
- /* Find the (binary) table entry */
-
- for (i = 0; ; i++)
- {
- NameSize = sizeof (KeyBuffer);
- WinStatus = RegEnumValue (Handle, i, KeyBuffer, &NameSize, NULL,
- &Type, NULL, 0);
- if (WinStatus != ERROR_SUCCESS)
- {
- fprintf (stderr, "Could not get %s registry entry: %s\n",
- Signature, WindowsFormatException (WinStatus));
- Status = AE_ERROR;
- goto Cleanup;
- }
-
- if (Type == REG_BINARY)
- {
- break;
- }
- }
-
- /* Get the size of the table */
-
- WinStatus = RegQueryValueEx (Handle, KeyBuffer, NULL, NULL,
- NULL, &DataSize);
- if (WinStatus != ERROR_SUCCESS)
- {
- fprintf (stderr, "Could not read the %s table size: %s\n",
- Signature, WindowsFormatException (WinStatus));
- Status = AE_ERROR;
- goto Cleanup;
- }
-
- /* Allocate a new buffer for the table */
-
- ReturnTable = malloc (DataSize);
+ ReturnTable = malloc(DataSize);
if (!ReturnTable)
{
- Status = AE_NO_MEMORY;
- goto Cleanup;
+ return (AE_NO_MEMORY);
}
- /* Get the actual table from the registry */
-
- WinStatus = RegQueryValueEx (Handle, KeyBuffer, NULL, NULL,
- (UCHAR *) ReturnTable, &DataSize);
- if (WinStatus != ERROR_SUCCESS)
+ Result = GetSystemFirmwareTable('ACPI', UIntSignature, ReturnTable, DataSize);
+ if (Result > (LONG) DataSize)
{
- fprintf (stderr, "Could not read %s data: %s\n",
- Signature, WindowsFormatException (WinStatus));
+ /* Clean up */
+
+ fprintf (stderr, "Could not read %s data\n", Signature);
free (ReturnTable);
- Status = AE_ERROR;
- goto Cleanup;
+ return (AE_ERROR);
}
*Table = ReturnTable;
- *Address = 0;
-
-Cleanup:
- RegCloseKey (Handle);
return (Status);
}
diff --git a/source/os_specific/service_layers/oswinxf.c b/source/os_specific/service_layers/oswinxf.c
index 9a5d5ac..fde770c 100644
--- a/source/os_specific/service_layers/oswinxf.c
+++ b/source/os_specific/service_layers/oswinxf.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpibin/abcompare.c b/source/tools/acpibin/abcompare.c
index 7702977..0975225 100644
--- a/source/tools/acpibin/abcompare.c
+++ b/source/tools/acpibin/abcompare.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -507,7 +511,7 @@
{
FILE *File;
UINT32 Size;
- char *Buffer = NULL;
+ char *DataBuffer = NULL;
size_t Actual;
@@ -531,8 +535,8 @@
/* Allocate a buffer for the entire file */
- Buffer = calloc (Size, 1);
- if (!Buffer)
+ DataBuffer = calloc (Size, 1);
+ if (!DataBuffer)
{
printf ("Could not allocate buffer of size %u\n", Size);
goto ErrorExit;
@@ -540,12 +544,12 @@
/* Read the entire file */
- Actual = fread (Buffer, 1, Size, File);
+ Actual = fread (DataBuffer, 1, Size, File);
if (Actual != Size)
{
printf ("Could not read the input file %s\n", Filename);
- free (Buffer);
- Buffer = NULL;
+ free (DataBuffer);
+ DataBuffer = NULL;
goto ErrorExit;
}
@@ -553,7 +557,7 @@
ErrorExit:
fclose (File);
- return (Buffer);
+ return (DataBuffer);
}
diff --git a/source/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c
index a464314..7e6f4cf 100644
--- a/source/tools/acpibin/abmain.c
+++ b/source/tools/acpibin/abmain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -122,7 +126,7 @@
AbGbl_DisplayAllMiscompares = TRUE;
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
case 'c': /* Compare Files */
diff --git a/source/tools/acpibin/acpibin.h b/source/tools/acpibin/acpibin.h
index 73e952e..e88dd54 100644
--- a/source/tools/acpibin/acpibin.h
+++ b/source/tools/acpibin/acpibin.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpidump/acpidump.h b/source/tools/acpidump/acpidump.h
index a362857..28959b2 100644
--- a/source/tools/acpidump/acpidump.h
+++ b/source/tools/acpidump/acpidump.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpidump/apdump.c b/source/tools/acpidump/apdump.c
index 67949d0..1687f28 100644
--- a/source/tools/acpidump/apdump.c
+++ b/source/tools/acpidump/apdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -122,7 +126,9 @@
}
else
{
- Status = AcpiTbVerifyChecksum (Table, Table->Length);
+ /* We don't have to check for a CDAT here, since CDAT is not in the RSDT/XSDT */
+
+ Status = AcpiUtVerifyChecksum (Table, Table->Length);
}
if (ACPI_FAILURE (Status))
diff --git a/source/tools/acpidump/apfiles.c b/source/tools/acpidump/apfiles.c
index 262e4c6..0d55336 100644
--- a/source/tools/acpidump/apfiles.c
+++ b/source/tools/acpidump/apfiles.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpidump/apmain.c b/source/tools/acpidump/apmain.c
index c1c2a0d..78fec12 100644
--- a/source/tools/acpidump/apmain.c
+++ b/source/tools/acpidump/apmain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpiexec/aecommon.h b/source/tools/acpiexec/aecommon.h
index 4b11f94..1a1ce95 100644
--- a/source/tools/acpiexec/aecommon.h
+++ b/source/tools/acpiexec/aecommon.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -83,7 +87,9 @@
typedef struct init_file_entry
{
char *Name;
+ char *Value;
ACPI_OPERAND_OBJECT *ObjDesc;
+ BOOLEAN IsUsed;
} INIT_FILE_ENTRY;
@@ -234,19 +240,23 @@
AeOpenInitializationFile (
char *Filename);
-void
+ACPI_STATUS
AeProcessInitFile (
void);
ACPI_STATUS
-AeSetupConfiguration (
- void *RegionAddr);
-
-ACPI_STATUS
AeLookupInitFileEntry (
char *Pathname,
ACPI_OPERAND_OBJECT **ObjDesc);
+void
+AeDisplayUnusedInitFileItems (
+ void);
+
+void
+AeDeleteInitFileList (
+ void);
+
/* aeexec */
void
@@ -265,6 +275,10 @@
void **ReturnValue);
ACPI_STATUS
+AeSetupConfiguration (
+ void *RegionAddr);
+
+ACPI_STATUS
ExecuteOSI (
char *OsiString,
UINT64 ExpectedResult);
diff --git a/source/tools/acpiexec/aeexception.c b/source/tools/acpiexec/aeexception.c
index acdd600..88d1b46 100644
--- a/source/tools/acpiexec/aeexception.c
+++ b/source/tools/acpiexec/aeexception.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -222,7 +226,7 @@
SigintCount++;
if (SigintCount >= ACPI_MAX_CONTROL_C)
{
- exit (0);
+ _exit (0);
}
/* Abort the application if there are no methods executing */
@@ -256,7 +260,7 @@
AcpiOsPrintf (AE_PREFIX "Terminating\n");
(void) AcpiOsTerminate ();
- exit (0);
+ _exit (0);
}
diff --git a/source/tools/acpiexec/aeexec.c b/source/tools/acpiexec/aeexec.c
index 74c84d4..9cfddab 100644
--- a/source/tools/acpiexec/aeexec.c
+++ b/source/tools/acpiexec/aeexec.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c
index da5e752..a2244b9 100644
--- a/source/tools/acpiexec/aehandlers.c
+++ b/source/tools/acpiexec/aehandlers.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpiexec/aeinitfile.c b/source/tools/acpiexec/aeinitfile.c
index 680952a..344f804 100644
--- a/source/tools/acpiexec/aeinitfile.c
+++ b/source/tools/acpiexec/aeinitfile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -39,24 +43,17 @@
#include "aecommon.h"
#include "acdispat.h"
+#include "acnamesp.h"
+
#define _COMPONENT ACPI_TOOLS
ACPI_MODULE_NAME ("aeinitfile")
-/* Local prototypes */
-
-static void
-AeEnterInitFileEntry (
- INIT_FILE_ENTRY InitEntry,
- ACPI_WALK_STATE *WalkState);
-
-
#define AE_FILE_BUFFER_SIZE 512
static char LineBuffer[AE_FILE_BUFFER_SIZE];
static char NameBuffer[AE_FILE_BUFFER_SIZE];
-static char ValueBuffer[AE_FILE_BUFFER_SIZE];
static FILE *InitFile;
@@ -99,23 +96,23 @@
* RETURN: None
*
* DESCRIPTION: Read the initialization file and perform all namespace
- * initializations. AcpiGbl_InitEntries will be used for region
- * field initialization.
+ * initializations. AcpiGbl_InitEntries will be used for all
+ * object initialization.
*
* NOTE: The format of the file is multiple lines, each of format:
- * <ACPI-pathname> <Integer Value>
+ * <ACPI-pathname> <New Value>
*
*****************************************************************************/
-void
-AeProcessInitFile(
+ACPI_STATUS
+AeProcessInitFile (
void)
{
ACPI_WALK_STATE *WalkState;
UINT64 idx;
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
char *Token;
- char *ObjectBuffer;
+ char *ValueBuffer;
char *TempNameBuffer;
ACPI_OBJECT_TYPE Type;
ACPI_OBJECT TempObject;
@@ -123,13 +120,14 @@
if (!InitFile)
{
- return;
+ return (AE_OK);
}
/* Create needed objects to be reused for each init entry */
WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
NameBuffer[0] = '\\';
+ NameBuffer[1] = 0;
while (fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile) != NULL)
{
@@ -137,12 +135,20 @@
}
rewind (InitFile);
+ /*
+ * Allocate and populate the Gbl_InitEntries array
+ */
AcpiGbl_InitEntries =
- AcpiOsAllocate (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount);
+ AcpiOsAllocateZeroed (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount);
for (idx = 0; fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile); ++idx)
{
-
TempNameBuffer = AcpiDbGetNextToken (LineBuffer, &Token, &Type);
+ if (!TempNameBuffer)
+ {
+ AcpiGbl_InitEntries[idx].Name = NULL;
+ continue;
+ }
+
if (LineBuffer[0] == '\\')
{
strcpy (NameBuffer, TempNameBuffer);
@@ -154,48 +160,67 @@
strcpy (NameBuffer + 1, TempNameBuffer);
}
+ AcpiNsNormalizePathname (NameBuffer);
AcpiGbl_InitEntries[idx].Name =
AcpiOsAllocateZeroed (strnlen (NameBuffer, AE_FILE_BUFFER_SIZE) + 1);
-
strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer);
- ObjectBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
+ ValueBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
+ if (!ValueBuffer)
+ {
+ AcpiGbl_InitEntries[idx].Value = NULL;
+ continue;
+ }
+
+ AcpiGbl_InitEntries[idx].Value =
+ AcpiOsAllocateZeroed (strnlen (ValueBuffer, AE_FILE_BUFFER_SIZE) + 1);
+ strcpy (AcpiGbl_InitEntries[idx].Value, ValueBuffer);
if (Type == ACPI_TYPE_FIELD_UNIT)
{
- Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ObjectBuffer,
+ Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ValueBuffer,
&TempObject);
}
else
{
- Status = AcpiDbConvertToObject (Type, ObjectBuffer, &TempObject);
+ Status = AcpiDbConvertToObject (Type, ValueBuffer, &TempObject);
+ }
+
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("%s[%s]: %s\n", NameBuffer, AcpiUtGetTypeName (Type),
+ AcpiFormatException (Status));
+ goto CleanupAndExit;
}
Status = AcpiUtCopyEobjectToIobject (&TempObject,
&AcpiGbl_InitEntries[idx].ObjDesc);
- if (Type == ACPI_TYPE_BUFFER || Type == ACPI_TYPE_FIELD_UNIT)
- {
- ACPI_FREE (TempObject.Buffer.Pointer);
- }
+ /* Cleanup the external object created by DbConvertToObject above */
- if (ACPI_FAILURE (Status))
+ if (ACPI_SUCCESS (Status))
{
- AcpiOsPrintf ("%s %s\n", ValueBuffer,
+ if (Type == ACPI_TYPE_BUFFER || Type == ACPI_TYPE_FIELD_UNIT)
+ {
+ ACPI_FREE (TempObject.Buffer.Pointer);
+ }
+ else if (Type == ACPI_TYPE_PACKAGE)
+ {
+ AcpiDbDeleteObjects (1, &TempObject);
+ }
+ }
+ else
+ {
+ AcpiOsPrintf ("%s[%s]: %s\n", NameBuffer, AcpiUtGetTypeName (Type),
AcpiFormatException (Status));
goto CleanupAndExit;
}
/*
- * Special case for field units. Field units are dependent on the
- * parent region. This parent region has yet to be created so defer the
- * initialization until the dispatcher. For all other types, initialize
- * the namespace node with the value found in the init file.
+ * Initialize the namespace node with the value found in the init file.
*/
- if (Type != ACPI_TYPE_FIELD_UNIT)
- {
- AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
- }
+ AcpiOsPrintf ("Namespace object init from file: %16s, Value \"%s\", Type %s\n",
+ AcpiGbl_InitEntries[idx].Name, AcpiGbl_InitEntries[idx].Value, AcpiUtGetTypeName (Type));
}
/* Cleanup */
@@ -203,62 +228,7 @@
CleanupAndExit:
fclose (InitFile);
AcpiDsDeleteWalkState (WalkState);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AeInitFileEntry
- *
- * PARAMETERS: InitEntry - Entry of the init file
- * WalkState - Used for the Store operation
- *
- * RETURN: None
- *
- * DESCRIPTION: Perform initialization of a single namespace object
- *
- * Note: namespace of objects are limited to integers and region
- * fields units of 8 bytes at this time.
- *
- *****************************************************************************/
-
-static void
-AeEnterInitFileEntry (
- INIT_FILE_ENTRY InitEntry,
- ACPI_WALK_STATE *WalkState)
-{
- char *Pathname = InitEntry.Name;
- ACPI_OPERAND_OBJECT *ObjDesc = InitEntry.ObjDesc;
- ACPI_NAMESPACE_NODE *NewNode;
- ACPI_STATUS Status;
-
-
- Status = AcpiNsLookup (NULL, Pathname, ObjDesc->Common.Type,
- ACPI_IMODE_LOAD_PASS2, ACPI_NS_ERROR_IF_FOUND | ACPI_NS_NO_UPSEARCH |
- ACPI_NS_EARLY_INIT, NULL, &NewNode);
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "While creating name from namespace initialization file: %s",
- Pathname));
- return;
- }
-
- /* Store pointer to value descriptor in the Node */
-
- Status = AcpiNsAttachObject (NewNode, ObjDesc,
- ObjDesc->Common.Type);
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "While attaching object to node from namespace initialization file: %s",
- Pathname));
- return;
- }
-
- /* Remove local reference to the object */
-
- AcpiUtRemoveReference (ObjDesc);
+ return (Status);
}
@@ -267,9 +237,9 @@
* FUNCTION: AeLookupInitFileEntry
*
* PARAMETERS: Pathname - AML namepath in external format
- * ValueString - value of the namepath if it exitst
+ * ObjDesc - Where the object is returned if it exists
*
- * RETURN: None
+ * RETURN: Status. AE_OK if a match was found
*
* DESCRIPTION: Search the init file for a particular name and its value.
*
@@ -282,18 +252,106 @@
{
UINT32 i;
+ ACPI_FUNCTION_TRACE (AeLookupInitFileEntry);
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Lookup: %s\n", Pathname));
+
if (!AcpiGbl_InitEntries)
{
- return AE_NOT_FOUND;
+ return (AE_NOT_FOUND);
+ }
+
+ AcpiNsNormalizePathname (Pathname);
+
+ for (i = 0; i < AcpiGbl_InitFileLineCount; ++i)
+ {
+ if (AcpiGbl_InitEntries[i].Name &&
+ !strcmp (AcpiGbl_InitEntries[i].Name, Pathname))
+ {
+ *ObjDesc = AcpiGbl_InitEntries[i].ObjDesc;
+ AcpiGbl_InitEntries[i].IsUsed = TRUE;
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Found match: %s, %p\n", Pathname, *ObjDesc));
+ return_ACPI_STATUS (AE_OK);
+ }
+ }
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "No match found: %s\n", Pathname));
+ return_ACPI_STATUS (AE_NOT_FOUND);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AeDisplayUnusedInitFileItems
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Display all init file items that have not been referenced
+ * (i.e., items that have not been found in the namespace).
+ *
+ *****************************************************************************/
+
+void
+AeDisplayUnusedInitFileItems (
+ void)
+{
+ UINT32 i;
+
+
+ if (!AcpiGbl_InitEntries)
+ {
+ return;
}
for (i = 0; i < AcpiGbl_InitFileLineCount; ++i)
{
- if (!strcmp(AcpiGbl_InitEntries[i].Name, Pathname))
+ if (AcpiGbl_InitEntries[i].Name &&
+ !AcpiGbl_InitEntries[i].IsUsed)
{
- *ObjDesc = AcpiGbl_InitEntries[i].ObjDesc;
- return AE_OK;
+ AcpiOsPrintf ("Init file entry not found in namespace "
+ "(or is a non-data type): %s\n",
+ AcpiGbl_InitEntries[i].Name);
}
}
- return AE_NOT_FOUND;
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AeDeleteInitFileList
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Delete the global namespace initialization file data
+ *
+ *****************************************************************************/
+
+void
+AeDeleteInitFileList (
+ void)
+{
+ UINT32 i;
+
+
+ if (!AcpiGbl_InitEntries)
+ {
+ return;
+ }
+
+ for (i = 0; i < AcpiGbl_InitFileLineCount; ++i)
+ {
+
+ if ((AcpiGbl_InitEntries[i].ObjDesc) && (AcpiGbl_InitEntries[i].Value))
+ {
+ /* Remove one reference on the object (and all subobjects) */
+
+ AcpiUtRemoveReference (AcpiGbl_InitEntries[i].ObjDesc);
+ }
+ }
+
+ AcpiOsFree (AcpiGbl_InitEntries);
}
diff --git a/source/tools/acpiexec/aeinstall.c b/source/tools/acpiexec/aeinstall.c
index abb37d7..281ba47 100644
--- a/source/tools/acpiexec/aeinstall.c
+++ b/source/tools/acpiexec/aeinstall.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -104,6 +108,7 @@
ACPI_ADR_SPACE_GPIO,
ACPI_ADR_SPACE_GSBUS,
ACPI_ADR_SPACE_PLATFORM_COMM,
+ ACPI_ADR_SPACE_PLATFORM_RT,
ACPI_ADR_SPACE_FIXED_HARDWARE,
ACPI_ADR_SPACE_USER_DEFINED1,
ACPI_ADR_SPACE_USER_DEFINED2
diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c
index f3d64d1..7d500f3 100644
--- a/source/tools/acpiexec/aemain.c
+++ b/source/tools/acpiexec/aemain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -80,7 +84,6 @@
UINT8 AcpiGbl_RegionFillValue = 0;
BOOLEAN AcpiGbl_IgnoreErrors = FALSE;
BOOLEAN AcpiGbl_AbortLoopOnTimeout = FALSE;
-BOOLEAN AcpiGbl_DbOpt_NoRegionSupport = FALSE;
UINT8 AcpiGbl_UseHwReducedFadt = FALSE;
BOOLEAN AcpiGbl_DoInterfaceTests = FALSE;
BOOLEAN AcpiGbl_LoadTestTables = FALSE;
@@ -522,12 +525,13 @@
ACPI_CHECK_OK (AcpiInitializeSubsystem, Status);
if (ACPI_FAILURE (Status))
{
+ ExitCode = -1;
goto ErrorExit;
}
/* Use a shorter timeout value for acpiexec */
- AcpiGbl_MaxLoopIterations = 1;
+ AcpiGbl_MaxLoopIterations = 10;
/* Initialize the AML debugger */
@@ -535,6 +539,7 @@
ACPI_CHECK_OK (AcpiInitializeDebugger, Status);
if (ACPI_FAILURE (Status))
{
+ ExitCode = -1;
goto ErrorExit;
}
@@ -563,8 +568,6 @@
signal (SIGSEGV, AeSignalHandler);
}
- AeProcessInitFile();
-
/* The remaining arguments are filenames for ACPI tables */
if (!argv[AcpiGbl_Optind])
@@ -598,6 +601,7 @@
Status = AeBuildLocalTables (ListHead);
if (ACPI_FAILURE (Status))
{
+ ExitCode = -1;
goto ErrorExit;
}
@@ -622,7 +626,22 @@
goto EnterDebugger;
}
+ /* Read the entire namespace initialization file if requested */
+
+ Status = AeProcessInitFile();
+ if (ACPI_FAILURE (Status))
+ {
+ ExitCode = -1;
+ goto ErrorExit;
+ }
+
Status = AeLoadTables ();
+ if (ACPI_FAILURE (Status))
+ {
+ printf ("**** Could not load ACPI tables, %s\n",
+ AcpiFormatException (Status));
+ goto EnterDebugger;
+ }
/*
* Exit namespace initialization for the "load namespace only" option.
@@ -634,13 +653,6 @@
goto EnterDebugger;
}
- if (ACPI_FAILURE (Status))
- {
- printf ("**** Could not load ACPI tables, %s\n",
- AcpiFormatException (Status));
- goto EnterDebugger;
- }
-
/* Setup initialization flags for ACPICA */
InitFlags = (ACPI_NO_HANDLER_INIT | ACPI_NO_ACPI_ENABLE);
@@ -683,6 +695,7 @@
goto EnterDebugger;
}
+ AeDisplayUnusedInitFileItems ();
AeMiscellaneousTests ();
@@ -729,7 +742,9 @@
ErrorExit:
AeLateTest ();
- AcpiOsFree (AcpiGbl_InitEntries);
+
+ AeDeleteInitFileList ();
+
(void) AcpiTerminate ();
AcDeleteTableList (ListHead);
return (ExitCode);
diff --git a/source/tools/acpiexec/aeregion.c b/source/tools/acpiexec/aeregion.c
index 82c4094..fa4f493 100644
--- a/source/tools/acpiexec/aeregion.c
+++ b/source/tools/acpiexec/aeregion.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -93,6 +97,7 @@
UINT32 Value1;
UINT32 Value2;
ACPI_RESOURCE *Resource;
+ char Uuid[ACPI_PRM_INPUT_BUFFER_SIZE + 1];
ACPI_FUNCTION_NAME (AeRegionHandler);
@@ -334,6 +339,7 @@
* default values. Note: ASLTS will depend on these values.
*/
case ACPI_ADR_SPACE_PLATFORM_COMM: /* ACPI 6.3 */
+
if (AcpiGbl_DisplayRegionAccess)
{
AcpiOsPrintf ("AcpiExec: PCC Write : Addr %.4X Width %X\n",
@@ -345,6 +351,21 @@
}
return (AE_OK);
+ case ACPI_ADR_SPACE_PLATFORM_RT:
+
+ AcpiOsPrintf ("Acpiexec: PRM %s invoked\n",
+ (Function & ACPI_IO_MASK) ? "Write" : "Read ");
+
+ if ((Function & ACPI_IO_MASK) == ACPI_WRITE)
+ {
+ AcpiUtConvertUuidToString((char *) Buffer + 10, Uuid);
+ AcpiOsPrintf ("Mode: %u GUID: %s\n", Buffer[0], Uuid);
+ }
+
+ /* Unpack the input buffer and print the contents for debug */
+
+ break;
+
default:
break;
}
diff --git a/source/tools/acpiexec/aetables.c b/source/tools/acpiexec/aetables.c
index 42c0581..73b07ec 100644
--- a/source/tools/acpiexec/aetables.c
+++ b/source/tools/acpiexec/aetables.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -155,7 +159,7 @@
/* Set the checksum, must set to zero first */
Header->Checksum = 0;
- Header->Checksum = (UINT8) -AcpiTbChecksum (
+ Header->Checksum = (UINT8) -AcpiUtChecksum (
(void *) Header, Header->Length);
}
@@ -308,7 +312,7 @@
AeInitializeTableHeader ((void *) LocalXSDT, ACPI_SIG_XSDT, XsdtSize);
LocalRSDP.Checksum = 0;
- LocalRSDP.Checksum = (UINT8) -AcpiTbChecksum (
+ LocalRSDP.Checksum = (UINT8) -AcpiUtChecksum (
(void *) &LocalRSDP, ACPI_RSDP_CHECKSUM_LENGTH);
if (!DsdtAddress)
@@ -359,7 +363,7 @@
/* Complete the external FADT with the checksum */
ExternalFadt->Header.Checksum = 0;
- ExternalFadt->Header.Checksum = (UINT8) -AcpiTbChecksum (
+ ExternalFadt->Header.Checksum = (UINT8) -AcpiUtChecksum (
(void *) ExternalFadt, ExternalFadt->Header.Length);
}
else if (AcpiGbl_UseHwReducedFadt)
@@ -439,7 +443,7 @@
LocalTEST.Length = sizeof (ACPI_TABLE_HEADER);
LocalTEST.Checksum = 0;
- LocalTEST.Checksum = (UINT8) -AcpiTbChecksum (
+ LocalTEST.Checksum = (UINT8) -AcpiUtChecksum (
(void *) &LocalTEST, LocalTEST.Length);
/*
@@ -453,7 +457,7 @@
LocalBADTABLE.Length = sizeof (ACPI_TABLE_HEADER);
LocalBADTABLE.Checksum = 0;
- LocalBADTABLE.Checksum = (UINT8) -AcpiTbChecksum (
+ LocalBADTABLE.Checksum = (UINT8) -AcpiUtChecksum (
(void *) &LocalBADTABLE, LocalBADTABLE.Length);
}
diff --git a/source/tools/acpiexec/aetables.h b/source/tools/acpiexec/aetables.h
index ee1402f..caa886c 100644
--- a/source/tools/acpiexec/aetables.h
+++ b/source/tools/acpiexec/aetables.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpiexec/aetests.c b/source/tools/acpiexec/aetests.c
index 70e8705..d00d0f6 100644
--- a/source/tools/acpiexec/aetests.c
+++ b/source/tools/acpiexec/aetests.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpihelp/acpihelp.h b/source/tools/acpihelp/acpihelp.h
index b21e2b0..230ce0c 100644
--- a/source/tools/acpihelp/acpihelp.h
+++ b/source/tools/acpihelp/acpihelp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -113,7 +117,8 @@
AH_DISPLAY_DEVICE_IDS,
AH_DISPLAY_UUIDS,
AH_DISPLAY_TABLES,
- AH_DISPLAY_DIRECTIVES
+ AH_DISPLAY_DIRECTIVES,
+ AH_DECODE_ASL_EXCEPTION
} AH_OPTION_TYPES;
@@ -185,6 +190,10 @@
char *Name);
void
+AhDecodeAslException (
+ char *Name);
+
+void
AhFindPredefinedNames (
char *Name);
diff --git a/source/tools/acpihelp/ahaml.c b/source/tools/acpihelp/ahaml.c
index db59f8c..5f7b6eb 100644
--- a/source/tools/acpihelp/ahaml.c
+++ b/source/tools/acpihelp/ahaml.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -103,9 +107,9 @@
}
}
- if (!Found)
+ if (!Found && Name)
{
- printf ("%s, no matching AML operators\n", Name);
+ printf ("%s, no matching AML opcodes\n", Name);
}
}
diff --git a/source/tools/acpihelp/ahamlops.c b/source/tools/acpihelp/ahamlops.c
index 3aae7db..3532576 100644
--- a/source/tools/acpihelp/ahamlops.c
+++ b/source/tools/acpihelp/ahamlops.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpihelp/ahasl.c b/source/tools/acpihelp/ahasl.c
index 8c1cc1f..e115d35 100644
--- a/source/tools/acpihelp/ahasl.c
+++ b/source/tools/acpihelp/ahasl.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpihelp/ahaslkey.c b/source/tools/acpihelp/ahaslkey.c
index dfdbb54..0ae80a4 100644
--- a/source/tools/acpihelp/ahaslkey.c
+++ b/source/tools/acpihelp/ahaslkey.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpihelp/ahaslops.c b/source/tools/acpihelp/ahaslops.c
index 39c7158..177bb7d 100644
--- a/source/tools/acpihelp/ahaslops.c
+++ b/source/tools/acpihelp/ahaslops.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpihelp/ahdecode.c b/source/tools/acpihelp/ahdecode.c
index fc9096a..fa35162 100644
--- a/source/tools/acpihelp/ahdecode.c
+++ b/source/tools/acpihelp/ahdecode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -43,6 +47,7 @@
#include "acpihelp.h"
#include "acpredef.h"
+BOOLEAN AslGbl_VerboseErrors = TRUE;
/* Local prototypes */
@@ -264,7 +269,7 @@
case 'E':
if (Name[2] == 'J')
{
- if (isdigit (Name[3]) || (Name[3] == 'X'))
+ if (isdigit ((int) Name[3]) || (Name[3] == 'X'))
{
/* _EJx */
@@ -273,12 +278,12 @@
}
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
case 'L':
case 'Q':
case 'W':
- if ((isxdigit (Name[2]) && isxdigit (Name[3]))
+ if ((isxdigit ((int) Name[2]) && isxdigit ((int) Name[3]))
||
((Name[2] == 'X') && (Name[3] == 'X')))
{
@@ -292,7 +297,7 @@
case 'A':
if ((Name[2] == 'C') || (Name[2] == 'L'))
{
- if (isdigit (Name[3]) || (Name[3] == 'X'))
+ if (isdigit ((int) Name[3]) || (Name[3] == 'X'))
{
/* _ACx or _ALx */
@@ -596,11 +601,11 @@
UINT32 i = 0;
- printf ("Known ACPI tables:\n");
+ printf ("Known/Supported ACPI tables:\n");
for (Info = AcpiGbl_SupportedTables; Info->Signature; Info++)
{
- printf ("%8s : %s\n", Info->Signature, Info->Description);
+ printf ("%8u) %s : %s\n", i + 1, Info->Signature, Info->Description);
i++;
}
diff --git a/source/tools/acpihelp/ahgrammar.c b/source/tools/acpihelp/ahgrammar.c
index 8a1256f..9d1fde2 100644
--- a/source/tools/acpihelp/ahgrammar.c
+++ b/source/tools/acpihelp/ahgrammar.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpihelp/ahmain.c b/source/tools/acpihelp/ahmain.c
index c585044..2bfd514 100644
--- a/source/tools/acpihelp/ahmain.c
+++ b/source/tools/acpihelp/ahmain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -48,7 +52,7 @@
void);
#define AH_UTILITY_NAME "ACPI Help Utility"
-#define AH_SUPPORTED_OPTIONS "adeghikmopstuv^"
+#define AH_SUPPORTED_OPTIONS "adeghikmopstuv^x"
#if defined ACPI_OPTION
@@ -85,6 +89,7 @@
ACPI_USAGE_TEXT ("\nACPI Values:\n");
ACPI_OPTION ("-e [HexValue]", "Decode ACPICA exception code");
ACPI_OPTION ("-o [HexValue]", "Decode hex AML opcode");
+ ACPI_OPTION ("-x [HexValue]", "Decode iASL exception code");
ACPI_USAGE_TEXT ("\nASL Names and Symbols (ACPI Source Language):\n");
ACPI_OPTION ("-k [Name/Prefix | *]", "Display ASL non-operator keyword(s)");
@@ -197,6 +202,11 @@
DecodeType = AH_DISPLAY_UUIDS;
break;
+ case 'x':
+
+ DecodeType = AH_DECODE_ASL_EXCEPTION;
+ break;
+
case 'v': /* -v: (Version): signon already emitted, just exit */
switch (AcpiGbl_Optarg[0])
@@ -290,6 +300,11 @@
AhDisplayDirectives ();
break;
+ case AH_DECODE_ASL_EXCEPTION:
+
+ AhDecodeAslException (Name);
+ break;
+
default:
if (!Name)
diff --git a/source/tools/acpinames/acpinames.h b/source/tools/acpinames/acpinames.h
deleted file mode 100644
index 6fe48e0..0000000
--- a/source/tools/acpinames/acpinames.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/******************************************************************************
- *
- * Module Name: acpinames.h - Common include for AcpiNames utility
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2020, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#ifndef _ACPINAMES_H
-#define _ACPINAMES_H
-
-#include "acpi.h"
-#include "accommon.h"
-#include "acapps.h"
-#include "acutils.h"
-#include "acnamesp.h"
-#include "actables.h"
-#include "acinterp.h"
-
-#include <stdio.h>
-
-#define ACPI_MAX_INIT_TABLES (32)
-
-extern BOOLEAN AcpiGbl_NsLoadOnly;
-
-
-ACPI_STATUS
-AnBuildLocalTables (
- ACPI_NEW_TABLE_DESC *TableList);
-
-#endif
diff --git a/source/tools/acpinames/anmain.c b/source/tools/acpinames/anmain.c
deleted file mode 100644
index 577b9ef..0000000
--- a/source/tools/acpinames/anmain.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/******************************************************************************
- *
- * Module Name: anmain - Main routine for the AcpiNames utility
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2020, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include "acpinames.h"
-#include "actables.h"
-#include "errno.h"
-
-#define _COMPONENT ACPI_TOOLS
- ACPI_MODULE_NAME ("anmain")
-
-
-/* Local prototypes */
-
-static int
-AnDumpEntireNamespace (
- ACPI_NEW_TABLE_DESC *ListHead);
-
-
-/*
- * Main routine for the ACPI user-space namespace utility.
- *
- * Portability note: The utility depends upon the host for command-line
- * wildcard support - it is not implemented locally. For example:
- *
- * Linux/Unix systems: Shell expands wildcards automatically.
- *
- * Windows: The setargv.obj module must be linked in to automatically
- * expand wildcards.
- */
-BOOLEAN AcpiGbl_NsLoadOnly = FALSE;
-
-
-#define AN_UTILITY_NAME "ACPI Namespace Dump Utility"
-#define AN_SUPPORTED_OPTIONS "?hlv^x:"
-
-
-/******************************************************************************
- *
- * FUNCTION: usage
- *
- * PARAMETERS: None
- *
- * RETURN: None
- *
- * DESCRIPTION: Print a usage message
- *
- *****************************************************************************/
-
-static void
-usage (
- void)
-{
-
- ACPI_USAGE_HEADER ("AcpiNames [options] AMLfile");
- ACPI_OPTION ("-?", "Display this message");
- ACPI_OPTION ("-l", "Load namespace only, no display");
- ACPI_OPTION ("-v", "Display version information");
- ACPI_OPTION ("-vd", "Display build date and time");
- ACPI_OPTION ("-x <DebugLevel>", "Debug output level");
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: main
- *
- * PARAMETERS: argc, argv
- *
- * RETURN: Status (pass/fail)
- *
- * DESCRIPTION: Main routine for NsDump utility
- *
- *****************************************************************************/
-
-int ACPI_SYSTEM_XFACE
-main (
- int argc,
- char **argv)
-{
- ACPI_NEW_TABLE_DESC *ListHead = NULL;
- ACPI_STATUS Status;
- int j;
-
-
- ACPI_DEBUG_INITIALIZE (); /* For debug version only */
-
- /* Init debug globals and ACPICA */
-
- AcpiDbgLevel = ACPI_NORMAL_DEFAULT | ACPI_LV_TABLES;
- AcpiDbgLayer = 0xFFFFFFFF;
-
- /* Set flags so that the interpreter is not used */
-
- Status = AcpiInitializeSubsystem ();
- ACPI_CHECK_OK (AcpiInitializeSubsystem, Status);
- if (ACPI_FAILURE (Status))
- {
- return (-1);
- }
-
- printf (ACPI_COMMON_SIGNON (AN_UTILITY_NAME));
- if (argc < 2)
- {
- usage ();
- return (0);
- }
-
- /* Get the command line options */
-
- while ((j = AcpiGetopt (argc, argv, AN_SUPPORTED_OPTIONS)) != ACPI_OPT_END) switch(j)
- {
- case 'l':
-
- AcpiGbl_NsLoadOnly = TRUE;
- break;
-
- case 'v':
-
- switch (AcpiGbl_Optarg[0])
- {
- case '^': /* -v: (Version): signon already emitted, just exit */
-
- exit (0);
-
- case 'd':
-
- printf (ACPI_COMMON_BUILD_TIME);
- return (0);
-
- default:
-
- printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);
- return (-1);
- }
- break;
-
- case 'x':
-
- AcpiDbgLevel = strtoul (AcpiGbl_Optarg, NULL, 0);
- printf ("Debug Level: 0x%8.8X\n", AcpiDbgLevel);
- break;
-
- case '?':
- case 'h':
- default:
-
- usage();
- return (0);
- }
-
- /* Get each of the ACPI table files on the command line */
-
- while (argv[AcpiGbl_Optind])
- {
- /* Get all ACPI AML tables in this file */
-
- Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind],
- ACPI_GET_ALL_TABLES, &ListHead);
- if (ACPI_FAILURE (Status))
- {
- return (-1);
- }
-
- AcpiGbl_Optind++;
- }
-
- printf ("\n");
-
- /*
- * The next argument is the filename for the DSDT or SSDT.
- * Open the file, build namespace and dump it.
- */
- return (AnDumpEntireNamespace (ListHead));
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AnDumpEntireNamespace
- *
- * PARAMETERS: AmlFilename - Filename for DSDT or SSDT AML table
- *
- * RETURN: Status (pass/fail)
- *
- * DESCRIPTION: Build an ACPI namespace for the input AML table, and dump the
- * formatted namespace contents.
- *
- *****************************************************************************/
-
-static int
-AnDumpEntireNamespace (
- ACPI_NEW_TABLE_DESC *ListHead)
-{
- ACPI_STATUS Status;
- ACPI_HANDLE Handle;
-
-
- /*
- * Build a local XSDT with all tables. Normally, here is where the
- * RSDP search is performed to find the ACPI tables
- */
- Status = AnBuildLocalTables (ListHead);
- if (ACPI_FAILURE (Status))
- {
- return (-1);
- }
-
- /* Initialize table manager, get XSDT */
-
- Status = AcpiInitializeTables (NULL, ACPI_MAX_INIT_TABLES, TRUE);
- if (ACPI_FAILURE (Status))
- {
- printf ("**** Could not initialize ACPI table manager, %s\n",
- AcpiFormatException (Status));
- return (-1);
- }
-
- /* Build the namespace from the tables */
-
- Status = AcpiLoadTables ();
- if (Status == AE_CTRL_TERMINATE)
- {
- /* At least one table load failed -- terminate with error */
-
- return (-1);
- }
-
- if (ACPI_FAILURE (Status))
- {
- printf ("**** While creating namespace, %s\n",
- AcpiFormatException (Status));
- return (-1);
- }
-
- if (AcpiGbl_NsLoadOnly)
- {
- printf ("**** Namespace successfully loaded\n");
- return (0);
- }
-
- /*
- * NOTE:
- * We don't need to do any further ACPICA initialization, since we don't
- * have any hardware, nor is the interpreter configured.
- *
- * Namely, we don't need these calls:
- * AcpiEnableSubsystem
- * AcpiInitializeObjects
- */
-
-
- /*
- * Perform a namespace walk to dump the contents
- */
- AcpiOsPrintf ("\nACPI Namespace:\n");
-
- AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY,
- ACPI_UINT32_MAX, ACPI_OWNER_ID_MAX, AcpiGbl_RootNode);
-
-
- /* Example: get a handle to the _GPE scope */
-
- Status = AcpiGetHandle (NULL, "\\_GPE", &Handle);
- ACPI_CHECK_OK (AcpiGetHandle, Status);
-
- AcDeleteTableList (ListHead);
- return (0);
-}
diff --git a/source/tools/acpinames/anstubs.c b/source/tools/acpinames/anstubs.c
deleted file mode 100644
index 85d9489..0000000
--- a/source/tools/acpinames/anstubs.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/******************************************************************************
- *
- * Module Name: anstubs - Stub routines for the AcpiNames utility
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2020, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include "acpinames.h"
-
-#include <acutils.h>
-#include <acevents.h>
-#include <acdispat.h>
-
-#define _COMPONENT ACPI_TOOLS
- ACPI_MODULE_NAME ("anstubs")
-
-
-/******************************************************************************
- *
- * DESCRIPTION: Stubs used to facilitate linkage of the NsDump utility.
- *
- *****************************************************************************/
-
-
-/* Utilities */
-
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-
-ACPI_STATUS
-AcpiUtCopyIobjectToEobject (
- ACPI_OPERAND_OBJECT *Obj,
- ACPI_BUFFER *RetBuffer)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiUtCopyEobjectToIobject (
- ACPI_OBJECT *Obj,
- ACPI_OPERAND_OBJECT **InternalObj)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiUtCopyIobjectToIobject (
- ACPI_OPERAND_OBJECT *SourceDesc,
- ACPI_OPERAND_OBJECT **DestDesc,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-#endif
-
-/* Hardware */
-
-UINT32
-AcpiHwGetMode (
- void)
-{
- return (0);
-}
-
-/* Event manager */
-
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-
-ACPI_STATUS
-AcpiEvInstallRegionHandlers (
- void)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiEvInitializeOpRegions (
- void)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiEvInitializeRegion (
- ACPI_OPERAND_OBJECT *RegionObj)
-{
- return (AE_OK);
-}
-#endif
-
-ACPI_STATUS
-AcpiEvInstallXruptHandlers (
- void)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiEvInitializeEvents (
- void)
-{
- return (AE_OK);
-}
-
-
-/* AML Interpreter */
-
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-
-ACPI_STATUS
-AcpiExReadDataFromField (
- ACPI_WALK_STATE *WalkState,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_OPERAND_OBJECT **RetBufferDesc)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiExWriteDataToField (
- ACPI_OPERAND_OBJECT *SourceDesc,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_OPERAND_OBJECT **ResultDesc)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiExStoreObjectToNode (
- ACPI_OPERAND_OBJECT *SourceDesc,
- ACPI_NAMESPACE_NODE *Node,
- ACPI_WALK_STATE *WalkState,
- UINT8 ImplicitConversion)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-/* Namespace manager */
-
-ACPI_STATUS
-AcpiNsEvaluate (
- ACPI_EVALUATE_INFO *Info)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-#endif
-
-void
-AcpiExDoDebugObject (
- ACPI_OPERAND_OBJECT *SourceDesc,
- UINT32 Level,
- UINT32 Index)
-{
- return;
-}
-
-void
-AcpiExStartTraceMethod (
- ACPI_NAMESPACE_NODE *MethodNode,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState)
-{
- return;
-}
-
-void
-AcpiExStopTraceMethod (
- ACPI_NAMESPACE_NODE *MethodNode,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState)
-{
- return;
-}
-
-void
-AcpiExStartTraceOpcode (
- ACPI_PARSE_OBJECT *Op,
- ACPI_WALK_STATE *WalkState)
-{
- return;
-}
-
-void
-AcpiExStopTraceOpcode (
- ACPI_PARSE_OBJECT *Op,
- ACPI_WALK_STATE *WalkState)
-
-{
- return;
-}
-
-void
-AcpiExTracePoint (
- ACPI_TRACE_EVENT_TYPE Type,
- BOOLEAN Begin,
- UINT8 *Aml,
- char *Pathname)
-{
- return;
-}
-
-
-/* Dispatcher */
-
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-
-ACPI_STATUS
-AcpiDsAutoSerializeMethod (
- ACPI_NAMESPACE_NODE *Node,
- ACPI_OPERAND_OBJECT *ObjDesc)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsInitializeRegion (
- ACPI_HANDLE ObjHandle)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsCallControlMethod (
- ACPI_THREAD_STATE *Thread,
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiDsRestartControlMethod (
- ACPI_WALK_STATE *WalkState,
- ACPI_OPERAND_OBJECT *ReturnDesc)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-void
-AcpiDsTerminateControlMethod (
- ACPI_OPERAND_OBJECT *MethodDesc,
- ACPI_WALK_STATE *WalkState)
-{
-}
-
-ACPI_STATUS
-AcpiDsMethodError (
- ACPI_STATUS Status,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiDsBeginMethodExecution (
- ACPI_NAMESPACE_NODE *MethodNode,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiDsGetPredicateValue (
- ACPI_WALK_STATE *WalkState,
- ACPI_OPERAND_OBJECT *ResultObj)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-#endif
-
-ACPI_STATUS
-AcpiDsGetBufferFieldArguments (
- ACPI_OPERAND_OBJECT *ObjDesc)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsGetBankFieldArguments (
- ACPI_OPERAND_OBJECT *ObjDesc)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsGetRegionArguments (
- ACPI_OPERAND_OBJECT *RgnDesc)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsGetBufferArguments (
- ACPI_OPERAND_OBJECT *ObjDesc)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsGetPackageArguments (
- ACPI_OPERAND_OBJECT *ObjDesc)
-{
- return (AE_OK);
-}
-
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-
-ACPI_STATUS
-AcpiDsExecBeginOp (
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT **OutOp)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiDsExecEndOp (
- ACPI_WALK_STATE *State)
-{
- ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
- "Stubbed function"));
-
- return (AE_NOT_IMPLEMENTED);
-}
-#endif
diff --git a/source/tools/acpinames/antables.c b/source/tools/acpinames/antables.c
deleted file mode 100644
index 5132ab1..0000000
--- a/source/tools/acpinames/antables.c
+++ /dev/null
@@ -1,352 +0,0 @@
-/******************************************************************************
- *
- * Module Name: antables - ACPI table setup/install for AcpiNames utility
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2020, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include "acpinames.h"
-
-#define _COMPONENT ACPI_TOOLS
- ACPI_MODULE_NAME ("antables")
-
-/* Local prototypes */
-
-static void
-AnInitializeTableHeader (
- ACPI_TABLE_HEADER *Header,
- char *Signature,
- UINT32 Length);
-
-
-/* Non-AML tables that are constructed locally and installed */
-
-static ACPI_TABLE_RSDP LocalRSDP;
-static ACPI_TABLE_FACS LocalFACS;
-
-/*
- * We need a local FADT so that the hardware subcomponent will function,
- * even though the underlying OSD HW access functions don't do anything.
- */
-static ACPI_TABLE_FADT LocalFADT;
-
-/*
- * Use XSDT so that both 32- and 64-bit versions of this utility will
- * function automatically.
- */
-static ACPI_TABLE_XSDT *LocalXSDT;
-
-#define BASE_XSDT_TABLES 1
-#define BASE_XSDT_SIZE (sizeof (ACPI_TABLE_XSDT) + \
- ((BASE_XSDT_TABLES -1) * sizeof (UINT64)))
-
-
-/******************************************************************************
- *
- * FUNCTION: AnInitializeTableHeader
- *
- * PARAMETERS: Header - A valid standard ACPI table header
- * Signature - Signature to insert
- * Length - Length of the table
- *
- * RETURN: None. Header is modified.
- *
- * DESCRIPTION: Initialize the table header for a local ACPI table.
- *
- *****************************************************************************/
-
-static void
-AnInitializeTableHeader (
- ACPI_TABLE_HEADER *Header,
- char *Signature,
- UINT32 Length)
-{
-
- ACPI_COPY_NAMESEG (Header->Signature, Signature);
- Header->Length = Length;
-
- Header->OemRevision = 0x1001;
- memcpy (Header->OemId, "Intel ", ACPI_OEM_ID_SIZE);
- memcpy (Header->OemTableId, "AcpiExec", ACPI_OEM_TABLE_ID_SIZE);
- ACPI_COPY_NAMESEG (Header->AslCompilerId, "INTL");
- Header->AslCompilerRevision = ACPI_CA_VERSION;
-
- /* Set the checksum, must set to zero first */
-
- Header->Checksum = 0;
- Header->Checksum = (UINT8) -AcpiTbChecksum (
- (void *) Header, Header->Length);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AnBuildLocalTables
- *
- * PARAMETERS: TableCount - Number of tables on the command line
- * TableList - List of actual tables from files
- *
- * RETURN: Status
- *
- * DESCRIPTION: Build a complete ACPI table chain, with a local RSDP, XSDT,
- * FADT, FACS, and the input DSDT/SSDT.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AnBuildLocalTables (
- ACPI_NEW_TABLE_DESC *TableList)
-{
- UINT32 TableCount = 0;
- ACPI_PHYSICAL_ADDRESS DsdtAddress = 0;
- UINT32 XsdtSize;
- ACPI_NEW_TABLE_DESC *NextTable;
- UINT32 NextIndex;
- ACPI_TABLE_FADT *ExternalFadt = NULL;
-
-
- /*
- * Update the table count. For the DSDT, it is not put into the XSDT.
- * For the FADT, this table is already accounted for since we usually
- * install a local FADT.
- */
- NextTable = TableList;
- while (NextTable)
- {
- if (!ACPI_COMPARE_NAMESEG (NextTable->Table->Signature, ACPI_SIG_DSDT) &&
- !ACPI_COMPARE_NAMESEG (NextTable->Table->Signature, ACPI_SIG_FADT))
- {
- TableCount++;
- }
-
- NextTable = NextTable->Next;
- }
-
- XsdtSize = BASE_XSDT_SIZE + (TableCount * sizeof (UINT64));
-
- /* Build an XSDT */
-
- LocalXSDT = AcpiOsAllocate (XsdtSize);
- if (!LocalXSDT)
- {
- return (AE_NO_MEMORY);
- }
-
- memset (LocalXSDT, 0, XsdtSize);
- LocalXSDT->TableOffsetEntry[0] = ACPI_PTR_TO_PHYSADDR (&LocalFADT);
-
- /*
- * Install the user tables. The DSDT must be installed in the FADT.
- * All other tables are installed directly into the XSDT.
- *
- * Note: The tables are loaded in reverse order from the incoming
- * input, which makes it match the command line order.
- */
- NextIndex = BASE_XSDT_TABLES;
- NextTable = TableList;
- while (NextTable)
- {
- /*
- * Incoming DSDT or FADT are special cases. All other tables are
- * just immediately installed into the XSDT.
- */
- if (ACPI_COMPARE_NAMESEG (NextTable->Table->Signature, ACPI_SIG_DSDT))
- {
- if (DsdtAddress)
- {
- printf ("Already found a DSDT, only one allowed\n");
- return (AE_ALREADY_EXISTS);
- }
-
- /* The incoming user table is a DSDT */
-
- DsdtAddress = ACPI_PTR_TO_PHYSADDR (NextTable->Table);
- }
- else if (ACPI_COMPARE_NAMESEG (NextTable->Table->Signature, ACPI_SIG_FADT))
- {
- ExternalFadt =
- ACPI_CAST_PTR (ACPI_TABLE_FADT, NextTable->Table);
- LocalXSDT->TableOffsetEntry[0] =
- ACPI_PTR_TO_PHYSADDR (NextTable->Table);
- }
- else
- {
- /* Install the table in the XSDT */
-
- LocalXSDT->TableOffsetEntry[TableCount - NextIndex + 1] =
- ACPI_PTR_TO_PHYSADDR (NextTable->Table);
- NextIndex++;
- }
-
- NextTable = NextTable->Next;
- }
-
- /* Build an RSDP. Contains a valid XSDT only, no RSDT */
-
- memset (&LocalRSDP, 0, sizeof (ACPI_TABLE_RSDP));
- ACPI_MAKE_RSDP_SIG (LocalRSDP.Signature);
- memcpy (LocalRSDP.OemId, "Intel", 6);
-
- LocalRSDP.Revision = 2;
- LocalRSDP.XsdtPhysicalAddress = ACPI_PTR_TO_PHYSADDR (LocalXSDT);
- LocalRSDP.Length = sizeof (ACPI_TABLE_XSDT);
-
- /* Set checksums for both XSDT and RSDP */
-
- AnInitializeTableHeader ((void *) LocalXSDT, ACPI_SIG_XSDT, XsdtSize);
-
- LocalRSDP.Checksum = 0;
- LocalRSDP.Checksum = (UINT8) -AcpiTbChecksum (
- (void *) &LocalRSDP, ACPI_RSDP_CHECKSUM_LENGTH);
-
- if (!DsdtAddress)
- {
- return (AE_SUPPORT);
- }
-
- /*
- * Build an FADT. There are two options for the FADT:
- * 1) Incoming external FADT specified on the command line
- * 2) A fully featured local FADT
- */
- memset (&LocalFADT, 0, sizeof (ACPI_TABLE_FADT));
-
- if (ExternalFadt)
- {
- /*
- * Use the external FADT, but we must update the DSDT/FACS
- * addresses as well as the checksum
- */
- ExternalFadt->Dsdt = (UINT32) DsdtAddress;
- ExternalFadt->Facs = ACPI_PTR_TO_PHYSADDR (&LocalFACS);
-
- /*
- * If there room in the FADT for the XDsdt and XFacs 64-bit
- * pointers, use them.
- */
- if (ExternalFadt->Header.Length > ACPI_PTR_DIFF (
- &ExternalFadt->XDsdt, ExternalFadt))
- {
- ExternalFadt->Dsdt = 0;
- ExternalFadt->Facs = 0;
- ExternalFadt->XDsdt = DsdtAddress;
- ExternalFadt->XFacs = ACPI_PTR_TO_PHYSADDR (&LocalFACS);
- }
-
- /* Complete the external FADT with the checksum */
-
- ExternalFadt->Header.Checksum = 0;
- ExternalFadt->Header.Checksum = (UINT8) -AcpiTbChecksum (
- (void *) ExternalFadt, ExternalFadt->Header.Length);
- }
- else
- {
- /*
- * Build a local FADT so we can test the hardware/event init
- */
- LocalFADT.Header.Revision = 5;
-
- /* Setup FADT header and DSDT/FACS addresses */
-
- LocalFADT.Dsdt = 0;
- LocalFADT.Facs = 0;
-
- LocalFADT.XDsdt = DsdtAddress;
- LocalFADT.XFacs = ACPI_PTR_TO_PHYSADDR (&LocalFACS);
-
- /* Miscellaneous FADT fields */
-
- LocalFADT.Gpe0BlockLength = 16;
- LocalFADT.Gpe0Block = 0x00001234;
-
- LocalFADT.Gpe1BlockLength = 6;
- LocalFADT.Gpe1Block = 0x00005678;
- LocalFADT.Gpe1Base = 96;
-
- LocalFADT.Pm1EventLength = 4;
- LocalFADT.Pm1aEventBlock = 0x00001aaa;
- LocalFADT.Pm1bEventBlock = 0x00001bbb;
-
- LocalFADT.Pm1ControlLength = 2;
- LocalFADT.Pm1aControlBlock = 0xB0;
-
- LocalFADT.PmTimerLength = 4;
- LocalFADT.PmTimerBlock = 0xA0;
-
- LocalFADT.Pm2ControlBlock = 0xC0;
- LocalFADT.Pm2ControlLength = 1;
-
- /* Setup one example X-64 field */
-
- LocalFADT.XPm1bEventBlock.SpaceId = ACPI_ADR_SPACE_SYSTEM_IO;
- LocalFADT.XPm1bEventBlock.Address = LocalFADT.Pm1bEventBlock;
- LocalFADT.XPm1bEventBlock.BitWidth = (UINT8)
- ACPI_MUL_8 (LocalFADT.Pm1EventLength);
- }
-
- AnInitializeTableHeader ((void *) &LocalFADT,
- ACPI_SIG_FADT, sizeof (ACPI_TABLE_FADT));
-
- /* Build a FACS */
-
- memset (&LocalFACS, 0, sizeof (ACPI_TABLE_FACS));
- ACPI_COPY_NAMESEG (LocalFACS.Signature, ACPI_SIG_FACS);
-
- LocalFACS.Length = sizeof (ACPI_TABLE_FACS);
- LocalFACS.GlobalLock = 0x11AA0011;
- return (AE_OK);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AcpiOsGetRootPointer
- *
- * PARAMETERS: None
- *
- * RETURN: Address of the RSDP
- *
- * DESCRIPTION: Return a local RSDP, used to dynamically load tables via the
- * standard ACPI mechanism.
- *
- *****************************************************************************/
-
-ACPI_PHYSICAL_ADDRESS
-AcpiOsGetRootPointer (
- void)
-{
-
- return (ACPI_PTR_TO_PHYSADDR (&LocalRSDP));
-}
diff --git a/source/tools/acpisrc/acpisrc.h b/source/tools/acpisrc/acpisrc.h
index ebc9a10..ec4c17b 100644
--- a/source/tools/acpisrc/acpisrc.h
+++ b/source/tools/acpisrc/acpisrc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpisrc/ascase.c b/source/tools/acpisrc/ascase.c
index 6459e4e..640f00b 100644
--- a/source/tools/acpisrc/ascase.c
+++ b/source/tools/acpisrc/ascase.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpisrc/asconvrt.c b/source/tools/acpisrc/asconvrt.c
index cc803ba..a1acfb5 100644
--- a/source/tools/acpisrc/asconvrt.c
+++ b/source/tools/acpisrc/asconvrt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -73,7 +77,7 @@
#define MODULE_HEADER_BEGIN "/******************************************************************************\n *\n * Module Name:";
#define MODULE_HEADER_END " *****************************************************************************/\n\n"
-#define INTEL_COPYRIGHT " * Copyright (C) 2000 - 2020, Intel Corp.\n"
+#define INTEL_COPYRIGHT " * Copyright (C) 2000 - 2022, Intel Corp.\n"
/* Opening signature of the Intel legal header */
diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c
index bda3877..261be45 100644
--- a/source/tools/acpisrc/asfile.c
+++ b/source/tools/acpisrc/asfile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpisrc/asmain.c b/source/tools/acpisrc/asmain.c
index 00d5734..f732e3d 100644
--- a/source/tools/acpisrc/asmain.c
+++ b/source/tools/acpisrc/asmain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpisrc/asremove.c b/source/tools/acpisrc/asremove.c
index 1e1c022..9755cc8 100644
--- a/source/tools/acpisrc/asremove.c
+++ b/source/tools/acpisrc/asremove.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c
index c25310b..a2730e9 100644
--- a/source/tools/acpisrc/astable.c
+++ b/source/tools/acpisrc/astable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -85,7 +89,7 @@
char EmptyHeader[] = "";
char DualLicenseHeader[] =
"/*\n"
-" * Copyright (C) 2000 - 2020, Intel Corp.\n"
+" * Copyright (C) 2000 - 2022, Intel Corp.\n"
" * All rights reserved.\n"
" *\n"
" * Redistribution and use in source and binary forms, with or without\n"
@@ -103,10 +107,14 @@
" * of any contributors may be used to endorse or promote products derived\n"
" * from this software without specific prior written permission.\n"
" *\n"
+" * Alternatively, this software may be distributed under the terms of the\n"
+" * GNU General Public License (\"GPL\") version 2 as published by the Free\n"
+" * Software Foundation.\n"
+" *\n"
" * NO WARRANTY\n"
" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"
" * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"
-" * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR\n"
+" * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"
" * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"
" * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n"
" * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n"
@@ -261,7 +269,6 @@
{"ACPI_MEMORY_ATTRIBUTE", SRC_TYPE_STRUCT},
{"ACPI_MEMORY_LIST", SRC_TYPE_STRUCT},
{"ACPI_METHOD_LOCAL", SRC_TYPE_STRUCT},
- {"ACPI_MTMR_ENTRY", SRC_TYPE_STRUCT},
{"ACPI_MUTEX", SRC_TYPE_SIMPLE},
{"ACPI_MUTEX_HANDLE", SRC_TYPE_SIMPLE},
{"ACPI_MUTEX_INFO", SRC_TYPE_STRUCT},
@@ -273,6 +280,7 @@
{"ACPI_NATIVE_INT", SRC_TYPE_SIMPLE},
{"ACPI_NATIVE_UINT", SRC_TYPE_SIMPLE},
{"ACPI_NEW_TABLE_DESC", SRC_TYPE_STRUCT},
+
{"ACPI_NOTIFY_HANDLER", SRC_TYPE_SIMPLE},
{"ACPI_NOTIFY_INFO", SRC_TYPE_STRUCT},
{"ACPI_NS_SEARCH_DATA", SRC_TYPE_STRUCT},
@@ -327,6 +335,7 @@
{"ACPI_PARSE_STATE", SRC_TYPE_STRUCT},
{"ACPI_PARSE_UPWARDS", SRC_TYPE_SIMPLE},
{"ACPI_PARSE_VALUE", SRC_TYPE_UNION},
+ {"ACPI_PCC_INFO", SRC_TYPE_STRUCT},
{"ACPI_PCI_DEVICE", SRC_TYPE_STRUCT},
{"ACPI_PCI_ID", SRC_TYPE_STRUCT},
{"ACPI_PCI_ROUTING_TABLE", SRC_TYPE_STRUCT},
@@ -359,6 +368,7 @@
{"ACPI_RESOURCE_ADDRESS32", SRC_TYPE_STRUCT},
{"ACPI_RESOURCE_ADDRESS64", SRC_TYPE_STRUCT},
{"ACPI_RESOURCE_COMMON_SERIALBUS", SRC_TYPE_STRUCT},
+ {"ACPI_RESOURCE_CSI2_SERIALBUS", SRC_TYPE_STRUCT},
{"ACPI_RESOURCE_EXTENDED_ADDRESS64", SRC_TYPE_STRUCT},
{"ACPI_RESOURCE_ATTRIBUTE", SRC_TYPE_UNION},
{"ACPI_RESOURCE_DATA", SRC_TYPE_UNION},
@@ -419,10 +429,8 @@
{"ACPI_TABLE_INFO", SRC_TYPE_STRUCT},
{"ACPI_TABLE_LIST", SRC_TYPE_STRUCT},
{"ACPI_TABLE_LPIT", SRC_TYPE_STRUCT},
- {"ACPI_TABLE_MTMR", SRC_TYPE_STRUCT},
{"ACPI_TABLE_SUPPORT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TYPE", SRC_TYPE_SIMPLE},
- {"ACPI_TABLE_VRTC", SRC_TYPE_STRUCT},
{"ACPI_TAG_INFO", SRC_TYPE_STRUCT},
{"ACPI_THREAD_ID", SRC_TYPE_SIMPLE},
{"ACPI_THREAD_STATE", SRC_TYPE_STRUCT},
@@ -433,7 +441,6 @@
{"ACPI_UUID", SRC_TYPE_STRUCT},
{"ACPI_VENDOR_UUID", SRC_TYPE_STRUCT},
{"ACPI_VENDOR_WALK_INFO", SRC_TYPE_STRUCT},
- {"ACPI_VRTC_ENTRY", SRC_TYPE_STRUCT},
{"ACPI_WALK_AML_CALLBACK", SRC_TYPE_SIMPLE},
{"ACPI_WALK_CALLBACK", SRC_TYPE_SIMPLE},
{"ACPI_WALK_RESOURCE_CALLBACK", SRC_TYPE_SIMPLE},
@@ -459,6 +466,7 @@
{"AML_RESOURCE_ADDRESS32", SRC_TYPE_STRUCT},
{"AML_RESOURCE_ADDRESS64", SRC_TYPE_STRUCT},
{"AML_RESOURCE_COMMON_SERIALBUS", SRC_TYPE_STRUCT},
+ {"AML_RESOURCE_CSI2_SERIALBUS", SRC_TYPE_STRUCT},
{"AML_RESOURCE_DMA", SRC_TYPE_STRUCT},
{"AML_RESOURCE_END_DEPENDENT", SRC_TYPE_STRUCT},
{"AML_RESOURCE_END_TAG", SRC_TYPE_STRUCT},
@@ -495,15 +503,22 @@
{"AE_DEBUG_REGIONS", SRC_TYPE_STRUCT},
{"AE_REGION", SRC_TYPE_STRUCT},
{"ASL_ANALYSIS_WALK_INFO", SRC_TYPE_STRUCT},
+ {"ASL_CACHE_INFO", SRC_TYPE_STRUCT},
{"ASL_COMMENT_STATE", SRC_TYPE_STRUCT},
{"ASL_COMMENT_TYPES", SRC_TYPE_SIMPLE},
{"ASL_ERROR_MSG", SRC_TYPE_STRUCT},
- {"ASL_ERROR_MSG", SRC_TYPE_STRUCT},
{"ASL_EVENT_INFO", SRC_TYPE_STRUCT},
+ {"ASL_EXPECTED_MESSAGE", SRC_TYPE_STRUCT},
+ {"ASL_EXPECTED_MSG_NODE", SRC_TYPE_STRUCT},
+ {"ASL_FILE_DESC", SRC_TYPE_STRUCT},
{"ASL_FILE_INFO", SRC_TYPE_STRUCT},
+ {"ASL_FILE_NODE", SRC_TYPE_STRUCT},
{"ASL_FILE_STATUS", SRC_TYPE_STRUCT},
+ {"ASL_FILE_TYPES", SRC_TYPE_STRUCT},
+ {"ASL_GLOBAL_FILE_NODE", SRC_TYPE_STRUCT},
{"ASL_INCLUDE_DIR", SRC_TYPE_STRUCT},
{"ASL_LISTING_NODE", SRC_TYPE_STRUCT},
+ {"ASL_LOCATION_NODE", SRC_TYPE_STRUCT},
{"ASL_MAPPING_ENTRY", SRC_TYPE_STRUCT},
{"ASL_METHOD_INFO", SRC_TYPE_STRUCT},
{"ASL_METHOD_LOCAL", SRC_TYPE_STRUCT},
@@ -518,10 +533,15 @@
/*
* Acpi table definition names.
*/
+ {"ACPI_TABLE_AEST", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_AGDI", SRC_TYPE_STRUCT},
{"ACPI_TABLE_ASF", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_BDAT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_BERT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_BGRT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_BOOT", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_CCEL", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_CEDT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_CPEP", SRC_TYPE_STRUCT},
{"ACPI_TABLE_CSRT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_DBG2", SRC_TYPE_STRUCT},
@@ -548,15 +568,20 @@
{"ACPI_TABLE_MSCT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_MSDM", SRC_TYPE_STRUCT},
{"ACPI_TABLE_NFIT", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_NHLT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_PCCT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_PDTT", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_PHAT", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_PMTT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_PPTT", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_PRMT", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_RGRT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_RSDP", SRC_TYPE_STRUCT},
{"ACPI_TABLE_RSDT", SRC_TYPE_STRUCT},
- {"ACPI_TABLE_MCHI", SRC_TYPE_STRUCT},
{"ACPI_TABLE_S3PT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_SBST", SRC_TYPE_STRUCT},
{"ACPI_TABLE_SDEV", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_SVKL", SRC_TYPE_STRUCT},
{"ACPI_TABLE_SLIC", SRC_TYPE_STRUCT},
{"ACPI_TABLE_SLIT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_SPCR", SRC_TYPE_STRUCT},
@@ -564,9 +589,11 @@
{"ACPI_TABLE_SRAT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_STAO", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TCPA", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_TDEL", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TPM2", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TPM23", SRC_TYPE_STRUCT},
{"ACPI_TABLE_UEFI", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_VIOT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_WAET", SRC_TYPE_STRUCT},
{"ACPI_TABLE_WDAT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_WDDT", SRC_TYPE_STRUCT},
@@ -576,6 +603,19 @@
{"ACPI_TABLE_XENV", SRC_TYPE_STRUCT},
{"ACPI_TABLE_XSDT", SRC_TYPE_STRUCT},
+ /* Individual per-table names (typically subtables) */
+
+ {"ACPI_AEST_GIC", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_MEMORY", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_NODE_INTERFACE", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_NODE_INTERRUPT", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_PROCESSOR", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_PROCESSOR_CACHE", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_PROCESSOR_GENERIC", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_PROCESSOR_TLB", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_SMMU", SRC_TYPE_STRUCT},
+ {"ACPI_AEST_VENDOR", SRC_TYPE_STRUCT},
{"ACPI_ASF_ADDRESS", SRC_TYPE_STRUCT},
{"ACPI_ASF_ALERT", SRC_TYPE_STRUCT},
{"ACPI_ASF_ALERT_DATA", SRC_TYPE_STRUCT},
@@ -585,6 +625,8 @@
{"ACPI_ASF_REMOTE", SRC_TYPE_STRUCT},
{"ACPI_ASF_RMCP", SRC_TYPE_STRUCT},
{"ACPI_BERT_REGION", SRC_TYPE_STRUCT},
+ {"ACPI_CEDT_CHBS", SRC_TYPE_STRUCT},
+ {"ACPI_CEDT_HEADER", SRC_TYPE_STRUCT},
{"ACPI_CPEP_POLLING", SRC_TYPE_STRUCT},
{"ACPI_CSRT_GROUP", SRC_TYPE_STRUCT},
{"ACPI_CSRT_DESCRIPTOR", SRC_TYPE_STRUCT},
@@ -648,6 +690,8 @@
{"ACPI_IORT_SMMU_GSI", SRC_TYPE_STRUCT},
{"ACPI_IORT_SMMU_V3", SRC_TYPE_STRUCT},
{"ACPI_IORT_PMCG", SRC_TYPE_STRUCT},
+ {"ACPI_IORT_RMR", SRC_TYPE_STRUCT},
+ {"ACPI_IORT_RMR_DESC", SRC_TYPE_STRUCT},
{"ACPI_IVRS_HEADER", SRC_TYPE_STRUCT},
{"ACPI_IVRS_HARDWARE", SRC_TYPE_STRUCT},
{"ACPI_IVRS_DE_HEADER", SRC_TYPE_STRUCT},
@@ -673,35 +717,81 @@
{"ACPI_MADT_INTERRUPT_OVERRIDE", SRC_TYPE_STRUCT},
{"ACPI_MADT_INTERRUPT_SOURCE", SRC_TYPE_STRUCT},
{"ACPI_MADT_NMI_SOURCE", SRC_TYPE_STRUCT},
+ {"ACPI_MADT_MULTIPROC_WAKEUP", SRC_TYPE_STRUCT},
+ {"ACPI_MADT_MULTIPROC_WAKEUP_MAILBOX", SRC_TYPE_STRUCT},
{"ACPI_MADT_PROCESSOR_APIC", SRC_TYPE_STRUCT},
+ {"ACPI_MCFG_ALLOCATION", SRC_TYPE_STRUCT},
{"ACPI_MPST_COMPONENT", SRC_TYPE_STRUCT},
{"ACPI_MPST_DATA_HDR", SRC_TYPE_STRUCT},
{"ACPI_MPST_POWER_DATA", SRC_TYPE_STRUCT},
{"ACPI_MPST_POWER_NODE", SRC_TYPE_STRUCT},
{"ACPI_MPST_POWER_STATE", SRC_TYPE_STRUCT},
- {"ACPI_MCFG_ALLOCATION", SRC_TYPE_STRUCT},
{"ACPI_MSCT_PROXIMITY", SRC_TYPE_STRUCT},
{"ACPI_NFIT_CAPABILITIES", SRC_TYPE_STRUCT},
- {"ACPI_NFIT_DEVICE_HANDLE", SRC_TYPE_STRUCT},
- {"ACPI_NFIT_HEADER", SRC_TYPE_STRUCT},
- {"ACPI_NFIT_SYSTEM_ADDRESS", SRC_TYPE_STRUCT},
- {"ACPI_NFIT_MEMORY_MAP", SRC_TYPE_STRUCT},
- {"ACPI_NFIT_INTERLEAVE", SRC_TYPE_STRUCT},
- {"ACPI_NFIT_SMBIOS", SRC_TYPE_STRUCT},
{"ACPI_NFIT_CONTROL_REGION", SRC_TYPE_STRUCT},
{"ACPI_NFIT_DATA_REGION", SRC_TYPE_STRUCT},
+ {"ACPI_NFIT_DEVICE_HANDLE", SRC_TYPE_STRUCT},
{"ACPI_NFIT_FLUSH_ADDRESS", SRC_TYPE_STRUCT},
+ {"ACPI_NFIT_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_NFIT_INTERLEAVE", SRC_TYPE_STRUCT},
+ {"ACPI_NFIT_MEMORY_MAP", SRC_TYPE_STRUCT},
+ {"ACPI_NFIT_SMBIOS", SRC_TYPE_STRUCT},
+ {"ACPI_NFIT_SYSTEM_ADDRESS", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_SPECIFIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_SPECIFIC_HDR", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_ENDPOINT", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_ENDPOINT_COUNT", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_FORMAT_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_FORMATS_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_INFO_COUNT", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_DEVICE_INFO", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION",SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_RENDER_DEVICE_SPECIFIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_TABLE_TERMINATOR", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_WAVE_EXTENSIBLE", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_NHLT_ENDPOINT", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_VENDOR_MIC_DEVICE_SPECIFIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG",SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG",SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_NHLT_ENDPOINT_COUNT", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_TABLE_TERMINATOR", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_VENDOR_MIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_VENDOR_MIC_COUNT", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_VENDOR_MIC_DEVICE_SPECIFIC_CONFIG", SRC_TYPE_STRUCT},
+ {"ACPI_NHLT_WAVE_EXTENSIBLE", SRC_TYPE_STRUCT},
{"ACPI_PCCT_EXT_PCC_SHARED_MEMORY", SRC_TYPE_STRUCT},
{"ACPI_PCCT_HW_REDUCED", SRC_TYPE_STRUCT},
{"ACPI_PCCT_HW_REDUCED_TYPE2", SRC_TYPE_STRUCT},
{"ACPI_PCCT_EXT_PCC_MASTER", SRC_TYPE_STRUCT},
{"ACPI_PCCT_EXT_PCC_SLAVE", SRC_TYPE_STRUCT},
+ {"ACPI_PCCT_HW_REG", SRC_TYPE_STRUCT},
{"ACPI_PCCT_SHARED_MEMORY", SRC_TYPE_STRUCT},
{"ACPI_PCCT_SUBSPACE", SRC_TYPE_STRUCT},
{"ACPI_PDTT_CHANNEL", SRC_TYPE_STRUCT},
+ {"ACPI_PHAT_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_PHAT_VERSION_DATA", SRC_TYPE_STRUCT},
+ {"ACPI_PHAT_VERSION_ELEMENT", SRC_TYPE_STRUCT},
+ {"ACPI_PHAT_HEALTH_DATA", SRC_TYPE_STRUCT},
+ {"ACPI_PMTT_CONTROLLER", SRC_TYPE_STRUCT},
+ {"ACPI_PMTT_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_PMTT_PHYSICAL_COMPONENT", SRC_TYPE_STRUCT},
+ {"ACPI_PMTT_SOCKET", SRC_TYPE_STRUCT},
+ {"ACPI_PMTT_VENDOR_SPECIFIC", SRC_TYPE_STRUCT},
{"ACPI_PPTT_CACHE", SRC_TYPE_STRUCT},
+ {"ACPI_PPTT_CACHE_V1", SRC_TYPE_STRUCT},
{"ACPI_PPTT_ID", SRC_TYPE_STRUCT},
{"ACPI_PPTT_PROCESSOR", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_PRMT_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_PRMT_MODULE_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_PRMT_MODULE_INFO", SRC_TYPE_STRUCT},
+ {"ACPI_PRMT_HANDLER_INFO", SRC_TYPE_STRUCT},
{"ACPI_RSDP_COMMON", SRC_TYPE_STRUCT},
{"ACPI_RSDP_EXTENSION", SRC_TYPE_STRUCT},
{"ACPI_S3PT_RESUME", SRC_TYPE_STRUCT},
@@ -710,6 +800,7 @@
{"ACPI_SDEV_NAMESPACE", SRC_TYPE_STRUCT},
{"ACPI_SDEV_PCIE", SRC_TYPE_STRUCT},
{"ACPI_SDEV_PCIE_PATH", SRC_TYPE_STRUCT},
+ {"ACPI_SVKL_KEY", SRC_TYPE_STRUCT},
{"ACPI_SRAT_CPU_AFFINITY", SRC_TYPE_STRUCT},
{"ACPI_SRAT_HEADER", SRC_TYPE_STRUCT},
{"ACPI_SRAT_GIC_ITS_AFFINITY", SRC_TYPE_STRUCT},
@@ -722,7 +813,13 @@
{"ACPI_TPM2_TRAILER", SRC_TYPE_STRUCT},
{"ACPI_TPM23_TRAILER", SRC_TYPE_STRUCT},
{"ACPI_TPM2_ARM_SMC", SRC_TYPE_STRUCT},
+ {"ACPI_VIOT_HEADER", SRC_TYPE_STRUCT},
+ {"ACPI_VIOT_PCI_RANGE", SRC_TYPE_STRUCT},
+ {"ACPI_VIOT_MMIO", SRC_TYPE_STRUCT},
+ {"ACPI_VIOT_VIRTIO_IOMMU_PCI", SRC_TYPE_STRUCT},
+ {"ACPI_VIOT_VIRTIO_IOMMU_MMIO", SRC_TYPE_STRUCT},
{"ACPI_WDAT_ENTRY", SRC_TYPE_STRUCT},
+ {"ACPI_WPBT_UNICODE", SRC_TYPE_STRUCT},
/* Data Table compiler */
@@ -853,7 +950,7 @@
/* C source files */
- "// SPDX-License-Identifier: BSD-3-Clause\n",
+ "// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0\n",
LinuxDataTypes,
LinuxEliminateLines_C,
NULL,
@@ -868,7 +965,7 @@
/* C header files */
- "/* SPDX-License-Identifier: BSD-3-Clause */\n",
+ "/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */\n",
LinuxDataTypes,
LinuxEliminateLines_H,
LinuxConditionalIdentifiers,
@@ -1040,8 +1137,8 @@
ACPI_STRING_TABLE CustomReplacements[] =
{
- {"(c) 1999 - 2020", "(c) 1999 - 2020", REPLACE_WHOLE_WORD}, /* Main ACPICA source */
- {"(c) 2006 - 2020", "(c) 2006 - 2020", REPLACE_WHOLE_WORD}, /* Test suites */
+ {"(c) 1999 - 2021", "(c) 1999 - 2022", REPLACE_WHOLE_WORD}, /* Main ACPICA source */
+ {"(c) 2006 - 2021", "(c) 2006 - 2022", REPLACE_WHOLE_WORD}, /* Test suites */
#if 0
{"SUPPORT, ASSISTANCE", "SUPPORT, ASSISTANCE", REPLACE_WHOLE_WORD}, /* Fix intel header */
diff --git a/source/tools/acpisrc/asutils.c b/source/tools/acpisrc/asutils.c
index deed726..d8fa34e 100644
--- a/source/tools/acpisrc/asutils.c
+++ b/source/tools/acpisrc/asutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c
index 603b39e..cd87b8e 100644
--- a/source/tools/acpixtract/acpixtract.c
+++ b/source/tools/acpixtract/acpixtract.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -449,7 +453,7 @@
FILE *InputFile;
unsigned char Header[48];
UINT32 ByteCount = 0;
- UINT32 ThisLineByteCount;
+ INT32 ThisLineByteCount;
unsigned int State = AX_STATE_FIND_HEADER;
diff --git a/source/tools/acpixtract/acpixtract.h b/source/tools/acpixtract/acpixtract.h
index 124ad97..5a75731 100644
--- a/source/tools/acpixtract/acpixtract.h
+++ b/source/tools/acpixtract/acpixtract.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -82,8 +86,8 @@
#define AX_LINE_BUFFER_SIZE 256
#define AX_MIN_BLOCK_HEADER_LENGTH 6 /* strlen ("DSDT @") */
#define AX_HEX_DATA_LENGTH 49 /* (3 * 16) + 1 for the colon delimiter */
-#define AX_IS_TABLE_BLOCK_HEADER (strlen (Gbl_LineBuffer) < AX_HEX_DATA_LENGTH) && \
- (strstr (Gbl_LineBuffer, " @ "))
+#define AX_IS_TABLE_BLOCK_HEADER (strlen (Gbl_LineBuffer) < AX_HEX_DATA_LENGTH && \
+ strstr (Gbl_LineBuffer, " @ "))
typedef struct AxTableInfo
diff --git a/source/tools/acpixtract/axmain.c b/source/tools/acpixtract/axmain.c
index d4dfa8c..489a912 100644
--- a/source/tools/acpixtract/axmain.c
+++ b/source/tools/acpixtract/axmain.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c
index 1d33999..589196e 100644
--- a/source/tools/acpixtract/axutils.c
+++ b/source/tools/acpixtract/axutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/efihello/efihello.c b/source/tools/efihello/efihello.c
index 48c781d..01e0f31 100644
--- a/source/tools/efihello/efihello.c
+++ b/source/tools/efihello/efihello.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/examples/examples.c b/source/tools/examples/examples.c
index 71bd176..bd67d12 100644
--- a/source/tools/examples/examples.c
+++ b/source/tools/examples/examples.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/examples/examples.h b/source/tools/examples/examples.h
index 42e9929..4890c0d 100644
--- a/source/tools/examples/examples.h
+++ b/source/tools/examples/examples.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/examples/exstubs.c b/source/tools/examples/exstubs.c
index 09817ba..a20967a 100644
--- a/source/tools/examples/exstubs.c
+++ b/source/tools/examples/exstubs.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/source/tools/examples/extables.c b/source/tools/examples/extables.c
index 8322b76..159021e 100644
--- a/source/tools/examples/extables.c
+++ b/source/tools/examples/extables.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2020, Intel Corp.
+ * Copyright (C) 2000 - 2022, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,14 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
@@ -203,19 +207,19 @@
/* Set new checksums for the modified tables */
Rsdp->Checksum = 0;
- Rsdp->Checksum = (UINT8) -AcpiTbChecksum (
+ Rsdp->Checksum = (UINT8) -AcpiUtChecksum (
(void *) RsdpCode, ACPI_RSDP_CHECKSUM_LENGTH);
Rsdt->Header.Checksum = 0;
- Rsdt->Header.Checksum = (UINT8) -AcpiTbChecksum (
+ Rsdt->Header.Checksum = (UINT8) -AcpiUtChecksum (
(void *) Rsdt, Rsdt->Header.Length);
Xsdt->Header.Checksum = 0;
- Xsdt->Header.Checksum = (UINT8) -AcpiTbChecksum (
+ Xsdt->Header.Checksum = (UINT8) -AcpiUtChecksum (
(void *) Xsdt, Xsdt->Header.Length);
Fadt->Header.Checksum = 0;
- Fadt->Header.Checksum = (UINT8) -AcpiTbChecksum (
+ Fadt->Header.Checksum = (UINT8) -AcpiUtChecksum (
(void *) Fadt, Fadt->Header.Length);
}