aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2010-07-06 17:18:05 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2010-07-06 17:18:05 +0000
commit6d31afa8e3ab79bfa6c97c341af73f4fc093351a (patch)
tree514e3ade7be23ac83127870abf009b5e5ae1d36f
parentf2bf96d30fe08965ffd53a28099131ac030e43d5 (diff)
downloadsrc-6d31afa8e3ab79bfa6c97c341af73f4fc093351a.tar.gz
src-6d31afa8e3ab79bfa6c97c341af73f4fc093351a.zip
Import ACPICA 20100702.vendor/acpica/20100702
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=209734 svn path=/vendor-sys/acpica/20100702/; revision=209735; tag=vendor/acpica/20100702
-rw-r--r--changes.txt76
-rw-r--r--common/adisasm.c8
-rw-r--r--common/dmtable.c298
-rw-r--r--common/dmtbdump.c51
-rw-r--r--common/dmtbinfo.c105
-rw-r--r--compiler/Makefile715
-rw-r--r--compiler/aslcompile.c11
-rw-r--r--compiler/aslcompiler.h14
-rw-r--r--compiler/asldefine.h1
-rw-r--r--compiler/aslerror.c7
-rw-r--r--compiler/aslfiles.c93
-rw-r--r--compiler/aslglobal.h5
-rw-r--r--compiler/aslmain.c34
-rw-r--r--compiler/aslstartup.c21
-rw-r--r--compiler/aslutils.c45
-rw-r--r--compiler/dtcompile.c39
-rw-r--r--compiler/dtcompiler.h38
-rw-r--r--compiler/dtfield.c153
-rw-r--r--compiler/dtio.c250
-rw-r--r--compiler/dttable.c20
-rw-r--r--compiler/dttemplate.c445
-rw-r--r--compiler/dttemplate.h757
-rw-r--r--compiler/dtutils.c18
-rw-r--r--debugger/dbdisply.c4
-rw-r--r--dispatcher/dsobject.c16
-rw-r--r--events/evgpe.c112
-rw-r--r--events/evgpeblk.c17
-rw-r--r--events/evgpeinit.c3
-rw-r--r--events/evxface.c16
-rw-r--r--events/evxfevnt.c192
-rw-r--r--executer/exfldio.c90
-rw-r--r--executer/exprep.c91
-rw-r--r--hardware/hwgpe.c124
-rw-r--r--include/acdisasm.h23
-rw-r--r--include/acevents.h6
-rw-r--r--include/achware.h12
-rw-r--r--include/aclocal.h1
-rw-r--r--include/acobject.h1
-rw-r--r--include/acoutput.h3
-rw-r--r--include/acpixf.h14
-rw-r--r--include/actbl.h23
-rw-r--r--include/actbl2.h42
-rw-r--r--include/actypes.h9
-rw-r--r--include/acutils.h4
-rw-r--r--namespace/nsrepair.c2
-rw-r--r--os_specific/service_layers/osunixxf.c13
-rw-r--r--osunixxf.c13
-rw-r--r--tests/templates/Makefile9
-rwxr-xr-xtests/templates/templates.sh50
-rw-r--r--tools/acpiexec/Makefile759
-rw-r--r--tools/acpiexec/aeexec.c16
-rw-r--r--tools/acpisrc/astable.c32
-rw-r--r--utilities/utmisc.c42
53 files changed, 3896 insertions, 1047 deletions
diff --git a/changes.txt b/changes.txt
index a99ed32bfcfb..49f66639e858 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,80 @@
----------------------------------------
+02 July 2010. Summary of changes for version 20100702:
+
+This release is available at www.acpica.org/downloads
+
+1) ACPI CA Core Subsystem:
+
+Implemented several updates to the recently added GPE reference count
+support. The model for "wake" GPEs is changing to give the host OS complete
+control of these GPEs. Eventually, the ACPICA core will not execute any _PRW
+methods, since the host already must execute them. Also, additional changes
+were made to help ensure that the reference counts are kept in proper
+synchronization with reality. Rafael J. Wysocki.
+
+1) Ensure that GPEs are not enabled twice during initialization.
+2) Ensure that GPE enable masks stay in sync with the reference count.
+3) Do not inadvertently enable GPEs when writing GPE registers.
+4) Remove the internal wake reference counter and add new AcpiGpeWakeup
+interface. This interface will set or clear individual GPEs for wakeup.
+5) Remove GpeType argument from AcpiEnable and AcpiDisable. These interfaces
+are now used for "runtime" GPEs only.
+
+Changed the behavior of the GPE install/remove handler interfaces. The GPE is
+no longer disabled during this process, as it was found to cause problems on
+some machines. Rafael J. Wysocki.
+
+Reverted a change introduced in version 20100528 to enable Embedded
+Controller multi-byte transfers. This change was found to cause problems with
+Index Fields and possibly Bank Fields. It will be reintroduced when these
+problems have been resolved.
+
+Fixed a problem with references to Alias objects within Package Objects. A
+reference to an Alias within the definition of a Package was not always
+resolved properly. Aliases to objects like Processors, Thermal zones, etc.
+were resolved to the actual object instead of a reference to the object as it
+should be. Package objects are only allowed to contain integer, string,
+buffer, package, and reference objects. Redhat bugzilla 608648.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has a
+much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total
+ Debug Version: 164.1K Code, 51.5K Data, 215.6K Total
+ Current Release:
+ Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total
+ Debug Version: 164.0K Code, 51.5K Data, 215.5K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented a new compiler subsystem to allow definition and
+compilation of the non-AML ACPI tables such as FADT, MADT, SRAT, etc. These
+are called "ACPI Data Tables", and the new compiler is the "Data Table
+Compiler". This compiler is intended to simplify the existing error-prone
+process of creating these tables for the BIOS, as well as allowing the
+disassembly, modification, recompilation, and override of existing ACPI data
+tables. See the iASL User Guide for detailed information.
+
+iASL: Implemented a new Template Generator option in support of the new Data
+Table Compiler. This option will create examples of all known ACPI tables
+that can be used as the basis for table development. See the iASL
+documentation and the -T option.
+
+Disassembler and headers: Added support for the WDDT ACPI table (Watchdog
+Descriptor Table).
+
+Updated the Linux makefiles for iASL and AcpiExec to place the generated
+object files in the local directory so that there can be no collisions
+between the shared files between them that are generated with different
+options.
+
+Added support for Mac OS X in the Unix OSL used for iASL and AcpiExec. Use
+the #define __APPLE__ to enable this support.
+
+----------------------------------------
28 May 2010. Summary of changes for version 20100528:
This release is available at www.acpica.org/downloads
diff --git a/common/adisasm.c b/common/adisasm.c
index 5c55f5c33149..293053584e7c 100644
--- a/common/adisasm.c
+++ b/common/adisasm.c
@@ -153,10 +153,6 @@ AdCreateTableHeader (
char *Filename,
ACPI_TABLE_HEADER *Table);
-void
-AdDisassemblerHeader (
- char *Filename);
-
ACPI_STATUS
AdDeferredParse (
ACPI_PARSE_OBJECT *Op,
@@ -644,7 +640,7 @@ AdCreateTableHeader (
*/
AdDisassemblerHeader (Filename);
- AcpiOsPrintf (" *\n * Original Table Header:\n");
+ AcpiOsPrintf (" * Original Table Header:\n");
AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature);
AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length);
@@ -689,7 +685,7 @@ AdCreateTableHeader (
AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId);
AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
- AcpiOsPrintf (" */\n");
+ AcpiOsPrintf (" */\n\n");
/* Create AML output filename based on input filename */
diff --git a/common/dmtable.c b/common/dmtable.c
index 49b8bb071768..05bd5e494574 100644
--- a/common/dmtable.c
+++ b/common/dmtable.c
@@ -117,6 +117,7 @@
#include "accommon.h"
#include "acdisasm.h"
#include "actables.h"
+#include "aslcompiler.h"
#include "dtcompiler.h"
/* This module used for application-level code only */
@@ -132,10 +133,6 @@ AcpiDmCheckAscii (
char *RepairedName,
UINT32 Count);
-UINT8
-AcpiTbGenerateChecksum (
- ACPI_TABLE_HEADER *Table);
-
/* These tables map a subtable type to a description string */
@@ -158,6 +155,74 @@ static const char *AcpiDmDmarSubnames[] =
"Unknown SubTable Type" /* Reserved */
};
+static const char *AcpiDmEinjActions[] =
+{
+ "Begin Operation",
+ "Get Trigger Table",
+ "Set Error Type",
+ "Get Error Type",
+ "End Operation",
+ "Execute Operation",
+ "Check Busy Status",
+ "Get Command Status",
+ "Unknown Action"
+};
+
+static const char *AcpiDmEinjInstructions[] =
+{
+ "Read Register",
+ "Read Register Value",
+ "Write Register",
+ "Write Register Value",
+ "Noop",
+ "Unknown Instruction"
+};
+
+static const char *AcpiDmErstActions[] =
+{
+ "Begin Write Operation",
+ "Begin Read Operation",
+ "Begin Clear Operation",
+ "End Operation",
+ "Set Record Offset",
+ "Execute Operation",
+ "Check Busy Status",
+ "Get Command Status",
+ "Get Record Identifier",
+ "Set Record Identifier",
+ "Get Record Count",
+ "Begin Dummy Write",
+ "Unused/Unknown Action",
+ "Get Error Address Range",
+ "Get Error Address Length",
+ "Get Error Attributes",
+ "Unknown Action"
+};
+
+static const char *AcpiDmErstInstructions[] =
+{
+ "Read Register",
+ "Read Register Value",
+ "Write Register",
+ "Write Register Value",
+ "Noop",
+ "Load Var1",
+ "Load Var2",
+ "Store Var1",
+ "Add",
+ "Subtract",
+ "Add Value",
+ "Subtract Value",
+ "Stall",
+ "Stall While True",
+ "Skip Next If True",
+ "GoTo",
+ "Set Source Address",
+ "Set Destination Address",
+ "Move Data",
+ "Unknown Instruction"
+};
+
static const char *AcpiDmHestSubnames[] =
{
"IA-32 Machine Check Exception",
@@ -234,56 +299,59 @@ static const char *AcpiDmFadtProfiles[] =
*
* ACPI Table Data, indexed by signature.
*
- * Each entry contains: Signature, Table Info, Handler, Description
+ * Each entry contains: Signature, Table Info, Handler, DtHandler,
+ * Template, Description
*
- * Simple tables have only a TableInfo structure, complex tables have a handler.
- * This table must be NULL terminated. RSDP and FACS are special-cased
- * elsewhere.
+ * Simple tables have only a TableInfo structure, complex tables have a
+ * handler. This table must be NULL terminated. RSDP and FACS are
+ * special-cased elsewhere.
*
******************************************************************************/
-static ACPI_DMTABLE_DATA AcpiDmTableData[] =
+ACPI_DMTABLE_DATA AcpiDmTableData[] =
{
- {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, "Alert Standard Format table"},
- {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, "Simple Boot Flag Table"},
- {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, "Boot Error Record Table"},
- {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, "Corrected Platform Error Polling table"},
- {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, "Debug Port table"},
- {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, "DMA Remapping table"},
- {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, "Embedded Controller Boot Resources Table"},
- {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, "Error Injection table"},
- {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, "Error Record Serialization Table"},
- {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, "Fixed ACPI Description Table"},
- {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, "Hardware Error Source Table"},
- {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, "High Precision Event Timer table"},
- {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, "I/O Virtualization Reporting Structure"},
- {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, "Multiple APIC Description Table"},
- {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, "Memory Mapped Configuration table"},
- {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, "Management Controller Host Interface table"},
- {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, "Maximum System Characteristics Table"},
- {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, "Root System Description Table"},
- {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, "Smart Battery Specification Table"},
- {ACPI_SIG_SLIC, AcpiDmTableInfoSlic, NULL, NULL, "Software Licensing Description Table"},
- {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, "System Locality Information Table"},
- {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, "Serial Port Console Redirection table"},
- {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, "Server Platform Management Interface table"},
- {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, "System Resource Affinity Table"},
- {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, "Trusted Computing Platform Alliance table"},
- {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, NULL, "UEFI Boot Optimization Table"},
- {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, "Windows ACPI Emulated Devices Table"},
- {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, "Watchdog Action Table"},
- {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, "Watchdog Resource Table"},
- {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, "Extended System Description Table"},
- {NULL, NULL, NULL, NULL, NULL}
+ {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf, "Alert Standard Format table"},
+ {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot, "Simple Boot Flag Table"},
+ {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert, "Boot Error Record Table"},
+ {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep, "Corrected Platform Error Polling table"},
+ {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp, "Debug Port table"},
+ {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar, "DMA Remapping table"},
+ {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt, "Embedded Controller Boot Resources Table"},
+ {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj, "Error Injection table"},
+ {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst, "Error Record Serialization Table"},
+ {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt, "Fixed ACPI Description Table"},
+ {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest, "Hardware Error Source Table"},
+ {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet, "High Precision Event Timer table"},
+ {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs, "I/O Virtualization Reporting Structure"},
+ {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt, "Multiple APIC Description Table"},
+ {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg, "Memory Mapped Configuration table"},
+ {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"},
+ {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"},
+ {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt, "Root System Description Table"},
+ {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst, "Smart Battery Specification Table"},
+ {ACPI_SIG_SLIC, AcpiDmTableInfoSlic, NULL, NULL, NULL, "Software Licensing Description Table"},
+ {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit, "System Locality Information Table"},
+ {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr, "Serial Port Console Redirection table"},
+ {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi, "Server Platform Management Interface table"},
+ {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat, "System Resource Affinity Table"},
+ {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa, "Trusted Computing Platform Alliance table"},
+ {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, NULL, TemplateUefi, "UEFI Boot Optimization Table"},
+ {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet, "Windows ACPI Emulated Devices Table"},
+ {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat, "Watchdog Action Table"},
+ {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt, "Watchdog Description Table"},
+ {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt, "Watchdog Resource Table"},
+ {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt, "Extended System Description Table"},
+ {NULL, NULL, NULL, NULL, NULL, NULL}
};
/*******************************************************************************
*
- * FUNCTION: AcpiTbGenerateChecksum
+ * FUNCTION: AcpiDmGenerateChecksum
*
- * PARAMETERS: Table - Pointer to a valid ACPI table (with a
- * standard ACPI header)
+ * 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
*
@@ -292,19 +360,21 @@ static ACPI_DMTABLE_DATA AcpiDmTableData[] =
******************************************************************************/
UINT8
-AcpiTbGenerateChecksum (
- ACPI_TABLE_HEADER *Table)
+AcpiDmGenerateChecksum (
+ void *Table,
+ UINT32 Length,
+ UINT8 OriginalChecksum)
{
UINT8 Checksum;
/* Sum the entire table as-is */
- Checksum = AcpiTbChecksum ((UINT8 *) Table, Table->Length);
+ Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
/* Subtract off the existing checksum value in the table */
- Checksum = (UINT8) (Checksum - Table->Checksum);
+ Checksum = (UINT8) (Checksum - OriginalChecksum);
/* Compute the final checksum */
@@ -429,10 +499,13 @@ AcpiDmDumpDataTable (
}
}
- /* Always dump the raw table data */
+ if (!Gbl_DoTemplates || Gbl_VerboseTemplates)
+ {
+ /* Dump the raw table data */
- AcpiOsPrintf ("\nRaw Table Data\n\n");
- AcpiUtDumpBuffer2 (ACPI_CAST_PTR (UINT8, Table), Length, DB_BYTE_DISPLAY);
+ AcpiOsPrintf ("\nRaw Table Data\n\n");
+ AcpiUtDumpBuffer2 (ACPI_CAST_PTR (UINT8, Table), Length, DB_BYTE_DISPLAY);
+ }
}
@@ -460,15 +533,31 @@ AcpiDmLineHeader (
char *Name)
{
- if (ByteLength)
+ if (Gbl_DoTemplates && !Gbl_VerboseTemplates) /* Terse template */
{
- AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %28s : ",
- Offset, Offset, ByteLength, Name);
+ if (ByteLength)
+ {
+ AcpiOsPrintf ("[%.3d] %34s : ",
+ ByteLength, Name);
+ }
+ else
+ {
+ AcpiOsPrintf ("%40s : ",
+ Name);
+ }
}
- else
+ else /* Normal disassembler or verbose template */
{
- AcpiOsPrintf ("%43s : ",
- Name);
+ if (ByteLength)
+ {
+ AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %28s : ",
+ Offset, Offset, ByteLength, Name);
+ }
+ else
+ {
+ AcpiOsPrintf ("%43s : ",
+ Name);
+ }
}
}
@@ -480,15 +569,31 @@ AcpiDmLineHeader2 (
UINT32 Value)
{
- if (ByteLength)
+ if (Gbl_DoTemplates && !Gbl_VerboseTemplates) /* Terse template */
{
- AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %24s % 3d : ",
- Offset, Offset, ByteLength, Name, Value);
+ if (ByteLength)
+ {
+ AcpiOsPrintf ("[%.3d] %30s % 3d : ",
+ ByteLength, Name, Value);
+ }
+ else
+ {
+ AcpiOsPrintf ("%36s % 3d : ",
+ Name, Value);
+ }
}
- else
+ else /* Normal disassembler or verbose template */
{
- AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s % 3d : ",
- Offset, Offset, Name, Value);
+ if (ByteLength)
+ {
+ AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %24s % 3d : ",
+ Offset, Offset, ByteLength, Name, Value);
+ }
+ else
+ {
+ AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s % 3d : ",
+ Offset, Offset, Name, Value);
+ }
}
}
@@ -508,6 +613,8 @@ AcpiDmLineHeader2 (
*
* DESCRIPTION: Display ACPI table contents by walking the Info table.
*
+ * Note: This function must remain in sync with DtGetFieldLength.
+ *
******************************************************************************/
ACPI_STATUS
@@ -568,6 +675,10 @@ AcpiDmDumpTable (
case ACPI_DMT_ASF:
case ACPI_DMT_HESTNTYP:
case ACPI_DMT_FADTPM:
+ case ACPI_DMT_EINJACT:
+ case ACPI_DMT_EINJINST:
+ case ACPI_DMT_ERSTACT:
+ case ACPI_DMT_ERSTINST:
ByteLength = 1;
break;
case ACPI_DMT_UINT16:
@@ -702,7 +813,11 @@ AcpiDmDumpTable (
for (Temp8 = 0; Temp8 < 16; Temp8++)
{
- AcpiOsPrintf ("%2.2X,", Target[Temp8]);
+ AcpiOsPrintf ("%2.2X", Target[Temp8]);
+ if ((Temp8 + 1) < 16)
+ {
+ AcpiOsPrintf (",");
+ }
}
AcpiOsPrintf ("\n");
break;
@@ -751,7 +866,9 @@ AcpiDmDumpTable (
/* Checksum, display and validate */
AcpiOsPrintf ("%2.2X", *Target);
- Temp8 = AcpiTbGenerateChecksum (Table);
+ Temp8 = AcpiDmGenerateChecksum (Table,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
{
AcpiOsPrintf (
@@ -804,6 +921,58 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%4.4X <%s>\n", ACPI_GET16 (Target), AcpiDmDmarSubnames[Temp16]);
break;
+ case ACPI_DMT_EINJACT:
+
+ /* EINJ Action types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_EINJ_ACTION_RESERVED)
+ {
+ Temp8 = ACPI_EINJ_ACTION_RESERVED;
+ }
+
+ AcpiOsPrintf ("%2.2X (%s)\n", *Target, AcpiDmEinjActions[Temp8]);
+ break;
+
+ case ACPI_DMT_EINJINST:
+
+ /* EINJ Instruction types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_EINJ_INSTRUCTION_RESERVED)
+ {
+ Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
+ }
+
+ AcpiOsPrintf ("%2.2X (%s)\n", *Target, AcpiDmEinjInstructions[Temp8]);
+ break;
+
+ case ACPI_DMT_ERSTACT:
+
+ /* ERST Action types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_ERST_ACTION_RESERVED)
+ {
+ Temp8 = ACPI_ERST_ACTION_RESERVED;
+ }
+
+ AcpiOsPrintf ("%2.2X (%s)\n", *Target, AcpiDmErstActions[Temp8]);
+ break;
+
+ case ACPI_DMT_ERSTINST:
+
+ /* ERST Instruction types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_ERST_INSTRUCTION_RESERVED)
+ {
+ Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
+ }
+
+ AcpiOsPrintf ("%2.2X (%s)\n", *Target, AcpiDmErstInstructions[Temp8]);
+ break;
+
case ACPI_DMT_HEST:
/* HEST subtable types */
@@ -839,7 +1008,6 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%2.2X (%s)\n", *Target, AcpiDmHestNotifySubnames[Temp8]);
break;
-
case ACPI_DMT_MADT:
/* MADT subtable types */
diff --git a/common/dmtbdump.c b/common/dmtbdump.c
index a929f0ff858e..8bbaf663fb9b 100644
--- a/common/dmtbdump.c
+++ b/common/dmtbdump.c
@@ -130,7 +130,8 @@
*
* PARAMETERS: Table - A RSDP
*
- * RETURN: Length of the table (there is no length field, use revision)
+ * RETURN: Length of the table (there is not always a length field,
+ * use revision or length if available (ACPI 2.0+))
*
* DESCRIPTION: Format the contents of a RSDP
*
@@ -140,19 +141,42 @@ UINT32
AcpiDmDumpRsdp (
ACPI_TABLE_HEADER *Table)
{
- UINT32 Length = ACPI_RSDP_REV0_SIZE;
+ ACPI_TABLE_RSDP *Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Table);
+ UINT32 Length = sizeof (ACPI_RSDP_COMMON);
+ UINT8 Checksum;
/* Dump the common ACPI 1.0 portion */
AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoRsdp1);
- /* ACPI 2.0+ contains more data and has a Length field */
+ /* Validate the first checksum */
- if (ACPI_CAST_PTR (ACPI_TABLE_RSDP, Table)->Revision > 0)
+ Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON),
+ Rsdp->Checksum);
+ if (Checksum != Rsdp->Checksum)
{
- Length = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Table)->Length;
+ AcpiOsPrintf ("/* Incorrect Checksum above, should be 0x%2.2X */\n",
+ Checksum);
+ }
+
+ /* The RSDP for ACPI 2.0+ contains more data and has a Length field */
+
+ if (Rsdp->Revision > 0)
+ {
+ Length = Rsdp->Length;
AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoRsdp2);
+
+ /* Validate the extended checksum over entire RSDP */
+
+ Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP),
+ Rsdp->ExtendedChecksum);
+ if (Checksum != Rsdp->ExtendedChecksum)
+ {
+ AcpiOsPrintf (
+ "/* Incorrect Extended Checksum above, should be 0x%2.2X */\n",
+ Checksum);
+ }
}
return (Length);
@@ -595,7 +619,7 @@ AcpiDmDumpDmar (
while (PathOffset < ScopeTable->Length)
{
AcpiDmLineHeader ((PathOffset + ScopeOffset + Offset), 2, "PCI Path");
- AcpiOsPrintf ("[%2.2X, %2.2X]\n", PciPath[0], PciPath[1]);
+ AcpiOsPrintf ("%2.2X,%2.2X\n", PciPath[0], PciPath[1]);
/* Point to next PCI Path entry */
@@ -709,7 +733,7 @@ AcpiDmDumpErst (
{
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length, Offset, SubTable,
- sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoEinj0);
+ sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoErst0);
if (ACPI_FAILURE (Status))
{
return;
@@ -1301,15 +1325,20 @@ AcpiDmDumpSlit (
return;
}
- AcpiOsPrintf ("%2.2X ", Row[j]);
+ AcpiOsPrintf ("%2.2X", Row[j]);
Offset++;
/* Display up to 16 bytes per output row */
- if (j && (((j+1) % 16) == 0) && ((j+1) < Localities))
+ if ((j+1) < Localities)
{
- AcpiOsPrintf ("\n");
- AcpiDmLineHeader (Offset, 0, "");
+ AcpiOsPrintf (",");
+
+ if (j && (((j+1) % 16) == 0))
+ {
+ AcpiOsPrintf ("\n");
+ AcpiDmLineHeader (Offset, 0, "");
+ }
}
}
diff --git a/common/dmtbinfo.c b/common/dmtbinfo.c
index a978a94f1b67..9abf586b3fb1 100644
--- a/common/dmtbinfo.c
+++ b/common/dmtbinfo.c
@@ -153,6 +153,7 @@
#define ACPI_UEFI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
#define ACPI_WAET_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WAET,f)
#define ACPI_WDAT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
+#define ACPI_WDDT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
#define ACPI_WDRT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
/* Subtables */
@@ -171,6 +172,7 @@
#define ACPI_DMAR2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
#define ACPI_DMAR3_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
#define ACPI_EINJ0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
+#define ACPI_ERST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
#define ACPI_HEST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f)
#define ACPI_HEST1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f)
#define ACPI_HEST2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_NMI,f)
@@ -229,6 +231,12 @@
#define ACPI_MADT8_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f,o)
#define ACPI_MADT9_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC,f,o)
#define ACPI_MADT10_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f,o)
+#define ACPI_WDDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
+#define ACPI_EINJ0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
+#define ACPI_ERST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
+#define ACPI_HEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f,o)
+#define ACPI_HEST1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_CORRECTED,f,o)
+#define ACPI_HEST6_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_AER_ROOT,f,o)
/*
* Required terminator for all tables below
@@ -731,7 +739,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[] =
{
- {ACPI_DMT_UINT32, ACPI_EINJ_OFFSET (HeaderLength), "Injection Header Length", DT_LENGTH},
+ {ACPI_DMT_UINT32, ACPI_EINJ_OFFSET (HeaderLength), "Injection Header Length", 0},
{ACPI_DMT_UINT8, ACPI_EINJ_OFFSET (Flags), "Flags", 0},
{ACPI_DMT_UINT24, ACPI_EINJ_OFFSET (Reserved[0]), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_EINJ_OFFSET (Entries), "Injection Entry Count", 0},
@@ -740,9 +748,11 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[] =
{
- {ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Action), "Action", 0},
- {ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Instruction), "Instruction", 0},
- {ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_EINJACT, ACPI_EINJ0_OFFSET (Action), "Action", 0},
+ {ACPI_DMT_EINJINST, ACPI_EINJ0_OFFSET (Instruction), "Instruction", 0},
+ {ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_EINJ0_FLAG_OFFSET (Flags,0), "Preserve Register Bits", 0},
+
{ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_GAS, ACPI_EINJ0_OFFSET (RegisterRegion), "Register Region", 0},
{ACPI_DMT_UINT64, ACPI_EINJ0_OFFSET (Value), "Value", 0},
@@ -759,12 +769,26 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoErst[] =
{
- {ACPI_DMT_UINT32, ACPI_ERST_OFFSET (HeaderLength), "Serialization Header Length", DT_LENGTH},
+ {ACPI_DMT_UINT32, ACPI_ERST_OFFSET (HeaderLength), "Serialization Header Length", 0},
{ACPI_DMT_UINT32, ACPI_ERST_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_ERST_OFFSET (Entries), "Instruction Entry Count", 0},
ACPI_DMT_TERMINATOR
};
+ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[] =
+{
+ {ACPI_DMT_ERSTACT, ACPI_ERST0_OFFSET (Action), "Action", 0},
+ {ACPI_DMT_ERSTINST, ACPI_ERST0_OFFSET (Instruction), "Instruction", 0},
+ {ACPI_DMT_UINT8, ACPI_ERST0_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_ERST0_FLAG_OFFSET (Flags,0), "Preserve Register Bits", 0},
+
+ {ACPI_DMT_UINT8, ACPI_ERST0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_GAS, ACPI_ERST0_OFFSET (RegisterRegion), "Register Region", 0},
+ {ACPI_DMT_UINT64, ACPI_ERST0_OFFSET (Value), "Value", 0},
+ {ACPI_DMT_UINT64, ACPI_ERST0_OFFSET (Mask), "Mask", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
@@ -786,7 +810,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest[] =
#define ACPI_DM_HEST_AER \
{ACPI_DMT_UINT16, ACPI_HEST6_OFFSET (Aer.Reserved1), "Reserved", 0}, \
- {ACPI_DMT_UINT8, ACPI_HEST6_OFFSET (Aer.Flags), "Flags", 0}, \
+ {ACPI_DMT_UINT8, ACPI_HEST6_OFFSET (Aer.Flags), "Flags (decoded below)", DT_FLAG}, \
+ {ACPI_DMT_FLAG0, ACPI_HEST6_FLAG_OFFSET (Aer.Flags,0), "Firmware First", 0}, \
{ACPI_DMT_UINT8, ACPI_HEST6_OFFSET (Aer.Enabled), "Enabled", 0}, \
{ACPI_DMT_UINT32, ACPI_HEST6_OFFSET (Aer.RecordsToPreallocate), "Records To Preallocate", 0}, \
{ACPI_DMT_UINT32, ACPI_HEST6_OFFSET (Aer.MaxSectionsPerRecord), "Max Sections Per Record", 0}, \
@@ -808,15 +833,17 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoHest0[] =
{
ACPI_DM_HEST_HEADER,
- {ACPI_DMT_UINT16, ACPI_HEST0_OFFSET (Reserved1), "Reserved", 0},
- {ACPI_DMT_UINT8, ACPI_HEST0_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_UINT16, ACPI_HEST0_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT8, ACPI_HEST0_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_HEST0_FLAG_OFFSET (Flags,0), "Firmware First", 0},
+
{ACPI_DMT_UINT8, ACPI_HEST0_OFFSET (Enabled), "Enabled", 0},
{ACPI_DMT_UINT32, ACPI_HEST0_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0},
{ACPI_DMT_UINT32, ACPI_HEST0_OFFSET (MaxSectionsPerRecord), "Max Sections Per Record", 0},
{ACPI_DMT_UINT64, ACPI_HEST0_OFFSET (GlobalCapabilityData), "Global Capability Data", 0},
{ACPI_DMT_UINT64, ACPI_HEST0_OFFSET (GlobalControlData), "Global Control Data", 0},
{ACPI_DMT_UINT8, ACPI_HEST0_OFFSET (NumHardwareBanks), "Num Hardware Banks", 0},
- {ACPI_DMT_UINT56, ACPI_HEST0_OFFSET (Reserved3[0]), "Reserved", 0},
+ {ACPI_DMT_UINT56, ACPI_HEST0_OFFSET (Reserved3[0]), "Reserved2", 0},
ACPI_DMT_TERMINATOR
};
@@ -825,14 +852,16 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest0[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoHest1[] =
{
ACPI_DM_HEST_HEADER,
- {ACPI_DMT_UINT16, ACPI_HEST1_OFFSET (Reserved1), "Reserved", 0},
- {ACPI_DMT_UINT8, ACPI_HEST1_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_UINT16, ACPI_HEST1_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT8, ACPI_HEST1_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_HEST1_FLAG_OFFSET (Flags,0), "Firmware First", 0},
+
{ACPI_DMT_UINT8, ACPI_HEST1_OFFSET (Enabled), "Enabled", 0},
{ACPI_DMT_UINT32, ACPI_HEST1_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0},
{ACPI_DMT_UINT32, ACPI_HEST1_OFFSET (MaxSectionsPerRecord), "Max Sections Per Record", 0},
{ACPI_DMT_HESTNTFY, ACPI_HEST1_OFFSET (Notify), "Notify", 0},
{ACPI_DMT_UINT8, ACPI_HEST1_OFFSET (NumHardwareBanks), "Num Hardware Banks", 0},
- {ACPI_DMT_UINT24, ACPI_HEST1_OFFSET (Reserved2[0]), "Reserved", 0},
+ {ACPI_DMT_UINT24, ACPI_HEST1_OFFSET (Reserved2[0]), "Reserved2", 0},
ACPI_DMT_TERMINATOR
};
@@ -848,7 +877,6 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest2[] =
ACPI_DMT_TERMINATOR
};
-
/* 6: PCI Express Root Port AER */
ACPI_DMTABLE_INFO AcpiDmTableInfoHest6[] =
@@ -1425,15 +1453,15 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[] =
{
{ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (ProximityDomain), "Proximity Domain", 0},
- {ACPI_DMT_UINT16, ACPI_SRAT1_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_SRAT1_OFFSET (Reserved), "Reserved1", 0},
{ACPI_DMT_UINT64, ACPI_SRAT1_OFFSET (BaseAddress), "Base Address", 0},
{ACPI_DMT_UINT64, ACPI_SRAT1_OFFSET (Length), "Address Length", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (Reserved1), "Reserved2", 0},
{ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_SRAT1_FLAG_OFFSET (Flags,0), "Enabled", 0},
{ACPI_DMT_FLAG1, ACPI_SRAT1_FLAG_OFFSET (Flags,0), "Hot Pluggable", 0},
{ACPI_DMT_FLAG2, ACPI_SRAT1_FLAG_OFFSET (Flags,0), "Non-Volatile", 0},
- {ACPI_DMT_UINT64, ACPI_SRAT1_OFFSET (Reserved2), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_SRAT1_OFFSET (Reserved2), "Reserved3", 0},
ACPI_DMT_TERMINATOR
};
@@ -1441,13 +1469,13 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[] =
{
- {ACPI_DMT_UINT16, ACPI_SRAT2_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_SRAT2_OFFSET (Reserved), "Reserved1", 0},
{ACPI_DMT_UINT32, ACPI_SRAT2_OFFSET (ProximityDomain), "Proximity Domain", 0},
{ACPI_DMT_UINT32, ACPI_SRAT2_OFFSET (ApicId), "Apic ID", 0},
{ACPI_DMT_UINT32, ACPI_SRAT2_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_SRAT2_FLAG_OFFSET (Flags,0), "Enabled", 0},
{ACPI_DMT_UINT32, ACPI_SRAT2_OFFSET (ClockDomain), "Clock Domain", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT2_OFFSET (Reserved2), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_SRAT2_OFFSET (Reserved2), "Reserved2", 0},
ACPI_DMT_TERMINATOR
};
@@ -1537,6 +1565,46 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[] =
/*******************************************************************************
*
+ * WDDT - Watchdog Description Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoWddt[] =
+{
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (SpecVersion), "Specification Version", 0},
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (TableVersion), "Table Version", 0},
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (PciVendorId), "PCI Vendor ID", 0},
+ {ACPI_DMT_GAS, ACPI_WDDT_OFFSET (Address), "Timer Register", 0},
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (MaxCount), "Max Count", 0},
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (MinCount), "Min Count", 0},
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (Period), "Period", 0},
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (Status), "Status (decoded below)", 0},
+
+ /* Status Flags byte 0 */
+
+ {ACPI_DMT_FLAG0, ACPI_WDDT_FLAG_OFFSET (Status,0), "Available", 0},
+ {ACPI_DMT_FLAG1, ACPI_WDDT_FLAG_OFFSET (Status,0), "Active", 0},
+ {ACPI_DMT_FLAG2, ACPI_WDDT_FLAG_OFFSET (Status,0), "OS Owns", 0},
+
+ /* Status Flags byte 1 */
+
+ {ACPI_DMT_FLAG3, ACPI_WDDT_FLAG_OFFSET (Status,1), "User Reset", 0},
+ {ACPI_DMT_FLAG4, ACPI_WDDT_FLAG_OFFSET (Status,1), "Timeout Reset", 0},
+ {ACPI_DMT_FLAG5, ACPI_WDDT_FLAG_OFFSET (Status,1), "Power Fail Reset", 0},
+ {ACPI_DMT_FLAG6, ACPI_WDDT_FLAG_OFFSET (Status,1), "Unknown Reset", 0},
+
+ {ACPI_DMT_UINT16, ACPI_WDDT_OFFSET (Capability), "Capability (decoded below)", 0},
+
+ /* Capability Flags byte 0 */
+
+ {ACPI_DMT_FLAG0, ACPI_WDDT_FLAG_OFFSET (Capability,0), "Auto Reset", 0},
+ {ACPI_DMT_FLAG1, ACPI_WDDT_FLAG_OFFSET (Capability,0), "Timeout Alert", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* WDRT - Watchdog Resource Table
*
******************************************************************************/
@@ -1555,4 +1623,3 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[] =
{ACPI_DMT_UINT8, ACPI_WDRT_OFFSET (Units), "Counter Units", 0},
ACPI_DMT_TERMINATOR
};
-
diff --git a/compiler/Makefile b/compiler/Makefile
index 6b6ac5c5105d..962ab670235a 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -1,161 +1,580 @@
-
+#
+# iASL compiler/disassembler
+#
+
PROG= iasl
-SRCS= \
- aslcompilerparse.c \
- aslcompilerlex.c \
- aslanalyze.c \
- aslcodegen.c \
- aslcompile.c \
- aslerror.c \
- aslfiles.c \
- aslfold.c \
- asllength.c \
- asllisting.c \
- aslload.c \
- asllookup.c \
- aslmain.c \
- aslmap.c \
- aslopcodes.c \
- asloperands.c \
- aslopt.c \
- aslpredef.c \
- aslresource.c \
- aslrestype1.c \
- aslrestype1i.c \
- aslrestype2.c \
- aslrestype2d.c \
- aslrestype2e.c \
- aslrestype2q.c \
- aslrestype2w.c \
- aslstartup.c \
- aslstubs.c \
- asltransform.c \
- asltree.c \
- aslutils.c \
- dtcompile.c \
- dtfield.c \
- dtio.c \
- dtsubtable.c \
- dttable.c \
- dtutils.c \
- ../common/getopt.c \
- ../utilities/utalloc.c \
- ../utilities/utcache.c \
- ../utilities/utcopy.c \
- ../utilities/utdebug.c \
- ../utilities/utdelete.c \
- ../utilities/utglobal.c \
- ../utilities/utinit.c \
- ../utilities/utlock.c \
- ../utilities/utobject.c \
- ../utilities/utmisc.c \
- ../utilities/utmath.c \
- ../utilities/utmutex.c \
- ../utilities/utresrc.c \
- ../utilities/utstate.c \
- ../utilities/utxface.c \
- ../namespace/nsaccess.c \
- ../namespace/nsalloc.c \
- ../namespace/nsdump.c \
- ../namespace/nsnames.c \
- ../namespace/nsobject.c \
- ../namespace/nsparse.c \
- ../namespace/nssearch.c \
- ../namespace/nsutils.c \
- ../namespace/nswalk.c \
- ../namespace/nsxfobj.c \
- ../parser/psargs.c \
- ../parser/psloop.c \
- ../parser/psopcode.c \
- ../parser/psparse.c \
- ../parser/psscope.c \
- ../parser/pstree.c \
- ../parser/psutils.c \
- ../parser/pswalk.c \
- ../dispatcher/dswscope.c \
- ../dispatcher/dswstate.c \
- ../dispatcher/dsfield.c \
- ../dispatcher/dsobject.c \
- ../dispatcher/dsopcode.c \
- ../dispatcher/dsutils.c \
- ../dispatcher/dswexec.c \
- ../dispatcher/dswload.c \
- ../executer/exconvrt.c \
- ../executer/excreate.c \
- ../executer/exdump.c \
- ../executer/exmisc.c \
- ../executer/exmutex.c \
- ../executer/exnames.c \
- ../executer/exoparg1.c \
- ../executer/exoparg2.c \
- ../executer/exoparg3.c \
- ../executer/exoparg6.c \
- ../executer/exprep.c \
- ../executer/exregion.c \
- ../executer/exresnte.c \
- ../executer/exresolv.c \
- ../executer/exresop.c \
- ../executer/exstore.c \
- ../executer/exstoren.c \
- ../executer/exstorob.c \
- ../executer/exsystem.c \
- ../executer/exutils.c \
- ../common/adfile.c \
- ../common/adisasm.c \
- ../common/adwalk.c \
- ../common/dmextern.c \
- ../common/dmrestag.c \
- ../common/dmtable.c \
- ../common/dmtbinfo.c \
- ../common/dmtbdump.c \
- ../debugger/dbfileio.c \
- ../disassembler/dmbuffer.c \
- ../disassembler/dmnames.c \
- ../disassembler/dmopcode.c \
- ../disassembler/dmobject.c \
- ../disassembler/dmresrc.c \
- ../disassembler/dmresrcl.c \
- ../disassembler/dmresrcs.c \
- ../disassembler/dmutils.c \
- ../disassembler/dmwalk.c \
- ../tables/tbfadt.c \
- ../tables/tbinstal.c \
- ../tables/tbutils.c \
- ../tables/tbxface.c \
- ../osunixxf.c
+
+ACPICA_SRC = ..
+ASL_COMPILER = $(ACPICA_SRC)/compiler
+ACPICA_COMMON = $(ACPICA_SRC)/common
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_TOOLS = $(ACPICA_SRC)/tools
+ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
NOMAN= YES
CFLAGS+= -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -I../compiler
-#YACC= yacc
-YACC= bison
-YFLAGS+= -v -d
-LEX= flex
-LFLAGS+= -i
+#
+# Bison/Flex configuration
+#
+YACC= bison
+YFLAGS+= -v -d -y -pAslCompiler
-#.if $(YACC) == "bison"
-YFLAGS+= -y -pAslCompiler
-#.else
-#CFLAGS+= -D_USE_BERKELEY_YACC
-#.endif
+LEX= flex
+LFLAGS+= -i -s -PAslCompiler
-LDLIBS = -lpthread -lrt
-aslmain : $(patsubst %.c,%.o, $(SRCS))
- $(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) \
- $(LOADLIBES) $(LDLIBS) -o iasl
+COMPILE = $(CC) -c $(CFLAGS) -o$@ $?
+LDFLAGS += -lpthread -lrt
-CLEANFILES= y.output y.tab.c y.tab.h aslcompiler.y.h \
- aslcompilerparse.c aslcompilerlex.c iasl
-aslcompilerparse.c: aslcompiler.y
- ${YACC} ${YFLAGS} aslcompiler.y
- cp y.tab.c aslcompilerparse.c
- cp y.tab.h aslcompiler.y.h
+OBJS = \
+ adfile.o \
+ adisasm.o \
+ adwalk.o \
+ aslanalyze.o \
+ aslcodegen.o \
+ aslcompile.o \
+ aslcompilerlex.o \
+ aslcompilerparse.o \
+ aslerror.o \
+ aslfiles.o \
+ aslfold.o \
+ asllength.o \
+ asllisting.o \
+ aslload.o \
+ asllookup.o \
+ aslmain.o \
+ aslmap.o \
+ aslopcodes.o \
+ asloperands.o \
+ aslopt.o \
+ aslpredef.o \
+ aslresource.o \
+ aslrestype1.o \
+ aslrestype1i.o \
+ aslrestype2.o \
+ aslrestype2d.o \
+ aslrestype2e.o \
+ aslrestype2q.o \
+ aslrestype2w.o \
+ aslstartup.o \
+ aslstubs.o \
+ asltransform.o \
+ asltree.o \
+ aslutils.o \
+ dtcompile.o \
+ dtfield.o \
+ dtio.o \
+ dtsubtable.o \
+ dttable.o \
+ dttemplate.o \
+ dtutils.o \
+ dbfileio.o \
+ dmbuffer.o \
+ dmextern.o \
+ dmnames.o \
+ dmobject.o \
+ dmopcode.o \
+ dmresrc.o \
+ dmresrcl.o \
+ dmresrcs.o \
+ dmrestag.o \
+ dmtable.o \
+ dmtbdump.o \
+ dmtbinfo.o \
+ dmutils.o \
+ dmwalk.o \
+ dsfield.o \
+ dsobject.o \
+ dsopcode.o \
+ dsutils.o \
+ dswexec.o \
+ dswload.o \
+ dswscope.o \
+ dswstate.o \
+ exconvrt.o \
+ excreate.o \
+ exdump.o \
+ exmisc.o \
+ exmutex.o \
+ exnames.o \
+ exoparg1.o \
+ exoparg2.o \
+ exoparg3.o \
+ exoparg6.o \
+ exprep.o \
+ exregion.o \
+ exresnte.o \
+ exresolv.o \
+ exresop.o \
+ exstore.o \
+ exstoren.o \
+ exstorob.o \
+ exsystem.o \
+ exutils.o \
+ getopt.o \
+ nsaccess.o \
+ nsalloc.o \
+ nsdump.o \
+ nsnames.o \
+ nsobject.o \
+ nsparse.o \
+ nssearch.o \
+ nsutils.o \
+ nswalk.o \
+ nsxfobj.o \
+ osunixxf.o \
+ psargs.o \
+ psloop.o \
+ psopcode.o \
+ psparse.o \
+ psscope.o \
+ pstree.o \
+ psutils.o \
+ pswalk.o \
+ tbfadt.o \
+ tbinstal.o \
+ tbutils.o \
+ tbxface.o \
+ utalloc.o \
+ utcache.o \
+ utcopy.o \
+ utdebug.o \
+ utdelete.o \
+ utglobal.o \
+ utinit.o \
+ utlock.o \
+ utmath.o \
+ utmisc.o \
+ utmutex.o \
+ utobject.o \
+ utresrc.o \
+ utstate.o \
+ utxface.o
-aslcompilerlex.c: aslcompiler.l
- ${LEX} ${LFLAGS} -PAslCompiler -oaslcompilerlex.c aslcompiler.l
+INTERMEDIATES = \
+ aslcompilerlex.c \
+ aslcompilerparse.c
-clean :
- rm -f $(CLEANFILES) $(patsubst %.c,%.o, $(SRCS))
+MISC = \
+ aslcompiler.y.h \
+ aslcompilerparse.output
+
+
+#
+# Root rule
+#
+$(PROG) : $(INTERMEDIATES) $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) -o $(PROG)
+ $(COPYPROG)
+
+
+#
+# Parser and Lexer - intermediate C files
+#
+aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l
+ ${LEX} ${LFLAGS} -o$@ $?
+
+aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y
+ ${YACC} ${YFLAGS} -o$@ $?
+ @mv -f aslcompilerparse.h aslcompiler.y.h
+
+#
+# Parser and Lexer - final object files
+#
+# Cannot use the common compile warning flags since the C files are created
+# by the utilities above and they are not necessarily ANSI C, etc.
+#
+aslcompilerlex.o : aslcompilerlex.c
+ $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $?
+
+aslcompilerparse.o : aslcompilerparse.c
+ $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $?
+
+
+#
+# Compiler source
+#
+aslanalyze.o : $(ASL_COMPILER)/aslanalyze.c
+ $(COMPILE)
+
+aslcodegen.o : $(ASL_COMPILER)/aslcodegen.c
+ $(COMPILE)
+
+aslcompile.o : $(ASL_COMPILER)/aslcompile.c
+ $(COMPILE)
+
+aslerror.o : $(ASL_COMPILER)/aslerror.c
+ $(COMPILE)
+
+aslfiles.o : $(ASL_COMPILER)/aslfiles.c
+ $(COMPILE)
+
+aslfold.o : $(ASL_COMPILER)/aslfold.c
+ $(COMPILE)
+
+asllength.o : $(ASL_COMPILER)/asllength.c
+ $(COMPILE)
+
+asllisting.o : $(ASL_COMPILER)/asllisting.c
+ $(COMPILE)
+
+aslload.o : $(ASL_COMPILER)/aslload.c
+ $(COMPILE)
+
+asllookup.o : $(ASL_COMPILER)/asllookup.c
+ $(COMPILE)
+
+aslmain.o : $(ASL_COMPILER)/aslmain.c
+ $(COMPILE)
+
+aslmap.o : $(ASL_COMPILER)/aslmap.c
+ $(COMPILE)
+
+aslopcodes.o : $(ASL_COMPILER)/aslopcodes.c
+ $(COMPILE)
+
+asloperands.o : $(ASL_COMPILER)/asloperands.c
+ $(COMPILE)
+
+aslopt.o : $(ASL_COMPILER)/aslopt.c
+ $(COMPILE)
+
+aslpredef.o : $(ASL_COMPILER)/aslpredef.c
+ $(COMPILE)
+
+aslresource.o : $(ASL_COMPILER)/aslresource.c
+ $(COMPILE)
+
+aslrestype1.o : $(ASL_COMPILER)/aslrestype1.c
+ $(COMPILE)
+
+aslrestype1i.o : $(ASL_COMPILER)/aslrestype1i.c
+ $(COMPILE)
+
+aslrestype2.o : $(ASL_COMPILER)/aslrestype2.c
+ $(COMPILE)
+
+aslrestype2d.o : $(ASL_COMPILER)/aslrestype2d.c
+ $(COMPILE)
+
+aslrestype2e.o : $(ASL_COMPILER)/aslrestype2e.c
+ $(COMPILE)
+
+aslrestype2q.o : $(ASL_COMPILER)/aslrestype2q.c
+ $(COMPILE)
+
+aslrestype2w.o : $(ASL_COMPILER)/aslrestype2w.c
+ $(COMPILE)
+
+aslstartup.o : $(ASL_COMPILER)/aslstartup.c
+ $(COMPILE)
+
+aslstubs.o : $(ASL_COMPILER)/aslstubs.c
+ $(COMPILE)
+
+asltransform.o : $(ASL_COMPILER)/asltransform.c
+ $(COMPILE)
+
+asltree.o : $(ASL_COMPILER)/asltree.c
+ $(COMPILE)
+
+aslutils.o : $(ASL_COMPILER)/aslutils.c
+ $(COMPILE)
+
+
+#
+# Data Table Compiler
+#
+dtcompile.o : $(ASL_COMPILER)/dtcompile.c
+ $(COMPILE)
+
+dtfield.o : $(ASL_COMPILER)/dtfield.c
+ $(COMPILE)
+
+dtio.o : $(ASL_COMPILER)/dtio.c
+ $(COMPILE)
+
+dtsubtable.o : $(ASL_COMPILER)/dtsubtable.c
+ $(COMPILE)
+
+dttable.o : $(ASL_COMPILER)/dttable.c
+ $(COMPILE)
+
+dttemplate.o : $(ASL_COMPILER)/dttemplate.c
+ $(COMPILE)
+
+dtutils.o : $(ASL_COMPILER)/dtutils.c
+ $(COMPILE)
+
+
+#
+# ACPICA core source - common
+#
+adfile.o : $(ACPICA_COMMON)/adfile.c
+ $(COMPILE)
+
+adisasm.o : $(ACPICA_COMMON)/adisasm.c
+ $(COMPILE)
+
+adwalk.o : $(ACPICA_COMMON)/adwalk.c
+ $(COMPILE)
+
+dmextern.o : $(ACPICA_COMMON)/dmextern.c
+ $(COMPILE)
+
+dmrestag.o : $(ACPICA_COMMON)/dmrestag.c
+ $(COMPILE)
+
+dmtable.o : $(ACPICA_COMMON)/dmtable.c
+ $(COMPILE)
+
+dmtbdump.o : $(ACPICA_COMMON)/dmtbdump.c
+ $(COMPILE)
+
+dmtbinfo.o : $(ACPICA_COMMON)/dmtbinfo.c
+ $(COMPILE)
+
+getopt.o : $(ACPICA_COMMON)/getopt.c
+ $(COMPILE)
+
+
+#
+# ACPICA core source
+#
+dbfileio.o : $(ACPICA_CORE)/debugger/dbfileio.c
+ $(COMPILE)
+
+dmbuffer.o : $(ACPICA_CORE)/disassembler/dmbuffer.c
+ $(COMPILE)
+
+dmnames.o : $(ACPICA_CORE)/disassembler/dmnames.c
+ $(COMPILE)
+
+dmobject.o : $(ACPICA_CORE)/disassembler/dmobject.c
+ $(COMPILE)
+
+dmopcode.o : $(ACPICA_CORE)/disassembler/dmopcode.c
+ $(COMPILE)
+
+dmresrc.o : $(ACPICA_CORE)/disassembler/dmresrc.c
+ $(COMPILE)
+
+dmresrcl.o : $(ACPICA_CORE)/disassembler/dmresrcl.c
+ $(COMPILE)
+
+dmresrcs.o : $(ACPICA_CORE)/disassembler/dmresrcs.c
+ $(COMPILE)
+
+dmutils.o : $(ACPICA_CORE)/disassembler/dmutils.c
+ $(COMPILE)
+dmwalk.o : $(ACPICA_CORE)/disassembler/dmwalk.c
+ $(COMPILE)
+
+dsfield.o : $(ACPICA_CORE)/dispatcher/dsfield.c
+ $(COMPILE)
+
+dsobject.o : $(ACPICA_CORE)/dispatcher/dsobject.c
+ $(COMPILE)
+
+dsopcode.o : $(ACPICA_CORE)/dispatcher/dsopcode.c
+ $(COMPILE)
+
+dsutils.o : $(ACPICA_CORE)/dispatcher/dsutils.c
+ $(COMPILE)
+
+dswexec.o : $(ACPICA_CORE)/dispatcher/dswexec.c
+ $(COMPILE)
+
+dswload.o : $(ACPICA_CORE)/dispatcher/dswload.c
+ $(COMPILE)
+
+dswscope.o : $(ACPICA_CORE)/dispatcher/dswscope.c
+ $(COMPILE)
+
+dswstate.o : $(ACPICA_CORE)/dispatcher/dswstate.c
+ $(COMPILE)
+
+exconvrt.o : $(ACPICA_CORE)/executer/exconvrt.c
+ $(COMPILE)
+
+excreate.o : $(ACPICA_CORE)/executer/excreate.c
+ $(COMPILE)
+
+exdump.o : $(ACPICA_CORE)/executer/exdump.c
+ $(COMPILE)
+
+exmisc.o : $(ACPICA_CORE)/executer/exmisc.c
+ $(COMPILE)
+
+exmutex.o : $(ACPICA_CORE)/executer/exmutex.c
+ $(COMPILE)
+
+exnames.o : $(ACPICA_CORE)/executer/exnames.c
+ $(COMPILE)
+
+exoparg1.o : $(ACPICA_CORE)/executer/exoparg1.c
+ $(COMPILE)
+
+exoparg2.o : $(ACPICA_CORE)/executer/exoparg2.c
+ $(COMPILE)
+
+exoparg3.o : $(ACPICA_CORE)/executer/exoparg3.c
+ $(COMPILE)
+
+exoparg6.o : $(ACPICA_CORE)/executer/exoparg6.c
+ $(COMPILE)
+
+exprep.o : $(ACPICA_CORE)/executer/exprep.c
+ $(COMPILE)
+
+exregion.o : $(ACPICA_CORE)/executer/exregion.c
+ $(COMPILE)
+
+exresnte.o : $(ACPICA_CORE)/executer/exresnte.c
+ $(COMPILE)
+
+exresolv.o : $(ACPICA_CORE)/executer/exresolv.c
+ $(COMPILE)
+
+exresop.o : $(ACPICA_CORE)/executer/exresop.c
+ $(COMPILE)
+
+exstore.o : $(ACPICA_CORE)/executer/exstore.c
+ $(COMPILE)
+
+exstoren.o : $(ACPICA_CORE)/executer/exstoren.c
+ $(COMPILE)
+
+exstorob.o : $(ACPICA_CORE)/executer/exstorob.c
+ $(COMPILE)
+
+exsystem.o : $(ACPICA_CORE)/executer/exsystem.c
+ $(COMPILE)
+
+exutils.o : $(ACPICA_CORE)/executer/exutils.c
+ $(COMPILE)
+
+nsaccess.o : $(ACPICA_CORE)/namespace/nsaccess.c
+ $(COMPILE)
+
+nsalloc.o : $(ACPICA_CORE)/namespace/nsalloc.c
+ $(COMPILE)
+
+nsdump.o : $(ACPICA_CORE)/namespace/nsdump.c
+ $(COMPILE)
+
+nsnames.o : $(ACPICA_CORE)/namespace/nsnames.c
+ $(COMPILE)
+
+nsobject.o : $(ACPICA_CORE)/namespace/nsobject.c
+ $(COMPILE)
+
+nsparse.o : $(ACPICA_CORE)/namespace/nsparse.c
+ $(COMPILE)
+
+nssearch.o : $(ACPICA_CORE)/namespace/nssearch.c
+ $(COMPILE)
+
+nsutils.o : $(ACPICA_CORE)/namespace/nsutils.c
+ $(COMPILE)
+
+nswalk.o : $(ACPICA_CORE)/namespace/nswalk.c
+ $(COMPILE)
+
+nsxfobj.o : $(ACPICA_CORE)/namespace/nsxfobj.c
+ $(COMPILE)
+
+psargs.o : $(ACPICA_CORE)/parser/psargs.c
+ $(COMPILE)
+
+psloop.o : $(ACPICA_CORE)/parser/psloop.c
+ $(COMPILE)
+
+psopcode.o : $(ACPICA_CORE)/parser/psopcode.c
+ $(COMPILE)
+
+psparse.o : $(ACPICA_CORE)/parser/psparse.c
+ $(COMPILE)
+
+psscope.o : $(ACPICA_CORE)/parser/psscope.c
+ $(COMPILE)
+
+pstree.o : $(ACPICA_CORE)/parser/pstree.c
+ $(COMPILE)
+
+psutils.o : $(ACPICA_CORE)/parser/psutils.c
+ $(COMPILE)
+
+pswalk.o : $(ACPICA_CORE)/parser/pswalk.c
+ $(COMPILE)
+
+tbfadt.o : $(ACPICA_CORE)/tables/tbfadt.c
+ $(COMPILE)
+
+tbinstal.o : $(ACPICA_CORE)/tables/tbinstal.c
+ $(COMPILE)
+
+tbutils.o : $(ACPICA_CORE)/tables/tbutils.c
+ $(COMPILE)
+
+tbxface.o : $(ACPICA_CORE)/tables/tbxface.c
+ $(COMPILE)
+
+utalloc.o : $(ACPICA_CORE)/utilities/utalloc.c
+ $(COMPILE)
+
+utcache.o : $(ACPICA_CORE)/utilities/utcache.c
+ $(COMPILE)
+
+utcopy.o : $(ACPICA_CORE)/utilities/utcopy.c
+ $(COMPILE)
+
+utdebug.o : $(ACPICA_CORE)/utilities/utdebug.c
+ $(COMPILE)
+
+utdelete.o : $(ACPICA_CORE)/utilities/utdelete.c
+ $(COMPILE)
+
+utglobal.o : $(ACPICA_CORE)/utilities/utglobal.c
+ $(COMPILE)
+
+utinit.o : $(ACPICA_CORE)/utilities/utinit.c
+ $(COMPILE)
+
+utlock.o : $(ACPICA_CORE)/utilities/utlock.c
+ $(COMPILE)
+
+utmath.o : $(ACPICA_CORE)/utilities/utmath.c
+ $(COMPILE)
+
+utmisc.o : $(ACPICA_CORE)/utilities/utmisc.c
+ $(COMPILE)
+
+utmutex.o : $(ACPICA_CORE)/utilities/utmutex.c
+ $(COMPILE)
+
+utobject.o : $(ACPICA_CORE)/utilities/utobject.c
+ $(COMPILE)
+
+utresrc.o : $(ACPICA_CORE)/utilities/utresrc.c
+ $(COMPILE)
+
+utstate.o : $(ACPICA_CORE)/utilities/utstate.c
+ $(COMPILE)
+
+utxface.o : $(ACPICA_CORE)/utilities/utxface.c
+ $(COMPILE)
+
+
+#
+# Unix OS services layer (OSL)
+#
+osunixxf.o : $(ACPICA_OSL)/osunixxf.c
+ $(COMPILE)
+
+
+clean :
+ rm -f $(PROG) $(PROG).exe $(OBJS) $(INTERMEDIATES) $(MISC)
diff --git a/compiler/aslcompile.c b/compiler/aslcompile.c
index 56663b571247..5b664ff5e3c5 100644
--- a/compiler/aslcompile.c
+++ b/compiler/aslcompile.c
@@ -903,10 +903,19 @@ CmCleanupAndExit (
/*
* Delete intermediate ("combined") source file (if -ls flag not set)
+ * This file is created during normal ASL/AML compiles. It is not
+ * created by the data table compiler.
+ *
+ * If the -ls flag is set, then the .SRC file should not be deleted.
+ * In this case, Gbl_SourceOutputFlag is set to TRUE.
+ *
+ * Note: Handles are cleared by FlCloseFile above, so we look at the
+ * filename instead, to determine if the .SRC file was actually
+ * created.
*
* TBD: SourceOutput should be .TMP, then rename if we want to keep it?
*/
- if (!Gbl_SourceOutputFlag)
+ if (!Gbl_SourceOutputFlag && Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename)
{
if (remove (Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename))
{
diff --git a/compiler/aslcompiler.h b/compiler/aslcompiler.h
index 02adaa4764f2..ee4f5ccc4a0e 100644
--- a/compiler/aslcompiler.h
+++ b/compiler/aslcompiler.h
@@ -189,8 +189,12 @@ AslPushInputFileStack (
char *Filename);
/*
- * aslstartup - called from main
+ * aslstartup - entered from main()
*/
+void
+AslInitializeGlobals (
+ void);
+
ACPI_STATUS
AslDoOnePathname (
char *Pathname);
@@ -694,6 +698,10 @@ DbgPrint (
#define ASL_TREE_OUTPUT 2
void
+UtDisplaySupportedTables (
+ void);
+
+void
UtDisplayConstantOpcodes (
void);
@@ -1024,5 +1032,9 @@ ACPI_STATUS
DtDoCompile(
void);
+ACPI_STATUS
+DtCreateTemplates (
+ char *Signature);
+
#endif /* __ASLCOMPILER_H */
diff --git a/compiler/asldefine.h b/compiler/asldefine.h
index a146f77f01a1..4cd8130b1347 100644
--- a/compiler/asldefine.h
+++ b/compiler/asldefine.h
@@ -182,6 +182,7 @@
#define FILE_SUFFIX_DISASSEMBLY "dsl"
#define FILE_SUFFIX_ASM_INCLUDE "inc"
#define FILE_SUFFIX_C_INCLUDE "h"
+#define FILE_SUFFIX_ASL_CODE "asl"
/* Types for input files */
diff --git a/compiler/aslerror.c b/compiler/aslerror.c
index 4b9a04fa57cf..ff24e62b7aa9 100644
--- a/compiler/aslerror.c
+++ b/compiler/aslerror.c
@@ -280,7 +280,14 @@ AePrintException (
/* Get the file handles */
OutputFile = Gbl_Files[FileId].Handle;
+
+ /* Use the merged header/source file if present, otherwise use input file */
+
SourceFile = Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
+ if (!SourceFile)
+ {
+ SourceFile = Gbl_Files[ASL_FILE_INPUT].Handle;
+ }
if (Header)
{
diff --git a/compiler/aslfiles.c b/compiler/aslfiles.c
index c9f87f7f1310..6ba32ca9f748 100644
--- a/compiler/aslfiles.c
+++ b/compiler/aslfiles.c
@@ -768,6 +768,55 @@ FlOpenMiscOutputFiles (
char *Filename;
+ /* Create/Open a hex output file if asked */
+
+ if (Gbl_HexOutputFlag)
+ {
+ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP);
+ if (!Filename)
+ {
+ AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
+ 0, 0, 0, 0, NULL, NULL);
+ return (AE_ERROR);
+ }
+
+ /* Open the hex file, text mode */
+
+ FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
+
+ AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
+ AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
+ }
+
+ /* Create/Open a debug output file if asked */
+
+ if (Gbl_DebugFlag)
+ {
+ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
+ if (!Filename)
+ {
+ AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
+ 0, 0, 0, 0, NULL, NULL);
+ return (AE_ERROR);
+ }
+
+ /* Open the debug file as STDERR, text mode */
+
+ /* TBD: hide this behind a FlReopenFile function */
+
+ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
+ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
+ freopen (Filename, "w+t", stderr);
+
+ AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
+ AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
+ }
+
+ if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
+ {
+ return (AE_OK);
+ }
+
/* Create/Open a combined source output file */
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_SOURCE);
@@ -887,26 +936,6 @@ FlOpenMiscOutputFiles (
AslCompilerFileHeader (ASL_FILE_C_INCLUDE_OUTPUT);
}
- /* Create/Open a hex output file if asked */
-
- if (Gbl_HexOutputFlag)
- {
- Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP);
- if (!Filename)
- {
- AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
- 0, 0, 0, 0, NULL, NULL);
- return (AE_ERROR);
- }
-
- /* Open the hex file, text mode */
-
- FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
-
- AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
- AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
- }
-
/* Create a namespace output file if asked */
if (Gbl_NsOutputFlag)
@@ -927,30 +956,6 @@ FlOpenMiscOutputFiles (
AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);
}
- /* Create/Open a debug output file if asked */
-
- if (Gbl_DebugFlag)
- {
- Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
- if (!Filename)
- {
- AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
- 0, 0, 0, 0, NULL, NULL);
- return (AE_ERROR);
- }
-
- /* Open the debug file as STDERR, text mode */
-
- /* TBD: hide this behind a FlReopenFile function */
-
- Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
- Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
- freopen (Filename, "w+t", stderr);
-
- AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
- AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
- }
-
return (AE_OK);
}
diff --git a/compiler/aslglobal.h b/compiler/aslglobal.h
index 6df7466af333..3f600d84223b 100644
--- a/compiler/aslglobal.h
+++ b/compiler/aslglobal.h
@@ -197,7 +197,8 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayRemarks, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayOptimizations, FALSE);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_WarningLevel, ASL_WARNING);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseOriginalCompilerId, FALSE);
-ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DataTableCompilerAvailable, FALSE);
+ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_VerboseTemplates, FALSE);
+ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoTemplates, FALSE);
#define HEX_OUTPUT_NONE 0
@@ -252,7 +253,7 @@ ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheLast, NULL)
ASL_EXTERN ACPI_PARSE_OBJECT *Gbl_FirstLevelInsertionNode;
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_FileType, 0);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_Signature, NULL);
-
+ASL_EXTERN char *Gbl_TemplateSignature;
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentHexColumn, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentAmlOffset, 0);
diff --git a/compiler/aslmain.c b/compiler/aslmain.c
index 406f67b2a9fa..e7f1ca123ff3 100644
--- a/compiler/aslmain.c
+++ b/compiler/aslmain.c
@@ -167,7 +167,7 @@ AslDoResponseFile (
#define ASL_TOKEN_SEPARATORS " \t\n"
-#define ASL_SUPPORTED_OPTIONS "@:2b:c:d^e:fgh^i^I:l^no:p:r:s:t:v:w:x:yz"
+#define ASL_SUPPORTED_OPTIONS "@:2b:c:d^e:fgh^i^I:l^no:p:r:s:t:T:v:w:x:z"
/*******************************************************************************
@@ -218,6 +218,10 @@ Options (
printf (" -ln Create namespace file (*.nsp)\n");
printf (" -ls Create combined source file (expanded includes) (*.src)\n");
+ printf ("\nACPI Data Tables:\n");
+ printf (" -T <Sig> Create table template file for <Sig> (or \"ALL\")\n");
+ printf (" -vt Create verbose templates (full disassembly)\n");
+
printf ("\nAML Disassembler:\n");
printf (" -d [file] Disassemble or decode binary ACPI table to file (*.dsl)\n");
printf (" -dc [file] Disassemble AML and immediately compile it\n");
@@ -230,6 +234,7 @@ Options (
printf (" -h Additional help and compiler debug options\n");
printf (" -hc Display operators allowed in constant expressions\n");
printf (" -hr Display ACPI reserved method names\n");
+ printf (" -ht Display currently supported ACPI table names\n");
}
@@ -268,7 +273,6 @@ HelpMessage (
printf (" -n Parse only, no output generation\n");
printf (" -ot Display compile times\n");
printf (" -x<level> Set debug level for trace output\n");
- printf (" -y Temporary: Enable data table compiler\n");
printf (" -z Do not insert new compiler ID for DataTables\n");
}
@@ -582,6 +586,10 @@ AslDoOptions (
ApDisplayReservedNames ();
exit (0);
+ case 't':
+ UtDisplaySupportedTables ();
+ exit (0);
+
default:
printf ("Unknown option: -h%s\n", AcpiGbl_Optarg);
return (-1);
@@ -769,6 +777,12 @@ AslDoOptions (
break;
+ case 'T':
+ Gbl_DoTemplates = TRUE;
+ Gbl_TemplateSignature = AcpiGbl_Optarg;
+ break;
+
+
case 'v':
switch (AcpiGbl_Optarg[0])
@@ -797,6 +811,10 @@ AslDoOptions (
Gbl_DoSignon = FALSE;
break;
+ case 't':
+ Gbl_VerboseTemplates = TRUE;
+ break;
+
default:
printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);
return (-1);
@@ -833,12 +851,6 @@ AslDoOptions (
break;
- case 'y':
-
- Gbl_DataTableCompilerAvailable = TRUE;
- break;
-
-
case 'z':
Gbl_UseOriginalCompilerId = TRUE;
@@ -887,6 +899,12 @@ AslCommandLine (
BadCommandLine = AslDoOptions (argc, argv, FALSE);
+ if (Gbl_DoTemplates)
+ {
+ DtCreateTemplates (Gbl_TemplateSignature);
+ exit (1);
+ }
+
/* Next parameter must be the input filename */
if (!argv[AcpiGbl_Optind] &&
diff --git a/compiler/aslstartup.c b/compiler/aslstartup.c
index 2588ccbdf8dd..32c6ae4bf534 100644
--- a/compiler/aslstartup.c
+++ b/compiler/aslstartup.c
@@ -131,10 +131,6 @@ BOOLEAN AslToFile = TRUE;
/* Local prototypes */
-static void
-AslInitializeGlobals (
- void);
-
static char **
AsDoWildcard (
char *DirectoryPathname,
@@ -158,7 +154,7 @@ AslDetectSourceFileType (
*
******************************************************************************/
-static void
+void
AslInitializeGlobals (
void)
{
@@ -187,6 +183,9 @@ AslInitializeGlobals (
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = NULL;
Gbl_Files[ASL_FILE_AML_OUTPUT].Handle = NULL;
+
+ Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename = NULL;
+ Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle = NULL;
}
@@ -464,17 +463,6 @@ AslDoOneFile (
*/
case ASL_INPUT_TYPE_ASCII_DATA:
- /*
- * Require use of command-line option to enable the data table
- * compiler -- for now, until development of the compiler is
- * complete.
- */
- if (!Gbl_DataTableCompilerAvailable)
- {
- printf ("Data Table Compiler is not available yet\n");
- return (AE_SUPPORT);
- }
-
Status = DtDoCompile ();
if (Gbl_Signature)
@@ -490,7 +478,6 @@ AslDoOneFile (
*/
case ASL_INPUT_TYPE_ASCII_ASL:
-
/* ACPICA subsystem initialization */
Status = AdInitialize ();
diff --git a/compiler/aslutils.c b/compiler/aslutils.c
index e8d61babc785..23e58e5eb99f 100644
--- a/compiler/aslutils.c
+++ b/compiler/aslutils.c
@@ -117,6 +117,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
+#include "acdisasm.h"
#include "acnamesp.h"
#include "amlcode.h"
@@ -157,6 +158,50 @@ UtAttachNameseg (
/*******************************************************************************
*
+ * FUNCTION: UtDisplaySupportedTables
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print all supported ACPI table names.
+ *
+ ******************************************************************************/
+
+void
+UtDisplaySupportedTables (
+ void)
+{
+ ACPI_DMTABLE_DATA *TableData;
+ UINT32 i = 6;
+
+
+ printf ("\nACPI tables supported by iASL subsystems in "
+ "version %8.8X:\n"
+ " ASL and Data Table compilers\n"
+ " AML and Data Table disassemblers\n"
+ " ACPI table template generator\n\n", ACPI_CA_VERSION);
+
+ /* Special tables */
+
+ printf ("%8u) %s %s\n", 1, ACPI_SIG_DSDT, "Differentiated System Description Table");
+ printf ("%8u) %s %s\n", 2, ACPI_SIG_SSDT, "Secondary System Description Table");
+ printf ("%8u) %s %s\n", 3, ACPI_SIG_FADT, "Fixed ACPI Description Table (FADT)");
+ printf ("%8u) %s %s\n", 4, ACPI_SIG_FACS, "Firmware ACPI Control Structure");
+ printf ("%8u) %s %s\n", 5, ACPI_RSDP_NAME, "Root System Description Pointer");
+
+ /* All data tables with common table header */
+
+ for (TableData = AcpiDmTableData; TableData->Signature; TableData++)
+ {
+ printf ("%8u) %s %s\n", i, TableData->Signature, TableData->Name);
+ i++;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiPsDisplayConstantOpcodes
*
* PARAMETERS: None
diff --git a/compiler/dtcompile.c b/compiler/dtcompile.c
index 351d9cc83f35..651bdfa192e0 100644
--- a/compiler/dtcompile.c
+++ b/compiler/dtcompile.c
@@ -183,8 +183,10 @@ DtDoCompile (
/* TBD: temporary error message. Msgs should come from function above */
DtError (ASL_ERROR, ASL_MSG_SYNTAX, NULL,
- "Could not parse input file");
- return (AE_ERROR);
+ "Input file does not appear to be an ASL or data table source file");
+
+ Status = AE_ERROR;
+ goto CleanupAndExit;
}
Event = UtBeginEvent ("Compile parse tree");
@@ -203,6 +205,7 @@ DtDoCompile (
DtError (ASL_ERROR, ASL_MSG_SYNTAX, NULL,
"Could not compile input file");
+
goto CleanupAndExit;
}
@@ -245,6 +248,9 @@ DtInitialize (
void)
{
+ AcpiOsInitialize ();
+ AcpiUtInitGlobals ();
+
Gbl_FieldList = NULL;
Gbl_RootTable = NULL;
Gbl_SubtableStack = NULL;
@@ -328,7 +334,9 @@ DtCompileDataTable (
Signature = DtGetFieldValue (*FieldList, "Signature");
if (!Signature)
{
- DtError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, *FieldList, NULL);
+ sprintf (MsgBuffer, "Expected \"%s\"", "Signature");
+ DtNameError (ASL_ERROR, ASL_MSG_INVALID_FIELD_NAME,
+ *FieldList, MsgBuffer);
return (AE_ERROR);
}
@@ -362,6 +370,15 @@ DtCompileDataTable (
return (AE_ERROR);
}
+ /* Validate the signature via the ACPI table list */
+
+ TableData = AcpiDmGetTableData (Signature);
+ if (!TableData)
+ {
+ DtFatal (ASL_MSG_UNKNOWN_TABLE, *FieldList, Signature);
+ return (AE_ERROR);
+ }
+
/*
* All other tables must use the common ACPI table header. Insert the
* current iASL IDs (name, version), and compile the header now.
@@ -377,14 +394,7 @@ DtCompileDataTable (
DtPushSubtable (Gbl_RootTable);
- /* Match signature and dispatch appropriately */
-
- TableData = AcpiDmGetTableData (Signature);
- if (!TableData)
- {
- DtFatal (ASL_MSG_UNKNOWN_TABLE, *FieldList, Signature);
- return (AE_ERROR);
- }
+ /* Dispatch to per-table compile */
if (TableData->CmTableHandler)
{
@@ -459,7 +469,6 @@ DtCompileTable (
UINT8 FieldType;
UINT8 *Buffer;
UINT8 *FlagBuffer = NULL;
- UINT32 FlagBitPosition = 0;
ACPI_STATUS Status;
@@ -530,7 +539,6 @@ DtCompileTable (
LocalField = LocalField->Next;
*Field = LocalField;
- FlagBitPosition = 0;
FlagBuffer = Buffer;
break;
@@ -540,8 +548,7 @@ DtCompileTable (
if (FlagBuffer)
{
- FlagBitPosition = DtCompileFlag (FlagBuffer,
- LocalField, Info, FlagBitPosition);
+ DtCompileFlag (FlagBuffer, LocalField, Info);
}
else
{
@@ -576,6 +583,8 @@ DtCompileTable (
goto Error;
}
+ DtSetSubtableLength (InlineSubtable);
+
ACPI_MEMCPY (Buffer, InlineSubtable->Buffer, FieldLength);
ACPI_FREE (InlineSubtable->Buffer);
ACPI_FREE (InlineSubtable);
diff --git a/compiler/dtcompiler.h b/compiler/dtcompiler.h
index 75d641190882..f2ce61bd54ab 100644
--- a/compiler/dtcompiler.h
+++ b/compiler/dtcompiler.h
@@ -290,12 +290,11 @@ DtCompileBuffer (
DT_FIELD *Field,
UINT32 ByteLength);
-UINT32
+void
DtCompileFlag (
UINT8 *Buffer,
DT_FIELD *Field,
- ACPI_DMTABLE_INFO *Info,
- UINT32 BitPosition);
+ ACPI_DMTABLE_INFO *Info);
/* dtutils - Miscellaneous utilities */
@@ -447,6 +446,39 @@ ACPI_STATUS
DtCompileXsdt (
void **PFieldList);
+/* ACPI Table templates */
+
+extern const unsigned char TemplateAsf[];
+extern const unsigned char TemplateBoot[];
+extern const unsigned char TemplateBert[];
+extern const unsigned char TemplateCpep[];
+extern const unsigned char TemplateDbgp[];
+extern const unsigned char TemplateDmar[];
+extern const unsigned char TemplateEcdt[];
+extern const unsigned char TemplateEinj[];
+extern const unsigned char TemplateErst[];
+extern const unsigned char TemplateFadt[];
+extern const unsigned char TemplateHest[];
+extern const unsigned char TemplateHpet[];
+extern const unsigned char TemplateIvrs[];
+extern const unsigned char TemplateMadt[];
+extern const unsigned char TemplateMcfg[];
+extern const unsigned char TemplateMchi[];
+extern const unsigned char TemplateMsct[];
+extern const unsigned char TemplateRsdt[];
+extern const unsigned char TemplateSbst[];
+extern const unsigned char TemplateSlic[];
+extern const unsigned char TemplateSlit[];
+extern const unsigned char TemplateSpcr[];
+extern const unsigned char TemplateSpmi[];
+extern const unsigned char TemplateSrat[];
+extern const unsigned char TemplateTcpa[];
+extern const unsigned char TemplateUefi[];
+extern const unsigned char TemplateWaet[];
+extern const unsigned char TemplateWdat[];
+extern const unsigned char TemplateWddt[];
+extern const unsigned char TemplateWdrt[];
+extern const unsigned char TemplateXsdt[];
/* Debug */
diff --git a/compiler/dtfield.c b/compiler/dtfield.c
index d3f32a44152d..34696c1ace62 100644
--- a/compiler/dtfield.c
+++ b/compiler/dtfield.c
@@ -131,15 +131,9 @@ DtCompileString (
UINT32 ByteLength);
static char *
-DtPciPathToBuffer (
- char *PciPath);
-
-static void
-DtCompilePciPath (
- UINT8 *Buffer,
- char *StringValue,
- DT_FIELD *Field,
- UINT32 ByteLength);
+DtNormalizeBuffer (
+ char *Buffer,
+ UINT32 *Count);
/******************************************************************************
@@ -180,10 +174,6 @@ DtCompileOneField (
DtCompileBuffer (Buffer, Field->Value, Field, ByteLength);
break;
- case DT_FIELD_TYPE_PCI_PATH:
- DtCompilePciPath (Buffer, Field->Value, Field, ByteLength);
- break;
-
default:
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid field type");
break;
@@ -225,9 +215,6 @@ DtCompileString (
Length = ByteLength;
}
- /* If input string is shorter than ByteLength, pad with blanks */
-
- ACPI_MEMSET (Buffer, 0x20, ByteLength);
ACPI_MEMCPY (Buffer, Field->Value, Length);
}
@@ -347,33 +334,68 @@ Exit:
/******************************************************************************
*
- * FUNCTION: DtPciPathToBuffer
+ * FUNCTION: DtNormalizeBuffer
*
- * PARAMETERS: PciPath - DMAR "PCI Path" field
+ * PARAMETERS: Buffer - Input buffer
+ * Count - Output the count of hex number in
+ * the Buffer
*
- * RETURN: Strings of PCI path
+ * RETURN: The normalized buffer, freed by caller
*
- * DESCRIPTION: Remove brackets and comma from DMAR "PCI Path" string, for
- * example: [1D, 01] ==> 1D 01
+ * DESCRIPTION: [1A,2B,3C,4D] or 1A, 2B, 3C, 4D will be normalized
+ * to 1A 2B 3C 4D
*
*****************************************************************************/
static char *
-DtPciPathToBuffer (
- char *PciPath)
+DtNormalizeBuffer (
+ char *Buffer,
+ UINT32 *Count)
{
- char *Buffer;
+ char *NewBuffer;
+ char *TmpBuffer;
+ UINT32 BufferCount = 0;
+ BOOLEAN Separator = TRUE;
+ char c;
- Buffer = UtLocalCalloc (6);
+ NewBuffer = UtLocalCalloc (ACPI_STRLEN (Buffer) + 1);
+ TmpBuffer = NewBuffer;
- Buffer[0] = PciPath[1];
- Buffer[1] = PciPath[2];
- Buffer[2] = ' ';
- Buffer[3] = PciPath[5];
- Buffer[4] = PciPath[6];
+ while ((c = *Buffer++))
+ {
+ switch (c)
+ {
+ /* Valid separators */
+
+ case '[':
+ case ']':
+ case ' ':
+ case ',':
+ Separator = TRUE;
+ break;
+
+ default:
+ if (Separator)
+ {
+ /* Insert blank as the standard separator */
+
+ if (NewBuffer[0])
+ {
+ *TmpBuffer++ = ' ';
+ BufferCount++;
+ }
+
+ Separator = FALSE;
+ }
+
+ *TmpBuffer++ = c;
+ break;
+ }
+ }
- return (Buffer);
+ *Count = BufferCount + 1;
+ return (NewBuffer);
}
@@ -407,13 +429,17 @@ DtCompileBuffer (
UINT32 Count;
- Count = ACPI_STRLEN (StringValue) / 3 + 1;
+ /* Allow several different types of value separators */
+
+ StringValue = DtNormalizeBuffer (StringValue, &Count);
Hex[2] = 0;
for (i = 0; i < Count; i++)
{
- Hex[0] = StringValue[0];
- Hex[1] = StringValue[1];
+ /* Each element of StringValue is three chars */
+
+ Hex[0] = StringValue[(3 * i)];
+ Hex[1] = StringValue[(3 * i) + 1];
/* Convert one hex byte */
@@ -426,70 +452,36 @@ DtCompileBuffer (
}
Buffer[i] = (UINT8) Value;
- StringValue += 3;
}
+ ACPI_FREE (StringValue);
return (ByteLength - Count);
}
/******************************************************************************
*
- * FUNCTION: DtCompilePciPath
- *
- * PARAMETERS: Buffer - Output buffer
- * StringValue - DMAR pci path string
- * ByteLength - Byte length of DMAR pci path string, 2
- *
- * RETURN: None
- *
- * DESCRIPTION: Compile DMAR PCI path string to binary
- *
- *****************************************************************************/
-
-static void
-DtCompilePciPath (
- UINT8 *Buffer,
- char *StringValue,
- DT_FIELD *Field,
- UINT32 ByteLength)
-{
- char *PciPathBuffer;
-
-
- /* Parse path to simple hex digits, then convert to binary */
-
- PciPathBuffer = DtPciPathToBuffer (StringValue);
-
- DtCompileBuffer (Buffer, PciPathBuffer, Field, ByteLength);
- ACPI_FREE (PciPathBuffer);
-}
-
-
-/******************************************************************************
- *
* FUNCTION: DtCompileFlag
*
* PARAMETERS: Buffer - Output buffer
* Field - Field to be compiled
* Info - Flag info
- * BitPosition - Flag bit position
*
- * RETURN: Next flag bit position
+ * RETURN:
*
* DESCRIPTION: Compile a flag
*
*****************************************************************************/
-UINT32
+void
DtCompileFlag (
UINT8 *Buffer,
DT_FIELD *Field,
- ACPI_DMTABLE_INFO *Info,
- UINT32 BitPosition)
+ ACPI_DMTABLE_INFO *Info)
{
UINT64 Value = 0;
UINT32 BitLength = 1;
+ UINT8 BitPosition = 0;
ACPI_STATUS Status;
@@ -510,12 +502,20 @@ DtCompileFlag (
case ACPI_DMT_FLAG6:
case ACPI_DMT_FLAG7:
+ BitPosition = Info->Opcode;
BitLength = 1;
break;
case ACPI_DMT_FLAGS0:
+
+ BitPosition = 0;
+ BitLength = 2;
+ break;
+
+
case ACPI_DMT_FLAGS2:
+ BitPosition = 2;
BitLength = 2;
break;
@@ -534,10 +534,5 @@ DtCompileFlag (
Value = 0;
}
- /* Insert the flag, return next flag bit position */
-
- Buffer += ACPI_DIV_8 (BitPosition);
- *Buffer |= (UINT8) (Value << ACPI_MOD_8 (BitPosition));
-
- return (BitPosition + BitLength);
+ *Buffer |= (UINT8) (Value << BitPosition);
}
diff --git a/compiler/dtio.c b/compiler/dtio.c
index 469cea60917d..4c19ad0b0c8c 100644
--- a/compiler/dtio.c
+++ b/compiler/dtio.c
@@ -122,33 +122,43 @@
ACPI_MODULE_NAME ("dtio")
-/******************************************************************************
- *
- * FUNCTION: DtIsComment
- *
- * PARAMETERS: Line - Current source code line
- *
- * RETURN: TRUE if comment, FALSE otherwise
- *
- * DESCRIPTION: Detect a comment in the source module
- *
- *****************************************************************************/
+/* Local prototypes */
-/* TBD: Temporary: very simple code to detect comments */
+static char *
+DtTrim (
+ char *String);
-static int
-DtIsComment(
- char *Line)
-{
+static void
+DtLinkField (
+ DT_FIELD *Field);
- if (!ACPI_STRNCMP (Line, "/*", 2) ||
- !ACPI_STRNCMP (Line, " *", 2))
- {
- return 1;
- }
+static void
+DtParseLine (
+ char *LineBuffer,
+ UINT32 Line,
+ UINT32 Offset);
- return 0;
-}
+static UINT32
+DtGetNextLine (
+ FILE *Handle);
+
+static void
+DtWriteBinary (
+ DT_SUBTABLE *Subtable,
+ void *Context,
+ void *ReturnValue);
+
+
+/* States for DtGetNextLine */
+
+#define DT_NORMAL_TEXT 0
+#define DT_START_QUOTED_STRING 1
+#define DT_START_COMMENT 2
+#define DT_SLASH_ASTERISK_COMMENT 3
+#define DT_SLASH_SLASH_COMMENT 4
+#define DT_END_COMMENT 5
+
+UINT32 Gbl_NextLineOffset;
/******************************************************************************
@@ -308,7 +318,7 @@ DtParseLine (
UINT32 NameColumn;
- if (!LineBuffer || DtIsComment (LineBuffer))
+ if (!LineBuffer)
{
return;
}
@@ -417,13 +427,184 @@ DtParseLine (
/******************************************************************************
*
+ * FUNCTION: DtGetNextLine
+ *
+ * PARAMETERS: Handle - Open file handle for the source file
+ *
+ * RETURN: Filled line buffer and offset of start-of-line (zero on EOF)
+ *
+ * DESCRIPTION: Get the next valid source line. Removes all comments.
+ * Ignores empty lines.
+ *
+ * Handles both slash-asterisk and slash-slash comments.
+ * Also, quoted strings, but no escapes within.
+ *
+ * Line is returned in Gbl_CurrentLineBuffer.
+ * Line number in original file is returned in Gbl_CurrentLineNumber.
+ *
+ *****************************************************************************/
+
+static UINT32
+DtGetNextLine (
+ FILE *Handle)
+{
+ UINT32 State = DT_NORMAL_TEXT;
+ UINT32 CurrentLineOffset;
+ UINT32 i;
+ char c;
+
+
+ for (i = 0; i < ASL_LINE_BUFFER_SIZE;)
+ {
+ c = (char) getc (Handle);
+ if (c == EOF)
+ {
+ return (0);
+ }
+
+ switch (State)
+ {
+ case DT_NORMAL_TEXT:
+
+ /* Normal text, insert char into line buffer */
+
+ Gbl_CurrentLineBuffer[i] = c;
+ switch (c)
+ {
+ case '/':
+ State = DT_START_COMMENT;
+ break;
+
+ case '"':
+ State = DT_START_QUOTED_STRING;
+ i++;
+ break;
+
+ case '\n':
+ CurrentLineOffset = Gbl_NextLineOffset;
+ Gbl_NextLineOffset = (UINT32) ftell (Handle);
+ Gbl_CurrentLineNumber++;
+
+ /* Exit if line is complete. Ignore blank lines */
+
+ if (i != 0)
+ {
+ Gbl_CurrentLineBuffer[i+1] = 0; /* Terminate line */
+ return (CurrentLineOffset);
+ }
+ break;
+
+ default:
+ i++;
+ break;
+ }
+ break;
+
+ case DT_START_QUOTED_STRING:
+
+ /* Insert raw chars until end of quoted string */
+
+ Gbl_CurrentLineBuffer[i] = c;
+ i++;
+
+ if (c == '"')
+ {
+ State = DT_NORMAL_TEXT;
+ }
+ break;
+
+ case DT_START_COMMENT:
+
+ /* Open comment if this character is an asterisk or slash */
+
+ switch (c)
+ {
+ case '*':
+ State = DT_SLASH_ASTERISK_COMMENT;
+ break;
+
+ case '/':
+ State = DT_SLASH_SLASH_COMMENT;
+ break;
+
+ default: /* Not a comment */
+ i++; /* Save the preceeding slash */
+ Gbl_CurrentLineBuffer[i] = c;
+ i++;
+ State = DT_NORMAL_TEXT;
+ break;
+ }
+ break;
+
+ case DT_SLASH_ASTERISK_COMMENT:
+
+ /* Ignore chars until an asterisk-slash is found */
+
+ switch (c)
+ {
+ case '\n':
+ Gbl_NextLineOffset = (UINT32) ftell (Handle);
+ Gbl_CurrentLineNumber++;
+ break;
+
+ case '*':
+ State = DT_END_COMMENT;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case DT_SLASH_SLASH_COMMENT:
+
+ /* Ignore chars until end-of-line */
+
+ if (c == '\n')
+ {
+ /* We will exit via the NORMAL_TEXT path */
+
+ ungetc (c, Handle);
+ State = DT_NORMAL_TEXT;
+ }
+ break;
+
+ case DT_END_COMMENT:
+
+ /* End comment if this char is a slash */
+
+ switch (c)
+ {
+ case '/':
+ State = DT_NORMAL_TEXT;
+ break;
+
+ default:
+ State = DT_SLASH_ASTERISK_COMMENT;
+ break;
+ }
+ break;
+
+ default:
+ DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, "Unknown input state");
+ return (0);
+ }
+ }
+
+ printf ("ERROR - Input line is too long (max %u)\n", ASL_LINE_BUFFER_SIZE);
+ return (0);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtScanFile
*
* PARAMETERS: Handle - Open file handle for the source file
*
* RETURN: Pointer to start of the constructed parse tree.
*
- * DESCRIPTION: Scan source file, link all field name and value
+ * DESCRIPTION: Scan source file, link all field names and values
* to the global parse tree: Gbl_FieldList
*
*****************************************************************************/
@@ -432,23 +613,28 @@ DT_FIELD *
DtScanFile (
FILE *Handle)
{
- UINT32 Line = 0;
- UINT32 Offset = 0;
+ UINT32 Offset;
+
+
+ ACPI_FUNCTION_NAME (DtScanFile);
/* Get the file size */
Gbl_InputByteCount = DtGetFileSize (Handle);
+ Gbl_CurrentLineNumber = 0;
+ Gbl_CurrentLineOffset = 0;
+ Gbl_NextLineOffset = 0;
+
/* Scan line-by-line */
- while (fgets (Gbl_CurrentLineBuffer, ASL_LINE_BUFFER_SIZE, Handle))
+ while ((Offset = DtGetNextLine (Handle)))
{
- Line++;
- Gbl_CurrentLineNumber++;
- DtParseLine (Gbl_CurrentLineBuffer, Line, Offset);
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s",
+ Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer));
- Offset = (UINT32) ftell (Handle);
+ DtParseLine (Gbl_CurrentLineBuffer, Gbl_CurrentLineNumber, Offset);
}
return (Gbl_FieldList);
diff --git a/compiler/dttable.c b/compiler/dttable.c
index 2ab6b9ef6612..863fa23d8437 100644
--- a/compiler/dttable.c
+++ b/compiler/dttable.c
@@ -264,10 +264,13 @@ DtCompileRsdp (
DT_FIELD **PFieldList)
{
DT_SUBTABLE *Subtable;
- ACPI_TABLE_RSDP *Table;
+ ACPI_TABLE_RSDP *Rsdp;
+ ACPI_RSDP_EXTENSION *RsdpExtension;
ACPI_STATUS Status;
+ /* Compile the "common" RSDP (ACPI 1.0) */
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoRsdp1,
&Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
@@ -275,11 +278,13 @@ DtCompileRsdp (
return (Status);
}
- Table = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Gbl_RootTable->Buffer);
- DtSetTableChecksum (&Table->Checksum);
+ Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Gbl_RootTable->Buffer);
+ DtSetTableChecksum (&Rsdp->Checksum);
- if (Table->Revision > 0)
+ if (Rsdp->Revision > 0)
{
+ /* Compile the "extended" part of the RSDP as a subtable */
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoRsdp2,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
@@ -288,7 +293,12 @@ DtCompileRsdp (
}
DtInsertSubtable (Gbl_RootTable, Subtable);
- DtSetTableChecksum (&Table->ExtendedChecksum);
+
+ /* Set length and extended checksum for entire RSDP */
+
+ RsdpExtension = ACPI_CAST_PTR (ACPI_RSDP_EXTENSION, Subtable->Buffer);
+ RsdpExtension->Length = Gbl_RootTable->Length + Subtable->Length;
+ DtSetTableChecksum (&RsdpExtension->ExtendedChecksum);
}
return (AE_OK);
diff --git a/compiler/dttemplate.c b/compiler/dttemplate.c
new file mode 100644
index 000000000000..ad69a14c2799
--- /dev/null
+++ b/compiler/dttemplate.c
@@ -0,0 +1,445 @@
+/******************************************************************************
+ *
+ * Module Name: dttemplate - ACPI table template generation
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "aslcompiler.h"
+#include "acapps.h"
+#include "dtcompiler.h"
+#include "dttemplate.h" /* Contains the hex ACPI table templates */
+
+#define _COMPONENT DT_COMPILER
+ ACPI_MODULE_NAME ("dttemplate")
+
+
+/* Local prototypes */
+
+static BOOLEAN
+AcpiUtIsSpecialTable (
+ char *Signature);
+
+static ACPI_STATUS
+DtCreateOneTemplate (
+ char *Signature,
+ ACPI_DMTABLE_DATA *TableData);
+
+static ACPI_STATUS
+DtCreateAllTemplates (
+ void);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtIsSpecialTable
+ *
+ * PARAMETERS: Signature - ACPI table signature
+ *
+ * RETURN: TRUE if signature is a special ACPI table
+ *
+ * DESCRIPTION: Check for valid ACPI tables that are not in the main ACPI
+ * table data structure (AcpiDmTableData).
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiUtIsSpecialTable (
+ char *Signature)
+{
+
+ if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT) ||
+ ACPI_COMPARE_NAME (Signature, ACPI_SIG_SSDT) ||
+ ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS) ||
+ ACPI_COMPARE_NAME (Signature, ACPI_RSDP_NAME))
+ {
+ return (TRUE);
+ }
+
+ return (FALSE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: DtCreateTemplates
+ *
+ * PARAMETERS: Signature - ACPI table signature
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Create one or more template files.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+DtCreateTemplates (
+ char *Signature)
+{
+ ACPI_DMTABLE_DATA *TableData;
+ ACPI_STATUS Status;
+
+
+ AslInitializeGlobals ();
+ AcpiUtStrupr (Signature);
+
+ /* Create all known templates if requested */
+
+ if (!ACPI_STRNCMP (Signature, "ALL", 3))
+ {
+ Status = DtCreateAllTemplates ();
+ return (Status);
+ }
+
+ /*
+ * Validate signature and get the template data:
+ * 1) Signature must be 4 characters
+ * 2) Signature must be a recognized ACPI table
+ * 3) There must be a template associated with the signature
+ */
+ if (strlen (Signature) != ACPI_NAME_SIZE)
+ {
+ fprintf (stderr, "%s, Invalid ACPI table signature\n", Signature);
+ return (AE_ERROR);
+ }
+
+ /*
+ * Some slack for the two strange tables whose name is different than
+ * their signatures: MADT->APIC and FADT->FACP.
+ */
+ if (!strcmp (Signature, "MADT"))
+ {
+ Signature = "APIC";
+ }
+ else if (!strcmp (Signature, "FADT"))
+ {
+ Signature = "FACP";
+ }
+
+ TableData = AcpiDmGetTableData (Signature);
+ if (TableData)
+ {
+ if (!TableData->Template)
+ {
+ fprintf (stderr, "%4.4s, No template available\n", Signature);
+ return (AE_ERROR);
+ }
+ }
+ else if (!AcpiUtIsSpecialTable (Signature))
+ {
+ fprintf (stderr,
+ "%4.4s, Unrecognized ACPI table signature\n", Signature);
+ return (AE_ERROR);
+ }
+
+ Status = AdInitialize ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ Status = DtCreateOneTemplate (Signature, TableData);
+ return (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: DtCreateAllTemplates
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Create all currently defined template files
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+DtCreateAllTemplates (
+ void)
+{
+ ACPI_DMTABLE_DATA *TableData;
+ ACPI_STATUS Status;
+
+
+ Status = AdInitialize ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ fprintf (stderr, "Creating all supported Template files\n");
+
+ /* Walk entire ACPI table data structure */
+
+ for (TableData = AcpiDmTableData; TableData->Signature; TableData++)
+ {
+ /* If table has a template, create the template file */
+
+ if (TableData->Template)
+ {
+ Status = DtCreateOneTemplate (TableData->Signature,
+ TableData);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+ }
+
+ /*
+ * Create the "special ACPI tables:
+ * 1) DSDT/SSDT are AML tables, not data tables
+ * 2) FACS and RSDP have non-standard headers
+ */
+ Status = DtCreateOneTemplate (ACPI_SIG_DSDT, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ Status = DtCreateOneTemplate (ACPI_SIG_SSDT, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ Status = DtCreateOneTemplate (ACPI_SIG_FACS, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ Status = DtCreateOneTemplate (ACPI_RSDP_NAME, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: DtCreateOneTemplate
+ *
+ * PARAMETERS: Signature - ACPI signature, NULL terminated.
+ * TableData - Entry in ACPI table data structure.
+ * NULL if a special ACPI table.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Create one template source file for the requested ACPI table.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+DtCreateOneTemplate (
+ char *Signature,
+ ACPI_DMTABLE_DATA *TableData)
+{
+ char *DisasmFilename;
+ FILE *File;
+ ACPI_STATUS Status = AE_OK;
+
+
+ /* New file will have a .asl suffix */
+
+ DisasmFilename = FlGenerateFilename (
+ Signature, FILE_SUFFIX_ASL_CODE);
+ if (!DisasmFilename)
+ {
+ fprintf (stderr, "Could not generate output filename\n");
+ return (AE_ERROR);
+ }
+
+ /* Probably should prompt to overwrite the file */
+
+ AcpiUtStrlwr (DisasmFilename);
+ File = fopen (DisasmFilename, "w+");
+ if (!File)
+ {
+ fprintf (stderr, "Could not open output file %s\n", DisasmFilename);
+ return (AE_ERROR);
+ }
+
+ /* Emit the common file header */
+
+ AcpiOsRedirectOutput (File);
+
+ AcpiOsPrintf ("/*\n * %s\n", IntelAcpiCA);
+ AcpiOsPrintf (" * iASL Compiler/Disassembler version %8.8X\n *\n",
+ ACPI_CA_VERSION);
+ AcpiOsPrintf (" * Template for [%4.4s] ACPI Table\n",
+ Signature);
+
+ /* Dump the actual ACPI table */
+
+ if (TableData)
+ {
+ /* Normal case, tables that appear in AcpiDmTableData */
+
+ if (Gbl_VerboseTemplates)
+ {
+ AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength]"
+ " FieldName : HexFieldValue\n */\n\n");
+ }
+ else
+ {
+ AcpiOsPrintf (" * Format: [ByteLength]"
+ " FieldName : HexFieldValue\n */\n\n");
+ }
+
+ AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ TableData->Template));
+ }
+ else
+ {
+ /* Special ACPI tables - DSDT, SSDT, FACS, RSDP */
+
+ AcpiOsPrintf (" */\n\n");
+ if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT))
+ {
+ fwrite (TemplateDsdt, sizeof (TemplateDsdt) -1, 1, File);
+ }
+ else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_SSDT))
+ {
+ fwrite (TemplateSsdt, sizeof (TemplateSsdt) -1, 1, File);
+ }
+ else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
+ {
+ AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ TemplateFacs));
+ }
+ else if (ACPI_COMPARE_NAME (Signature, ACPI_RSDP_NAME))
+ {
+ AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ TemplateRsdp));
+ }
+ else
+ {
+ fprintf (stderr,
+ "%4.4s, Unrecognized ACPI table signature\n", Signature);
+ return (AE_ERROR);
+ }
+ }
+
+ fprintf (stderr,
+ "Created ACPI table template for [%4.4s], written to \"%s\"\n",
+ Signature, DisasmFilename);
+
+ fclose (File);
+ AcpiOsRedirectOutput (stdout);
+ ACPI_FREE (DisasmFilename);
+ return (Status);
+}
diff --git a/compiler/dttemplate.h b/compiler/dttemplate.h
new file mode 100644
index 000000000000..5379b6ecfcec
--- /dev/null
+++ b/compiler/dttemplate.h
@@ -0,0 +1,757 @@
+/******************************************************************************
+ *
+ * Module Name: dttemplate.h - ACPI table template definitions
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#ifndef __DTTEMPLATE_H
+#define __DTTEMPLATE_H
+
+
+/* Special templates for DSDT and SSDT (AML byte-code tables) */
+
+const char TemplateDsdt[] =
+ "DefinitionBlock (\"dsdt.aml\", \"DSDT\", 2, \"Intel\", \"Template\", 0x00000001)\n"
+ "{\n"
+ " Method (MAIN, 0, NotSerialized)\n"
+ " {\n"
+ " Return (Zero)\n"
+ " }\n"
+ "}\n\n";
+
+const char TemplateSsdt[] =
+ "DefinitionBlock (\"ssdt.aml\", \"SSDT\", 2, \"Intel\", \"Template\", 0x00000001)\n"
+ "{\n"
+ " Method (MAIN, 0, NotSerialized)\n"
+ " {\n"
+ " Return (Zero)\n"
+ " }\n"
+ "}\n\n";
+
+
+/* Templates for ACPI data tables */
+
+const unsigned char TemplateAsf[] =
+{
+ 0x41,0x53,0x46,0x21,0x72,0x00,0x00,0x00, /* 00000000 "ASF!r..." */
+ 0x10,0x0B,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x10,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x14,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x01,0x0C,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x02,0x00,0x0C,0x00,0x01,0x04,0x00,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x00,0x00,0x03,0x00,0x17,0x00, /* 00000050 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x84,0x00,0x07,0x00,0x00, /* 00000068 "........" */
+ 0x01,0x00 /* 00000070 ".." */
+};
+
+const unsigned char TemplateBert[] =
+{
+ 0x42,0x45,0x52,0x54,0x30,0x00,0x00,0x00, /* 00000000 "BERT0..." */
+ 0x01,0x15,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000028 "........" */
+};
+
+const unsigned char TemplateBoot[] =
+{
+ 0x42,0x4F,0x4F,0x54,0x28,0x00,0x00,0x00, /* 00000000 "BOOT(..." */
+ 0x01,0x0D,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x00,0x00,0x04,0x06,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00 /* 00000020 "(.. ...." */
+};
+
+const unsigned char TemplateCpep[] =
+{
+ 0x43,0x50,0x45,0x50,0x34,0x00,0x00,0x00, /* 00000000 "CPEP4..." */
+ 0x01,0x0F,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000030 "...." */
+};
+
+const unsigned char TemplateDbgp[] =
+{
+ 0x44,0x42,0x47,0x50,0x34,0x00,0x00,0x00, /* 00000000 "DBGP4..." */
+ 0x01,0x1A,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000030 "...." */
+};
+
+const unsigned char TemplateDmar[] =
+{
+ 0x44,0x4D,0x41,0x52,0x8C,0x00,0x00,0x00, /* 00000000 "DMAR...." */
+ 0x01,0x15,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" */
+ 0x28,0x05,0x10,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,0x02,0xFD,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x03,0x08,0x00,0x00,0x08,0xF0,0x1F,0x07, /* 00000040 "........" */
+ 0x01,0x00,0x20,0x00,0x00,0x00,0x00,0x00, /* 00000048 ".. ....." */
+ 0x00,0x10,0xC2,0x78,0x00,0x00,0x00,0x00, /* 00000050 "...x...." */
+ 0xFF,0x3F,0xC2,0x78,0x00,0x00,0x00,0x00, /* 00000058 ".?.x...." */
+ 0x01,0x08,0x00,0x00,0x00,0x00,0x1D,0x00, /* 00000060 "........" */
+ 0x02,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x02,0x08,0x00,0x00,0x00,0x00,0x01,0x00, /* 00000070 "........" */
+ 0x03,0x00,0x14,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x02,0xFD,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000088 "...." */
+};
+
+const unsigned char TemplateEcdt[] =
+{
+ 0x45,0x43,0x44,0x54,0x42,0x00,0x00,0x00, /* 00000000 "ECDTB..." */
+ 0x01,0x2D,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" */
+ 0x28,0x05,0x10,0x20,0x01,0x08,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "f......." */
+ 0x01,0x08,0x00,0x00,0x62,0x00,0x00,0x00, /* 00000030 "....b..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x09,0x00 /* 00000040 ".." */
+};
+
+const unsigned char TemplateEinj[] =
+{
+ 0x45,0x49,0x4E,0x4A,0x30,0x01,0x00,0x00, /* 00000000 "EINJ0..." */
+ 0x01,0x09,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" */
+ 0x28,0x05,0x10,0x20,0x30,0x00,0x00,0x00, /* 00000020 "(.. 0..." */
+ 0x00,0x00,0x00,0x00,0x0A,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000030 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000048 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000050 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000068 "........" */
+ 0x02,0x02,0x01,0x00,0x00,0x40,0x00,0x04, /* 00000070 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000088 "........" */
+ 0x03,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000090 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000000A8 "........" */
+ 0x04,0x03,0x01,0x00,0x00,0x40,0x00,0x04, /* 000000B0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000000C8 "........" */
+ 0x05,0x03,0x01,0x00,0x01,0x10,0x00,0x02, /* 000000D0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000000E8 "........" */
+ 0x06,0x01,0x00,0x00,0x00,0x40,0x00,0x04, /* 000000F0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000108 "........" */
+ 0x07,0x00,0x01,0x00,0x00,0x40,0x00,0x04, /* 00000110 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF /* 00000128 "........" */
+};
+
+const unsigned char TemplateErst[] =
+{
+ 0x45,0x52,0x53,0x54,0x30,0x02,0x00,0x00, /* 00000000 "ERST0..." */
+ 0x01,0xAB,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" */
+ 0x28,0x05,0x10,0x20,0x30,0x00,0x00,0x00, /* 00000020 "(.. 0..." */
+ 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x03,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000030 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000048 "........" */
+ 0x01,0x03,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000050 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000068 "........" */
+ 0x02,0x03,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000070 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000088 "........" */
+ 0x03,0x04,0x01,0x00,0x00,0x40,0x00,0x04, /* 00000090 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000000A8 "........" */
+ 0x04,0x02,0x00,0x00,0x00,0x40,0x00,0x04, /* 000000B0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000000C8 "........" */
+ 0x05,0x03,0x00,0x00,0x01,0x08,0x00,0x01, /* 000000D0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000000E8 "........" */
+ 0x06,0x01,0x00,0x00,0x00,0x40,0x00,0x04, /* 000000F0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000108 "........" */
+ 0x07,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000110 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000128 "........" */
+ 0x08,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000130 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000138 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000148 "........" */
+ 0x09,0x02,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000150 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000168 "........" */
+ 0x0A,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000170 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000188 "........" */
+ 0x0B,0x03,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000190 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000198 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000001A8 "........" */
+ 0x0C,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 000001B0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000001C8 "........" */
+ 0x0D,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 000001D0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E0 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 000001E8 "........" */
+ 0x0E,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 000001F0 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000200 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000208 "........" */
+ 0x0F,0x00,0x00,0x00,0x00,0x40,0x00,0x04, /* 00000210 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000218 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000220 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF /* 00000228 "........" */
+};
+
+const unsigned char TemplateFacs[] =
+{
+ 0x46,0x41,0x43,0x53,0x40,0x00,0x00,0x00, /* 00000000 "FACS@..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000008 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000010 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000018 "........" */
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000020 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000038 "........" */
+};
+
+const unsigned char TemplateFadt[] =
+{
+ 0x46,0x41,0x43,0x50,0xF4,0x00,0x00,0x00, /* 00000000 "FACP...." */
+ 0x04,0x4E,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".NINTEL " */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x28,0x05,0x10,0x20,0x01,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x04,0x02,0x01,0x04,0x08,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x08,0x00,0x01, /* 00000070 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x20,0x00,0x02, /* 00000090 "..... .." */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x10,0x00,0x02, /* 000000A8 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x08,0x00,0x00, /* 000000C0 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
+ 0x01,0x20,0x00,0x03,0x01,0x00,0x00,0x00, /* 000000D0 ". ......" */
+ 0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x01, /* 000000D8 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
+ 0x00,0x00,0x00,0x00 /* 000000F0 "...." */
+};
+
+const unsigned char TemplateHest[] =
+{
+ 0x48,0x45,0x53,0x54,0xD4,0x01,0x00,0x00, /* 00000000 "HEST...." */
+ 0x01,0x20,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" */
+ 0x28,0x05,0x10,0x20,0x04,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, /* 00000028 "........" */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x00,0x01,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,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01, /* 00000088 "........" */
+ 0x01,0x00,0x00,0x00,0x01,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 "........" */
+ 0x00,0x00,0x00,0x00,0x02,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,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000D0 "........" */
+ 0x00,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 "........" */
+ 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x01, /* 000000F0 "........" */
+ 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000F8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "........" */
+ 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00, /* 00000118 "........" */
+ 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00, /* 00000120 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000138 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
+ 0x00,0x00,0x00,0x00,0x09,0x00,0x02,0x00, /* 00000150 "........" */
+ 0xFF,0xFF,0x00,0x01,0x01,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x10,0x00,0x00, /* 00000160 "........" */
+ 0x00,0x40,0x00,0x04,0x00,0x00,0x00,0x00, /* 00000168 ".@......" */
+ 0x00,0x00,0x00,0x00,0x03,0x1C,0x00,0x00, /* 00000170 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000188 "........" */
+ 0x00,0x10,0x00,0x00,0x09,0x00,0x03,0x00, /* 00000190 "........" */
+ 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00, /* 00000198 "........" */
+ 0x01,0x00,0x00,0x00,0x00,0x10,0x00,0x00, /* 000001A0 "........" */
+ 0x00,0x40,0x00,0x04,0x00,0x00,0x00,0x00, /* 000001A8 ".@......" */
+ 0x00,0x00,0x00,0x00,0x04,0x1C,0x00,0x00, /* 000001B0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "........" */
+ 0x00,0x10,0x00,0x00 /* 000001D0 "...." */
+};
+
+const unsigned char TemplateHpet[] =
+{
+ 0x48,0x50,0x45,0x54,0x38,0x00,0x00,0x00, /* 00000000 "HPET8..." */
+ 0x01,0x09,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000030 "........" */
+};
+
+const unsigned char TemplateIvrs[] =
+{
+ 0x49,0x56,0x52,0x53,0xBC,0x00,0x00,0x00, /* 00000000 "IVRS...." */
+ 0x01,0x87,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 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 "...." */
+};
+
+const unsigned char TemplateMadt[] =
+{
+ 0x41,0x50,0x49,0x43,0xB6,0x00,0x00,0x00, /* 00000000 "APIC...." */
+ 0x01,0x45,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".EINTEL " */
+ 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 "(.. ...." */
+ 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 "........" */
+ 0x02,0x0A,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x00,0x00,0x03,0x08,0x0D,0x00,0x01,0x00, /* 00000048 "........" */
+ 0x00,0x00,0x04,0x06,0x00,0x05,0x00,0x01, /* 00000050 "........" */
+ 0x05,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x06,0x10,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x00,0x00,0x00,0x00,0x07,0x16,0x00,0x00, /* 00000070 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x00,0x5C,0x43,0x50,0x55, /* 00000080 "....\CPU" */
+ 0x30,0x00,0x08,0x10,0x05,0x00,0x00,0x00, /* 00000088 "0......." */
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00, /* 00000090 "........" */
+ 0x00,0x00,0x09,0x10,0x00,0x00,0x00,0x00, /* 00000098 "........" */
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x00,0x0A,0x0C,0x05,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00 /* 000000B0 "......" */
+};
+
+const unsigned char TemplateMcfg[] =
+{
+ 0x4D,0x43,0x46,0x47,0x3C,0x00,0x00,0x00, /* 00000000 "MCFG<..." */
+ 0x01,0x19,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000038 "...." */
+};
+
+const unsigned char TemplateMchi[] =
+{
+ 0x4D,0x43,0x48,0x49,0x45,0x00,0x00,0x00, /* 00000000 "MCHIE..." */
+ 0x01,0xE4,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x15,0x07,0x00,0x02,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x28,0x05,0x10,0x20,0x01,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x08,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x00 /* 00000040 "....." */
+};
+
+const unsigned char TemplateMsct[] =
+{
+ 0x4D,0x53,0x43,0x54,0x90,0x00,0x00,0x00, /* 00000000 "MSCT...." */
+ 0x01,0xB7,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" */
+ 0x28,0x05,0x10,0x20,0x38,0x00,0x00,0x00, /* 00000020 "(.. 8..." */
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0x00, /* 00000030 "........" */
+ 0x01,0x16,0x00,0x00,0x00,0x00,0x03,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x16, /* 00000048 "..@....." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x16,0x00,0x00, /* 00000060 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000070 "........" */
+ 0x00,0x00,0x01,0x16,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000088 "........" */
+};
+
+const unsigned char TemplateRsdp[] =
+{
+ 0x52,0x53,0x44,0x20,0x50,0x54,0x52,0x20, /* 00000000 "RSD PTR " */
+ 0x43,0x49,0x4E,0x54,0x45,0x4C,0x20,0x02, /* 00000008 "CINTEL ." */
+ 0x00,0x00,0x00,0x00,0x24,0x00,0x00,0x00, /* 00000010 "....$..." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000018 "........" */
+ 0xDC,0x00,0x00,0x00 /* 00000020 "...." */
+};
+
+const unsigned char TemplateRsdt[] =
+{
+ 0x52,0x53,0x44,0x54,0x44,0x00,0x00,0x00, /* 00000000 "RSDTD..." */
+ 0x01,0xB1,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" */
+ 0x28,0x05,0x10,0x20,0x10,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x20,0x00,0x00,0x00,0x30,0x00,0x00,0x00, /* 00000028 " ...0..." */
+ 0x40,0x00,0x00,0x00,0x50,0x00,0x00,0x00, /* 00000030 "@...P..." */
+ 0x60,0x00,0x00,0x00,0x70,0x00,0x00,0x00, /* 00000038 "`...p..." */
+ 0x80,0x00,0x00,0x00 /* 00000040 "...." */
+};
+
+const unsigned char TemplateSbst[] =
+{
+ 0x53,0x42,0x53,0x54,0x30,0x00,0x00,0x00, /* 00000000 "SBST0..." */
+ 0x01,0x06,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000028 "........" */
+};
+
+const unsigned char TemplateSlit[] =
+{
+ 0x53,0x4C,0x49,0x54,0x3C,0x00,0x00,0x00, /* 00000000 "SLIT<..." */
+ 0x01,0x1B,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" */
+ 0x28,0x05,0x10,0x20,0x04,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x0A,0x0F,0x0F,0x0F, /* 00000028 "........" */
+ 0x0F,0x0A,0x0F,0x0F,0x0F,0x0F,0x0A,0x0F, /* 00000030 "........" */
+ 0x0F,0x0F,0x0F,0x0A /* 00000038 "...." */
+};
+
+const unsigned char TemplateSpcr[] =
+{
+ 0x53,0x50,0x43,0x52,0x50,0x00,0x00,0x00, /* 00000000 "SPCRP..." */
+ 0x01,0xE3,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,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 "........" */
+};
+
+const unsigned char TemplateSpmi[] =
+{
+ 0x53,0x50,0x4D,0x49,0x41,0x00,0x00,0x00, /* 00000000 "SPMIA..." */
+ 0x04,0xED,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x08,0x00,0x01,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00 /* 00000040 "." */
+};
+
+const unsigned char TemplateSrat[] =
+{
+ 0x53,0x52,0x41,0x54,0x80,0x00,0x00,0x00, /* 00000000 "SRAT...." */
+ 0x03,0x5A,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".ZINTEL " */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x28,0x05,0x10,0x20,0x01,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x01,0x28,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 ".(......" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x00,0xFC,0x09,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
+ 0x02,0x18,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000070 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000078 "........" */
+};
+
+const unsigned char TemplateTcpa[] =
+{
+ 0x54,0x43,0x50,0x41,0x32,0x00,0x00,0x00, /* 00000000 "TCPA2..." */
+ 0x01,0x67,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".gINTEL " */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x80,0x31,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 ".1..INTL" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00 /* 00000030 ".." */
+};
+
+const unsigned char TemplateUefi[] =
+{
+ 0x55,0x45,0x46,0x49,0x36,0x00,0x00,0x00, /* 00000000 "UEFI6..." */
+ 0x01,0x9B,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x01,0x02,0x03, /* 00000020 "(.. ...." */
+ 0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B, /* 00000028 "........" */
+ 0x0C,0x0D,0x0E,0x0F,0x00,0x00 /* 00000030 "......" */
+};
+
+const unsigned char TemplateWaet[] =
+{
+ 0x57,0x41,0x45,0x54,0x28,0x00,0x00,0x00, /* 00000000 "WAET(..." */
+ 0x01,0x19,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00 /* 00000020 "(.. ...." */
+};
+
+const unsigned char TemplateWdat[] =
+{
+ 0x57,0x44,0x41,0x54,0x5C,0x00,0x00,0x00, /* 00000000 "WDAT\..." */
+ 0x01,0xE3,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" */
+ 0x28,0x05,0x10,0x20,0x20,0x00,0x00,0x00, /* 00000020 "(.. ..." */
+ 0xFF,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x58,0x02,0x00,0x00,0xFF,0x03,0x00,0x00, /* 00000030 "X......." */
+ 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x0E,0x00,0x00,0x00,0x01,0x02,0x00,0x00, /* 00000040 "........" */
+ 0x01,0x10,0x00,0x02,0x60,0x04,0x00,0x00, /* 00000048 "....`..." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000050 "........" */
+ 0x01,0x00,0x00,0x00 /* 00000058 "...." */
+};
+
+const unsigned char TemplateWddt[] =
+{
+ 0x57,0x44,0x44,0x54,0x40,0x00,0x00,0x00, /* 00000000 "WDDT@..." */
+ 0x01,0x00,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x01,0xFF,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000038 "........" */
+};
+
+const unsigned char TemplateWdrt[] =
+{
+ 0x57,0x44,0x52,0x54,0x47,0x00,0x00,0x00, /* 00000000 "WDRTG..." */
+ 0x01,0xB0,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" */
+ 0x28,0x05,0x10,0x20,0x00,0x20,0x00,0x00, /* 00000020 "(.. . .." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 ". ......" */
+ 0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0xFF,0xFF,0x00 /* 00000040 "......." */
+};
+
+const unsigned char TemplateXsdt[] =
+{
+ 0x58,0x53,0x44,0x54,0x64,0x00,0x00,0x00, /* 00000000 "XSDTd..." */
+ 0x01,0x8B,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" */
+ 0x28,0x05,0x10,0x20,0x10,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00, /* 00000028 ".... ..." */
+ 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00, /* 00000030 "....0..." */
+ 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00, /* 00000038 "....@..." */
+ 0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00, /* 00000040 "....P..." */
+ 0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00, /* 00000048 "....`..." */
+ 0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00, /* 00000050 "....p..." */
+ 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* 00000058 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000060 "...." */
+};
+
+#endif
diff --git a/compiler/dtutils.c b/compiler/dtutils.c
index c3a4a85cd094..2394b300868b 100644
--- a/compiler/dtutils.c
+++ b/compiler/dtutils.c
@@ -472,11 +472,8 @@ DtGetFieldType (
case ACPI_DMT_BUFFER:
case ACPI_DMT_BUF16:
- Type = DT_FIELD_TYPE_BUFFER;
- break;
-
case ACPI_DMT_PCI_PATH:
- Type = DT_FIELD_TYPE_PCI_PATH;
+ Type = DT_FIELD_TYPE_BUFFER;
break;
case ACPI_DMT_GAS:
@@ -543,6 +540,8 @@ DtGetBufferLength (
*
* DESCRIPTION: Get length of bytes needed to compile the field
*
+ * Note: This function must remain in sync with AcpiDmDumpTable.
+ *
*****************************************************************************/
UINT32
@@ -574,12 +573,16 @@ DtGetFieldLength (
case ACPI_DMT_UINT8:
case ACPI_DMT_CHKSUM:
case ACPI_DMT_SPACEID:
+ case ACPI_DMT_IVRS:
case ACPI_DMT_MADT:
case ACPI_DMT_SRAT:
case ACPI_DMT_ASF:
case ACPI_DMT_HESTNTYP:
case ACPI_DMT_FADTPM:
- case ACPI_DMT_IVRS:
+ case ACPI_DMT_EINJACT:
+ case ACPI_DMT_EINJINST:
+ case ACPI_DMT_ERSTACT:
+ case ACPI_DMT_ERSTINST:
ByteLength = 1;
break;
@@ -753,6 +756,11 @@ DtSetTableLength (
ChildTable = DtGetNextSubtable (ParentTable, ChildTable);
if (ChildTable)
{
+ if (ChildTable->LengthField)
+ {
+ DtSetSubtableLength (ChildTable);
+ }
+
if (ChildTable->Child)
{
ParentTable = ChildTable;
diff --git a/debugger/dbdisply.c b/debugger/dbdisply.c
index 3234c367ad7a..a0ae7a5885c4 100644
--- a/debugger/dbdisply.c
+++ b/debugger/dbdisply.c
@@ -904,9 +904,9 @@ AcpiDbDisplayGpes (
}
AcpiOsPrintf (
- " GPE %.2X: %p RunRefs %2.2X WakeRefs %2.2X Flags %2.2X (",
+ " GPE %.2X: %p RunRefs %2.2X Flags %2.2X (",
GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo,
- GpeEventInfo->RuntimeCount, GpeEventInfo->WakeupCount,
+ GpeEventInfo->RuntimeCount,
GpeEventInfo->Flags);
/* Decode the flags byte */
diff --git a/dispatcher/dsobject.c b/dispatcher/dsobject.c
index 3d8fce40390b..9963bd3b804a 100644
--- a/dispatcher/dsobject.c
+++ b/dispatcher/dsobject.c
@@ -159,6 +159,7 @@ AcpiDsBuildInternalObject (
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STATUS Status;
+ ACPI_OBJECT_TYPE Type;
ACPI_FUNCTION_TRACE (DsBuildInternalObject);
@@ -241,7 +242,20 @@ AcpiDsBuildInternalObject (
return_ACPI_STATUS (Status);
}
- switch (Op->Common.Node->Type)
+ /*
+ * Special handling for Alias objects. We need to setup the type
+ * and the Op->Common.Node to point to the Alias target. Note,
+ * Alias has at most one level of indirection internally.
+ */
+ Type = Op->Common.Node->Type;
+ if (Type == ACPI_TYPE_LOCAL_ALIAS)
+ {
+ Type = ObjDesc->Common.Type;
+ Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
+ Op->Common.Node->Object);
+ }
+
+ switch (Type)
{
/*
* For these types, we need the actual node, not the subobject.
diff --git a/events/evgpe.c b/events/evgpe.c
index 604f23d6c20f..f7ab1600844a 100644
--- a/events/evgpe.c
+++ b/events/evgpe.c
@@ -134,26 +134,26 @@ AcpiEvAsynchEnableGpe (
/*******************************************************************************
*
- * FUNCTION: AcpiEvUpdateGpeEnableMasks
+ * FUNCTION: AcpiEvUpdateGpeEnableMask
*
* PARAMETERS: GpeEventInfo - GPE to update
*
* RETURN: Status
*
- * DESCRIPTION: Updates GPE register enable masks based upon whether there are
- * references (either wake or run) to this GPE
+ * DESCRIPTION: Updates GPE register enable mask based upon whether there are
+ * runtime references to this GPE
*
******************************************************************************/
ACPI_STATUS
-AcpiEvUpdateGpeEnableMasks (
+AcpiEvUpdateGpeEnableMask (
ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
- UINT8 RegisterBit;
+ UINT32 RegisterBit;
- ACPI_FUNCTION_TRACE (EvUpdateGpeEnableMasks);
+ ACPI_FUNCTION_TRACE (EvUpdateGpeEnableMask);
GpeRegisterInfo = GpeEventInfo->RegisterInfo;
@@ -162,24 +162,17 @@ AcpiEvUpdateGpeEnableMasks (
return_ACPI_STATUS (AE_NOT_EXIST);
}
- RegisterBit = (UINT8)
- (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber));
+ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
- /* Clear the wake/run bits up front */
+ /* Clear the run bit up front */
- ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
- /* Set the mask bits only if there are references to this GPE */
+ /* Set the mask bit only if there are references to this GPE */
if (GpeEventInfo->RuntimeCount)
{
- ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
- }
-
- if (GpeEventInfo->WakeupCount)
- {
- ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
+ ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, (UINT8) RegisterBit);
}
return_ACPI_STATUS (AE_OK);
@@ -194,10 +187,7 @@ AcpiEvUpdateGpeEnableMasks (
*
* RETURN: Status
*
- * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless
- * of type or number of references.
- *
- * Note: The GPE lock should be already acquired when this function is called.
+ * DESCRIPTION: Clear a GPE of stale events and enable it.
*
******************************************************************************/
@@ -222,14 +212,6 @@ AcpiEvEnableGpe (
return_ACPI_STATUS (AE_NO_HANDLER);
}
- /* Ensure the HW enable masks are current */
-
- Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
/* Clear the GPE (of stale events) */
Status = AcpiHwClearGpe (GpeEventInfo);
@@ -240,59 +222,7 @@ AcpiEvEnableGpe (
/* Enable the requested GPE */
- Status = AcpiHwWriteGpeEnableReg (GpeEventInfo);
- return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEvDisableGpe
- *
- * PARAMETERS: GpeEventInfo - GPE to disable
- *
- * RETURN: Status
- *
- * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE,
- * regardless of the type or number of references.
- *
- * Note: The GPE lock should be already acquired when this function is called.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiEvDisableGpe (
- ACPI_GPE_EVENT_INFO *GpeEventInfo)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (EvDisableGpe);
-
-
- /*
- * Note: Always disable the GPE, even if we think that that it is already
- * disabled. It is possible that the AML or some other code has enabled
- * the GPE behind our back.
- */
-
- /* Ensure the HW enable masks are current */
-
- Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /*
- * Always H/W disable this GPE, even if we don't know the GPE type.
- * Simply clear the enable bit for this particular GPE, but do not
- * write out the current GPE enable mask since this may inadvertently
- * enable GPEs too early. An example is a rogue GPE that has arrived
- * during ACPICA initialization - possibly because AML or other code
- * has enabled the GPE.
- */
- Status = AcpiHwLowDisableGpe (GpeEventInfo);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
return_ACPI_STATUS (Status);
}
@@ -578,10 +508,6 @@ AcpiEvAsynchExecuteGpeMethod (
return_VOID;
}
- /* Update the GPE register masks for return to enabled state */
-
- (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo);
-
/*
* Take a snapshot of the GPE info for this level - we copy the info to
* prevent a race condition with RemoveHandler/RemoveBlock.
@@ -677,9 +603,11 @@ AcpiEvAsynchEnableGpe (
}
}
- /* Enable this GPE */
-
- (void) AcpiHwWriteGpeEnableReg (GpeEventInfo);
+ /*
+ * Enable this GPE, conditionally. This means that the GPE will only be
+ * physically enabled if the EnableForRun bit is set in the EventInfo
+ */
+ (void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE);
Exit:
ACPI_FREE (GpeEventInfo);
@@ -772,7 +700,7 @@ AcpiEvGpeDispatch (
* Disable the GPE, so it doesn't keep firing before the method has a
* chance to run (it runs asynchronously with interrupts enabled).
*/
- Status = AcpiEvDisableGpe (GpeEventInfo);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
@@ -806,10 +734,10 @@ AcpiEvGpeDispatch (
GpeNumber));
/*
- * Disable the GPE. The GPE will remain disabled a handler
+ * Disable the GPE. The GPE will remain disabled until a handler
* is installed or ACPICA is restarted.
*/
- Status = AcpiEvDisableGpe (GpeEventInfo);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
diff --git a/events/evgpeblk.c b/events/evgpeblk.c
index 721411703e85..7aaff531503d 100644
--- a/events/evgpeblk.c
+++ b/events/evgpeblk.c
@@ -613,6 +613,18 @@ AcpiEvInitializeGpeBlock (
GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
+ GpeNumber = GpeIndex + GpeBlock->BlockBaseNumber;
+
+ /*
+ * If the GPE has already been enabled for runtime
+ * signalling, make sure that it remains enabled, but
+ * do not increment its reference count.
+ */
+ if (GpeEventInfo->RuntimeCount)
+ {
+ Status = AcpiEvEnableGpe (GpeEventInfo);
+ goto Enabled;
+ }
/* Ignore GPEs that can wake the system */
@@ -634,9 +646,8 @@ AcpiEvInitializeGpeBlock (
/* Enable this GPE */
- GpeNumber = GpeIndex + GpeBlock->BlockBaseNumber;
- Status = AcpiEnableGpe (GpeDevice, GpeNumber,
- ACPI_GPE_TYPE_RUNTIME);
+ Status = AcpiEnableGpe (GpeDevice, GpeNumber);
+Enabled:
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
diff --git a/events/evgpeinit.c b/events/evgpeinit.c
index 1720250cc85f..be38f0cfcd11 100644
--- a/events/evgpeinit.c
+++ b/events/evgpeinit.c
@@ -575,8 +575,7 @@ AcpiEvMatchGpeMethod (
GpeDevice = NULL;
}
- Status = AcpiEnableGpe (GpeDevice, GpeNumber,
- ACPI_GPE_TYPE_RUNTIME);
+ Status = AcpiEnableGpe (GpeDevice, GpeNumber);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
diff --git a/events/evxface.c b/events/evxface.c
index 567eba444770..5019b66315d6 100644
--- a/events/evxface.c
+++ b/events/evxface.c
@@ -747,14 +747,6 @@ AcpiInstallGpeHandler (
Handler->Context = Context;
Handler->MethodNode = GpeEventInfo->Dispatch.MethodNode;
- /* Disable the GPE before installing the handler */
-
- Status = AcpiEvDisableGpe (GpeEventInfo);
- if (ACPI_FAILURE (Status))
- {
- goto UnlockAndExit;
- }
-
/* Install the handler */
Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
@@ -845,14 +837,6 @@ AcpiRemoveGpeHandler (
goto UnlockAndExit;
}
- /* Disable the GPE before removing the handler */
-
- Status = AcpiEvDisableGpe (GpeEventInfo);
- if (ACPI_FAILURE (Status))
- {
- goto UnlockAndExit;
- }
-
/* Remove the handler */
Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
diff --git a/events/evxfevnt.c b/events/evxfevnt.c
index 9f2906311b7e..e8a9e9802a66 100644
--- a/events/evxfevnt.c
+++ b/events/evxfevnt.c
@@ -305,44 +305,110 @@ AcpiEnableEvent (
ACPI_EXPORT_SYMBOL (AcpiEnableEvent)
+
/*******************************************************************************
*
- * FUNCTION: AcpiEnableGpe
+ * FUNCTION: AcpiGpeWakeup
*
* PARAMETERS: GpeDevice - Parent GPE Device. NULL for GPE0/GPE1
* GpeNumber - GPE level within the GPE block
- * GpeType - ACPI_GPE_TYPE_RUNTIME or ACPI_GPE_TYPE_WAKE
- * or both
+ * Action - Enable or Disable
*
* RETURN: Status
*
- * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
- * hardware-enabled (for runtime GPEs), or the GPE register mask
- * is updated (for wake GPEs).
+ * DESCRIPTION: Set or clear the GPE's wakeup enable mask bit.
*
******************************************************************************/
ACPI_STATUS
-AcpiEnableGpe (
+AcpiGpeWakeup (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- UINT8 GpeType)
+ UINT8 Action)
{
ACPI_STATUS Status = AE_OK;
ACPI_GPE_EVENT_INFO *GpeEventInfo;
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_CPU_FLAGS Flags;
+ UINT32 RegisterBit;
- ACPI_FUNCTION_TRACE (AcpiEnableGpe);
+ ACPI_FUNCTION_TRACE (AcpiGpeWakeup);
+
+ Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
- /* Parameter validation */
+ /* Ensure that we have a valid GPE number */
- if (!GpeType || (GpeType & ~ACPI_GPE_TYPE_WAKE_RUN))
+ GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
+ if (!GpeEventInfo)
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ Status = AE_BAD_PARAMETER;
+ goto UnlockAndExit;
}
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ Status = AE_NOT_EXIST;
+ goto UnlockAndExit;
+ }
+
+ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
+
+ /* Perform the action */
+
+ switch (Action)
+ {
+ case ACPI_GPE_ENABLE:
+ ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, (UINT8) RegisterBit);
+ break;
+
+ case ACPI_GPE_DISABLE:
+ ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, (UINT8) RegisterBit);
+ break;
+
+ default:
+ ACPI_ERROR ((AE_INFO, "%u, Invalid action", Action));
+ Status = AE_BAD_PARAMETER;
+ break;
+ }
+
+UnlockAndExit:
+ AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiGpeWakeup)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnableGpe
+ *
+ * PARAMETERS: GpeDevice - Parent GPE Device. NULL for GPE0/GPE1
+ * GpeNumber - GPE level within the GPE block
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
+ * hardware-enabled.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnableGpe (
+ ACPI_HANDLE GpeDevice,
+ UINT32 GpeNumber)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo;
+ ACPI_CPU_FLAGS Flags;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnableGpe);
+
+
Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
/* Ensure that we have a valid GPE number */
@@ -354,50 +420,23 @@ AcpiEnableGpe (
goto UnlockAndExit;
}
- if (GpeType & ACPI_GPE_TYPE_RUNTIME)
+ if (GpeEventInfo->RuntimeCount == ACPI_UINT8_MAX)
{
- if (GpeEventInfo->RuntimeCount == ACPI_UINT8_MAX)
- {
- Status = AE_LIMIT; /* Too many references */
- goto UnlockAndExit;
- }
-
- GpeEventInfo->RuntimeCount++;
- if (GpeEventInfo->RuntimeCount == 1)
- {
- Status = AcpiEvEnableGpe (GpeEventInfo);
- if (ACPI_FAILURE (Status))
- {
- GpeEventInfo->RuntimeCount--;
- goto UnlockAndExit;
- }
- }
+ Status = AE_LIMIT; /* Too many references */
+ goto UnlockAndExit;
}
- if (GpeType & ACPI_GPE_TYPE_WAKE)
+ GpeEventInfo->RuntimeCount++;
+ if (GpeEventInfo->RuntimeCount == 1)
{
- /* The GPE must have the ability to wake the system */
-
- if (!(GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE))
- {
- Status = AE_TYPE;
- goto UnlockAndExit;
- }
-
- if (GpeEventInfo->WakeupCount == ACPI_UINT8_MAX)
+ Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
+ if (ACPI_SUCCESS (Status))
{
- Status = AE_LIMIT; /* Too many references */
- goto UnlockAndExit;
+ Status = AcpiEvEnableGpe (GpeEventInfo);
}
-
- /*
- * Update the enable mask on the first wakeup reference. Wake GPEs
- * are only hardware-enabled just before sleeping.
- */
- GpeEventInfo->WakeupCount++;
- if (GpeEventInfo->WakeupCount == 1)
+ if (ACPI_FAILURE (Status))
{
- (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo);
+ GpeEventInfo->RuntimeCount--;
}
}
@@ -415,8 +454,6 @@ ACPI_EXPORT_SYMBOL (AcpiEnableGpe)
*
* PARAMETERS: GpeDevice - Parent GPE Device. NULL for GPE0/GPE1
* GpeNumber - GPE level within the GPE block
- * GpeType - ACPI_GPE_TYPE_RUNTIME or ACPI_GPE_TYPE_WAKE
- * or both
*
* RETURN: Status
*
@@ -429,8 +466,7 @@ ACPI_EXPORT_SYMBOL (AcpiEnableGpe)
ACPI_STATUS
AcpiDisableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber,
- UINT8 GpeType)
+ UINT32 GpeNumber)
{
ACPI_STATUS Status = AE_OK;
ACPI_GPE_EVENT_INFO *GpeEventInfo;
@@ -440,13 +476,6 @@ AcpiDisableGpe (
ACPI_FUNCTION_TRACE (AcpiDisableGpe);
- /* Parameter validation */
-
- if (!GpeType || (GpeType & ~ACPI_GPE_TYPE_WAKE_RUN))
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
/* Ensure that we have a valid GPE number */
@@ -460,47 +489,26 @@ AcpiDisableGpe (
/* Hardware-disable a runtime GPE on removal of the last reference */
- if (GpeType & ACPI_GPE_TYPE_RUNTIME)
+ if (!GpeEventInfo->RuntimeCount)
{
- if (!GpeEventInfo->RuntimeCount)
- {
- Status = AE_LIMIT; /* There are no references to remove */
- goto UnlockAndExit;
- }
-
- GpeEventInfo->RuntimeCount--;
- if (!GpeEventInfo->RuntimeCount)
- {
- Status = AcpiEvDisableGpe (GpeEventInfo);
- if (ACPI_FAILURE (Status))
- {
- GpeEventInfo->RuntimeCount++;
- goto UnlockAndExit;
- }
- }
+ Status = AE_LIMIT; /* There are no references to remove */
+ goto UnlockAndExit;
}
- /*
- * Update masks for wake GPE on removal of the last reference.
- * No need to hardware-disable wake GPEs here, they are not currently
- * enabled.
- */
- if (GpeType & ACPI_GPE_TYPE_WAKE)
+ GpeEventInfo->RuntimeCount--;
+ if (!GpeEventInfo->RuntimeCount)
{
- if (!GpeEventInfo->WakeupCount)
+ Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
+ if (ACPI_SUCCESS (Status))
{
- Status = AE_LIMIT; /* There are no references to remove */
- goto UnlockAndExit;
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
}
-
- GpeEventInfo->WakeupCount--;
- if (!GpeEventInfo->WakeupCount)
+ if (ACPI_FAILURE (Status))
{
- (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo);
+ GpeEventInfo->RuntimeCount++;
}
}
-
UnlockAndExit:
AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
return_ACPI_STATUS (Status);
@@ -563,7 +571,7 @@ AcpiSetGpe (
break;
case ACPI_GPE_DISABLE:
- Status = AcpiEvDisableGpe (GpeEventInfo);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
break;
default:
diff --git a/executer/exfldio.c b/executer/exfldio.c
index 5ba1b44c5568..3276bc418c67 100644
--- a/executer/exfldio.c
+++ b/executer/exfldio.c
@@ -202,8 +202,8 @@ AcpiExSetupRegion (
}
/*
- * Exit now for SMBus or IPMI address space, it has a non-linear
- * address space and the request cannot be directly validated
+ * Exit now for SMBus or IPMI address space, it has a non-linear address space
+ * and the request cannot be directly validated
*/
if (RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_IPMI)
@@ -233,7 +233,8 @@ AcpiExSetupRegion (
* (Region length is specified in bytes)
*/
if (RgnDesc->Region.Length <
- (ObjDesc->CommonField.BaseByteOffset + FieldDatumByteOffset +
+ (ObjDesc->CommonField.BaseByteOffset +
+ FieldDatumByteOffset +
ObjDesc->CommonField.AccessByteWidth))
{
if (AcpiGbl_EnableInterpreterSlack)
@@ -793,7 +794,6 @@ AcpiExExtractFromField (
UINT32 BufferTailBits;
UINT32 DatumCount;
UINT32 FieldDatumCount;
- UINT32 AccessBitWidth;
UINT32 i;
@@ -803,7 +803,7 @@ AcpiExExtractFromField (
/* Validate target buffer and clear it */
if (BufferLength <
- ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
+ ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
{
ACPI_ERROR ((AE_INFO,
"Field size %u (bits) is too large for buffer (%u)",
@@ -811,37 +811,17 @@ AcpiExExtractFromField (
return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
}
-
ACPI_MEMSET (Buffer, 0, BufferLength);
- AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
-
- /* Handle the simple case here */
-
- if ((ObjDesc->CommonField.StartFieldBitOffset == 0) &&
- (ObjDesc->CommonField.BitLength == AccessBitWidth))
- {
- Status = AcpiExFieldDatumIo (ObjDesc, 0, Buffer, ACPI_READ);
- return_ACPI_STATUS (Status);
- }
-
-/* TBD: Move to common setup code */
-
- /* Field algorithm is limited to sizeof(UINT64), truncate if needed */
-
- if (ObjDesc->CommonField.AccessByteWidth > sizeof (UINT64))
- {
- ObjDesc->CommonField.AccessByteWidth = sizeof (UINT64);
- AccessBitWidth = sizeof (UINT64) * 8;
- }
/* Compute the number of datums (access width data items) */
DatumCount = ACPI_ROUND_UP_TO (
- ObjDesc->CommonField.BitLength, AccessBitWidth);
-
+ ObjDesc->CommonField.BitLength,
+ ObjDesc->CommonField.AccessBitWidth);
FieldDatumCount = ACPI_ROUND_UP_TO (
- ObjDesc->CommonField.BitLength +
- ObjDesc->CommonField.StartFieldBitOffset, AccessBitWidth);
+ ObjDesc->CommonField.BitLength +
+ ObjDesc->CommonField.StartFieldBitOffset,
+ ObjDesc->CommonField.AccessBitWidth);
/* Priming read from the field */
@@ -874,11 +854,12 @@ AcpiExExtractFromField (
* This avoids the differences in behavior between different compilers
* concerning shift values larger than the target data width.
*/
- if (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset <
- ACPI_INTEGER_BIT_SIZE)
+ if ((ObjDesc->CommonField.AccessBitWidth -
+ ObjDesc->CommonField.StartFieldBitOffset) < ACPI_INTEGER_BIT_SIZE)
{
MergedDatum |= RawDatum <<
- (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
+ (ObjDesc->CommonField.AccessBitWidth -
+ ObjDesc->CommonField.StartFieldBitOffset);
}
if (i == DatumCount)
@@ -898,7 +879,8 @@ AcpiExExtractFromField (
/* Mask off any extra bits in the last datum */
- BufferTailBits = ObjDesc->CommonField.BitLength % AccessBitWidth;
+ BufferTailBits = ObjDesc->CommonField.BitLength %
+ ObjDesc->CommonField.AccessBitWidth;
if (BufferTailBits)
{
MergedDatum &= ACPI_MASK_BITS_ABOVE (BufferTailBits);
@@ -934,7 +916,6 @@ AcpiExInsertIntoField (
void *Buffer,
UINT32 BufferLength)
{
- void *NewBuffer;
ACPI_STATUS Status;
UINT64 Mask;
UINT64 WidthMask;
@@ -945,9 +926,9 @@ AcpiExInsertIntoField (
UINT32 BufferTailBits;
UINT32 DatumCount;
UINT32 FieldDatumCount;
- UINT32 AccessBitWidth;
- UINT32 RequiredLength;
UINT32 i;
+ UINT32 RequiredLength;
+ void *NewBuffer;
ACPI_FUNCTION_TRACE (ExInsertIntoField);
@@ -984,41 +965,31 @@ AcpiExInsertIntoField (
BufferLength = RequiredLength;
}
-/* TBD: Move to common setup code */
-
- /* Algo is limited to sizeof(UINT64), so cut the AccessByteWidth */
- if (ObjDesc->CommonField.AccessByteWidth > sizeof (UINT64))
- {
- ObjDesc->CommonField.AccessByteWidth = sizeof (UINT64);
- }
-
- AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
-
/*
* Create the bitmasks used for bit insertion.
* Note: This if/else is used to bypass compiler differences with the
* shift operator
*/
- if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
+ if (ObjDesc->CommonField.AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
{
WidthMask = ACPI_UINT64_MAX;
}
else
{
- WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth);
+ WidthMask = ACPI_MASK_BITS_ABOVE (ObjDesc->CommonField.AccessBitWidth);
}
Mask = WidthMask &
- ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
+ ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
/* Compute the number of datums (access width data items) */
DatumCount = ACPI_ROUND_UP_TO (ObjDesc->CommonField.BitLength,
- AccessBitWidth);
+ ObjDesc->CommonField.AccessBitWidth);
FieldDatumCount = ACPI_ROUND_UP_TO (ObjDesc->CommonField.BitLength +
- ObjDesc->CommonField.StartFieldBitOffset,
- AccessBitWidth);
+ ObjDesc->CommonField.StartFieldBitOffset,
+ ObjDesc->CommonField.AccessBitWidth);
/* Get initial Datum from the input buffer */
@@ -1053,11 +1024,12 @@ AcpiExInsertIntoField (
* This avoids the differences in behavior between different compilers
* concerning shift values larger than the target data width.
*/
- if ((AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset) <
- ACPI_INTEGER_BIT_SIZE)
+ if ((ObjDesc->CommonField.AccessBitWidth -
+ ObjDesc->CommonField.StartFieldBitOffset) < ACPI_INTEGER_BIT_SIZE)
{
MergedDatum = RawDatum >>
- (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
+ (ObjDesc->CommonField.AccessBitWidth -
+ ObjDesc->CommonField.StartFieldBitOffset);
}
else
{
@@ -1076,15 +1048,15 @@ AcpiExInsertIntoField (
BufferOffset += ObjDesc->CommonField.AccessByteWidth;
ACPI_MEMCPY (&RawDatum, ((char *) Buffer) + BufferOffset,
ACPI_MIN(ObjDesc->CommonField.AccessByteWidth,
- BufferLength - BufferOffset));
-
+ BufferLength - BufferOffset));
MergedDatum |= RawDatum << ObjDesc->CommonField.StartFieldBitOffset;
}
/* Mask off any extra bits in the last datum */
BufferTailBits = (ObjDesc->CommonField.BitLength +
- ObjDesc->CommonField.StartFieldBitOffset) % AccessBitWidth;
+ ObjDesc->CommonField.StartFieldBitOffset) %
+ ObjDesc->CommonField.AccessBitWidth;
if (BufferTailBits)
{
Mask &= ACPI_MASK_BITS_ABOVE (BufferTailBits);
diff --git a/executer/exprep.c b/executer/exprep.c
index 624140497355..b1c97164a39b 100644
--- a/executer/exprep.c
+++ b/executer/exprep.c
@@ -193,12 +193,12 @@ AcpiExGenerateAccess (
FieldByteLength = FieldByteEndOffset - FieldByteOffset;
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Bit length %u, Bit offset %u\n",
- FieldBitLength, FieldBitOffset));
+ "Bit length %u, Bit offset %u\n",
+ FieldBitLength, FieldBitOffset));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Byte Length %u, Byte Offset %u, End Offset %u\n",
- FieldByteLength, FieldByteOffset, FieldByteEndOffset));
+ "Byte Length %u, Byte Offset %u, End Offset %u\n",
+ FieldByteLength, FieldByteOffset, FieldByteEndOffset));
/*
* Iterative search for the maximum access width that is both aligned
@@ -228,11 +228,11 @@ AcpiExGenerateAccess (
Accesses = FieldEndOffset - FieldStartOffset;
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "AccessWidth %u end is within region\n", AccessByteWidth));
+ "AccessWidth %u end is within region\n", AccessByteWidth));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Field Start %u, Field End %u -- requires %u accesses\n",
- FieldStartOffset, FieldEndOffset, Accesses));
+ "Field Start %u, Field End %u -- requires %u accesses\n",
+ FieldStartOffset, FieldEndOffset, Accesses));
/* Single access is optimal */
@@ -261,7 +261,7 @@ AcpiExGenerateAccess (
if (AccessByteWidth == 1)
{
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Field goes beyond end-of-region!\n"));
+ "Field goes beyond end-of-region!\n"));
/* Field does not fit in the region at all */
@@ -273,8 +273,8 @@ AcpiExGenerateAccess (
* previous access
*/
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Backing off to previous optimal access width of %u\n",
- MinimumAccessWidth));
+ "Backing off to previous optimal access width of %u\n",
+ MinimumAccessWidth));
return_VALUE (MinimumAccessWidth);
}
}
@@ -284,7 +284,7 @@ AcpiExGenerateAccess (
* just use max access width
*/
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Cannot access field in one operation, using width 8\n"));
+ "Cannot access field in one operation, using width 8\n"));
return_VALUE (8);
}
#endif /* ACPI_UNDER_DEVELOPMENT */
@@ -444,16 +444,18 @@ AcpiExPrepCommonFieldObject (
* the same (equivalent) as the ByteAlignment.
*/
AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags,
- &ByteAlignment);
+ &ByteAlignment);
if (!AccessBitWidth)
{
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
- /* Setup width (access granularity) fields (values are: 1, 2, 4, 8) */
+ /* Setup width (access granularity) fields */
ObjDesc->CommonField.AccessByteWidth = (UINT8)
- ACPI_DIV_8 (AccessBitWidth);
+ ACPI_DIV_8 (AccessBitWidth); /* 1, 2, 4, 8 */
+
+ ObjDesc->CommonField.AccessBitWidth = (UINT8) AccessBitWidth;
/*
* BaseByteOffset is the address of the start of the field within the
@@ -466,9 +468,9 @@ AcpiExPrepCommonFieldObject (
* region or buffer.
*/
NearestByteAddress =
- ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
+ ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
ObjDesc->CommonField.BaseByteOffset = (UINT32)
- ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
+ ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
/*
* StartFieldBitOffset is the offset of the first bit of the field within
@@ -500,9 +502,8 @@ AcpiExPrepFieldValue (
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_OPERAND_OBJECT *SecondDesc = NULL;
- ACPI_STATUS Status;
- UINT32 AccessByteWidth;
UINT32 Type;
+ ACPI_STATUS Status;
ACPI_FUNCTION_TRACE (ExPrepFieldValue);
@@ -521,7 +522,8 @@ AcpiExPrepFieldValue (
Type = AcpiNsGetType (Info->RegionNode);
if (Type != ACPI_TYPE_REGION)
{
- ACPI_ERROR ((AE_INFO, "Needed Region, found type 0x%X (%s)",
+ ACPI_ERROR ((AE_INFO,
+ "Needed Region, found type 0x%X (%s)",
Type, AcpiUtGetTypeName (Type)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -539,9 +541,8 @@ AcpiExPrepFieldValue (
/* Initialize areas of the object that are common to all fields */
ObjDesc->CommonField.Node = Info->FieldNode;
- Status = AcpiExPrepCommonFieldObject (ObjDesc,
- Info->FieldFlags, Info->Attribute,
- Info->FieldBitPosition, Info->FieldBitLength);
+ Status = AcpiExPrepCommonFieldObject (ObjDesc, Info->FieldFlags,
+ Info->Attribute, Info->FieldBitPosition, Info->FieldBitLength);
if (ACPI_FAILURE (Status))
{
AcpiUtDeleteObjectDesc (ObjDesc);
@@ -556,22 +557,6 @@ AcpiExPrepFieldValue (
ObjDesc->Field.RegionObj = AcpiNsGetAttachedObject (Info->RegionNode);
- /* Allow full data read from EC address space */
-
- if ((ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&
- (ObjDesc->CommonField.BitLength > 8))
- {
- AccessByteWidth = ACPI_ROUND_BITS_UP_TO_BYTES (
- ObjDesc->CommonField.BitLength);
-
- /* Maximum byte width supported is 255 */
-
- if (AccessByteWidth < 256)
- {
- ObjDesc->CommonField.AccessByteWidth = (UINT8) AccessByteWidth;
- }
- }
-
/* An additional reference for the container */
AcpiUtAddReference (ObjDesc->Field.RegionObj);
@@ -585,11 +570,11 @@ AcpiExPrepFieldValue (
case ACPI_TYPE_LOCAL_BANK_FIELD:
- ObjDesc->BankField.Value = Info->BankValue;
- ObjDesc->BankField.RegionObj =
- AcpiNsGetAttachedObject (Info->RegionNode);
- ObjDesc->BankField.BankObj =
- AcpiNsGetAttachedObject (Info->RegisterNode);
+ ObjDesc->BankField.Value = Info->BankValue;
+ ObjDesc->BankField.RegionObj = AcpiNsGetAttachedObject (
+ Info->RegionNode);
+ ObjDesc->BankField.BankObj = AcpiNsGetAttachedObject (
+ Info->RegisterNode);
/* An additional reference for the attached objects */
@@ -609,11 +594,9 @@ AcpiExPrepFieldValue (
* opcode and operands -- since the BankValue
* operands must be evaluated.
*/
- SecondDesc = ObjDesc->Common.NextObject;
- SecondDesc->Extra.AmlStart = ACPI_CAST_PTR (ACPI_PARSE_OBJECT,
- Info->DataRegisterNode)->Named.Data;
- SecondDesc->Extra.AmlLength = ACPI_CAST_PTR (ACPI_PARSE_OBJECT,
- Info->DataRegisterNode)->Named.Length;
+ SecondDesc = ObjDesc->Common.NextObject;
+ SecondDesc->Extra.AmlStart = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Info->DataRegisterNode)->Named.Data;
+ SecondDesc->Extra.AmlLength = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Info->DataRegisterNode)->Named.Length;
break;
@@ -622,10 +605,10 @@ AcpiExPrepFieldValue (
/* Get the Index and Data registers */
- ObjDesc->IndexField.IndexObj =
- AcpiNsGetAttachedObject (Info->RegisterNode);
- ObjDesc->IndexField.DataObj =
- AcpiNsGetAttachedObject (Info->DataRegisterNode);
+ ObjDesc->IndexField.IndexObj = AcpiNsGetAttachedObject (
+ Info->RegisterNode);
+ ObjDesc->IndexField.DataObj = AcpiNsGetAttachedObject (
+ Info->DataRegisterNode);
if (!ObjDesc->IndexField.DataObj || !ObjDesc->IndexField.IndexObj)
{
@@ -680,10 +663,10 @@ AcpiExPrepFieldValue (
* preserving the current type of that NamedObj.
*/
Status = AcpiNsAttachObject (Info->FieldNode, ObjDesc,
- AcpiNsGetType (Info->FieldNode));
+ AcpiNsGetType (Info->FieldNode));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Set NamedObj %p [%4.4s], ObjDesc %p\n",
- Info->FieldNode, AcpiUtGetNodeName (Info->FieldNode), ObjDesc));
+ Info->FieldNode, AcpiUtGetNodeName (Info->FieldNode), ObjDesc));
/* Remove local reference to the object */
diff --git a/hardware/hwgpe.c b/hardware/hwgpe.c
index 24e741e11a1a..c7391b408cd8 100644
--- a/hardware/hwgpe.c
+++ b/hardware/hwgpe.c
@@ -132,23 +132,54 @@ AcpiHwEnableWakeupGpeBlock (
/******************************************************************************
*
- * FUNCTION: AcpiHwLowDisableGpe
+ * FUNCTION: AcpiHwGetGpeRegisterBit
+ *
+ * PARAMETERS: GpeEventInfo - Info block for the GPE
+ * GpeRegisterInfo - Info block for the GPE register
+ *
+ * RETURN: Register mask with a one in the GPE bit position
+ *
+ * DESCRIPTION: Compute the register mask for this GPE. One bit is set in the
+ * correct position for the input GPE.
+ *
+ ******************************************************************************/
+
+UINT32
+AcpiHwGetGpeRegisterBit (
+ ACPI_GPE_EVENT_INFO *GpeEventInfo,
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo)
+{
+
+ return ((UINT32) 1 <<
+ (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber));
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiHwLowSetGpe
*
* PARAMETERS: GpeEventInfo - Info block for the GPE to be disabled
+ * Action - Enable or disable
*
* RETURN: Status
*
- * DESCRIPTION: Disable a single GPE in the enable register.
+ * DESCRIPTION: Enable or disable a single GPE in the parent enable register.
*
******************************************************************************/
ACPI_STATUS
-AcpiHwLowDisableGpe (
- ACPI_GPE_EVENT_INFO *GpeEventInfo)
+AcpiHwLowSetGpe (
+ ACPI_GPE_EVENT_INFO *GpeEventInfo,
+ UINT32 Action)
{
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_STATUS Status;
UINT32 EnableMask;
+ UINT32 RegisterBit;
+
+
+ ACPI_FUNCTION_ENTRY ();
/* Get the info block for the entire GPE register */
@@ -167,57 +198,38 @@ AcpiHwLowDisableGpe (
return (Status);
}
- /* Clear just the bit that corresponds to this GPE */
-
- ACPI_CLEAR_BIT (EnableMask, ((UINT32) 1 <<
- (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)));
-
-
- /* Write the updated enable mask */
-
- Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
- return (Status);
-}
-
+ /* Set or clear just the bit that corresponds to this GPE */
-/******************************************************************************
- *
- * FUNCTION: AcpiHwWriteGpeEnableReg
- *
- * PARAMETERS: GpeEventInfo - Info block for the GPE to be enabled
- *
- * RETURN: Status
- *
- * DESCRIPTION: Write a GPE enable register. Note: The bit for this GPE must
- * already be cleared or set in the parent register
- * EnableForRun mask.
- *
- ******************************************************************************/
+ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
+ switch (Action)
+ {
+ case ACPI_GPE_CONDITIONAL_ENABLE:
-ACPI_STATUS
-AcpiHwWriteGpeEnableReg (
- ACPI_GPE_EVENT_INFO *GpeEventInfo)
-{
- ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
- ACPI_STATUS Status;
+ /* Only enable if the EnableForRun bit is set */
+ if (!(RegisterBit & GpeRegisterInfo->EnableForRun))
+ {
+ return (AE_BAD_PARAMETER);
+ }
- ACPI_FUNCTION_ENTRY ();
+ /*lint -fallthrough */
+ case ACPI_GPE_ENABLE:
+ ACPI_SET_BIT (EnableMask, RegisterBit);
+ break;
- /* Get the info block for the entire GPE register */
+ case ACPI_GPE_DISABLE:
+ ACPI_CLEAR_BIT (EnableMask, RegisterBit);
+ break;
- GpeRegisterInfo = GpeEventInfo->RegisterInfo;
- if (!GpeRegisterInfo)
- {
- return (AE_NOT_EXIST);
+ default:
+ ACPI_ERROR ((AE_INFO, "Invalid GPE Action, %u\n", Action));
+ return (AE_BAD_PARAMETER);
}
- /* Write the entire GPE (runtime) enable register */
-
- Status = AcpiHwWrite (GpeRegisterInfo->EnableForRun,
- &GpeRegisterInfo->EnableAddress);
+ /* Write the updated enable mask */
+ Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
return (Status);
}
@@ -238,22 +250,29 @@ ACPI_STATUS
AcpiHwClearGpe (
ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
ACPI_STATUS Status;
- UINT8 RegisterBit;
+ UINT32 RegisterBit;
ACPI_FUNCTION_ENTRY ();
+ /* Get the info block for the entire GPE register */
- RegisterBit = (UINT8) (1 <<
- (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ return (AE_NOT_EXIST);
+ }
/*
* Write a one to the appropriate bit in the status register to
* clear this GPE.
*/
+ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
+
Status = AcpiHwWrite (RegisterBit,
- &GpeEventInfo->RegisterInfo->StatusAddress);
+ &GpeRegisterInfo->StatusAddress);
return (Status);
}
@@ -278,10 +297,10 @@ AcpiHwGetGpeStatus (
ACPI_EVENT_STATUS *EventStatus)
{
UINT32 InByte;
- UINT8 RegisterBit;
+ UINT32 RegisterBit;
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
- ACPI_STATUS Status;
ACPI_EVENT_STATUS LocalEventStatus = 0;
+ ACPI_STATUS Status;
ACPI_FUNCTION_ENTRY ();
@@ -298,8 +317,7 @@ AcpiHwGetGpeStatus (
/* Get the register bitmask for this GPE */
- RegisterBit = (UINT8) (1 <<
- (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
+ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);
/* GPE currently enabled? (enabled for runtime?) */
diff --git a/include/acdisasm.h b/include/acdisasm.h
index 4ab78ce5c14c..09677285bcc1 100644
--- a/include/acdisasm.h
+++ b/include/acdisasm.h
@@ -185,6 +185,10 @@ typedef const struct acpi_dmtable_info
#define ACPI_DMT_IVRS 34
#define ACPI_DMT_BUFFER 35
#define ACPI_DMT_PCI_PATH 36
+#define ACPI_DMT_EINJACT 37
+#define ACPI_DMT_EINJINST 38
+#define ACPI_DMT_ERSTACT 39
+#define ACPI_DMT_ERSTINST 40
typedef
@@ -201,6 +205,7 @@ typedef struct acpi_dmtable_data
ACPI_DMTABLE_INFO *TableInfo;
ACPI_DMTABLE_HANDLER TableHandler;
ACPI_CMTABLE_HANDLER CmTableHandler;
+ const unsigned char *Template;
char *Name;
} ACPI_DMTABLE_DATA;
@@ -270,6 +275,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
@@ -330,12 +336,20 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWaet[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoWddt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[];
/*
* dmtable
*/
+extern ACPI_DMTABLE_DATA AcpiDmTableData[];
+
+UINT8
+AcpiDmGenerateChecksum (
+ void *Table,
+ UINT32 Length,
+ UINT8 OriginalChecksum);
ACPI_DMTABLE_DATA *
AcpiDmGetTableData (
@@ -784,4 +798,13 @@ AcpiDmCheckResourceReference (
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState);
+
+/*
+ * acdisasm
+ */
+void
+AdDisassemblerHeader (
+ char *Filename);
+
+
#endif /* __ACDISASM_H__ */
diff --git a/include/acevents.h b/include/acevents.h
index 40515579e5e0..c03e9e365784 100644
--- a/include/acevents.h
+++ b/include/acevents.h
@@ -174,17 +174,13 @@ AcpiEvGpeDetect (
ACPI_GPE_XRUPT_INFO *GpeXruptList);
ACPI_STATUS
-AcpiEvUpdateGpeEnableMasks (
+AcpiEvUpdateGpeEnableMask (
ACPI_GPE_EVENT_INFO *GpeEventInfo);
ACPI_STATUS
AcpiEvEnableGpe (
ACPI_GPE_EVENT_INFO *GpeEventInfo);
-ACPI_STATUS
-AcpiEvDisableGpe (
- ACPI_GPE_EVENT_INFO *GpeEventInfo);
-
ACPI_GPE_EVENT_INFO *
AcpiEvGetGpeEventInfo (
ACPI_HANDLE GpeDevice,
diff --git a/include/achware.h b/include/achware.h
index be0b4df327d8..db08293c0af0 100644
--- a/include/achware.h
+++ b/include/achware.h
@@ -200,13 +200,15 @@ AcpiHwWritePort (
/*
* hwgpe - GPE support
*/
-ACPI_STATUS
-AcpiHwLowDisableGpe (
- ACPI_GPE_EVENT_INFO *GpeEventInfo);
+UINT32
+AcpiHwGetGpeRegisterBit (
+ ACPI_GPE_EVENT_INFO *GpeEventInfo,
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo);
ACPI_STATUS
-AcpiHwWriteGpeEnableReg (
- ACPI_GPE_EVENT_INFO *GpeEventInfo);
+AcpiHwLowSetGpe (
+ ACPI_GPE_EVENT_INFO *GpeEventInfo,
+ UINT32 Action);
ACPI_STATUS
AcpiHwDisableGpeBlock (
diff --git a/include/aclocal.h b/include/aclocal.h
index 0fca5e0f23d6..9609aedfca61 100644
--- a/include/aclocal.h
+++ b/include/aclocal.h
@@ -563,7 +563,6 @@ typedef struct acpi_gpe_event_info
UINT8 Flags; /* Misc info about this GPE */
UINT8 GpeNumber; /* This GPE */
UINT8 RuntimeCount; /* References to a run GPE */
- UINT8 WakeupCount; /* References to a wake GPE */
} ACPI_GPE_EVENT_INFO;
diff --git a/include/acobject.h b/include/acobject.h
index ebb656a1b4f3..29f8b623caaf 100644
--- a/include/acobject.h
+++ b/include/acobject.h
@@ -386,6 +386,7 @@ typedef struct acpi_object_thermal_zone
UINT32 BaseByteOffset; /* Byte offset within containing object */\
UINT32 Value; /* Value to store into the Bank or Index register */\
UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
+ UINT8 AccessBitWidth; /* Read/Write size in bits (8-64) */
typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
diff --git a/include/acoutput.h b/include/acoutput.h
index 8fca0de33953..61884f14d225 100644
--- a/include/acoutput.h
+++ b/include/acoutput.h
@@ -143,8 +143,9 @@
#define ACPI_TOOLS 0x00002000
#define ACPI_EXAMPLE 0x00004000
#define ACPI_DRIVER 0x00008000
+#define DT_COMPILER 0x00010000
-#define ACPI_ALL_COMPONENTS 0x0000FFFF
+#define ACPI_ALL_COMPONENTS 0x0001FFFF
#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
/* Component IDs reserved for ACPI drivers */
diff --git a/include/acpixf.h b/include/acpixf.h
index 0a94de302d8e..fe22a18c66c6 100644
--- a/include/acpixf.h
+++ b/include/acpixf.h
@@ -120,7 +120,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20100528
+#define ACPI_CA_VERSION 0x20100702
#include "actypes.h"
#include "actbl.h"
@@ -473,14 +473,12 @@ AcpiSetGpe (
ACPI_STATUS
AcpiEnableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber,
- UINT8 GpeType);
+ UINT32 GpeNumber);
ACPI_STATUS
AcpiDisableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber,
- UINT8 GpeType);
+ UINT32 GpeNumber);
ACPI_STATUS
AcpiClearGpe (
@@ -488,6 +486,12 @@ AcpiClearGpe (
UINT32 GpeNumber);
ACPI_STATUS
+AcpiGpeWakeup (
+ ACPI_HANDLE GpeDevice,
+ UINT32 GpeNumber,
+ UINT8 Action);
+
+ACPI_STATUS
AcpiGetGpeStatus (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
diff --git a/include/actbl.h b/include/actbl.h
index c25ad50a575a..e45e2368fca4 100644
--- a/include/actbl.h
+++ b/include/actbl.h
@@ -224,7 +224,28 @@ typedef struct acpi_table_rsdp
} ACPI_TABLE_RSDP;
-#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */
+/* Standalone struct for the ACPI 1.0 RSDP */
+
+typedef struct acpi_rsdp_common
+{
+ char Signature[8];
+ UINT8 Checksum;
+ char OemId[ACPI_OEM_ID_SIZE];
+ UINT8 Revision;
+ UINT32 RsdtPhysicalAddress;
+
+} ACPI_RSDP_COMMON;
+
+/* Standalone struct for the extended part of the RSDP (ACPI 2.0+) */
+
+typedef struct acpi_rsdp_extension
+{
+ UINT32 Length;
+ UINT64 XsdtPhysicalAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
+
+} ACPI_RSDP_EXTENSION;
/*******************************************************************************
diff --git a/include/actbl2.h b/include/actbl2.h
index fde9552e43e3..881d5ad7587d 100644
--- a/include/actbl2.h
+++ b/include/actbl2.h
@@ -151,6 +151,7 @@
#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization 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 */
#ifdef ACPI_UNDEFINED_TABLES
@@ -1129,6 +1130,47 @@ enum AcpiWdatInstructions
/*******************************************************************************
*
+ * WDDT - Watchdog Descriptor Table
+ * Version 1
+ *
+ * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
+ * Version 001, September 2002
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_wddt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT16 SpecVersion;
+ UINT16 TableVersion;
+ UINT16 PciVendorId;
+ ACPI_GENERIC_ADDRESS Address;
+ UINT16 MaxCount; /* Maximum counter value supported */
+ UINT16 MinCount; /* Minimum counter value supported */
+ UINT16 Period;
+ UINT16 Status;
+ UINT16 Capability;
+
+} ACPI_TABLE_WDDT;
+
+/* Flags for Status field above */
+
+#define ACPI_WDDT_AVAILABLE (1)
+#define ACPI_WDDT_ACTIVE (1<<1)
+#define ACPI_WDDT_TCO_OS_OWNED (1<<2)
+#define ACPI_WDDT_USER_RESET (1<<11)
+#define ACPI_WDDT_WDT_RESET (1<<12)
+#define ACPI_WDDT_POWER_FAIL (1<<13)
+#define ACPI_WDDT_UNKNOWN_RESET (1<<14)
+
+/* Flags for Capability field above */
+
+#define ACPI_WDDT_AUTO_RESET (1)
+#define ACPI_WDDT_ALERT_SUPPORT (1<<1)
+
+
+/*******************************************************************************
+ *
* WDRT - Watchdog Resource Table
* Version 1
*
diff --git a/include/actypes.h b/include/actypes.h
index 601e87e908d9..949100ca5c8d 100644
--- a/include/actypes.h
+++ b/include/actypes.h
@@ -742,16 +742,11 @@ typedef UINT32 ACPI_EVENT_STATUS;
#define ACPI_GPE_MAX 0xFF
#define ACPI_NUM_GPE 256
-/* Actions for AcpiSetGpe */
+/* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */
#define ACPI_GPE_ENABLE 0
#define ACPI_GPE_DISABLE 1
-
-/* GpeTypes for AcpiEnableGpe and AcpiDisableGpe */
-
-#define ACPI_GPE_TYPE_WAKE (UINT8) 0x01
-#define ACPI_GPE_TYPE_RUNTIME (UINT8) 0x02
-#define ACPI_GPE_TYPE_WAKE_RUN (UINT8) 0x03
+#define ACPI_GPE_CONDITIONAL_ENABLE 2
/*
* GPE info flags - Per GPE
diff --git a/include/acutils.h b/include/acutils.h
index ae406c3882a0..6f735cfd4e5f 100644
--- a/include/acutils.h
+++ b/include/acutils.h
@@ -767,6 +767,10 @@ AcpiUtStrupr (
char *SrcString);
void
+AcpiUtStrlwr (
+ char *SrcString);
+
+void
AcpiUtPrintString (
char *String,
UINT8 MaxLength);
diff --git a/namespace/nsrepair.c b/namespace/nsrepair.c
index 76d62bf7a0a5..3bc3660da090 100644
--- a/namespace/nsrepair.c
+++ b/namespace/nsrepair.c
@@ -683,7 +683,7 @@ AcpiNsRepairNullElement (
{
/* Need an Integer - create a zero-value integer */
- NewObject = AcpiUtCreateIntegerObject (0);
+ NewObject = AcpiUtCreateIntegerObject ((UINT64) 0);
}
else if (ExpectedBtypes & ACPI_RTYPE_STRING)
{
diff --git a/os_specific/service_layers/osunixxf.c b/os_specific/service_layers/osunixxf.c
index b457745122a1..70f69c9a0ea6 100644
--- a/os_specific/service_layers/osunixxf.c
+++ b/os_specific/service_layers/osunixxf.c
@@ -117,6 +117,8 @@
/*
* These interfaces are required in order to compile the ASL compiler under
* Linux or other Unix-like system.
+ *
+ * Note: Use #define __APPLE__ for OS X generation.
*/
#include <stdio.h>
@@ -126,6 +128,7 @@
#include <sys/time.h>
#include <semaphore.h>
#include <pthread.h>
+#include <errno.h>
#include "acpi.h"
#include "accommon.h"
@@ -528,8 +531,15 @@ AcpiOsCreateSemaphore (
return (AE_BAD_PARAMETER);
}
- Sem = AcpiOsAllocate (sizeof (sem_t));
+#ifdef __APPLE__
+ Sem = sem_open (tmpnam (NULL), O_EXCL|O_CREAT, 0755, InitialUnits);
+ if (!Sem)
+ {
+ return (AE_NO_MEMORY);
+ }
+#else
+ Sem = AcpiOsAllocate (sizeof (sem_t));
if (!Sem)
{
return (AE_NO_MEMORY);
@@ -540,6 +550,7 @@ AcpiOsCreateSemaphore (
AcpiOsFree (Sem);
return (AE_BAD_PARAMETER);
}
+#endif
*OutHandle = (ACPI_HANDLE) Sem;
return (AE_OK);
diff --git a/osunixxf.c b/osunixxf.c
index b457745122a1..70f69c9a0ea6 100644
--- a/osunixxf.c
+++ b/osunixxf.c
@@ -117,6 +117,8 @@
/*
* These interfaces are required in order to compile the ASL compiler under
* Linux or other Unix-like system.
+ *
+ * Note: Use #define __APPLE__ for OS X generation.
*/
#include <stdio.h>
@@ -126,6 +128,7 @@
#include <sys/time.h>
#include <semaphore.h>
#include <pthread.h>
+#include <errno.h>
#include "acpi.h"
#include "accommon.h"
@@ -528,8 +531,15 @@ AcpiOsCreateSemaphore (
return (AE_BAD_PARAMETER);
}
- Sem = AcpiOsAllocate (sizeof (sem_t));
+#ifdef __APPLE__
+ Sem = sem_open (tmpnam (NULL), O_EXCL|O_CREAT, 0755, InitialUnits);
+ if (!Sem)
+ {
+ return (AE_NO_MEMORY);
+ }
+#else
+ Sem = AcpiOsAllocate (sizeof (sem_t));
if (!Sem)
{
return (AE_NO_MEMORY);
@@ -540,6 +550,7 @@ AcpiOsCreateSemaphore (
AcpiOsFree (Sem);
return (AE_BAD_PARAMETER);
}
+#endif
*OutHandle = (ACPI_HANDLE) Sem;
return (AE_OK);
diff --git a/tests/templates/Makefile b/tests/templates/Makefile
new file mode 100644
index 000000000000..1880dcc04184
--- /dev/null
+++ b/tests/templates/Makefile
@@ -0,0 +1,9 @@
+
+PROG= templates
+
+templates :
+ sh templates.sh
+
+clean :
+ rm -f *.asl *.aml *.dsl *.hex diff.log
+
diff --git a/tests/templates/templates.sh b/tests/templates/templates.sh
new file mode 100755
index 000000000000..06c08143df42
--- /dev/null
+++ b/tests/templates/templates.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+rm -f *.aml *.asl *.dsl *.log
+
+files=`ls`
+
+if [ "$1" == 1 ]; then
+ ASL_COMPILER="../../generate/unix/bin/iasl"
+else
+ ASL_COMPILER="iasl"
+fi
+
+echo "Using $ASL_COMPILER"
+
+#
+# Create and compile the terse (normal) templates just
+# to ensure that they will emit and compile
+#
+$ASL_COMPILER -T ALL > /dev/null 2>&1
+$ASL_COMPILER *.asl > /dev/null 2>&1
+
+rm -f *.aml *.asl *.dsl *.log
+
+# Create the templates (use verbose mode)
+
+$ASL_COMPILER -vt -T ALL > /dev/null 2>&1
+
+# Compile the templates
+
+$ASL_COMPILER *.asl > /dev/null 2>&1
+
+# Disassemble the compiled templates
+
+$ASL_COMPILER -d *.aml > /dev/null 2>&1
+
+> diff.log
+
+#
+# Compare templates to compiled/disassembled templates
+#
+for f in $files ; do
+ if [ "$f" != "$0" ] && [ "$f" != "Makefile" ]; then
+ sig=`echo $f | awk -F. '{print $1}'`
+
+ # Ignore differences in the comment/header field
+
+ diff -pu -I" \*" $sig.asl $sig.dsl >> diff.log
+ fi
+done
+
diff --git a/tools/acpiexec/Makefile b/tools/acpiexec/Makefile
index c9cf8a4b5b92..b9e892aa7e04 100644
--- a/tools/acpiexec/Makefile
+++ b/tools/acpiexec/Makefile
@@ -1,152 +1,611 @@
-PROG= acpiexec
-SRCS= aetables.c aehandlers.c aeexec.c aemain.c \
- ../../common/getopt.c \
- ../../debugger/dbcmds.c \
- ../../debugger/dbdisply.c \
- ../../debugger/dbexec.c \
- ../../debugger/dbfileio.c \
- ../../debugger/dbhistry.c \
- ../../debugger/dbinput.c \
- ../../debugger/dbstats.c \
- ../../debugger/dbutils.c \
- ../../debugger/dbxface.c \
- ../../disassembler/dmbuffer.c \
- ../../disassembler/dmnames.c \
- ../../disassembler/dmobject.c \
- ../../disassembler/dmopcode.c \
- ../../disassembler/dmresrc.c \
- ../../disassembler/dmresrcl.c \
- ../../disassembler/dmresrcs.c \
- ../../disassembler/dmutils.c \
- ../../disassembler/dmwalk.c \
- ../../events/evevent.c \
- ../../events/evgpe.c \
- ../../events/evgpeblk.c \
- ../../events/evgpeinit.c \
- ../../events/evgpeutil.c \
- ../../events/evmisc.c \
- ../../events/evregion.c \
- ../../events/evrgnini.c \
- ../../events/evsci.c \
- ../../events/evxface.c \
- ../../events/evxfevnt.c \
- ../../events/evxfregn.c \
- ../../hardware/hwacpi.c \
- ../../hardware/hwgpe.c \
- ../../hardware/hwregs.c \
- ../../hardware/hwsleep.c \
- ../../hardware/hwvalid.c \
- ../../hardware/hwxface.c \
- ../../dispatcher/dsfield.c \
- ../../dispatcher/dsinit.c \
- ../../dispatcher/dsmethod.c \
- ../../dispatcher/dsmthdat.c \
- ../../dispatcher/dsobject.c \
- ../../dispatcher/dsopcode.c \
- ../../dispatcher/dsutils.c \
- ../../dispatcher/dswexec.c \
- ../../dispatcher/dswload.c \
- ../../dispatcher/dswscope.c \
- ../../dispatcher/dswstate.c \
- ../../executer/exconfig.c \
- ../../executer/exconvrt.c \
- ../../executer/excreate.c \
- ../../executer/exdebug.c \
- ../../executer/exdump.c \
- ../../executer/exfield.c \
- ../../executer/exfldio.c \
- ../../executer/exmisc.c \
- ../../executer/exmutex.c \
- ../../executer/exnames.c \
- ../../executer/exoparg1.c \
- ../../executer/exoparg2.c \
- ../../executer/exoparg3.c \
- ../../executer/exoparg6.c \
- ../../executer/exprep.c \
- ../../executer/exregion.c \
- ../../executer/exresnte.c \
- ../../executer/exresolv.c \
- ../../executer/exresop.c \
- ../../executer/exstore.c \
- ../../executer/exstoren.c \
- ../../executer/exstorob.c \
- ../../executer/exsystem.c \
- ../../executer/exutils.c \
- ../../parser/psargs.c \
- ../../parser/psloop.c \
- ../../parser/psopcode.c \
- ../../parser/psparse.c \
- ../../parser/psscope.c \
- ../../parser/pstree.c \
- ../../parser/psutils.c \
- ../../parser/pswalk.c \
- ../../parser/psxface.c \
- ../../namespace/nsaccess.c \
- ../../namespace/nsalloc.c \
- ../../namespace/nsdump.c \
- ../../namespace/nsdumpdv.c \
- ../../namespace/nseval.c \
- ../../namespace/nsinit.c \
- ../../namespace/nsload.c \
- ../../namespace/nsnames.c \
- ../../namespace/nsobject.c \
- ../../namespace/nsparse.c \
- ../../namespace/nspredef.c \
- ../../namespace/nsrepair.c \
- ../../namespace/nsrepair2.c \
- ../../namespace/nssearch.c \
- ../../namespace/nsutils.c \
- ../../namespace/nswalk.c \
- ../../namespace/nsxfeval.c \
- ../../namespace/nsxfname.c \
- ../../namespace/nsxfobj.c \
- ../../resources/rsaddr.c \
- ../../resources/rscalc.c \
- ../../resources/rscreate.c \
- ../../resources/rsdump.c \
- ../../resources/rsio.c \
- ../../resources/rsinfo.c \
- ../../resources/rsirq.c \
- ../../resources/rslist.c \
- ../../resources/rsmemory.c \
- ../../resources/rsmisc.c \
- ../../resources/rsutils.c \
- ../../resources/rsxface.c \
- ../../tables/tbfadt.c \
- ../../tables/tbfind.c \
- ../../tables/tbinstal.c \
- ../../tables/tbutils.c \
- ../../tables/tbxface.c \
- ../../tables/tbxfroot.c \
- ../../utilities/utalloc.c \
- ../../utilities/utcache.c \
- ../../utilities/utcopy.c \
- ../../utilities/utdebug.c \
- ../../utilities/utdelete.c \
- ../../utilities/uteval.c \
- ../../utilities/utglobal.c \
- ../../utilities/utids.c \
- ../../utilities/utinit.c \
- ../../utilities/utlock.c \
- ../../utilities/utmath.c \
- ../../utilities/utmisc.c \
- ../../utilities/utmutex.c \
- ../../utilities/utobject.c \
- ../../utilities/utresrc.c \
- ../../utilities/utstate.c \
- ../../utilities/uttrack.c \
- ../../utilities/utxface.c \
- ../../osunixxf.c
-
-
-CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../include
-
-
-acpiexec : $(patsubst %.c,%.o, $(SRCS))
- $(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -lrt -lpthread -o $(PROG)
-
-CLEANFILES= $(PROG)
+#
+# AcpiExec utility
+#
-clean :
- rm -f $(CLEANFILES) $(patsubst %.c,%.o, $(SRCS))
+PROG = acpiexec
+
+ACPICA_SRC = ../../../source
+ACPICA_COMMON = $(ACPICA_SRC)/common
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_TOOLS = $(ACPICA_SRC)/tools
+ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+
+NOMAN= YES
+CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I$(ACPICA_SRC)/include
+
+COMPILE = $(CC) -c $(CFLAGS) -o$@ $?
+LDFLAGS += -lpthread -lrt
+
+OBJS = \
+ aeexec.o \
+ aehandlers.o \
+ aemain.o \
+ aetables.o \
+ dbcmds.o \
+ dbdisply.o \
+ dbexec.o \
+ dbfileio.o \
+ dbhistry.o \
+ dbinput.o \
+ dbstats.o \
+ dbutils.o \
+ dbxface.o \
+ dmbuffer.o \
+ dmnames.o \
+ dmobject.o \
+ dmopcode.o \
+ dmresrc.o \
+ dmresrcl.o \
+ dmresrcs.o \
+ dmutils.o \
+ dmwalk.o \
+ dsfield.o \
+ dsinit.o \
+ dsmethod.o \
+ dsmthdat.o \
+ dsobject.o \
+ dsopcode.o \
+ dsutils.o \
+ dswexec.o \
+ dswload.o \
+ dswscope.o \
+ dswstate.o \
+ evevent.o \
+ evgpe.o \
+ evgpeblk.o \
+ evgpeinit.o \
+ evgpeutil.o \
+ evmisc.o \
+ evregion.o \
+ evrgnini.o \
+ evsci.o \
+ evxface.o \
+ evxfevnt.o \
+ evxfregn.o \
+ exconfig.o \
+ exconvrt.o \
+ excreate.o \
+ exdebug.o \
+ exdump.o \
+ exfield.o \
+ exfldio.o \
+ exmisc.o \
+ exmutex.o \
+ exnames.o \
+ exoparg1.o \
+ exoparg2.o \
+ exoparg3.o \
+ exoparg6.o \
+ exprep.o \
+ exregion.o \
+ exresnte.o \
+ exresolv.o \
+ exresop.o \
+ exstore.o \
+ exstoren.o \
+ exstorob.o \
+ exsystem.o \
+ exutils.o \
+ getopt.o \
+ hwacpi.o \
+ hwgpe.o \
+ hwregs.o \
+ hwsleep.o \
+ hwvalid.o \
+ hwxface.o \
+ nsaccess.o \
+ nsalloc.o \
+ nsdump.o \
+ nsdumpdv.o \
+ nseval.o \
+ nsinit.o \
+ nsload.o \
+ nsnames.o \
+ nsobject.o \
+ nsparse.o \
+ nspredef.o \
+ nsrepair.o \
+ nsrepair2.o \
+ nssearch.o \
+ nsutils.o \
+ nswalk.o \
+ nsxfeval.o \
+ nsxfname.o \
+ nsxfobj.o \
+ osunixxf.o \
+ psargs.o \
+ psloop.o \
+ psopcode.o \
+ psparse.o \
+ psscope.o \
+ pstree.o \
+ psutils.o \
+ pswalk.o \
+ psxface.o \
+ rsaddr.o \
+ rscalc.o \
+ rscreate.o \
+ rsdump.o \
+ rsinfo.o \
+ rsio.o \
+ rsirq.o \
+ rslist.o \
+ rsmemory.o \
+ rsmisc.o \
+ rsutils.o \
+ rsxface.o \
+ tbfadt.o \
+ tbfind.o \
+ tbinstal.o \
+ tbutils.o \
+ tbxface.o \
+ tbxfroot.o \
+ utalloc.o \
+ utcache.o \
+ utcopy.o \
+ utdebug.o \
+ utdelete.o \
+ uteval.o \
+ utglobal.o \
+ utids.o \
+ utinit.o \
+ utlock.o \
+ utmath.o \
+ utmisc.o \
+ utmutex.o \
+ utobject.o \
+ utresrc.o \
+ utstate.o \
+ uttrack.o \
+ utxface.o
+
+
+#
+# Root rule
+#
+$(PROG) : $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) -lpthread -o $(PROG)
+ $(COPYPROG)
+
+
+#
+# acpiexec source
+#
+aeexec.o : $(ACPICA_TOOLS)/acpiexec/aeexec.c
+ $(COMPILE)
+
+aehandlers.o : $(ACPICA_TOOLS)/acpiexec/aehandlers.c
+ $(COMPILE)
+
+aemain.o : $(ACPICA_TOOLS)/acpiexec/aemain.c
+ $(COMPILE)
+
+aetables.o : $(ACPICA_TOOLS)/acpiexec/aetables.c
+ $(COMPILE)
+
+
+#
+# ACPICA core source - common
+#
+getopt.o : $(ACPICA_COMMON)/getopt.c
+ $(COMPILE)
+
+
+#
+# ACPICA core source
+#
+dbcmds.o : $(ACPICA_CORE)/debugger/dbcmds.c
+ $(COMPILE)
+
+dbdisply.o : $(ACPICA_CORE)/debugger/dbdisply.c
+ $(COMPILE)
+
+dbexec.o : $(ACPICA_CORE)/debugger/dbexec.c
+ $(COMPILE)
+
+dbfileio.o : $(ACPICA_CORE)/debugger/dbfileio.c
+ $(COMPILE)
+
+dbhistry.o : $(ACPICA_CORE)/debugger/dbhistry.c
+ $(COMPILE)
+
+dbinput.o : $(ACPICA_CORE)/debugger/dbinput.c
+ $(COMPILE)
+
+dbstats.o : $(ACPICA_CORE)/debugger/dbstats.c
+ $(COMPILE)
+
+dbutils.o : $(ACPICA_CORE)/debugger/dbutils.c
+ $(COMPILE)
+
+dbxface.o : $(ACPICA_CORE)/debugger/dbxface.c
+ $(COMPILE)
+
+dmbuffer.o : $(ACPICA_CORE)/disassembler/dmbuffer.c
+ $(COMPILE)
+
+dmnames.o : $(ACPICA_CORE)/disassembler/dmnames.c
+ $(COMPILE)
+
+dmobject.o : $(ACPICA_CORE)/disassembler/dmobject.c
+ $(COMPILE)
+
+dmopcode.o : $(ACPICA_CORE)/disassembler/dmopcode.c
+ $(COMPILE)
+
+dmresrc.o : $(ACPICA_CORE)/disassembler/dmresrc.c
+ $(COMPILE)
+
+dmresrcl.o : $(ACPICA_CORE)/disassembler/dmresrcl.c
+ $(COMPILE)
+
+dmresrcs.o : $(ACPICA_CORE)/disassembler/dmresrcs.c
+ $(COMPILE)
+
+dmutils.o : $(ACPICA_CORE)/disassembler/dmutils.c
+ $(COMPILE)
+
+dmwalk.o : $(ACPICA_CORE)/disassembler/dmwalk.c
+ $(COMPILE)
+
+dsfield.o : $(ACPICA_CORE)/dispatcher/dsfield.c
+ $(COMPILE)
+
+dsinit.o : $(ACPICA_CORE)/dispatcher/dsinit.c
+ $(COMPILE)
+
+dsmethod.o : $(ACPICA_CORE)/dispatcher/dsmethod.c
+ $(COMPILE)
+
+dsmthdat.o : $(ACPICA_CORE)/dispatcher/dsmthdat.c
+ $(COMPILE)
+
+dsobject.o : $(ACPICA_CORE)/dispatcher/dsobject.c
+ $(COMPILE)
+
+dsopcode.o : $(ACPICA_CORE)/dispatcher/dsopcode.c
+ $(COMPILE)
+
+dsutils.o : $(ACPICA_CORE)/dispatcher/dsutils.c
+ $(COMPILE)
+
+dswexec.o : $(ACPICA_CORE)/dispatcher/dswexec.c
+ $(COMPILE)
+
+dswload.o : $(ACPICA_CORE)/dispatcher/dswload.c
+ $(COMPILE)
+
+dswscope.o : $(ACPICA_CORE)/dispatcher/dswscope.c
+ $(COMPILE)
+
+dswstate.o : $(ACPICA_CORE)/dispatcher/dswstate.c
+ $(COMPILE)
+
+evevent.o : $(ACPICA_CORE)/events/evevent.c
+ $(COMPILE)
+
+evgpe.o : $(ACPICA_CORE)/events/evgpe.c
+ $(COMPILE)
+
+evgpeblk.o : $(ACPICA_CORE)/events/evgpeblk.c
+ $(COMPILE)
+
+evgpeinit.o : $(ACPICA_CORE)/events/evgpeinit.c
+ $(COMPILE)
+
+evgpeutil.o : $(ACPICA_CORE)/events/evgpeutil.c
+ $(COMPILE)
+
+evmisc.o : $(ACPICA_CORE)/events/evmisc.c
+ $(COMPILE)
+
+evregion.o : $(ACPICA_CORE)/events/evregion.c
+ $(COMPILE)
+
+evrgnini.o : $(ACPICA_CORE)/events/evrgnini.c
+ $(COMPILE)
+
+evsci.o : $(ACPICA_CORE)/events/evsci.c
+ $(COMPILE)
+
+evxface.o : $(ACPICA_CORE)/events/evxface.c
+ $(COMPILE)
+
+evxfevnt.o : $(ACPICA_CORE)/events/evxfevnt.c
+ $(COMPILE)
+
+evxfregn.o : $(ACPICA_CORE)/events/evxfregn.c
+ $(COMPILE)
+
+exconfig.o : $(ACPICA_CORE)/executer/exconfig.c
+ $(COMPILE)
+
+exconvrt.o : $(ACPICA_CORE)/executer/exconvrt.c
+ $(COMPILE)
+
+excreate.o : $(ACPICA_CORE)/executer/excreate.c
+ $(COMPILE)
+
+exdebug.o : $(ACPICA_CORE)/executer/exdebug.c
+ $(COMPILE)
+
+exdump.o : $(ACPICA_CORE)/executer/exdump.c
+ $(COMPILE)
+
+exfield.o : $(ACPICA_CORE)/executer/exfield.c
+ $(COMPILE)
+
+exfldio.o : $(ACPICA_CORE)/executer/exfldio.c
+ $(COMPILE)
+
+exmisc.o : $(ACPICA_CORE)/executer/exmisc.c
+ $(COMPILE)
+
+exmutex.o : $(ACPICA_CORE)/executer/exmutex.c
+ $(COMPILE)
+
+exnames.o : $(ACPICA_CORE)/executer/exnames.c
+ $(COMPILE)
+
+exoparg1.o : $(ACPICA_CORE)/executer/exoparg1.c
+ $(COMPILE)
+
+exoparg2.o : $(ACPICA_CORE)/executer/exoparg2.c
+ $(COMPILE)
+
+exoparg3.o : $(ACPICA_CORE)/executer/exoparg3.c
+ $(COMPILE)
+
+exoparg6.o : $(ACPICA_CORE)/executer/exoparg6.c
+ $(COMPILE)
+
+exprep.o : $(ACPICA_CORE)/executer/exprep.c
+ $(COMPILE)
+
+exregion.o : $(ACPICA_CORE)/executer/exregion.c
+ $(COMPILE)
+
+exresnte.o : $(ACPICA_CORE)/executer/exresnte.c
+ $(COMPILE)
+
+exresolv.o : $(ACPICA_CORE)/executer/exresolv.c
+ $(COMPILE)
+
+exresop.o : $(ACPICA_CORE)/executer/exresop.c
+ $(COMPILE)
+
+exstore.o : $(ACPICA_CORE)/executer/exstore.c
+ $(COMPILE)
+
+exstoren.o : $(ACPICA_CORE)/executer/exstoren.c
+ $(COMPILE)
+exstorob.o : $(ACPICA_CORE)/executer/exstorob.c
+ $(COMPILE)
+
+exsystem.o : $(ACPICA_CORE)/executer/exsystem.c
+ $(COMPILE)
+
+exutils.o : $(ACPICA_CORE)/executer/exutils.c
+ $(COMPILE)
+
+hwacpi.o : $(ACPICA_CORE)/hardware/hwacpi.c
+ $(COMPILE)
+
+hwgpe.o : $(ACPICA_CORE)/hardware/hwgpe.c
+ $(COMPILE)
+
+hwregs.o : $(ACPICA_CORE)/hardware/hwregs.c
+ $(COMPILE)
+
+hwsleep.o : $(ACPICA_CORE)/hardware/hwsleep.c
+ $(COMPILE)
+
+hwvalid.o : $(ACPICA_CORE)/hardware/hwvalid.c
+ $(COMPILE)
+
+hwxface.o : $(ACPICA_CORE)/hardware/hwxface.c
+ $(COMPILE)
+
+nsaccess.o : $(ACPICA_CORE)/namespace/nsaccess.c
+ $(COMPILE)
+
+nsalloc.o : $(ACPICA_CORE)/namespace/nsalloc.c
+ $(COMPILE)
+
+nsdump.o : $(ACPICA_CORE)/namespace/nsdump.c
+ $(COMPILE)
+
+nsdumpdv.o : $(ACPICA_CORE)/namespace/nsdumpdv.c
+ $(COMPILE)
+
+nseval.o : $(ACPICA_CORE)/namespace/nseval.c
+ $(COMPILE)
+
+nsinit.o : $(ACPICA_CORE)/namespace/nsinit.c
+ $(COMPILE)
+
+nsload.o : $(ACPICA_CORE)/namespace/nsload.c
+ $(COMPILE)
+
+nsnames.o : $(ACPICA_CORE)/namespace/nsnames.c
+ $(COMPILE)
+
+nsobject.o : $(ACPICA_CORE)/namespace/nsobject.c
+ $(COMPILE)
+
+nsparse.o : $(ACPICA_CORE)/namespace/nsparse.c
+ $(COMPILE)
+
+nspredef.o : $(ACPICA_CORE)/namespace/nspredef.c
+ $(COMPILE)
+
+nsrepair.o : $(ACPICA_CORE)/namespace/nsrepair.c
+ $(COMPILE)
+
+nsrepair2.o : $(ACPICA_CORE)/namespace/nsrepair2.c
+ $(COMPILE)
+
+nssearch.o : $(ACPICA_CORE)/namespace/nssearch.c
+ $(COMPILE)
+
+nsutils.o : $(ACPICA_CORE)/namespace/nsutils.c
+ $(COMPILE)
+
+nswalk.o : $(ACPICA_CORE)/namespace/nswalk.c
+ $(COMPILE)
+
+nsxfeval.o : $(ACPICA_CORE)/namespace/nsxfeval.c
+ $(COMPILE)
+
+nsxfname.o : $(ACPICA_CORE)/namespace/nsxfname.c
+ $(COMPILE)
+
+nsxfobj.o : $(ACPICA_CORE)/namespace/nsxfobj.c
+ $(COMPILE)
+
+psargs.o : $(ACPICA_CORE)/parser/psargs.c
+ $(COMPILE)
+
+psloop.o : $(ACPICA_CORE)/parser/psloop.c
+ $(COMPILE)
+
+psopcode.o : $(ACPICA_CORE)/parser/psopcode.c
+ $(COMPILE)
+
+psparse.o : $(ACPICA_CORE)/parser/psparse.c
+ $(COMPILE)
+
+psscope.o : $(ACPICA_CORE)/parser/psscope.c
+ $(COMPILE)
+
+pstree.o : $(ACPICA_CORE)/parser/pstree.c
+ $(COMPILE)
+
+psutils.o : $(ACPICA_CORE)/parser/psutils.c
+ $(COMPILE)
+
+pswalk.o : $(ACPICA_CORE)/parser/pswalk.c
+ $(COMPILE)
+
+psxface.o : $(ACPICA_CORE)/parser/psxface.c
+ $(COMPILE)
+
+rsaddr.o : $(ACPICA_CORE)/resources/rsaddr.c
+ $(COMPILE)
+
+rscalc.o : $(ACPICA_CORE)/resources/rscalc.c
+ $(COMPILE)
+
+rscreate.o : $(ACPICA_CORE)/resources/rscreate.c
+ $(COMPILE)
+
+rsdump.o : $(ACPICA_CORE)/resources/rsdump.c
+ $(COMPILE)
+
+rsio.o : $(ACPICA_CORE)/resources/rsio.c
+ $(COMPILE)
+
+rsinfo.o : $(ACPICA_CORE)/resources/rsinfo.c
+ $(COMPILE)
+
+rsirq.o : $(ACPICA_CORE)/resources/rsirq.c
+ $(COMPILE)
+
+rslist.o : $(ACPICA_CORE)/resources/rslist.c
+ $(COMPILE)
+
+rsmemory.o : $(ACPICA_CORE)/resources/rsmemory.c
+ $(COMPILE)
+
+rsmisc.o : $(ACPICA_CORE)/resources/rsmisc.c
+ $(COMPILE)
+
+rsutils.o : $(ACPICA_CORE)/resources/rsutils.c
+ $(COMPILE)
+
+rsxface.o : $(ACPICA_CORE)/resources/rsxface.c
+ $(COMPILE)
+
+tbfadt.o : $(ACPICA_CORE)/tables/tbfadt.c
+ $(COMPILE)
+
+tbfind.o : $(ACPICA_CORE)/tables/tbfind.c
+ $(COMPILE)
+
+tbinstal.o : $(ACPICA_CORE)/tables/tbinstal.c
+ $(COMPILE)
+
+tbutils.o : $(ACPICA_CORE)/tables/tbutils.c
+ $(COMPILE)
+
+tbxface.o : $(ACPICA_CORE)/tables/tbxface.c
+ $(COMPILE)
+
+tbxfroot.o : $(ACPICA_CORE)/tables/tbxfroot.c
+ $(COMPILE)
+
+utalloc.o : $(ACPICA_CORE)/utilities/utalloc.c
+ $(COMPILE)
+
+utcache.o : $(ACPICA_CORE)/utilities/utcache.c
+ $(COMPILE)
+
+utcopy.o : $(ACPICA_CORE)/utilities/utcopy.c
+ $(COMPILE)
+
+utdebug.o : $(ACPICA_CORE)/utilities/utdebug.c
+ $(COMPILE)
+
+utdelete.o : $(ACPICA_CORE)/utilities/utdelete.c
+ $(COMPILE)
+
+uteval.o : $(ACPICA_CORE)/utilities/uteval.c
+ $(COMPILE)
+
+utglobal.o : $(ACPICA_CORE)/utilities/utglobal.c
+ $(COMPILE)
+
+utids.o : $(ACPICA_CORE)/utilities/utids.c
+ $(COMPILE)
+
+utinit.o : $(ACPICA_CORE)/utilities/utinit.c
+ $(COMPILE)
+
+utlock.o : $(ACPICA_CORE)/utilities/utlock.c
+ $(COMPILE)
+
+utmath.o : $(ACPICA_CORE)/utilities/utmath.c
+ $(COMPILE)
+
+utmisc.o : $(ACPICA_CORE)/utilities/utmisc.c
+ $(COMPILE)
+
+utmutex.o : $(ACPICA_CORE)/utilities/utmutex.c
+ $(COMPILE)
+
+utobject.o : $(ACPICA_CORE)/utilities/utobject.c
+ $(COMPILE)
+
+utresrc.o : $(ACPICA_CORE)/utilities/utresrc.c
+ $(COMPILE)
+
+utstate.o : $(ACPICA_CORE)/utilities/utstate.c
+ $(COMPILE)
+
+uttrack.o : $(ACPICA_CORE)/utilities/uttrack.c
+ $(COMPILE)
+
+utxface.o : $(ACPICA_CORE)/utilities/utxface.c
+ $(COMPILE)
+
+
+#
+# Unix OS services layer (OSL)
+#
+osunixxf.o : $(ACPICA_OSL)/osunixxf.c
+ $(COMPILE)
+
+
+clean :
+ rm -f $(PROG) $(PROG).exe $(OBJS)
diff --git a/tools/acpiexec/aeexec.c b/tools/acpiexec/aeexec.c
index 2e8790a59949..d18a09c1fba1 100644
--- a/tools/acpiexec/aeexec.c
+++ b/tools/acpiexec/aeexec.c
@@ -237,7 +237,7 @@ AfInstallGpeBlock (
Status = AcpiInstallGpeBlock (Handle2, &BlockAddress, 7, 8);
AcpiInstallGpeHandler (Handle2, 8, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (Handle2, 8, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (Handle2, 8);
Status = AcpiGetGpeDevice (0x30, &GpeDevice);
Status = AcpiGetGpeDevice (0x42, &GpeDevice);
@@ -531,30 +531,30 @@ AeMiscellaneousTests (
* GPEs: Handlers, enable/disable, etc.
*/
AcpiInstallGpeHandler (NULL, 0, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (NULL, 0, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (NULL, 0);
AcpiRemoveGpeHandler (NULL, 0, AeGpeHandler);
AcpiInstallGpeHandler (NULL, 0, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (NULL, 0, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (NULL, 0);
AcpiSetGpe (NULL, 0, ACPI_GPE_DISABLE);
AcpiSetGpe (NULL, 0, ACPI_GPE_ENABLE);
AcpiInstallGpeHandler (NULL, 1, ACPI_GPE_EDGE_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (NULL, 1, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (NULL, 1);
AcpiInstallGpeHandler (NULL, 2, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (NULL, 2, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (NULL, 2);
AcpiInstallGpeHandler (NULL, 3, ACPI_GPE_EDGE_TRIGGERED, AeGpeHandler, NULL);
AcpiInstallGpeHandler (NULL, 4, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
AcpiInstallGpeHandler (NULL, 5, ACPI_GPE_EDGE_TRIGGERED, AeGpeHandler, NULL);
AcpiInstallGpeHandler (NULL, 0x19, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (NULL, 0x19, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (NULL, 0x19);
AcpiInstallGpeHandler (NULL, 0x62, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
- AcpiEnableGpe (NULL, 0x62, ACPI_GPE_TYPE_RUNTIME);
- AcpiDisableGpe (NULL, 0x62, ACPI_GPE_TYPE_RUNTIME);
+ AcpiEnableGpe (NULL, 0x62);
+ AcpiDisableGpe (NULL, 0x62);
AfInstallGpeBlock ();
diff --git a/tools/acpisrc/astable.c b/tools/acpisrc/astable.c
index 5a96f06a8c83..325d519c5ffc 100644
--- a/tools/acpisrc/astable.c
+++ b/tools/acpisrc/astable.c
@@ -600,39 +600,19 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_MADT_PROCESSOR_APIC", SRC_TYPE_STRUCT},
{"ACPI_MCFG_ALLOCATION", SRC_TYPE_STRUCT},
{"ACPI_MSCT_PROXIMITY", SRC_TYPE_STRUCT},
+ {"ACPI_RSDP_COMMON", SRC_TYPE_STRUCT},
+ {"ACPI_RSDP_EXTENSION", SRC_TYPE_STRUCT},
{"ACPI_SRAT_CPU_AFFINITY", SRC_TYPE_STRUCT},
{"ACPI_SRAT_HEADER", SRC_TYPE_STRUCT},
{"ACPI_SRAT_MEM_AFFINITY", SRC_TYPE_STRUCT},
{"ACPI_SRAT_X2APIC_CPU_AFFINITY", SRC_TYPE_STRUCT},
{"ACPI_WDAT_ENTRY", SRC_TYPE_STRUCT},
+ /* Data Table compiler */
+
+ {"DT_FIELD", SRC_TYPE_STRUCT},
+ {"DT_SUBTABLE", SRC_TYPE_STRUCT},
- /* Legacy names, should be removed */
-
- {"EC_BOOT_RESOURCES", SRC_TYPE_STRUCT},
- {"HPET_TABLE", SRC_TYPE_STRUCT},
- {"MADT_ADDRESS_OVERRIDE", SRC_TYPE_STRUCT},
- {"MADT_INTERRUPT_OVERRIDE", SRC_TYPE_STRUCT},
- {"MADT_INTERRUPT_SOURCE", SRC_TYPE_STRUCT},
- {"MADT_IO_APIC", SRC_TYPE_STRUCT},
- {"MADT_IO_SAPIC", SRC_TYPE_STRUCT},
- {"MADT_LOCAL_APIC_NMI", SRC_TYPE_STRUCT},
- {"MADT_LOCAL_SAPIC", SRC_TYPE_STRUCT},
- {"MADT_NMI_SOURCE", SRC_TYPE_STRUCT},
- {"MADT_PROCESSOR_APIC", SRC_TYPE_STRUCT},
- {"MEMORY_AFFINITY", SRC_TYPE_STRUCT},
- {"MULTIPLE_APIC_TABLE", SRC_TYPE_STRUCT},
- {"SMART_BATTERY_TABLE", SRC_TYPE_STRUCT},
- {"STATIC_RESOURCE_ALLOC", SRC_TYPE_STRUCT},
- {"SYSTEM_RESOURCE_AFFINITY", SRC_TYPE_STRUCT},
- {"SYSTEM_LOCALITY_INFO", SRC_TYPE_STRUCT},
- {"FACS_DESCRIPTOR", SRC_TYPE_STRUCT},
- {"FADT_DESCRIPTOR_REV1", SRC_TYPE_STRUCT},
- {"FADT_DESCRIPTOR", SRC_TYPE_STRUCT},
- {"FADT_DESCRIPTOR_REV2_MINUS", SRC_TYPE_STRUCT},
- {"RSDP_DESCRIPTOR", SRC_TYPE_STRUCT},
- {"RSDT_DESCRIPTOR", SRC_TYPE_STRUCT},
- {"XSDT_DESCRIPTOR", SRC_TYPE_STRUCT},
{NULL, 0}
};
diff --git a/utilities/utmisc.c b/utilities/utmisc.c
index 8357aceb318d..f3e2d180fcd0 100644
--- a/utilities/utmisc.c
+++ b/utilities/utmisc.c
@@ -505,6 +505,48 @@ AcpiUtStrupr (
}
+#ifdef ACPI_ASL_COMPILER
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtStrlwr (strlwr)
+ *
+ * PARAMETERS: SrcString - The source string to convert
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Convert string to lowercase
+ *
+ * NOTE: This is not a POSIX function, so it appears here, not in utclib.c
+ *
+ ******************************************************************************/
+
+void
+AcpiUtStrlwr (
+ char *SrcString)
+{
+ char *String;
+
+
+ ACPI_FUNCTION_ENTRY ();
+
+
+ if (!SrcString)
+ {
+ return;
+ }
+
+ /* Walk entire string, lowercasing the letters */
+
+ for (String = SrcString; *String; String++)
+ {
+ *String = (char) ACPI_TOLOWER (*String);
+ }
+
+ return;
+}
+#endif
+
+
/*******************************************************************************
*
* FUNCTION: AcpiUtPrintString