aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2011-03-16 20:53:41 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2011-03-16 20:53:41 +0000
commit4d8fe534b7309d798d941e14e51985eed6b511bc (patch)
tree8e59ec98e0d4b4d7084753b3623441114c6185b0
parent19834a6cfd047752c68451e6ded1a2950f6b1f44 (diff)
downloadsrc-4d8fe534b7309d798d941e14e51985eed6b511bc.tar.gz
src-4d8fe534b7309d798d941e14e51985eed6b511bc.zip
Import ACPICA 20110316.vendor/acpica/20110316
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=219704 svn path=/vendor-sys/acpica/20110316/; revision=219705; tag=vendor/acpica/20110316
-rw-r--r--changes.txt46
-rw-r--r--common/dmtable.c61
-rw-r--r--common/dmtbdump.c75
-rw-r--r--common/dmtbinfo.c63
-rw-r--r--compiler/Makefile1
-rw-r--r--compiler/aslcompiler.y15
-rw-r--r--compiler/dtcompiler.h4
-rw-r--r--compiler/dtio.c68
-rw-r--r--compiler/dttable.c69
-rw-r--r--compiler/dttemplate.h51
-rw-r--r--compiler/dtutils.c6
-rw-r--r--events/evmisc.c114
-rw-r--r--events/evxfgpe.c12
-rw-r--r--include/acdisasm.h11
-rw-r--r--include/acglobal.h5
-rw-r--r--include/acpixf.h2
-rw-r--r--include/actbl2.h77
-rw-r--r--tools/acpiexec/aehandlers.c25
-rw-r--r--tools/acpixtract/acpixtract.c20
19 files changed, 642 insertions, 83 deletions
diff --git a/changes.txt b/changes.txt
index b7e53872752d..edac6cb98991 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,7 +1,49 @@
----------------------------------------
-11 February 2011. Summary of changes for version 20110211:
+16 March 2011. Summary of changes for version 20110316:
+
+x
+1) ACPI CA Core Subsystem:
+
+Fixed a problem caused by a _PRW method appearing at the namespace root scope
+during the setup of wake GPEs. A fault could occur if a _PRW directly under the
+root object was passed to the AcpiSetupGpeForWake interface. Lin Ming.
+
+Implemented support for "spurious" Global Lock interrupts. On some systems, a
+global lock interrupt can occur without the pending flag being set. Upon a GL
+interrupt, we now ensure that a thread is actually waiting for the lock before
+signaling GL availability. Rafael Wysocki, Bob Moore.
+
+Example Code and Data Size: These are the sizes for the OS-independent acpica.lib
+produced by the Microsoft Visual C++ 9.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 (VC 9.0):
+ Non-Debug Version: 89.7K Code, 23.7K Data, 113.4K Total
+ Debug Version: 163.9K Code, 67.5K Data, 231.4K Total
+ Current Release (VC 9.0):
+ Non-Debug Version: 89.8K Code, 23.8K Data, 113.6K Total
+ Debug Version: 164.2K Code, 67.9K Data, 232.1K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Implemented full support for the "SLIC" ACPI table. Includes support in the
+header files, disassembler, table compiler, and template generator. Bob Moore,
+Lin Ming.
-This release is available at www.acpica.org/downloads
+AcpiXtract: Correctly handle embedded comments and messages from AcpiDump.
+Apparently some or all versions of acpidump will occasionally emit a comment like
+"Wrong checksum", etc., into the dump file. This was causing problems for
+AcpiXtract. ACPICA BZ 905.
+
+iASL: Fix the Linux makefile by removing an inadvertent double file inclusion.
+ACPICA BZ 913.
+
+AcpiExec: Update installation of operation region handlers. Install one handler
+for a user-defined address space. This is used by the ASL test suite (ASLTS).
+
+----------------------------------------
+11 February 2011. Summary of changes for version 20110211:
1) ACPI CA Core Subsystem:
diff --git a/common/dmtable.c b/common/dmtable.c
index 61d9fa22b5f8..6d8e58c6fcd8 100644
--- a/common/dmtable.c
+++ b/common/dmtable.c
@@ -192,6 +192,13 @@ static const char *AcpiDmMadtSubnames[] =
"Unknown SubTable Type" /* Reserved */
};
+static const char *AcpiDmSlicSubnames[] =
+{
+ "Public Key Structure",
+ "Windows Marker Structure",
+ "Unknown SubTable Type" /* Reserved */
+};
+
static const char *AcpiDmSratSubnames[] =
{
"Processor Local APIC/SAPIC Affinity",
@@ -270,7 +277,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] =
{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_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic, "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"},
@@ -475,30 +482,34 @@ AcpiDmLineHeader (
char *Name)
{
+ /* Allow a null name for fields that span multiple lines (large buffers) */
+
+ if (!Name)
+ {
+ Name = "";
+ }
+
if (Gbl_DoTemplates && !Gbl_VerboseTemplates) /* Terse template */
{
if (ByteLength)
{
- AcpiOsPrintf ("[%.3d] %34s : ",
- ByteLength, Name);
+ AcpiOsPrintf ("[%.4d] %34s : ", ByteLength, Name);
}
else
{
- AcpiOsPrintf ("%40s : ",
- Name);
+ AcpiOsPrintf ("%41s : ", Name);
}
}
else /* Normal disassembler or verbose template */
{
if (ByteLength)
{
- AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %28s : ",
+ AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
Offset, Offset, ByteLength, Name);
}
else
{
- AcpiOsPrintf ("%43s : ",
- Name);
+ AcpiOsPrintf ("%44s : ", Name);
}
}
}
@@ -635,6 +646,7 @@ AcpiDmDumpTable (
case ACPI_DMT_UINT32:
case ACPI_DMT_NAME4:
case ACPI_DMT_SIG:
+ case ACPI_DMT_SLIC:
ByteLength = 4;
break;
case ACPI_DMT_NAME6:
@@ -652,6 +664,9 @@ AcpiDmDumpTable (
case ACPI_DMT_UUID:
ByteLength = 16;
break;
+ case ACPI_DMT_BUF128:
+ ByteLength = 128;
+ break;
case ACPI_DMT_STRING:
ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
break;
@@ -754,17 +769,26 @@ AcpiDmDumpTable (
case ACPI_DMT_BUF7:
case ACPI_DMT_BUF16:
+ case ACPI_DMT_BUF128:
/*
* Buffer: Size depends on the opcode and was set above.
* Each hex byte is separated with a space.
*/
- for (Temp8 = 0; Temp8 < ByteLength; Temp8++)
+ for (Temp16 = 0; Temp16 < ByteLength; Temp16++)
{
- AcpiOsPrintf ("%2.2X", Target[Temp8]);
- if ((UINT32) (Temp8 + 1) < ByteLength)
+ AcpiOsPrintf ("%2.2X", Target[Temp16]);
+ if ((UINT32) (Temp16 + 1) < ByteLength)
{
- AcpiOsPrintf (" ");
+ if ((Temp16 > 0) && (!((Temp16+1) % 16)))
+ {
+ AcpiOsPrintf ("\n");
+ AcpiDmLineHeader (0, 0, NULL);
+ }
+ else
+ {
+ AcpiOsPrintf (" ");
+ }
}
}
AcpiOsPrintf ("\n");
@@ -991,6 +1015,19 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%2.2X <%s>\n", *Target, AcpiDmMadtSubnames[Temp8]);
break;
+ case ACPI_DMT_SLIC:
+
+ /* SLIC subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_SLIC_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_SLIC_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf ("%8.8X <%s>\n", *Target, AcpiDmSlicSubnames[Temp8]);
+ break;
+
case ACPI_DMT_SRAT:
/* SRAT subtable types */
diff --git a/common/dmtbdump.c b/common/dmtbdump.c
index 280e3eeae5c3..590aeaeefa3f 100644
--- a/common/dmtbdump.c
+++ b/common/dmtbdump.c
@@ -1275,6 +1275,81 @@ AcpiDmDumpMsct (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpSlic
+ *
+ * PARAMETERS: Table - A SLIC table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a SLIC
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpSlic (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ UINT32 Offset = sizeof (ACPI_TABLE_SLIC);
+ ACPI_SLIC_HEADER *SubTable;
+ ACPI_DMTABLE_INFO *InfoTable;
+
+
+ /* There is no main SLIC table, only subtables */
+
+ SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, Table, Offset);
+ while (Offset < Table->Length)
+ {
+ /* Common sub-table header */
+
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
+ SubTable->Length, AcpiDmTableInfoSlicHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ switch (SubTable->Type)
+ {
+ case ACPI_SLIC_TYPE_PUBLIC_KEY:
+ InfoTable = AcpiDmTableInfoSlic0;
+ break;
+ case ACPI_SLIC_TYPE_WINDOWS_MARKER:
+ InfoTable = AcpiDmTableInfoSlic1;
+ break;
+ default:
+ AcpiOsPrintf ("\n**** Unknown SLIC sub-table type 0x%X\n", SubTable->Type);
+
+ /* Attempt to continue */
+
+ if (!SubTable->Length)
+ {
+ AcpiOsPrintf ("Invalid zero length subtable\n");
+ return;
+ }
+ goto NextSubTable;
+ }
+
+ AcpiOsPrintf ("\n");
+ Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
+ SubTable->Length, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+NextSubTable:
+ /* Point to next sub-table */
+
+ Offset += SubTable->Length;
+ SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, SubTable, SubTable->Length);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpSlit
*
* PARAMETERS: Table - An SLIT
diff --git a/common/dmtbinfo.c b/common/dmtbinfo.c
index 3cc9a1708d4b..d776b34a2a93 100644
--- a/common/dmtbinfo.c
+++ b/common/dmtbinfo.c
@@ -51,6 +51,31 @@
ACPI_MODULE_NAME ("dmtbinfo")
/*
+ * How to add a new table:
+ *
+ * - Add the C table definition to the actbl1.h or actbl2.h header.
+ * - Add ACPI_xxxx_OFFSET macro(s) for the table (and subtables) to list below.
+ * - Define the table in this file (for the disassembler). If any
+ * new data types are required (ACPI_DMT_*), see below.
+ * - Add an external declaration for the new table definition (AcpiDmTableInfo*)
+ * in acdisam.h
+ * - Add new table definition to the dispatch table in dmtable.c (AcpiDmTableData)
+ * If a simple table (with no subtables), no disassembly code is needed.
+ * Otherwise, create the AcpiDmDump* function for to disassemble the table
+ * and add it to the dmtbdump.c file.
+ * - Add an external declaration for the new AcpiDmDump* function in acdisasm.h
+ * - Add the new AcpiDmDump* function to the dispatch table in dmtable.c
+ * - Create a template for the new table
+ * - Add data table compiler support
+ *
+ * How to add a new data type (ACPI_DMT_*):
+ *
+ * - Add new type at the end of the ACPI_DMT list in acdisasm.h
+ * - Add length and implementation cases in dmtable.c (disassembler)
+ * - Add type and length cases in dtutils.c (DT compiler)
+ */
+
+/*
* Macros used to generate offsets to specific table fields
*/
#define ACPI_FACS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_FACS,f)
@@ -131,6 +156,9 @@
#define ACPI_MADTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_MCFG0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
#define ACPI_MSCT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
+#define ACPI_SLICH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
+#define ACPI_SLIC0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_KEY,f)
+#define ACPI_SLIC1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
#define ACPI_SRATH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_SRAT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
#define ACPI_SRAT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
@@ -1256,13 +1284,42 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[] =
/*******************************************************************************
*
- * SLIC - Software Licensing Description Table. NOT FULLY IMPLEMENTED, do not
- * have the table definition.
+ * SLIC - Software Licensing Description Table. There is no common table, just
+ * the standard ACPI header and then subtables.
*
******************************************************************************/
-ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[] =
+/* Common Subtable header (one per Subtable) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[] =
+{
+ {ACPI_DMT_SLIC, ACPI_SLICH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT32, ACPI_SLICH_OFFSET (Length), "Length", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[] =
+{
+ {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (KeyType), "Key Type", 0},
+ {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (Version), "Version", 0},
+ {ACPI_DMT_UINT16, ACPI_SLIC0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Algorithm), "Algorithm", 0},
+ {ACPI_DMT_NAME4, ACPI_SLIC0_OFFSET (Magic), "Magic", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (BitLength), "BitLength", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Exponent), "Exponent", 0},
+ {ACPI_DMT_BUF128, ACPI_SLIC0_OFFSET (Modulus[0]), "Modulus", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[] =
{
+ {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (Version), "Version", 0},
+ {ACPI_DMT_NAME6, ACPI_SLIC1_OFFSET (OemId[0]), "Oem ID", 0},
+ {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (OemTableId[0]), "Oem Table ID", 0},
+ {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (WindowsFlag[0]), "Windows Flag", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (SlicVersion), "SLIC Version", 0},
+ {ACPI_DMT_BUF16, ACPI_SLIC1_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_BUF128, ACPI_SLIC1_OFFSET (Signature[0]), "Signature", 0},
ACPI_DMT_TERMINATOR
};
diff --git a/compiler/Makefile b/compiler/Makefile
index e10878597df8..6344b059f651 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -32,7 +32,6 @@ OBJS = \
adfile.o \
adisasm.o \
adwalk.o \
- aslbtypes.o \
aslanalyze.o \
aslbtypes.o \
aslcodegen.o \
diff --git a/compiler/aslcompiler.y b/compiler/aslcompiler.y
index 5574f8815950..92517a4234cb 100644
--- a/compiler/aslcompiler.y
+++ b/compiler/aslcompiler.y
@@ -728,6 +728,21 @@ ASLCode
| error {YYABORT; $$ = NULL;}
;
+/*
+ * Note concerning support for "module-level code".
+ *
+ * ACPI 1.0 allowed Type1 and Type2 executable opcodes outside of control
+ * methods (the so-called module-level code.) This support was explicitly
+ * removed in ACPI 2.0, but this type of code continues to be created by
+ * BIOS vendors. In order to support the disassembly and recompilation of
+ * such code (and the porting of ASL code to iASL), iASL supports this
+ * code in violation of the current ACPI specification.
+ *
+ * The grammar change to support module-level code is to revert the
+ * {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
+ * original use of {TermList} instead (see below.) This allows the use
+ * of Type1 and Type2 opcodes at module level.
+ */
DefinitionBlockTerm
: PARSEOP_DEFINITIONBLOCK '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITIONBLOCK);}
String ','
diff --git a/compiler/dtcompiler.h b/compiler/dtcompiler.h
index a344a5ba2fb4..9138a78e71bf 100644
--- a/compiler/dtcompiler.h
+++ b/compiler/dtcompiler.h
@@ -394,6 +394,10 @@ DtCompileRsdt (
void **PFieldList);
ACPI_STATUS
+DtCompileSlic (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompileSlit (
void **PFieldList);
diff --git a/compiler/dtio.c b/compiler/dtio.c
index 395645035e6d..ee3f2478245e 100644
--- a/compiler/dtio.c
+++ b/compiler/dtio.c
@@ -60,6 +60,10 @@ static void
DtLinkField (
DT_FIELD *Field);
+static void
+DtMergeField (
+ char *Value);
+
static ACPI_STATUS
DtParseLine (
char *LineBuffer,
@@ -222,6 +226,56 @@ DtLinkField (
/******************************************************************************
*
+ * FUNCTION: DtMergeField
+ *
+ * PARAMETERS: Value - Merge this line into previous one
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Merge a field value to the previous one,
+ * probably for a multi-line buffer definition.
+ *
+ *****************************************************************************/
+
+static void
+DtMergeField (
+ char *Value)
+{
+ DT_FIELD *Prev;
+ DT_FIELD *Next;
+ char *NewValue;
+ UINT32 PrevLength;
+ UINT32 ThisLength;
+
+
+ Prev = Next = Gbl_FieldList;
+
+ while (Next)
+ {
+ Prev = Next;
+ Next = Next->Next;
+ }
+
+ if (Prev)
+ {
+ PrevLength = ACPI_STRLEN (Prev->Value);
+ ThisLength = ACPI_STRLEN (Value);
+
+ /* Add two for: separator + NULL terminator */
+
+ NewValue = UtLocalCalloc (PrevLength + ThisLength + 2);
+ ACPI_STRNCPY (NewValue, Prev->Value, PrevLength);
+ NewValue[PrevLength] = ' ';
+
+ ACPI_STRNCPY ((NewValue + PrevLength + 1), Value, ThisLength);
+ ACPI_FREE (Prev->Value);
+ Prev->Value = NewValue;
+ }
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtParseLine
*
* PARAMETERS: LineBuffer - Current source code line
@@ -354,11 +408,12 @@ DtParseLine (
Length = ACPI_PTR_DIFF (End, Start);
TmpValue = UtLocalCalloc (Length + 1);
+
ACPI_STRNCPY (TmpValue, Start, Length);
Value = DtTrim (TmpValue);
ACPI_FREE (TmpValue);
- if (Name && Value)
+ if (ACPI_STRLEN (Name) && Value)
{
Field = UtLocalCalloc (sizeof (DT_FIELD));
Field->Name = Name;
@@ -370,6 +425,17 @@ DtParseLine (
DtLinkField (Field);
}
+ else if (!ACPI_STRLEN (Name))
+ {
+ /* Handle multi-line buffers (length > 16) */
+
+ DtMergeField (Value);
+ }
+ else
+ {
+ ACPI_FREE (Name);
+ ACPI_FREE (Value);
+ }
return (AE_OK);
}
diff --git a/compiler/dttable.c b/compiler/dttable.c
index f818d3e96a56..0ad4dd4f4311 100644
--- a/compiler/dttable.c
+++ b/compiler/dttable.c
@@ -1134,6 +1134,75 @@ DtCompileRsdt (
/******************************************************************************
*
+ * FUNCTION: DtCompileSlic
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile SLIC.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileSlic (
+ void **List)
+{
+ ACPI_STATUS Status;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ DT_FIELD *SubtableStart;
+ ACPI_SLIC_HEADER *SlicHeader;
+ ACPI_DMTABLE_INFO *InfoTable;
+
+
+ while (*PFieldList)
+ {
+ SubtableStart = *PFieldList;
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlicHdr,
+ &Subtable, TRUE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ SlicHeader = ACPI_CAST_PTR (ACPI_SLIC_HEADER, Subtable->Buffer);
+
+ switch (SlicHeader->Type)
+ {
+ case ACPI_SLIC_TYPE_PUBLIC_KEY:
+ InfoTable = AcpiDmTableInfoSlic0;
+ break;
+ case ACPI_SLIC_TYPE_WINDOWS_MARKER:
+ InfoTable = AcpiDmTableInfoSlic1;
+ break;
+ default:
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SLIC");
+ return (AE_ERROR);
+ }
+
+ Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPopSubtable ();
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompileSlit
*
* PARAMETERS: List - Current field list pointer
diff --git a/compiler/dttemplate.h b/compiler/dttemplate.h
index 0e37e80031c3..79b3a61aeaaf 100644
--- a/compiler/dttemplate.h
+++ b/compiler/dttemplate.h
@@ -534,6 +534,57 @@ const unsigned char TemplateSbst[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000028 "........" */
};
+const unsigned char TemplateSlic[] =
+{
+ 0x53,0x4C,0x49,0x43,0x76,0x01,0x00,0x00, /* 00000000 "SLICv..." */
+ 0x01,0x07,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" */
+ 0x11,0x02,0x11,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x9C,0x00,0x00,0x00,0x06,0x02,0x00,0x00, /* 00000028 "........" */
+ 0x00,0x24,0x00,0x00,0x52,0x53,0x41,0x31, /* 00000030 ".$..RSA1" */
+ 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x00,0x00,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,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,0x00,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
+ 0x01,0x00,0x00,0x00,0xB6,0x00,0x00,0x00, /* 000000C0 "........" */
+ 0x00,0x00,0x02,0x00,0x49,0x4E,0x54,0x45, /* 000000C8 "....INTE" */
+ 0x4C,0x20,0x54,0x45,0x4D,0x50,0x4C,0x41, /* 000000D0 "L TEMPLA" */
+ 0x54,0x45,0x57,0x49,0x4E,0x44,0x4F,0x57, /* 000000D8 "TEWINDOW" */
+ 0x53,0x20,0x01,0x00,0x02,0x00,0x00,0x00, /* 000000E0 "S ......" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
+ 0x00,0x00,0x00,0x00,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,0x00,0x00,0x00,0x00, /* 00000118 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
+ 0x00,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,0x00,0x00,0x00,0x00, /* 00000150 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000168 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00 /* 00000170 "......" */
+};
+
const unsigned char TemplateSlit[] =
{
0x53,0x4C,0x49,0x54,0x3C,0x00,0x00,0x00, /* 00000000 "SLIT<..." */
diff --git a/compiler/dtutils.c b/compiler/dtutils.c
index 2198cb55ddef..321ec9343ac6 100644
--- a/compiler/dtutils.c
+++ b/compiler/dtutils.c
@@ -401,6 +401,7 @@ DtGetFieldType (
case ACPI_DMT_BUFFER:
case ACPI_DMT_BUF7:
case ACPI_DMT_BUF16:
+ case ACPI_DMT_BUF128:
case ACPI_DMT_PCI_PATH:
Type = DT_FIELD_TYPE_BUFFER;
break;
@@ -546,6 +547,7 @@ DtGetFieldLength (
case ACPI_DMT_UINT32:
case ACPI_DMT_NAME4:
+ case ACPI_DMT_SLIC:
case ACPI_DMT_SIG:
ByteLength = 4;
break;
@@ -605,6 +607,10 @@ DtGetFieldLength (
ByteLength = 16;
break;
+ case ACPI_DMT_BUF128:
+ ByteLength = 128;
+ break;
+
case ACPI_DMT_UNICODE:
Value = DtGetFieldValue (Field, Info->Name);
diff --git a/events/evmisc.c b/events/evmisc.c
index d15143e54e11..bbb4fa0c10a0 100644
--- a/events/evmisc.c
+++ b/events/evmisc.c
@@ -309,12 +309,8 @@ AcpiEvNotifyDispatch (
* RETURN: ACPI_INTERRUPT_HANDLED
*
* DESCRIPTION: Invoked directly from the SCI handler when a global lock
- * release interrupt occurs. Attempt to acquire the global lock,
- * if successful, signal the thread waiting for the lock.
- *
- * NOTE: Assumes that the semaphore can be signaled from interrupt level. If
- * this is not possible for some reason, a separate thread will have to be
- * scheduled to do this.
+ * release interrupt occurs. If there is actually a pending
+ * request for the lock, signal the waiting thread.
*
******************************************************************************/
@@ -322,32 +318,38 @@ static UINT32
AcpiEvGlobalLockHandler (
void *Context)
{
- BOOLEAN Acquired = FALSE;
ACPI_STATUS Status;
+ ACPI_CPU_FLAGS Flags;
+
+ Flags = AcpiOsAcquireLock (AcpiGbl_GlobalLockPendingLock);
/*
- * Attempt to get the lock.
- *
- * If we don't get it now, it will be marked pending and we will
- * take another interrupt when it becomes free.
+ * If a request for the global lock is not actually pending,
+ * we are done. This handles "spurious" global lock interrupts
+ * which are possible (and have been seen) with bad BIOSs.
*/
- ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_FACS, Acquired);
- if (Acquired)
+ if (!AcpiGbl_GlobalLockPending)
{
- /* Got the lock, now wake the thread waiting for it */
+ goto CleanupAndExit;
+ }
- AcpiGbl_GlobalLockAcquired = TRUE;
+ /*
+ * Send a unit to the global lock semaphore. The actual acquisition
+ * of the global lock will be performed by the waiting thread.
+ */
+ Status = AcpiOsSignalSemaphore (AcpiGbl_GlobalLockSemaphore, 1);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_ERROR ((AE_INFO, "Could not signal Global Lock semaphore"));
+ }
- /* Send a unit to the semaphore */
+ AcpiGbl_GlobalLockPending = FALSE;
- Status = AcpiOsSignalSemaphore (AcpiGbl_GlobalLockSemaphore, 1);
- if (ACPI_FAILURE (Status))
- {
- ACPI_ERROR ((AE_INFO, "Could not signal Global Lock semaphore"));
- }
- }
+CleanupAndExit:
+
+ AcpiOsReleaseLock (AcpiGbl_GlobalLockPendingLock, Flags);
return (ACPI_INTERRUPT_HANDLED);
}
@@ -385,15 +387,22 @@ AcpiEvInitGlobalLockHandler (
* Map to AE_OK, but mark global lock as not present. Any attempt to
* actually use the global lock will be flagged with an error.
*/
+ AcpiGbl_GlobalLockPresent = FALSE;
if (Status == AE_NO_HARDWARE_RESPONSE)
{
ACPI_ERROR ((AE_INFO,
"No response from Global Lock hardware, disabling lock"));
- AcpiGbl_GlobalLockPresent = FALSE;
return_ACPI_STATUS (AE_OK);
}
+ Status = AcpiOsCreateLock (&AcpiGbl_GlobalLockPendingLock);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiGbl_GlobalLockPending = FALSE;
AcpiGbl_GlobalLockPresent = TRUE;
return_ACPI_STATUS (Status);
}
@@ -454,7 +463,8 @@ ACPI_STATUS
AcpiEvAcquireGlobalLock (
UINT16 Timeout)
{
- ACPI_STATUS Status = AE_OK;
+ ACPI_CPU_FLAGS Flags;
+ ACPI_STATUS Status;
BOOLEAN Acquired = FALSE;
@@ -487,8 +497,8 @@ AcpiEvAcquireGlobalLock (
}
/*
- * Make sure that a global lock actually exists. If not, just treat the
- * lock as a standard mutex.
+ * Make sure that a global lock actually exists. If not, just
+ * treat the lock as a standard mutex.
*/
if (!AcpiGbl_GlobalLockPresent)
{
@@ -496,31 +506,45 @@ AcpiEvAcquireGlobalLock (
return_ACPI_STATUS (AE_OK);
}
- /* Attempt to acquire the actual hardware lock */
+ Flags = AcpiOsAcquireLock (AcpiGbl_GlobalLockPendingLock);
- ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_FACS, Acquired);
- if (Acquired)
+ do
{
- /* We got the lock */
+ /* Attempt to acquire the actual hardware lock */
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Acquired hardware Global Lock\n"));
+ ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_FACS, Acquired);
+ if (Acquired)
+ {
+ AcpiGbl_GlobalLockAcquired = TRUE;
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Acquired hardware Global Lock\n"));
+ break;
+ }
- AcpiGbl_GlobalLockAcquired = TRUE;
- return_ACPI_STATUS (AE_OK);
- }
+ /*
+ * Did not get the lock. The pending bit was set above, and
+ * we must now wait until we receive the global lock
+ * released interrupt.
+ */
+ AcpiGbl_GlobalLockPending = TRUE;
+ AcpiOsReleaseLock (AcpiGbl_GlobalLockPendingLock, Flags);
- /*
- * Did not get the lock. The pending bit was set above, and we must now
- * wait until we get the global lock released interrupt.
- */
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Waiting for hardware Global Lock\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Waiting for hardware Global Lock\n"));
- /*
- * Wait for handshake with the global lock interrupt handler.
- * This interface releases the interpreter if we must wait.
- */
- Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
- ACPI_WAIT_FOREVER);
+ /*
+ * Wait for handshake with the global lock interrupt handler.
+ * This interface releases the interpreter if we must wait.
+ */
+ Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
+ ACPI_WAIT_FOREVER);
+
+ Flags = AcpiOsAcquireLock (AcpiGbl_GlobalLockPendingLock);
+
+ } while (ACPI_SUCCESS (Status));
+
+ AcpiGbl_GlobalLockPending = FALSE;
+ AcpiOsReleaseLock (AcpiGbl_GlobalLockPendingLock, Flags);
return_ACPI_STATUS (Status);
}
diff --git a/events/evxfgpe.c b/events/evxfgpe.c
index 009271053cf0..76019969ec8c 100644
--- a/events/evxfgpe.c
+++ b/events/evxfgpe.c
@@ -314,9 +314,19 @@ AcpiSetupGpeForWake (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ /* Handle root object case */
+
+ if (WakeDevice == ACPI_ROOT_OBJECT)
+ {
+ DeviceNode = AcpiGbl_RootNode;
+ }
+ else
+ {
+ DeviceNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, WakeDevice);
+ }
+
/* Validate WakeDevice is of type Device */
- DeviceNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, WakeDevice);
if (DeviceNode->Type != ACPI_TYPE_DEVICE)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
diff --git a/include/acdisasm.h b/include/acdisasm.h
index 01235ca95caf..aaaac11d861e 100644
--- a/include/acdisasm.h
+++ b/include/acdisasm.h
@@ -129,7 +129,8 @@ typedef const struct acpi_dmtable_info
#define ACPI_DMT_DEVICE_PATH 44
#define ACPI_DMT_LABEL 45
#define ACPI_DMT_BUF7 46
-
+#define ACPI_DMT_BUF128 47
+#define ACPI_DMT_SLIC 48
typedef
void (*ACPI_DMTABLE_HANDLER) (
@@ -262,7 +263,9 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
@@ -379,6 +382,10 @@ AcpiDmDumpRsdt (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpSlic (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpSlit (
ACPI_TABLE_HEADER *Table);
diff --git a/include/acglobal.h b/include/acglobal.h
index 65cf6911f2db..fc20994fea42 100644
--- a/include/acglobal.h
+++ b/include/acglobal.h
@@ -190,13 +190,16 @@ ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
/*
* Global lock mutex is an actual AML mutex object
- * Global lock semaphore works in conjunction with the HW global lock
+ * Global lock semaphore works in conjunction with the actual global lock
+ * Global lock spinlock is used for "pending" handshake
*/
ACPI_EXTERN ACPI_OPERAND_OBJECT *AcpiGbl_GlobalLockMutex;
ACPI_EXTERN ACPI_SEMAPHORE AcpiGbl_GlobalLockSemaphore;
+ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_GlobalLockPendingLock;
ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle;
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
+ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPending;
/*
* Spinlocks are used for interfaces that can be possibly called at
diff --git a/include/acpixf.h b/include/acpixf.h
index a8573617c9e7..568a1ca48579 100644
--- a/include/acpixf.h
+++ b/include/acpixf.h
@@ -48,7 +48,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20110211
+#define ACPI_CA_VERSION 0x20110316
#include "actypes.h"
#include "actbl.h"
diff --git a/include/actbl2.h b/include/actbl2.h
index 8502c7ff977a..e4f01e3f6b8b 100644
--- a/include/actbl2.h
+++ b/include/actbl2.h
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
+ * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
*
*****************************************************************************/
@@ -831,6 +831,81 @@ typedef struct acpi_table_mchi
/*******************************************************************************
*
+ * SLIC - Software Licensing Description Table
+ * Version 1
+ *
+ * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
+ * Copyright 2006
+ *
+ ******************************************************************************/
+
+/* Basic SLIC table is only the common ACPI header */
+
+typedef struct acpi_table_slic
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_SLIC;
+
+
+/* Common SLIC subtable header */
+
+typedef struct acpi_slic_header
+{
+ UINT32 Type;
+ UINT32 Length;
+
+} ACPI_SLIC_HEADER;
+
+/* Values for Type field above */
+
+enum AcpiSlicType
+{
+ ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
+ ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
+ ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
+};
+
+
+/*
+ * SLIC Sub-tables, correspond to Type in ACPI_SLIC_HEADER
+ */
+
+/* 0: Public Key Structure */
+
+typedef struct acpi_slic_key
+{
+ ACPI_SLIC_HEADER Header;
+ UINT8 KeyType;
+ UINT8 Version;
+ UINT16 Reserved;
+ UINT32 Algorithm;
+ char Magic[4];
+ UINT32 BitLength;
+ UINT32 Exponent;
+ UINT8 Modulus[128];
+
+} ACPI_SLIC_KEY;
+
+
+/* 1: Windows Marker Structure */
+
+typedef struct acpi_slic_marker
+{
+ ACPI_SLIC_HEADER Header;
+ UINT32 Version;
+ char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
+ char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
+ char WindowsFlag[8];
+ UINT32 SlicVersion;
+ UINT8 Reserved[16];
+ UINT8 Signature[128];
+
+} ACPI_SLIC_MARKER;
+
+
+/*******************************************************************************
+ *
* SPCR - Serial Port Console Redirection table
* Version 1
*
diff --git a/tools/acpiexec/aehandlers.c b/tools/acpiexec/aehandlers.c
index 79ca33b275ef..701804e78a0b 100644
--- a/tools/acpiexec/aehandlers.c
+++ b/tools/acpiexec/aehandlers.c
@@ -100,29 +100,32 @@ static AE_DEBUG_REGIONS AeRegions;
/*
- * We will override default region handlers for memory and I/O. Especially
- * the SystemMemory handler, which must be implemented locally to simulate
- * memory operation regions. Do not override the PCI_Config handler since
- * we would like to exercise the default handler code. Do not override
- * DataTable handler, since the default handler works correctly under
- * acpiexec (and is used by the test suites.)
+ * We will override some of the default region handlers, especially the
+ * SystemMemory handler, which must be implemented locally. Do not override
+ * the PCI_Config handler since we would like to exercise the default handler
+ * code. These handlers are installed "early" - before any _REG methods
+ * are executed - since they are special in the sense that tha ACPI spec
+ * declares that they must "always be available". Cannot override the
+ * DataTable region handler either -- needed for test execution.
*/
-static ACPI_ADR_SPACE_TYPE DefaultSpaceIdList[] =
-{
+static ACPI_ADR_SPACE_TYPE DefaultSpaceIdList[] = {
ACPI_ADR_SPACE_SYSTEM_MEMORY,
ACPI_ADR_SPACE_SYSTEM_IO
};
/*
* We will install handlers for some of the various address space IDs
+ * Test one user-defined address space (used by aslts.)
*/
-static ACPI_ADR_SPACE_TYPE SpaceIdList[] =
-{
+#define ACPI_ADR_SPACE_USER_DEFINED 0x80
+
+static ACPI_ADR_SPACE_TYPE SpaceIdList[] = {
ACPI_ADR_SPACE_EC,
ACPI_ADR_SPACE_SMBUS,
ACPI_ADR_SPACE_PCI_BAR_TARGET,
ACPI_ADR_SPACE_IPMI,
- ACPI_ADR_SPACE_FIXED_HARDWARE
+ ACPI_ADR_SPACE_FIXED_HARDWARE,
+ ACPI_ADR_SPACE_USER_DEFINED
};
diff --git a/tools/acpixtract/acpixtract.c b/tools/acpixtract/acpixtract.c
index d4e90421556c..2e407c571c55 100644
--- a/tools/acpixtract/acpixtract.c
+++ b/tools/acpixtract/acpixtract.c
@@ -50,11 +50,11 @@
/* Note: This is a 32-bit program only */
-#define VERSION 0x20100107
+#define VERSION 0x20110225
#define FIND_HEADER 0
#define EXTRACT_DATA 1
#define BUFFER_SIZE 256
-
+#define HEADER_LINE_LENGTH 17 /* strlen ("FACP @ 0x737e1000") */
/* Local prototypes */
@@ -505,6 +505,13 @@ ExtractTables (
{
case FIND_HEADER:
+ /* Ignore lines that are too short to be header lines */
+
+ if (strlen (Buffer) < HEADER_LINE_LENGTH)
+ {
+ continue;
+ }
+
/* Ignore empty lines and lines that start with a space */
if ((Buffer[0] == ' ') ||
@@ -513,6 +520,15 @@ ExtractTables (
continue;
}
+ /* Ignore lines that are not of the form "ABCD @ " */
+
+ if ((Buffer[4] != ' ') ||
+ (Buffer[5] != '@') ||
+ (Buffer[6] != ' '))
+ {
+ continue;
+ }
+
NormalizeSignature (Buffer);
strncpy (ThisSignature, Buffer, 4);