merging acpica-20080321 in trunk
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24783 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: a16find - 16-bit (real mode) routines to find ACPI
|
||||
* tables in memory
|
||||
* $Revision: 1.41 $
|
||||
* $Revision: 1.43 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: adfile - Application-level disassembler file support routines
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: adisasm - Application-level disassembler routines
|
||||
* $Revision: 1.103 $
|
||||
* $Revision: 1.112 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -372,7 +372,7 @@ AdAmlDisassemble (
|
||||
ACPI_STATUS Status;
|
||||
char *DisasmFilename = NULL;
|
||||
FILE *File = NULL;
|
||||
ACPI_TABLE_HEADER *Table;
|
||||
ACPI_TABLE_HEADER *Table = NULL;
|
||||
ACPI_TABLE_HEADER *ExternalTable;
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ AdAmlDisassemble (
|
||||
{
|
||||
/* Always parse the tables, only option is what to display */
|
||||
|
||||
Status = AdParseTable (Table);
|
||||
Status = AdParseTable (Table, TRUE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
|
||||
@@ -547,7 +547,9 @@ AdAmlDisassemble (
|
||||
Status = AcpiNsRootInitialize ();
|
||||
AdAddExternalsToNamespace ();
|
||||
|
||||
Status = AdParseTable (Table);
|
||||
/* Parse table. No need to reload it, however (FALSE) */
|
||||
|
||||
Status = AdParseTable (Table, FALSE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
|
||||
@@ -573,6 +575,17 @@ AdAmlDisassemble (
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
|
||||
if (Table && !AcpiUtIsAmlTable (Table))
|
||||
{
|
||||
ACPI_FREE (Table);
|
||||
}
|
||||
|
||||
if (DisasmFilename)
|
||||
{
|
||||
ACPI_FREE (DisasmFilename);
|
||||
}
|
||||
|
||||
if (OutToFile && File)
|
||||
{
|
||||
|
||||
@@ -585,7 +598,8 @@ Cleanup:
|
||||
}
|
||||
|
||||
AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
|
||||
return Status;
|
||||
AcpiGbl_ParseOpRoot = NULL;
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
@@ -640,19 +654,36 @@ AdCreateTableHeader (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
char *NewFilename;
|
||||
UINT8 Checksum;
|
||||
|
||||
|
||||
/*
|
||||
* Print file header and dump original table header
|
||||
*/
|
||||
AdDisassemblerHeader (Filename);
|
||||
|
||||
AcpiOsPrintf (" *\n * Original Table Header:\n");
|
||||
AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature);
|
||||
AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length);
|
||||
AcpiOsPrintf (" * Revision 0x%2.2X\n", Table->Revision);
|
||||
|
||||
/* Print and validate the table checksum */
|
||||
|
||||
AcpiOsPrintf (" * Checksum 0x%2.2X", Table->Checksum);
|
||||
|
||||
Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
|
||||
if (Checksum)
|
||||
{
|
||||
AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
|
||||
(UINT8) (Table->Checksum - Checksum));
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
AcpiOsPrintf (" * OEM ID \"%.6s\"\n", Table->OemId);
|
||||
AcpiOsPrintf (" * OEM Table ID \"%.8s\"\n", Table->OemTableId);
|
||||
AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
|
||||
AcpiOsPrintf (" * Creator ID \"%.4s\"\n", Table->AslCompilerId);
|
||||
AcpiOsPrintf (" * Creator Revision 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
|
||||
AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId);
|
||||
AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
|
||||
AcpiOsPrintf (" */\n");
|
||||
|
||||
/* Create AML output filename based on input filename */
|
||||
@@ -674,6 +705,8 @@ AdCreateTableHeader (
|
||||
"DefinitionBlock (\"%s\", \"%4.4s\", %hd, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
|
||||
NewFilename, Table->Signature, Table->Revision,
|
||||
Table->OemId, Table->OemTableId, Table->OemRevision);
|
||||
|
||||
ACPI_FREE (NewFilename);
|
||||
}
|
||||
|
||||
|
||||
@@ -904,6 +937,7 @@ AdParseDeferredOps (
|
||||
case AML_CREATE_BYTE_FIELD_OP:
|
||||
case AML_CREATE_BIT_FIELD_OP:
|
||||
case AML_CREATE_FIELD_OP:
|
||||
case AML_BANK_FIELD_OP:
|
||||
|
||||
/* Nothing to do in these cases */
|
||||
|
||||
@@ -1046,7 +1080,8 @@ AdGetLocalTables (
|
||||
|
||||
ACPI_STATUS
|
||||
AdParseTable (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
BOOLEAN LoadTable)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_WALK_STATE *WalkState;
|
||||
@@ -1102,16 +1137,19 @@ AdParseTable (
|
||||
|
||||
/* Pass 2 */
|
||||
|
||||
Status = AcpiTbStoreTable ((ACPI_NATIVE_UINT) Table, Table,
|
||||
Table->Length, ACPI_TABLE_ORIGIN_ALLOCATED, &TableIndex);
|
||||
if (ACPI_FAILURE (Status))
|
||||
if (LoadTable)
|
||||
{
|
||||
return Status;
|
||||
Status = AcpiTbStoreTable ((ACPI_NATIVE_UINT) Table, Table,
|
||||
Table->Length, ACPI_TABLE_ORIGIN_ALLOCATED, &TableIndex);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf (stderr, "Pass 2 parse of [%4.4s]\n", (char *) Table->Signature);
|
||||
|
||||
Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, 0);
|
||||
Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, 0, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: adwalk - Application-level disassembler parse tree walk routines
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dmrestag - Add tags to resource descriptors (Application-level)
|
||||
* $Revision: 1.10 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dmtable - Support for ACPI tables that contain no AML code
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -137,6 +137,16 @@ AcpiDmCheckAscii (
|
||||
|
||||
/* These tables map a subtable type to a description string */
|
||||
|
||||
static const char *AcpiDmAsfSubnames[] =
|
||||
{
|
||||
"ASF Information",
|
||||
"ASF Alerts",
|
||||
"ASF Remote Control",
|
||||
"ASF RMCP Boot Options",
|
||||
"ASF Address",
|
||||
"Unknown SubTable Type" /* Reserved */
|
||||
};
|
||||
|
||||
static const char *AcpiDmDmarSubnames[] =
|
||||
{
|
||||
"Hardware Unit Definition",
|
||||
@@ -144,6 +154,31 @@ static const char *AcpiDmDmarSubnames[] =
|
||||
"Unknown SubTable Type" /* Reserved */
|
||||
};
|
||||
|
||||
static const char *AcpiDmHestSubnames[] =
|
||||
{
|
||||
"XPF Machine Check Exception",
|
||||
"XPF Corrected Machine Check",
|
||||
"NOT USED???",
|
||||
"XPF Non-Maskable Interrupt",
|
||||
"IPF Corrected Machine Check",
|
||||
"IPF Corrected Platform Error",
|
||||
"PCI Express Root Port AER",
|
||||
"PCI Express AER (AER Endpoint)",
|
||||
"PCI Express/PCI-X Bridge AERn",
|
||||
"Generic Hardware Error Source",
|
||||
"Unknown SubTable Type" /* Reserved */
|
||||
};
|
||||
|
||||
static const char *AcpiDmHestNotifySubnames[] =
|
||||
{
|
||||
"Polled",
|
||||
"External Interrupt",
|
||||
"Local Interrupt",
|
||||
"SCI",
|
||||
"NMI",
|
||||
"Unknown Notify Type" /* Reserved */
|
||||
};
|
||||
|
||||
static const char *AcpiDmMadtSubnames[] =
|
||||
{
|
||||
"Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
|
||||
@@ -180,16 +215,21 @@ static ACPI_DMTABLE_DATA AcpiDmTableData[] =
|
||||
{
|
||||
{ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, "Alert Standard Format table"},
|
||||
{ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, "Simple Boot Flag Table"},
|
||||
{ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, "Boot Error Record Table"},
|
||||
{ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, "Corrected Platform Error Polling table"},
|
||||
{ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, "Debug Port table"},
|
||||
{ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, "DMA Remapping table"},
|
||||
{ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, "Embedded Controller Boot Resources Table"},
|
||||
{ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, "Error Injection table"},
|
||||
{ACPI_SIG_ERST, NULL, AcpiDmDumpErst, "Error Record Serialization Table"},
|
||||
{ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, "Fixed ACPI Description Table"},
|
||||
{ACPI_SIG_HEST, NULL, AcpiDmDumpHest, "Hardware Error Source Table"},
|
||||
{ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, "High Precision Event Timer table"},
|
||||
{ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, "Multiple APIC Description Table"},
|
||||
{ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, "Memory Mapped Configuration table"},
|
||||
{ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, "Root System Description Table"},
|
||||
{ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, "Smart Battery Specification Table"},
|
||||
{ACPI_SIG_SLIC, AcpiDmTableInfoSlic, NULL, "Software Licensing Description Table"},
|
||||
{ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, "System Locality Information Table"},
|
||||
{ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, "Serial Port Console Redirection table"},
|
||||
{ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, "Server Platform Management Interface table"},
|
||||
@@ -284,6 +324,7 @@ void
|
||||
AcpiDmDumpDataTable (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_DMTABLE_DATA *TableData;
|
||||
UINT32 Length;
|
||||
|
||||
@@ -314,7 +355,11 @@ AcpiDmDumpDataTable (
|
||||
* All other tables must use the common ACPI table header, dump it now
|
||||
*/
|
||||
Length = Table->Length;
|
||||
AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
/* Match signature and dispatch appropriately */
|
||||
@@ -419,7 +464,7 @@ AcpiDmLineHeader2 (
|
||||
* TableOffset - Starting offset within the table for this
|
||||
* sub-descriptor (0 if main table)
|
||||
* Table - The ACPI table
|
||||
* SubtableLength - Lenghth of this sub-descriptor
|
||||
* SubtableLength - Length of this sub-descriptor
|
||||
* Info - Info table for this ACPI table
|
||||
*
|
||||
* RETURN: None
|
||||
@@ -428,7 +473,7 @@ AcpiDmLineHeader2 (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiDmDumpTable (
|
||||
UINT32 TableLength,
|
||||
UINT32 TableOffset,
|
||||
@@ -442,12 +487,13 @@ AcpiDmDumpTable (
|
||||
UINT8 Temp8;
|
||||
UINT16 Temp16;
|
||||
ACPI_DMTABLE_DATA *TableData;
|
||||
BOOLEAN LastOutputBlankLine = FALSE;
|
||||
|
||||
|
||||
if (!Info)
|
||||
{
|
||||
AcpiOsPrintf ("Display not implemented\n");
|
||||
return;
|
||||
return (AE_NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* Walk entire Info table; Null name terminates */
|
||||
@@ -466,7 +512,8 @@ AcpiDmDumpTable (
|
||||
if ((CurrentOffset >= TableLength) ||
|
||||
(SubtableLength && (Info->Offset >= SubtableLength)))
|
||||
{
|
||||
return;
|
||||
AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
|
||||
return (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
/* Generate the byte length for this field */
|
||||
@@ -478,10 +525,13 @@ AcpiDmDumpTable (
|
||||
case ACPI_DMT_SPACEID:
|
||||
case ACPI_DMT_MADT:
|
||||
case ACPI_DMT_SRAT:
|
||||
case ACPI_DMT_ASF:
|
||||
case ACPI_DMT_HESTNTYP:
|
||||
ByteLength = 1;
|
||||
break;
|
||||
case ACPI_DMT_UINT16:
|
||||
case ACPI_DMT_DMAR:
|
||||
case ACPI_DMT_HEST:
|
||||
ByteLength = 2;
|
||||
break;
|
||||
case ACPI_DMT_UINT24:
|
||||
@@ -506,14 +556,32 @@ AcpiDmDumpTable (
|
||||
ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
|
||||
break;
|
||||
case ACPI_DMT_GAS:
|
||||
AcpiOsPrintf ("\n");
|
||||
if (!LastOutputBlankLine)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
LastOutputBlankLine = TRUE;
|
||||
}
|
||||
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
|
||||
break;
|
||||
case ACPI_DMT_HESTNTFY:
|
||||
if (!LastOutputBlankLine)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
LastOutputBlankLine = TRUE;
|
||||
}
|
||||
ByteLength = sizeof (ACPI_HEST_NOTIFY);
|
||||
break;
|
||||
default:
|
||||
ByteLength = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (CurrentOffset + ByteLength > TableLength)
|
||||
{
|
||||
AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
|
||||
return (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
/* Start a new line and decode the opcode */
|
||||
|
||||
AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
|
||||
@@ -571,9 +639,11 @@ AcpiDmDumpTable (
|
||||
|
||||
case ACPI_DMT_UINT56:
|
||||
|
||||
AcpiOsPrintf ("%6.6X%8.8X\n",
|
||||
ACPI_HIDWORD (ACPI_GET64 (Target)) & 0x00FFFFFF,
|
||||
ACPI_LODWORD (ACPI_GET64 (Target)));
|
||||
for (Temp8 = 0; Temp8 < 7; Temp8++)
|
||||
{
|
||||
AcpiOsPrintf ("%2.2X", Target[Temp8]);
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
break;
|
||||
|
||||
case ACPI_DMT_UINT64:
|
||||
@@ -649,6 +719,21 @@ AcpiDmDumpTable (
|
||||
AcpiOsPrintf ("<Generic Address Structure>\n");
|
||||
AcpiDmDumpTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
|
||||
CurrentOffset, Target, 0, AcpiDmTableInfoGas);
|
||||
AcpiOsPrintf ("\n");
|
||||
LastOutputBlankLine = TRUE;
|
||||
break;
|
||||
|
||||
case ACPI_DMT_ASF:
|
||||
|
||||
/* ASF subtable types */
|
||||
|
||||
Temp16 = (UINT16) ((*Target) & 0x7F); /* Top bit can be zero or one */
|
||||
if (Temp16 > ACPI_ASF_TYPE_RESERVED)
|
||||
{
|
||||
Temp16 = ACPI_ASF_TYPE_RESERVED;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("%2.2X <%s>\n", *Target, AcpiDmAsfSubnames[Temp16]);
|
||||
break;
|
||||
|
||||
case ACPI_DMT_DMAR:
|
||||
@@ -664,6 +749,42 @@ AcpiDmDumpTable (
|
||||
AcpiOsPrintf ("%4.4X <%s>\n", *Target, AcpiDmDmarSubnames[Temp16]);
|
||||
break;
|
||||
|
||||
case ACPI_DMT_HEST:
|
||||
|
||||
/* HEST subtable types */
|
||||
|
||||
Temp16 = *Target;
|
||||
if (Temp16 > ACPI_HEST_TYPE_RESERVED)
|
||||
{
|
||||
Temp16 = ACPI_HEST_TYPE_RESERVED;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("%4.4X (%s)\n", *Target, AcpiDmHestSubnames[Temp16]);
|
||||
break;
|
||||
|
||||
case ACPI_DMT_HESTNTFY:
|
||||
|
||||
AcpiOsPrintf ("<Hardware Error Notification Structure>\n");
|
||||
AcpiDmDumpTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
|
||||
CurrentOffset, Target, 0, AcpiDmTableInfoHestNotify);
|
||||
AcpiOsPrintf ("\n");
|
||||
LastOutputBlankLine = TRUE;
|
||||
break;
|
||||
|
||||
case ACPI_DMT_HESTNTYP:
|
||||
|
||||
/* HEST Notify types */
|
||||
|
||||
Temp8 = *Target;
|
||||
if (Temp8 > ACPI_HEST_NOTIFY_RESERVED)
|
||||
{
|
||||
Temp8 = ACPI_HEST_NOTIFY_RESERVED;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("%2.2X (%s)\n", *Target, AcpiDmHestNotifySubnames[Temp8]);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_DMT_MADT:
|
||||
|
||||
/* MADT subtable types */
|
||||
@@ -691,14 +812,16 @@ AcpiDmDumpTable (
|
||||
break;
|
||||
|
||||
case ACPI_DMT_EXIT:
|
||||
return;
|
||||
return (AE_OK);
|
||||
|
||||
default:
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"**** Invalid table opcode [%X] ****\n", Info->Opcode));
|
||||
return;
|
||||
return (AE_SUPPORT);
|
||||
}
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dmtbdump - Dump ACPI data tables that contain no AML code
|
||||
* $Revision: 1.14 $
|
||||
* $Revision: 1.18 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -289,6 +289,7 @@ void
|
||||
AcpiDmDumpAsf (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_HEADER);
|
||||
ACPI_ASF_INFO *SubTable;
|
||||
ACPI_DMTABLE_INFO *InfoTable;
|
||||
@@ -307,7 +308,12 @@ AcpiDmDumpAsf (
|
||||
{
|
||||
/* Common sub-table header */
|
||||
|
||||
AcpiDmDumpTable (Table->Length, Offset, SubTable, 0, AcpiDmTableInfoAsfHdr);
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
|
||||
SubTable->Header.Length, AcpiDmTableInfoAsfHdr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (SubTable->Header.Type & 0x7F) /* Mask off top bit */
|
||||
{
|
||||
@@ -349,8 +355,12 @@ AcpiDmDumpAsf (
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiDmDumpTable (Table->Length, Offset, SubTable, SubTable->Header.Length, InfoTable);
|
||||
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
|
||||
SubTable->Header.Length, InfoTable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Dump variable-length extra data */
|
||||
|
||||
@@ -362,7 +372,12 @@ AcpiDmDumpAsf (
|
||||
for (i = 0; i < DataCount; i++)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Table->Length, DataOffset, DataTable, DataLength, DataInfoTable);
|
||||
Status = AcpiDmDumpTable (Table->Length, DataOffset,
|
||||
DataTable, DataLength, DataInfoTable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DataTable = ACPI_ADD_PTR (UINT8, DataTable, DataLength);
|
||||
DataOffset += DataLength;
|
||||
@@ -381,6 +396,11 @@ AcpiDmDumpAsf (
|
||||
AcpiOsPrintf ("%2.2X ", *DataTable);
|
||||
DataTable++;
|
||||
DataOffset++;
|
||||
if (DataOffset > Table->Length)
|
||||
{
|
||||
AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
@@ -391,6 +411,12 @@ AcpiDmDumpAsf (
|
||||
|
||||
/* Point to next sub-table */
|
||||
|
||||
if (!SubTable->Header.Length)
|
||||
{
|
||||
AcpiOsPrintf ("Invalid zero subtable header length\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Offset += SubTable->Header.Length;
|
||||
SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, SubTable, SubTable->Header.Length);
|
||||
}
|
||||
@@ -414,6 +440,7 @@ void
|
||||
AcpiDmDumpCpep (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_CPEP_POLLING *SubTable;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_CPEP);
|
||||
@@ -421,7 +448,11 @@ AcpiDmDumpCpep (
|
||||
|
||||
/* Main table */
|
||||
|
||||
AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoCpep);
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoCpep);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
@@ -429,7 +460,12 @@ AcpiDmDumpCpep (
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Length, Offset, SubTable, SubTable->Length, AcpiDmTableInfoCpep0);
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
SubTable->Length, AcpiDmTableInfoCpep0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table */
|
||||
|
||||
@@ -456,6 +492,7 @@ void
|
||||
AcpiDmDumpDmar (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_DMAR_HEADER *SubTable;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_DMAR);
|
||||
@@ -468,7 +505,11 @@ AcpiDmDumpDmar (
|
||||
|
||||
/* Main table */
|
||||
|
||||
AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoDmar);
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoDmar);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
@@ -478,7 +519,12 @@ AcpiDmDumpDmar (
|
||||
/* Common sub-table header */
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Length, Offset, SubTable, 0, AcpiDmTableInfoDmarHdr);
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
SubTable->Length, AcpiDmTableInfoDmarHdr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (SubTable->Type)
|
||||
{
|
||||
@@ -495,7 +541,12 @@ AcpiDmDumpDmar (
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiDmDumpTable (Length, Offset, SubTable, SubTable->Length, InfoTable);
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
SubTable->Length, InfoTable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Currently, a common flag indicates whether there are any
|
||||
@@ -509,8 +560,12 @@ AcpiDmDumpDmar (
|
||||
while (ScopeOffset < SubTable->Length)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable,
|
||||
ScopeTable->Length, AcpiDmTableInfoDmarScope);
|
||||
Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable,
|
||||
ScopeTable->Length, AcpiDmTableInfoDmarScope);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Dump the PCI Path entries for this device scope */
|
||||
|
||||
@@ -546,6 +601,180 @@ AcpiDmDumpDmar (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpEinj
|
||||
*
|
||||
* PARAMETERS: Table - A EINJ table
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Format the contents of a EINJ. This table type consists
|
||||
* of an open-ended number of subtables.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDmDumpEinj (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_WHEA_HEADER *SubTable;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_EINJ);
|
||||
|
||||
|
||||
/* Main table */
|
||||
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoEinj);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset);
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
0, AcpiDmTableInfoEinj0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table (each subtable is of fixed length) */
|
||||
|
||||
Offset += sizeof (ACPI_WHEA_HEADER);
|
||||
SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable,
|
||||
sizeof (ACPI_WHEA_HEADER));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpErst
|
||||
*
|
||||
* PARAMETERS: Table - A ERST table
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Format the contents of a ERST. This table type consists
|
||||
* of an open-ended number of subtables.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDmDumpErst (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_WHEA_HEADER *SubTable;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_ERST);
|
||||
|
||||
|
||||
/* Main table */
|
||||
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoErst);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset);
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
0, AcpiDmTableInfoEinj0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table (each subtable is of fixed length) */
|
||||
|
||||
Offset += sizeof (ACPI_WHEA_HEADER);
|
||||
SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable,
|
||||
sizeof (ACPI_WHEA_HEADER));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpHest
|
||||
*
|
||||
* PARAMETERS: Table - A HEST table
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Format the contents of a HEST. This table type consists
|
||||
* of an open-ended number of subtables.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDmDumpHest (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_HEST_HEADER *SubTable;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_HEST);
|
||||
ACPI_DMTABLE_INFO *InfoTable;
|
||||
UINT32 SubTableLength;
|
||||
|
||||
|
||||
/* Main table */
|
||||
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHest);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
SubTable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset);
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
/* TBD: add new subtable types as examples become available */
|
||||
|
||||
switch (SubTable->Type)
|
||||
{
|
||||
case ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE:
|
||||
InfoTable = AcpiDmTableInfoHest9;
|
||||
SubTableLength = sizeof (ACPI_HEST_GENERIC);
|
||||
break;
|
||||
|
||||
default:
|
||||
AcpiOsPrintf ("\n**** Unknown HEST sub-table type %X\n", SubTable->Type);
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
0, InfoTable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table (each subtable is of fixed length) */
|
||||
|
||||
Offset += SubTableLength;
|
||||
SubTable = ACPI_ADD_PTR (ACPI_HEST_HEADER, SubTable, SubTableLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpMadt
|
||||
@@ -563,6 +792,7 @@ void
|
||||
AcpiDmDumpMadt (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_SUBTABLE_HEADER *SubTable;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_MADT);
|
||||
@@ -571,7 +801,11 @@ AcpiDmDumpMadt (
|
||||
|
||||
/* Main table */
|
||||
|
||||
AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoMadt);
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoMadt);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
@@ -581,7 +815,12 @@ AcpiDmDumpMadt (
|
||||
/* Common sub-table header */
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Length, Offset, SubTable, 0, AcpiDmTableInfoMadtHdr);
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
SubTable->Length, AcpiDmTableInfoMadtHdr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (SubTable->Type)
|
||||
{
|
||||
@@ -617,7 +856,12 @@ AcpiDmDumpMadt (
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiDmDumpTable (Length, Offset, SubTable, SubTable->Length, InfoTable);
|
||||
Status = AcpiDmDumpTable (Length, Offset, SubTable,
|
||||
SubTable->Length, InfoTable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table */
|
||||
|
||||
@@ -643,13 +887,18 @@ void
|
||||
AcpiDmDumpMcfg (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_MCFG);
|
||||
ACPI_MCFG_ALLOCATION *SubTable;
|
||||
|
||||
|
||||
/* Main table */
|
||||
|
||||
AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg);
|
||||
Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
@@ -664,7 +913,11 @@ AcpiDmDumpMcfg (
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Table->Length, Offset, SubTable, 0, AcpiDmTableInfoMcfg0);
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 0, AcpiDmTableInfoMcfg0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table (each subtable is of fixed length) */
|
||||
|
||||
@@ -691,6 +944,7 @@ void
|
||||
AcpiDmDumpSlit (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 Offset;
|
||||
UINT8 *Row;
|
||||
UINT32 Localities;
|
||||
@@ -700,7 +954,11 @@ AcpiDmDumpSlit (
|
||||
|
||||
/* Main table */
|
||||
|
||||
AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSlit);
|
||||
Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSlit);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Display the Locality NxN Matrix */
|
||||
|
||||
@@ -759,6 +1017,7 @@ void
|
||||
AcpiDmDumpSrat (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_SRAT);
|
||||
ACPI_SUBTABLE_HEADER *SubTable;
|
||||
ACPI_DMTABLE_INFO *InfoTable;
|
||||
@@ -766,7 +1025,11 @@ AcpiDmDumpSrat (
|
||||
|
||||
/* Main table */
|
||||
|
||||
AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSrat);
|
||||
Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSrat);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sub-tables */
|
||||
|
||||
@@ -787,7 +1050,12 @@ AcpiDmDumpSrat (
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiDmDumpTable (Table->Length, Offset, SubTable, SubTable->Length, InfoTable);
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
|
||||
SubTable->Length, InfoTable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Point to next sub-table */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dmtbinfo - Table info for non-AML tables
|
||||
* $Revision: 1.12 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -130,10 +130,14 @@
|
||||
#define ACPI_HDR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
|
||||
#define ACPI_RSDP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_RSDP,f)
|
||||
#define ACPI_BOOT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
|
||||
#define ACPI_BERT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BERT,f)
|
||||
#define ACPI_CPEP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
|
||||
#define ACPI_DBGP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
|
||||
#define ACPI_DMAR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DMAR,f)
|
||||
#define ACPI_ECDT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_ECDT,f)
|
||||
#define ACPI_EINJ_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_EINJ,f)
|
||||
#define ACPI_ERST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_ERST,f)
|
||||
#define ACPI_HEST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HEST,f)
|
||||
#define ACPI_HPET_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HPET,f)
|
||||
#define ACPI_MADT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MADT,f)
|
||||
#define ACPI_MCFG_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
|
||||
@@ -145,7 +149,7 @@
|
||||
#define ACPI_TCPA_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
|
||||
#define ACPI_WDRT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
|
||||
|
||||
/* Sub-tables */
|
||||
/* Subtables */
|
||||
|
||||
#define ACPI_ASF0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_INFO,f)
|
||||
#define ACPI_ASF1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT,f)
|
||||
@@ -158,6 +162,9 @@
|
||||
#define ACPI_DMARS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f)
|
||||
#define ACPI_DMAR0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f)
|
||||
#define ACPI_DMAR1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f)
|
||||
#define ACPI_EINJ0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
|
||||
#define ACPI_HEST9_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
|
||||
#define ACPI_HESTN_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
|
||||
#define ACPI_MADT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f)
|
||||
#define ACPI_MADT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_IO_APIC,f)
|
||||
#define ACPI_MADT2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f)
|
||||
@@ -396,11 +403,11 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[] =
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Common sub-table header (one per sub-table) */
|
||||
/* Common Subtable header (one per Subtable) */
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[] =
|
||||
{
|
||||
{ACPI_DMT_UINT8, ACPI_ASF0_OFFSET (Header.Type), "Sub-Table Type"},
|
||||
{ACPI_DMT_ASF, ACPI_ASF0_OFFSET (Header.Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_ASF0_OFFSET (Header.Reserved), "Reserved"},
|
||||
{ACPI_DMT_UINT16, ACPI_ASF0_OFFSET (Header.Length), "Length"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
@@ -494,6 +501,20 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[] =
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* BERT - Boot Error Record table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoBert[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_BERT_OFFSET (RegionLength), "Boot Error Region Length"},
|
||||
{ACPI_DMT_UINT64, ACPI_BERT_OFFSET (Address), "Boot Error Region Address"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* BOOT - Simple Boot Flag Table
|
||||
@@ -522,7 +543,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[] =
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[] =
|
||||
{
|
||||
{ACPI_DMT_UINT8, ACPI_CPEP0_OFFSET (Type), "Sub-Table Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_CPEP0_OFFSET (Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_CPEP0_OFFSET (Length), "Length"},
|
||||
{ACPI_DMT_UINT8, ACPI_CPEP0_OFFSET (Id), "Processor ID"},
|
||||
{ACPI_DMT_UINT8, ACPI_CPEP0_OFFSET (Eid), "Processor EID"},
|
||||
@@ -558,11 +579,11 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmar[] =
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
/* Common sub-table header (one per sub-table) */
|
||||
/* Common Subtable header (one per Subtable) */
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoDmarHdr[] =
|
||||
{
|
||||
{ACPI_DMT_DMAR, ACPI_DMAR0_OFFSET (Header.Type), "Sub-Table Type"},
|
||||
{ACPI_DMT_DMAR, ACPI_DMAR0_OFFSET (Header.Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT16, ACPI_DMAR0_OFFSET (Header.Length), "Length"},
|
||||
{ACPI_DMT_UINT8, ACPI_DMAR0_OFFSET (Header.Flags), "Flags"},
|
||||
{ACPI_DMT_UINT24, ACPI_DMAR0_OFFSET (Header.Reserved[0]), "Reserved"},
|
||||
@@ -580,7 +601,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[] =
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
/* DMAR sub-tables */
|
||||
/* DMAR Subtables */
|
||||
|
||||
/* 0: Hardware Unit Definition */
|
||||
|
||||
@@ -617,6 +638,91 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[] =
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* EINJ - Error Injection table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_EINJ_OFFSET (HeaderLength), "Injection Header Length"},
|
||||
{ACPI_DMT_UINT32, ACPI_EINJ_OFFSET (Reserved), "Reserved"},
|
||||
{ACPI_DMT_UINT32, ACPI_EINJ_OFFSET (Entries), "Injection Entry Count"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[] =
|
||||
{
|
||||
{ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Action), "Action"},
|
||||
{ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Instruction), "Instruction"},
|
||||
{ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Flags), "Flags"},
|
||||
{ACPI_DMT_UINT8, ACPI_EINJ0_OFFSET (Reserved), "Reserved"},
|
||||
{ACPI_DMT_GAS, ACPI_EINJ0_OFFSET (RegisterRegion), "Register Region"},
|
||||
{ACPI_DMT_UINT64, ACPI_EINJ0_OFFSET (Value), "Value"},
|
||||
{ACPI_DMT_UINT64, ACPI_EINJ0_OFFSET (Mask), "Mask"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* ERST - Error Record Serialization table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoErst[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_ERST_OFFSET (HeaderLength), "Serialization Header Length"},
|
||||
{ACPI_DMT_UINT32, ACPI_ERST_OFFSET (Reserved), "Reserved"},
|
||||
{ACPI_DMT_UINT32, ACPI_ERST_OFFSET (Entries), "Instruction Entry Count"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* HEST - Hardware Error Source table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoHest[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_HEST_OFFSET (ErrorSourceCount), "Error Source Count"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[] =
|
||||
{
|
||||
{ACPI_DMT_HEST, ACPI_HEST9_OFFSET (Header.Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT16, ACPI_HEST9_OFFSET (SourceId), "Source Id"},
|
||||
{ACPI_DMT_UINT16, ACPI_HEST9_OFFSET (RelatedSourceId), "Related Source Id"},
|
||||
{ACPI_DMT_UINT8, ACPI_HEST9_OFFSET (ConfigWriteEnable), "Configuration Write Enable"},
|
||||
{ACPI_DMT_UINT8, ACPI_HEST9_OFFSET (Enabled), "Enabled"},
|
||||
{ACPI_DMT_UINT32, ACPI_HEST9_OFFSET (RecordsToPreAllocate), "Records To Preallocate"},
|
||||
{ACPI_DMT_UINT32, ACPI_HEST9_OFFSET (MaxSectionsPerRecord), "Max Sections Per Record"},
|
||||
{ACPI_DMT_UINT32, ACPI_HEST9_OFFSET (MaxRawDataLength), "Max Raw Data Length"},
|
||||
{ACPI_DMT_GAS, ACPI_HEST9_OFFSET (ErrorStatusAddress), "Error Status Address"},
|
||||
{ACPI_DMT_HESTNTFY, ACPI_HEST9_OFFSET (Notify), "Notify"},
|
||||
{ACPI_DMT_UINT32, ACPI_HEST9_OFFSET (ErrorStatusBlockLength), "Error Status Block Length"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[10] =
|
||||
{
|
||||
{ACPI_DMT_HESTNTYP, ACPI_HESTN_OFFSET (Type), "Notify Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_HESTN_OFFSET (Length), "Notify Length"},
|
||||
{ACPI_DMT_UINT16, ACPI_HESTN_OFFSET (ConfigWriteEnable), "Configuration Write Enable"},
|
||||
{ACPI_DMT_UINT32, ACPI_HESTN_OFFSET (PollInterval), "PollInterval"},
|
||||
{ACPI_DMT_UINT32, ACPI_HESTN_OFFSET (Vector), "Vector"},
|
||||
{ACPI_DMT_UINT32, ACPI_HESTN_OFFSET (PollingThresholdValue), "Polling Threshold Value"},
|
||||
{ACPI_DMT_UINT32, ACPI_HESTN_OFFSET (PollingThresholdWindow), "Polling Threshold Window"},
|
||||
{ACPI_DMT_UINT32, ACPI_HESTN_OFFSET (ErrorThresholdValue), "Error Threshold Value"},
|
||||
{ACPI_DMT_UINT32, ACPI_HESTN_OFFSET (ErrorThresholdWindow), "Error Threshold Window"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* HPET - High Precision Event Timer table
|
||||
@@ -651,16 +757,16 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[] =
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
/* Common sub-table header (one per sub-table) */
|
||||
/* Common Subtable header (one per Subtable) */
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[] =
|
||||
{
|
||||
{ACPI_DMT_MADT, ACPI_MADTH_OFFSET (Type), "Sub-Table Type"},
|
||||
{ACPI_DMT_MADT, ACPI_MADTH_OFFSET (Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_MADTH_OFFSET (Length), "Length"},
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
/* MADT sub-tables */
|
||||
/* MADT Subtables */
|
||||
|
||||
/* 0: processor APIC */
|
||||
|
||||
@@ -775,7 +881,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMadt8[] =
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MCFG - PCI Memory Mapped Configuration table and sub-table
|
||||
* MCFG - PCI Memory Mapped Configuration table and Subtable
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -811,6 +917,18 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[] =
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* SLIC - Software Licensing Description Table. NOT FULLY IMPLEMENTED
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[] =
|
||||
{
|
||||
{ACPI_DMT_EXIT, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* SLIT - System Locality Information Table
|
||||
@@ -883,7 +1001,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[] =
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* SRAT - System Resource Affinity Table and sub-tables
|
||||
* SRAT - System Resource Affinity Table and Subtables
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -896,7 +1014,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat[] =
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[] =
|
||||
{
|
||||
{ACPI_DMT_SRAT, ACPI_SRAT0_OFFSET (Header.Type), "Sub-Table Type"},
|
||||
{ACPI_DMT_SRAT, ACPI_SRAT0_OFFSET (Header.Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_SRAT0_OFFSET (Header.Length), "Length"},
|
||||
{ACPI_DMT_UINT8, ACPI_SRAT0_OFFSET (ProximityDomainLo), "Proximity Domain Low(8)"},
|
||||
{ACPI_DMT_UINT8, ACPI_SRAT0_OFFSET (ApicId), "Apic ID"},
|
||||
@@ -910,7 +1028,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[] =
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[] =
|
||||
{
|
||||
{ACPI_DMT_SRAT, ACPI_SRAT1_OFFSET (Header.Type), "Sub-Table Type"},
|
||||
{ACPI_DMT_SRAT, ACPI_SRAT1_OFFSET (Header.Type), "Subtable Type"},
|
||||
{ACPI_DMT_UINT8, ACPI_SRAT1_OFFSET (Header.Length), "Length"},
|
||||
{ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (ProximityDomain), "Proximity Domain"},
|
||||
{ACPI_DMT_UINT16, ACPI_SRAT1_OFFSET (Reserved), "Reserved"},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: getopt
|
||||
* $Revision: 1.9 $
|
||||
* $Revision: 1.11 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -4,7 +4,7 @@ PROG= iasl
|
||||
SRCS= aslcompilerparse.c aslcompilerlex.c aslanalyze.c aslcodegen.c \
|
||||
aslcompile.c aslerror.c aslfiles.c asllength.c \
|
||||
asllisting.c aslload.c asllookup.c aslmain.c aslmap.c aslopcodes.c \
|
||||
asloperands.c aslresource.c aslrestype1.c aslrestype2.c \
|
||||
asloperands.c aslresource.c aslrestype1.c aslrestype2.c aslstartup.c \
|
||||
asltree.c aslutils.c asltransform.c aslfold.c aslstubs.c aslopt.c \
|
||||
../common/getopt.c \
|
||||
../utilities/utalloc.c \
|
||||
@@ -13,12 +13,14 @@ SRCS= aslcompilerparse.c aslcompilerlex.c aslanalyze.c aslcodegen.c \
|
||||
../utilities/utdebug.c \
|
||||
../utilities/utdelete.c \
|
||||
../utilities/utglobal.c \
|
||||
../utilities/utinit.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 \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslanalyze.c - check for semantic errors
|
||||
* $Revision: 1.114 $
|
||||
* $Revision: 1.118 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -272,7 +272,11 @@ AnMapArgTypeToBtype (
|
||||
return (ACPI_BTYPE_MUTEX);
|
||||
|
||||
case ARGI_DDBHANDLE:
|
||||
return (ACPI_BTYPE_DDB_HANDLE);
|
||||
/*
|
||||
* DDBHandleObject := SuperName
|
||||
* ACPI_BTYPE_REFERENCE: Index reference as parameter of Load/Unload
|
||||
*/
|
||||
return (ACPI_BTYPE_DDB_HANDLE | ACPI_BTYPE_REFERENCE);
|
||||
|
||||
/* Interchangeable types */
|
||||
/*
|
||||
@@ -956,9 +960,9 @@ AnMethodAnalysisWalkBegin (
|
||||
MethodInfo->ValidArgTypes[ActualArgs] =
|
||||
AnMapObjTypeToBtype (NextType);
|
||||
NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
|
||||
ActualArgs++;
|
||||
}
|
||||
|
||||
ActualArgs++;
|
||||
NextType = NextType->Asl.Next;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslcodegen - AML code generation
|
||||
* $Revision: 1.61 $
|
||||
* $Revision: 1.63 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslcompile - top level compile module
|
||||
* $Revision: 1.96 $
|
||||
* $Revision: 1.99 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -914,16 +914,6 @@ CmCleanupAndExit (
|
||||
}
|
||||
|
||||
UtDisplaySummary (ASL_FILE_STDOUT);
|
||||
|
||||
/*
|
||||
* Return non-zero exit code if there have been errors, unless the
|
||||
* global ignore error flag has been set
|
||||
*/
|
||||
if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors))
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslcompiler.h - common include file for iASL
|
||||
* $Revision: 1.147 $
|
||||
* $Revision: 1.151 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -188,6 +188,12 @@ AslPushInputFileStack (
|
||||
FILE *InputFile,
|
||||
char *Filename);
|
||||
|
||||
/*
|
||||
* aslstartup - called from main
|
||||
*/
|
||||
ACPI_STATUS
|
||||
AslDoOnePathname (
|
||||
char *Pathname);
|
||||
|
||||
/*
|
||||
* aslcompile - compile mainline
|
||||
@@ -307,6 +313,10 @@ void
|
||||
AePrintErrorLog (
|
||||
UINT32 FileId);
|
||||
|
||||
void
|
||||
AeClearErrorLog (
|
||||
void);
|
||||
|
||||
ACPI_PHYSICAL_ADDRESS
|
||||
AeLocalGetRootPointer (
|
||||
void);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslcompiler.l - Flex input file
|
||||
* $Revision: 1.78 $
|
||||
* $Revision: 1.80 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asldefine.h - Common defines for the iASL compiler
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.9 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -128,7 +128,7 @@
|
||||
#define IntelAcpiCA "Intel ACPI Component Architecture"
|
||||
#define CompilerId "ASL Optimizing Compiler"
|
||||
#define DisassemblerId "AML Disassembler"
|
||||
#define CompilerCopyright "Copyright (C) 2000 - 2006 Intel Corporation"
|
||||
#define CompilerCopyright "Copyright (C) 2000 - 2008 Intel Corporation"
|
||||
#define CompilerCompliance "Supports ACPI Specification Revision 3.0a"
|
||||
#define CompilerName "iasl"
|
||||
#define CompilerCreatorId "INTL"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslerror - Error handling and statistics
|
||||
* $Revision: 1.91 $
|
||||
* $Revision: 1.95 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -128,6 +128,26 @@ AeAddToErrorLog (
|
||||
ASL_ERROR_MSG *Enode);
|
||||
|
||||
|
||||
void
|
||||
AeClearErrorLog (
|
||||
void)
|
||||
{
|
||||
ASL_ERROR_MSG *Enode = Gbl_ErrorLog;
|
||||
ASL_ERROR_MSG *Next;
|
||||
|
||||
/* Walk the error node list */
|
||||
|
||||
while (Enode)
|
||||
{
|
||||
Next = Enode->Next;
|
||||
ACPI_FREE (Enode);
|
||||
Enode = Next;
|
||||
}
|
||||
|
||||
Gbl_ErrorLog = NULL;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AeAddToErrorLog
|
||||
@@ -288,7 +308,8 @@ AePrintException (
|
||||
if (Actual)
|
||||
{
|
||||
fprintf (OutputFile,
|
||||
"[*** iASL: Seek error on source code temp file ***]");
|
||||
"[*** iASL: Seek error on source code temp file %s ***]",
|
||||
Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -296,7 +317,8 @@ AePrintException (
|
||||
if (!RActual)
|
||||
{
|
||||
fprintf (OutputFile,
|
||||
"[*** iASL: Read error on source code temp file ***]");
|
||||
"[*** iASL: Read error on source code temp file %s ***]",
|
||||
Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
|
||||
}
|
||||
|
||||
else while (RActual && SourceByte && (SourceByte != '\n'))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslfiles - file I/O suppoert
|
||||
* $Revision: 1.53 $
|
||||
* $Revision: 1.56 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -369,6 +369,8 @@ FlPrintFile (
|
||||
va_start (Args, Format);
|
||||
|
||||
Actual = vfprintf (Gbl_Files[FileId].Handle, Format, Args);
|
||||
va_end (Args);
|
||||
|
||||
if (Actual == -1)
|
||||
{
|
||||
FlFileError (FileId, ASL_MSG_WRITE);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslfold - Constant folding
|
||||
* $Revision: 1.19 $
|
||||
* $Revision: 1.21 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslglobal.h - Global variable definitions
|
||||
* $Revision: 1.55 $
|
||||
* $Revision: 1.58 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -144,7 +144,7 @@ extern FILE *AslCompilerin;
|
||||
extern int AslCompilerdebug;
|
||||
extern const ASL_MAPPING_ENTRY AslKeywordMapping[];
|
||||
extern char *AslCompilertext;
|
||||
extern char hex[];
|
||||
extern char HexLookup[];
|
||||
|
||||
#define ASL_LINE_BUFFER_SIZE 512
|
||||
#define ASL_MSG_BUFFER_SIZE 4096
|
||||
@@ -171,6 +171,9 @@ extern UINT32 Gbl_ExceptionCount[];
|
||||
|
||||
/* Option flags */
|
||||
|
||||
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoCompile, TRUE);
|
||||
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoSignon, TRUE);
|
||||
|
||||
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_Acpi2, FALSE);
|
||||
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE);
|
||||
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NsOutputFlag, FALSE);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asllength - Tree walk to determine package and opcode lengths
|
||||
* $Revision: 1.36 $
|
||||
* $Revision: 1.38 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asllisting - Listing file generation
|
||||
* $Revision: 1.62 $
|
||||
* $Revision: 1.64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswload - Dispatcher namespace load callbacks
|
||||
* $Revision: 1.76 $
|
||||
* $Revision: 1.79 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -672,7 +672,8 @@ LdNamespace1Begin (
|
||||
Node->Type = (UINT8) ObjectType;
|
||||
Status = AE_OK;
|
||||
}
|
||||
else if (Node->Flags & ANOBJ_IS_EXTERNAL)
|
||||
else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
|
||||
(Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
|
||||
{
|
||||
/*
|
||||
* Allow one create on an object or segment that was
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asllookup- Namespace lookup
|
||||
* $Revision: 1.102 $
|
||||
* $Revision: 1.106 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -174,6 +174,13 @@ LkIsObjectUsed (
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
static ACPI_STATUS
|
||||
LsDoOnePathname (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -416,6 +423,18 @@ LsDoOneNamespaceObject (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: LsSetupNsList
|
||||
*
|
||||
* PARAMETERS: Handle - local file handle
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Set the namespace output file to the input handle
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
LsSetupNsList (void * Handle)
|
||||
{
|
||||
@@ -425,6 +444,44 @@ LsSetupNsList (void * Handle)
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: LsDoOnePathname
|
||||
*
|
||||
* PARAMETERS: ACPI_WALK_CALLBACK
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Print the full pathname for a namespace node.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
LsDoOnePathname (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_BUFFER TargetPath;
|
||||
|
||||
|
||||
TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
|
||||
Status = AcpiNsHandleToPathname (Node, &TargetPath);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s\n", TargetPath.Pointer);
|
||||
ACPI_FREE (TargetPath.Pointer);
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: LsDisplayNamespace
|
||||
@@ -463,6 +520,15 @@ LsDisplayNamespace (
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject,
|
||||
NULL, NULL);
|
||||
|
||||
/* Print the full pathname for each namespace node */
|
||||
|
||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
|
||||
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, FALSE, LsDoOnePathname,
|
||||
NULL, NULL);
|
||||
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslmain - compiler main and utilities
|
||||
* $Revision: 1.94 $
|
||||
* $Revision: 1.99 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -130,15 +130,6 @@
|
||||
#define _COMPONENT ACPI_COMPILER
|
||||
ACPI_MODULE_NAME ("aslmain")
|
||||
|
||||
BOOLEAN AslToFile = TRUE;
|
||||
BOOLEAN DoCompile = TRUE;
|
||||
BOOLEAN DoSignon = TRUE;
|
||||
|
||||
char hex[] =
|
||||
{
|
||||
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
};
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
static void
|
||||
@@ -157,16 +148,11 @@ static void
|
||||
AslInitialize (
|
||||
void);
|
||||
|
||||
static void
|
||||
static int
|
||||
AslCommandLine (
|
||||
int argc,
|
||||
char **argv);
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if ACPI_MACHINE_WIDTH != 16
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -186,7 +172,7 @@ Options (
|
||||
{
|
||||
|
||||
printf ("General Output:\n");
|
||||
printf (" -p <prefix> Specify filename prefix for all output files (including .aml)\n");
|
||||
printf (" -p <prefix> Specify path/filename prefix for all output files\n");
|
||||
printf (" -vi Less verbose errors and warnings for use with IDEs\n");
|
||||
printf (" -vo Enable optimization comments\n");
|
||||
printf (" -vr Disable remarks\n");
|
||||
@@ -280,7 +266,7 @@ Usage (
|
||||
void)
|
||||
{
|
||||
|
||||
printf ("Usage: %s [Options] [InputFile]\n\n", CompilerName);
|
||||
printf ("Usage: %s [Options] [Files]\n\n", CompilerName);
|
||||
Options ();
|
||||
}
|
||||
|
||||
@@ -336,7 +322,7 @@ AslInitialize (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
static int
|
||||
AslCommandLine (
|
||||
int argc,
|
||||
char **argv)
|
||||
@@ -402,7 +388,7 @@ AslCommandLine (
|
||||
switch (AcpiGbl_Optarg[0])
|
||||
{
|
||||
case '^':
|
||||
DoCompile = FALSE;
|
||||
Gbl_DoCompile = FALSE;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
@@ -436,7 +422,7 @@ AslCommandLine (
|
||||
/* Get all ACPI tables */
|
||||
|
||||
Gbl_GetAllTables = TRUE;
|
||||
DoCompile = FALSE;
|
||||
Gbl_DoCompile = FALSE;
|
||||
break;
|
||||
|
||||
|
||||
@@ -652,7 +638,7 @@ AslCommandLine (
|
||||
break;
|
||||
|
||||
case 's':
|
||||
DoSignon = FALSE;
|
||||
Gbl_DoSignon = FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -701,9 +687,7 @@ AslCommandLine (
|
||||
|
||||
/* Next parameter must be the input filename */
|
||||
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename = argv[AcpiGbl_Optind];
|
||||
|
||||
if (!Gbl_Files[ASL_FILE_INPUT].Filename &&
|
||||
if (!argv[AcpiGbl_Optind] &&
|
||||
!Gbl_DisasmFlag &&
|
||||
!Gbl_GetAllTables)
|
||||
{
|
||||
@@ -711,7 +695,7 @@ AslCommandLine (
|
||||
BadCommandLine = TRUE;
|
||||
}
|
||||
|
||||
if (DoSignon)
|
||||
if (Gbl_DoSignon)
|
||||
{
|
||||
AslCompilerSignon (ASL_FILE_STDOUT);
|
||||
}
|
||||
@@ -725,11 +709,7 @@ AslCommandLine (
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if ((AcpiGbl_Optind + 1) < argc)
|
||||
{
|
||||
printf ("Warning: extra arguments (%d) after input filename are ignored\n\n",
|
||||
argc - AcpiGbl_Optind - 1);
|
||||
}
|
||||
return (AcpiGbl_Optind);
|
||||
}
|
||||
|
||||
|
||||
@@ -741,8 +721,8 @@ AslCommandLine (
|
||||
*
|
||||
* RETURN: Program termination code
|
||||
*
|
||||
* DESCRIPTION: C main routine for the Asl Compiler. Handle command line
|
||||
* options and begin the compile.
|
||||
* DESCRIPTION: C main routine for the Asl Compiler. Handle command line
|
||||
* options and begin the compile for each file on the command line
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -752,118 +732,30 @@ main (
|
||||
char **argv)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
char *Prefix;
|
||||
int Index;
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if ACPI_MACHINE_WIDTH != 16
|
||||
_CrtSetDbgFlag (_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_LEAK_CHECK_DF |
|
||||
_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Init and command line */
|
||||
|
||||
AslInitialize ();
|
||||
AslCommandLine (argc, argv);
|
||||
Index = AslCommandLine (argc, argv);
|
||||
|
||||
/*
|
||||
* If -p not specified, we will use the input filename as the
|
||||
* output filename prefix
|
||||
*/
|
||||
Status = FlSplitInputPathname (Gbl_Files[ASL_FILE_INPUT].Filename,
|
||||
&Gbl_DirectoryPath, &Prefix);
|
||||
if (ACPI_FAILURE (Status))
|
||||
/* Process each pathname/filename in the list, with possible wildcards */
|
||||
|
||||
while (argv[Index])
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (Gbl_UseDefaultAmlFilename)
|
||||
{
|
||||
Gbl_OutputFilenamePrefix = Prefix;
|
||||
}
|
||||
|
||||
/* AML Disassembly (Optional) */
|
||||
|
||||
if (Gbl_DisasmFlag || Gbl_GetAllTables)
|
||||
{
|
||||
/* ACPI CA subsystem initialization */
|
||||
|
||||
Status = AdInitialize ();
|
||||
Status = AslDoOnePathname (argv[Index]);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
Status = AcpiAllocateRootTable (4);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not initialize ACPI Table Manager, %s\n",
|
||||
AcpiFormatException (Status));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* This is where the disassembly happens */
|
||||
|
||||
AcpiGbl_DbOpt_disasm = TRUE;
|
||||
Status = AdAmlDisassemble (AslToFile,
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename,
|
||||
Gbl_OutputFilenamePrefix,
|
||||
&Gbl_Files[ASL_FILE_INPUT].Filename,
|
||||
Gbl_GetAllTables);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the
|
||||
* .DSL disassembly file, which can now be compiled if requested
|
||||
*/
|
||||
if (DoCompile)
|
||||
{
|
||||
AcpiOsPrintf ("\nCompiling \"%s\"\n",
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ASL Compilation (Optional)
|
||||
*/
|
||||
if (DoCompile)
|
||||
{
|
||||
/*
|
||||
* If -p not specified, we will use the input filename as the
|
||||
* output filename prefix
|
||||
*/
|
||||
Status = FlSplitInputPathname (Gbl_Files[ASL_FILE_INPUT].Filename,
|
||||
&Gbl_DirectoryPath, &Prefix);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (Gbl_UseDefaultAmlFilename)
|
||||
{
|
||||
Gbl_OutputFilenamePrefix = Prefix;
|
||||
}
|
||||
|
||||
/* ACPI CA subsystem initialization (Must be re-initialized) */
|
||||
|
||||
Status = AcpiOsInitialize ();
|
||||
AcpiUtInitGlobals ();
|
||||
Status = AcpiUtMutexInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
Status = AcpiNsRootInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
Status = CmDoCompile ();
|
||||
Index++;
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslmap - parser to AML opcode mapping table
|
||||
* $Revision: 1.85 $
|
||||
* $Revision: 1.88 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -308,7 +308,7 @@ const ASL_RESERVED_INFO ReservedMethods[] = {
|
||||
{"_EJ3", 1, 0},
|
||||
{"_EJ4", 1, 0},
|
||||
{"_EJD", 0, ASL_RSVD_RETURN_VALUE},
|
||||
{"_ERR", 2, ASL_RSVD_RETURN_VALUE},
|
||||
{"_ERR", 3, ASL_RSVD_RETURN_VALUE},
|
||||
{"_FDE", 0, ASL_RSVD_RETURN_VALUE},
|
||||
{"_FDI", 0, ASL_RSVD_RETURN_VALUE},
|
||||
{"_FDM", 1, 0},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslopcode - AML opcode generation
|
||||
* $Revision: 1.73 $
|
||||
* $Revision: 1.75 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asloperands - AML operand processing
|
||||
* $Revision: 1.60 $
|
||||
* $Revision: 1.64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -949,6 +949,7 @@ OpnDoDefinitionBlock (
|
||||
ACPI_PARSE_OBJECT *Child;
|
||||
ACPI_SIZE Length;
|
||||
ACPI_NATIVE_UINT i;
|
||||
char *Filename;
|
||||
|
||||
|
||||
/*
|
||||
@@ -966,7 +967,19 @@ OpnDoDefinitionBlock (
|
||||
*Child->Asl.Value.Buffer &&
|
||||
(Gbl_UseDefaultAmlFilename))
|
||||
{
|
||||
Gbl_OutputFilenamePrefix = (char *) Child->Asl.Value.Buffer;
|
||||
/*
|
||||
* We will use the AML filename that is embedded in the source file
|
||||
* for the output filename.
|
||||
*/
|
||||
Filename = ACPI_ALLOCATE (strlen (Gbl_DirectoryPath) +
|
||||
strlen ((char *) Child->Asl.Value.Buffer) + 1);
|
||||
|
||||
/* Prepend the current directory path */
|
||||
|
||||
strcpy (Filename, Gbl_DirectoryPath);
|
||||
strcat (Filename, (char *) Child->Asl.Value.Buffer);
|
||||
|
||||
Gbl_OutputFilenamePrefix = Filename;
|
||||
}
|
||||
Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslopt- Compiler optimizations
|
||||
* $Revision: 1.25 $
|
||||
* $Revision: 1.27 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslresource - Resource templates and descriptors
|
||||
* $Revision: 1.42 $
|
||||
* $Revision: 1.44 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslrestype1 - Short (type1) resource templates and descriptors
|
||||
* $Revision: 1.39 $
|
||||
* $Revision: 1.41 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslrestype2 - Long (type2) resource templates and descriptors
|
||||
* $Revision: 1.50 $
|
||||
* $Revision: 1.52 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
+452
@@ -0,0 +1,452 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslstartup - Compiler startup routines, called from main
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, 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 "acnamesp.h"
|
||||
#include "actables.h"
|
||||
#include "acapps.h"
|
||||
|
||||
#define _COMPONENT ACPI_COMPILER
|
||||
ACPI_MODULE_NAME ("aslstartup")
|
||||
|
||||
|
||||
#define ASL_MAX_FILES 256
|
||||
char *FileList[ASL_MAX_FILES];
|
||||
int FileCount;
|
||||
BOOLEAN AslToFile = TRUE;
|
||||
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
static void
|
||||
AslInitializeGlobals (
|
||||
void);
|
||||
|
||||
static char **
|
||||
AsDoWildcard (
|
||||
char *DirectoryPathname,
|
||||
char *FileSpecifier);
|
||||
|
||||
static ACPI_STATUS
|
||||
AslDoOneFile (
|
||||
char *Filename);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AslInitializeGlobals
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Re-initialize globals needed to restart the compiler. This
|
||||
* allows multiple files to be disassembled and/or compiled.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
AslInitializeGlobals (
|
||||
void)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* Init compiler globals */
|
||||
|
||||
Gbl_CurrentColumn = 0;
|
||||
Gbl_CurrentLineNumber = 1;
|
||||
Gbl_LogicalLineNumber = 1;
|
||||
Gbl_CurrentLineOffset = 0;
|
||||
Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
|
||||
|
||||
Gbl_ErrorLog = NULL;
|
||||
Gbl_NextError = NULL;
|
||||
|
||||
AslGbl_NextEvent = 0;
|
||||
for (i = 0; i < ASL_NUM_REPORT_LEVELS; i++)
|
||||
{
|
||||
Gbl_ExceptionCount[i] = 0;
|
||||
}
|
||||
|
||||
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = NULL;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AsDoWildcard
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Process files via wildcards. This function is for the Windows
|
||||
* case only.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static char **
|
||||
AsDoWildcard (
|
||||
char *DirectoryPathname,
|
||||
char *FileSpecifier)
|
||||
{
|
||||
#ifdef WIN32
|
||||
void *DirInfo;
|
||||
char *Filename;
|
||||
|
||||
|
||||
FileCount = 0;
|
||||
|
||||
/* Open parent directory */
|
||||
|
||||
DirInfo = AcpiOsOpenDirectory (DirectoryPathname, FileSpecifier, REQUEST_FILE_ONLY);
|
||||
if (!DirInfo)
|
||||
{
|
||||
/* Either the directory of file does not exist */
|
||||
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename = FileSpecifier;
|
||||
FlFileError (ASL_FILE_INPUT, ASL_MSG_OPEN);
|
||||
AslAbort ();
|
||||
}
|
||||
|
||||
/* Process each file that matches the wildcard specification */
|
||||
|
||||
while ((Filename = AcpiOsGetNextFilename (DirInfo)))
|
||||
{
|
||||
/* Add the filename to the file list */
|
||||
|
||||
FileList[FileCount] = AcpiOsAllocate (strlen (Filename) + 1);
|
||||
strcpy (FileList[FileCount], Filename);
|
||||
FileCount++;
|
||||
|
||||
if (FileCount >= ASL_MAX_FILES)
|
||||
{
|
||||
printf ("Max files reached\n");
|
||||
FileList[0] = NULL;
|
||||
return (FileList);
|
||||
}
|
||||
}
|
||||
|
||||
/* Cleanup */
|
||||
|
||||
AcpiOsCloseDirectory (DirInfo);
|
||||
FileList[FileCount] = NULL;
|
||||
return (FileList);
|
||||
|
||||
#else
|
||||
/*
|
||||
* Linux/Unix cases - Wildcards are expanded by the shell automatically.
|
||||
* Just return the filename in a null terminated list
|
||||
*/
|
||||
FileList[0] = AcpiOsAllocate (strlen (FileSpecifier) + 1);
|
||||
strcpy (FileList[0], FileSpecifier);
|
||||
FileList[1] = NULL;
|
||||
|
||||
return (FileList);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AslDoOneFile
|
||||
*
|
||||
* PARAMETERS: Filename - Name of the file
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Process a single file - either disassemble, compile, or both
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AslDoOneFile (
|
||||
char *Filename)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename = Filename;
|
||||
|
||||
/* Re-initialize "some" compiler globals */
|
||||
|
||||
AslInitializeGlobals ();
|
||||
|
||||
/*
|
||||
* AML Disassembly (Optional)
|
||||
*/
|
||||
if (Gbl_DisasmFlag || Gbl_GetAllTables)
|
||||
{
|
||||
/* ACPI CA subsystem initialization */
|
||||
|
||||
Status = AdInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
Status = AcpiAllocateRootTable (4);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not initialize ACPI Table Manager, %s\n",
|
||||
AcpiFormatException (Status));
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* This is where the disassembly happens */
|
||||
|
||||
AcpiGbl_DbOpt_disasm = TRUE;
|
||||
Status = AdAmlDisassemble (AslToFile,
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename,
|
||||
Gbl_OutputFilenamePrefix,
|
||||
&Gbl_Files[ASL_FILE_INPUT].Filename,
|
||||
Gbl_GetAllTables);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* Shutdown compiler and ACPICA subsystem */
|
||||
|
||||
AeClearErrorLog ();
|
||||
AcpiTerminate ();
|
||||
|
||||
/*
|
||||
* Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the
|
||||
* .DSL disassembly file, which can now be compiled if requested
|
||||
*/
|
||||
if (Gbl_DoCompile)
|
||||
{
|
||||
AcpiOsPrintf ("\nCompiling \"%s\"\n",
|
||||
Gbl_Files[ASL_FILE_INPUT].Filename);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ASL Compilation (Optional)
|
||||
*/
|
||||
if (Gbl_DoCompile)
|
||||
{
|
||||
/*
|
||||
* If -p not specified, we will use the input filename as the
|
||||
* output filename prefix
|
||||
*/
|
||||
if (Gbl_UseDefaultAmlFilename)
|
||||
{
|
||||
Gbl_OutputFilenamePrefix = Gbl_Files[ASL_FILE_INPUT].Filename;
|
||||
}
|
||||
|
||||
/* ACPI CA subsystem initialization (Must be re-initialized) */
|
||||
|
||||
Status = AdInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
Status = CmDoCompile ();
|
||||
AcpiTerminate ();
|
||||
|
||||
/*
|
||||
* Return non-zero exit code if there have been errors, unless the
|
||||
* global ignore error flag has been set
|
||||
*/
|
||||
if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors))
|
||||
{
|
||||
return (AE_ERROR);
|
||||
}
|
||||
|
||||
AeClearErrorLog ();
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AslDoOnePathname
|
||||
*
|
||||
* PARAMETERS: Pathname - Full pathname, possibly with wildcards
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Process one pathname, possible terminated with a wildcard
|
||||
* specification. If a wildcard, it is expanded and the multiple
|
||||
* files are processed.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AslDoOnePathname (
|
||||
char *Pathname)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
char **FileList;
|
||||
char *Filename;
|
||||
char *FullPathname;
|
||||
|
||||
|
||||
/* Split incoming path into a directory/filename combo */
|
||||
|
||||
Status = FlSplitInputPathname (Pathname, &Gbl_DirectoryPath, &Filename);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* Expand possible wildcard into a file list (Windows/DOS only) */
|
||||
|
||||
FileList = AsDoWildcard (Gbl_DirectoryPath, Filename);
|
||||
while (*FileList)
|
||||
{
|
||||
FullPathname = ACPI_ALLOCATE (
|
||||
strlen (Gbl_DirectoryPath) + strlen (*FileList) + 1);
|
||||
|
||||
/* Construct a full path to the file */
|
||||
|
||||
strcpy (FullPathname, Gbl_DirectoryPath);
|
||||
strcat (FullPathname, *FileList);
|
||||
|
||||
/*
|
||||
* If -p not specified, we will use the input filename as the
|
||||
* output filename prefix
|
||||
*/
|
||||
if (Gbl_UseDefaultAmlFilename)
|
||||
{
|
||||
Gbl_OutputFilenamePrefix = FullPathname;
|
||||
}
|
||||
|
||||
Status = AslDoOneFile (FullPathname);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
ACPI_FREE (FullPathname);
|
||||
ACPI_FREE (*FileList);
|
||||
*FileList = NULL;
|
||||
FileList++;
|
||||
}
|
||||
|
||||
ACPI_FREE (Gbl_DirectoryPath);
|
||||
ACPI_FREE (Filename);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslstubs - Stubs used to link to Aml interpreter
|
||||
* $Revision: 1.19 $
|
||||
* $Revision: 1.23 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -119,6 +119,8 @@
|
||||
#include "aslcompiler.h"
|
||||
#include "acdispat.h"
|
||||
#include "actables.h"
|
||||
#include "acevents.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
#define _COMPONENT ACPI_COMPILER
|
||||
ACPI_MODULE_NAME ("aslstubs")
|
||||
@@ -197,14 +199,14 @@ AcpiEvIsNotifyObject (
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvAcquireGlobalLock(
|
||||
UINT32 Timeout)
|
||||
AcpiEvAcquireGlobalLock (
|
||||
UINT16 Timeout)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvReleaseGlobalLock(
|
||||
AcpiEvReleaseGlobalLock (
|
||||
void)
|
||||
{
|
||||
return (AE_OK);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asltransform - Parse tree transforms
|
||||
* $Revision: 1.41 $
|
||||
* $Revision: 1.44 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -468,6 +468,7 @@ TrDoSwitch (
|
||||
ACPI_PARSE_OBJECT *Peer;
|
||||
ACPI_PARSE_OBJECT *NewOp;
|
||||
ACPI_PARSE_OBJECT *NewOp2;
|
||||
ACPI_PARSE_OBJECT *MethodOp;
|
||||
char *PredicateValueName;
|
||||
UINT16 Index;
|
||||
UINT32 Btype;
|
||||
@@ -729,18 +730,32 @@ TrDoSwitch (
|
||||
{
|
||||
Next = Next->Asl.Parent;
|
||||
}
|
||||
MethodOp = Next;
|
||||
|
||||
NewOp->Asl.CompileFlags |= NODE_COMPILER_EMITTED;
|
||||
NewOp->Asl.Parent = Next;
|
||||
|
||||
/* Insert name after the method name and arguments */
|
||||
|
||||
Next = Next->Asl.Child;
|
||||
Next = Next->Asl.Next;
|
||||
Next = Next->Asl.Next;
|
||||
Next = Next->Asl.Next;
|
||||
Next = Next->Asl.Next;
|
||||
Next = Next->Asl.Next;
|
||||
Next = Next->Asl.Child; /* Name */
|
||||
Next = Next->Asl.Next; /* NumArgs */
|
||||
Next = Next->Asl.Next; /* SerializeRule */
|
||||
|
||||
/*
|
||||
* If method is not Serialized, we must make is so, because of the way
|
||||
* that Switch() must be implemented -- we cannot allow multiple threads
|
||||
* to execute this method concurrently since we need to create local
|
||||
* temporary name(s).
|
||||
*/
|
||||
if (Next->Asl.ParseOpcode != PARSEOP_SERIALIZERULE_SERIAL)
|
||||
{
|
||||
AslError (ASL_REMARK, ASL_MSG_SERIALIZED, MethodOp, "Due to use of Switch operator");
|
||||
Next->Asl.ParseOpcode = PARSEOP_SERIALIZERULE_SERIAL;
|
||||
}
|
||||
|
||||
Next = Next->Asl.Next; /* SyncLevel */
|
||||
Next = Next->Asl.Next; /* ReturnType */
|
||||
Next = Next->Asl.Next; /* ParameterTypes */
|
||||
|
||||
TrAmlInsertPeer (Next, NewOp);
|
||||
TrAmlInitLineNumbers (NewOp, Next);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asltree - parse tree management
|
||||
* $Revision: 1.62 $
|
||||
* $Revision: 1.65 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -914,6 +914,7 @@ TrLinkPeerNodes (
|
||||
This->Asl.Next = Next;
|
||||
This = Next;
|
||||
}
|
||||
va_end (ap);
|
||||
|
||||
DbgPrint (ASL_PARSE_OUTPUT,"\n\n");
|
||||
return (Start);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asltypes.h - compiler data types and struct definitions
|
||||
* $Revision: 1.88 $
|
||||
* $Revision: 1.91 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -422,7 +422,8 @@ typedef enum
|
||||
ASL_MSG_RESULT_NOT_USED,
|
||||
ASL_MSG_NOT_REFERENCED,
|
||||
ASL_MSG_NON_ZERO,
|
||||
ASL_MSG_STRING_LENGTH
|
||||
ASL_MSG_STRING_LENGTH,
|
||||
ASL_MSG_SERIALIZED
|
||||
|
||||
} ASL_MESSAGE_IDS;
|
||||
|
||||
@@ -536,7 +537,8 @@ char *AslMessages [] = {
|
||||
/* ASL_MSG_RESULT_NOT_USED */ "Result is not used, operator has no effect",
|
||||
/* ASL_MSG_NOT_REFERENCED */ "Namespace object is not referenced",
|
||||
/* ASL_MSG_NON_ZERO */ "Operand evaluates to zero",
|
||||
/* ASL_MSG_STRING_LENGTH */ "String literal too long"
|
||||
/* ASL_MSG_STRING_LENGTH */ "String literal too long",
|
||||
/* ASL_MSG_SERIALIZED */ "Control Method marked Serialized"
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslutils -- compiler utilities
|
||||
* $Revision: 1.71 $
|
||||
* $Revision: 1.74 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -131,6 +131,12 @@ static const char * const *yytname = &AslCompilername[254];
|
||||
extern const char * const yytname[];
|
||||
#endif
|
||||
|
||||
char HexLookup[] =
|
||||
{
|
||||
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
};
|
||||
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
static ACPI_STATUS
|
||||
@@ -333,8 +339,8 @@ UtConvertByteToHex (
|
||||
Buffer[0] = '0';
|
||||
Buffer[1] = 'x';
|
||||
|
||||
Buffer[2] = (UINT8) hex[(RawByte >> 4) & 0xF];
|
||||
Buffer[3] = (UINT8) hex[RawByte & 0xF];
|
||||
Buffer[2] = (UINT8) HexLookup[(RawByte >> 4) & 0xF];
|
||||
Buffer[3] = (UINT8) HexLookup[RawByte & 0xF];
|
||||
}
|
||||
|
||||
|
||||
@@ -359,8 +365,8 @@ UtConvertByteToAsmHex (
|
||||
{
|
||||
|
||||
Buffer[0] = '0';
|
||||
Buffer[1] = (UINT8) hex[(RawByte >> 4) & 0xF];
|
||||
Buffer[2] = (UINT8) hex[RawByte & 0xF];
|
||||
Buffer[1] = (UINT8) HexLookup[(RawByte >> 4) & 0xF];
|
||||
Buffer[2] = (UINT8) HexLookup[RawByte & 0xF];
|
||||
Buffer[3] = 'h';
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbcmds - debug commands and output routines
|
||||
* $Revision: 1.148 $
|
||||
* $Revision: 1.157 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -285,9 +285,6 @@ ACPI_STATUS
|
||||
AcpiDbSleep (
|
||||
char *ObjectArg)
|
||||
{
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
return (AE_OK);
|
||||
#else
|
||||
ACPI_STATUS Status;
|
||||
UINT8 SleepState;
|
||||
|
||||
@@ -312,7 +309,6 @@ AcpiDbSleep (
|
||||
Status = AcpiLeaveSleepState (SleepState);
|
||||
|
||||
return (Status);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -447,13 +443,13 @@ AcpiDbDisplayTableInfo (
|
||||
for (i = 0; i < AcpiGbl_RootTableList.Count; i++)
|
||||
{
|
||||
TableDesc = &AcpiGbl_RootTableList.Tables[i];
|
||||
AcpiOsPrintf ( "%4.4s at %p length %.5X",
|
||||
AcpiOsPrintf ( "%.4s at %p length %.5X",
|
||||
TableDesc->Signature.Ascii, TableDesc->Pointer,
|
||||
(UINT32) TableDesc->Length);
|
||||
|
||||
if (TableDesc->Pointer && (i != ACPI_TABLE_INDEX_FACS))
|
||||
{
|
||||
AcpiOsPrintf (" OemId=\"%6s\" OemTableId=\"%8s\" OemRevision=%8.8X",
|
||||
AcpiOsPrintf (" OemId=\"%.6s\" OemTableId=\"%.8s\" OemRevision=%8.8X",
|
||||
TableDesc->Pointer->OemId,
|
||||
TableDesc->Pointer->OemTableId,
|
||||
TableDesc->Pointer->OemRevision);
|
||||
@@ -1415,8 +1411,8 @@ AcpiDmTestResourceConversion (
|
||||
OriginalAml = ReturnObj.Pointer;
|
||||
|
||||
AcpiDmCompareAmlResources (
|
||||
OriginalAml->Buffer.Pointer, OriginalAml->Buffer.Length,
|
||||
NewAml.Pointer, NewAml.Length);
|
||||
OriginalAml->Buffer.Pointer, (ACPI_RSDESC_SIZE) OriginalAml->Buffer.Length,
|
||||
NewAml.Pointer, (ACPI_RSDESC_SIZE) NewAml.Length);
|
||||
|
||||
/* Cleanup and exit */
|
||||
|
||||
@@ -1445,8 +1441,6 @@ void
|
||||
AcpiDbDisplayResources (
|
||||
char *ObjectArg)
|
||||
{
|
||||
#if ACPI_MACHINE_WIDTH != 16
|
||||
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_BUFFER ReturnObj;
|
||||
@@ -1584,7 +1578,6 @@ Cleanup:
|
||||
|
||||
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1610,24 +1603,45 @@ AcpiDbIntegrityWalk (
|
||||
ACPI_INTEGRITY_INFO *Info = (ACPI_INTEGRITY_INFO *) Context;
|
||||
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
|
||||
ACPI_OPERAND_OBJECT *Object;
|
||||
BOOLEAN Alias = TRUE;
|
||||
|
||||
|
||||
Info->Nodes++;
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
|
||||
|
||||
/* Verify the NS node, and dereference aliases */
|
||||
|
||||
while (Alias)
|
||||
{
|
||||
AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s]\n",
|
||||
Node, AcpiUtGetDescriptorName (Node));
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s] - is %2.2X should be %2.2X\n",
|
||||
Node, AcpiUtGetDescriptorName (Node), ACPI_GET_DESCRIPTOR_TYPE (Node),
|
||||
ACPI_DESC_TYPE_NAMED);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if ((Node->Type == ACPI_TYPE_LOCAL_ALIAS) ||
|
||||
(Node->Type == ACPI_TYPE_LOCAL_METHOD_ALIAS))
|
||||
{
|
||||
Node = (ACPI_NAMESPACE_NODE *) Node->Object;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alias = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (Node->Type > ACPI_TYPE_LOCAL_MAX)
|
||||
{
|
||||
AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n",
|
||||
Node, Node->Type);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if (!AcpiUtValidAcpiName (Node->Name.Integer))
|
||||
{
|
||||
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
Object = AcpiNsGetAttachedObject (Node);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbdisply - debug display commands
|
||||
* $Revision: 1.117 $
|
||||
* $Revision: 1.121 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -160,24 +160,7 @@ AcpiDbGetPointer (
|
||||
void *ObjPtr;
|
||||
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
#include <stdio.h>
|
||||
|
||||
/* Have to handle 16-bit pointers of the form segment:offset */
|
||||
|
||||
if (!sscanf (Target, "%p", &ObjPtr))
|
||||
{
|
||||
AcpiOsPrintf ("Invalid pointer: %s\n", Target);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* Simple flat pointer */
|
||||
|
||||
ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16));
|
||||
#endif
|
||||
|
||||
return (ObjPtr);
|
||||
}
|
||||
|
||||
@@ -597,8 +580,10 @@ AcpiDbDisplayResults (
|
||||
UINT32 i;
|
||||
ACPI_WALK_STATE *WalkState;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
UINT32 NumResults = 0;
|
||||
UINT32 ResultCount = 0;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_GENERIC_STATE *Frame;
|
||||
UINT32 Index; /* Index onto current frame */
|
||||
|
||||
|
||||
WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
|
||||
@@ -613,17 +598,28 @@ AcpiDbDisplayResults (
|
||||
|
||||
if (WalkState->Results)
|
||||
{
|
||||
NumResults = WalkState->Results->Results.NumResults;
|
||||
ResultCount = WalkState->ResultCount;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
|
||||
AcpiUtGetNodeName (Node), NumResults);
|
||||
AcpiUtGetNodeName (Node), ResultCount);
|
||||
|
||||
for (i = 0; i < NumResults; i++)
|
||||
/* From the top element of result stack */
|
||||
|
||||
Frame = WalkState->Results;
|
||||
Index = (ResultCount - 1) % ACPI_RESULTS_FRAME_OBJ_NUM;
|
||||
|
||||
for (i = 0; i < ResultCount; i++)
|
||||
{
|
||||
ObjDesc = WalkState->Results->Results.ObjDesc[i];
|
||||
ObjDesc = Frame->Results.ObjDesc[Index];
|
||||
AcpiOsPrintf ("Result%d: ", i);
|
||||
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
|
||||
if (Index == 0)
|
||||
{
|
||||
Frame = Frame->Results.Next;
|
||||
Index = ACPI_RESULTS_FRAME_OBJ_NUM;
|
||||
}
|
||||
Index--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -853,8 +849,8 @@ AcpiDbDisplayGpes (
|
||||
AcpiOsPrintf (
|
||||
" RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
|
||||
GpeBlock->RegisterInfo,
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->StatusAddress.Address)),
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->EnableAddress.Address)));
|
||||
ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
|
||||
ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
|
||||
|
||||
AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
|
||||
|
||||
@@ -868,8 +864,8 @@ AcpiDbDisplayGpes (
|
||||
" Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n",
|
||||
i, GpeRegisterInfo->EnableForWake,
|
||||
GpeRegisterInfo->EnableForRun,
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->StatusAddress.Address)),
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)));
|
||||
ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
|
||||
ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
|
||||
|
||||
/* Now look at the individual GPEs in this byte register */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbexec - debugger control method execution
|
||||
* $Revision: 1.77 $
|
||||
* $Revision: 1.83 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -153,12 +153,6 @@ AcpiDbExecutionWalk (
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
static UINT32
|
||||
AcpiDbGetCacheInfo (
|
||||
ACPI_MEMORY_LIST *Cache);
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -283,7 +277,7 @@ AcpiDbExecuteSetup (
|
||||
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
static UINT32
|
||||
UINT32
|
||||
AcpiDbGetCacheInfo (
|
||||
ACPI_MEMORY_LIST *Cache)
|
||||
{
|
||||
@@ -426,6 +420,8 @@ AcpiDbExecute (
|
||||
return;
|
||||
}
|
||||
|
||||
ACPI_MEMSET (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO));
|
||||
|
||||
ACPI_STRCPY (NameString, Name);
|
||||
AcpiUtStrupr (NameString);
|
||||
AcpiGbl_DbMethodInfo.Name = NameString;
|
||||
@@ -509,9 +505,21 @@ AcpiDbMethodThread (
|
||||
ACPI_STATUS Status;
|
||||
ACPI_DB_METHOD_INFO *Info = Context;
|
||||
UINT32 i;
|
||||
UINT8 Allow;
|
||||
ACPI_BUFFER ReturnObj;
|
||||
|
||||
|
||||
if (Info->InitArgs)
|
||||
{
|
||||
AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
|
||||
AcpiDbUInt32ToHexString (AcpiOsGetThreadId (), Info->IdOfThreadStr);
|
||||
}
|
||||
|
||||
if (Info->Threads && (Info->NumCreated < Info->NumThreads))
|
||||
{
|
||||
Info->Threads[Info->NumCreated++] = AcpiOsGetThreadId();
|
||||
}
|
||||
|
||||
for (i = 0; i < Info->NumLoops; i++)
|
||||
{
|
||||
Status = AcpiDbExecuteMethod (Info, &ReturnObj);
|
||||
@@ -525,12 +533,12 @@ AcpiDbMethodThread (
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ((i % 100) == 0)
|
||||
{
|
||||
AcpiOsPrintf ("%d executions\n", i);
|
||||
AcpiOsPrintf ("%d executions, Thread 0x%x\n", i, AcpiOsGetThreadId ());
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (ReturnObj.Length)
|
||||
{
|
||||
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
|
||||
@@ -542,11 +550,26 @@ AcpiDbMethodThread (
|
||||
|
||||
/* Signal our completion */
|
||||
|
||||
Status = AcpiOsSignalSemaphore (Info->ThreadGate, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
Allow = 0;
|
||||
(void) AcpiOsWaitSemaphore (Info->ThreadCompleteGate, 1, ACPI_WAIT_FOREVER);
|
||||
Info->NumCompleted++;
|
||||
|
||||
if (Info->NumCompleted == Info->NumThreads)
|
||||
{
|
||||
AcpiOsPrintf ("Could not signal debugger thread sync semaphore, %s\n",
|
||||
AcpiFormatException (Status));
|
||||
/* Do signal for main thread once only */
|
||||
Allow = 1;
|
||||
}
|
||||
|
||||
(void) AcpiOsSignalSemaphore (Info->ThreadCompleteGate, 1);
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
Status = AcpiOsSignalSemaphore (Info->MainThreadGate, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not signal debugger thread sync semaphore, %s\n",
|
||||
AcpiFormatException (Status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,8 +598,9 @@ AcpiDbCreateExecutionThreads (
|
||||
UINT32 NumThreads;
|
||||
UINT32 NumLoops;
|
||||
UINT32 i;
|
||||
ACPI_MUTEX ThreadGate;
|
||||
|
||||
UINT32 Size;
|
||||
ACPI_MUTEX MainThreadGate;
|
||||
ACPI_MUTEX ThreadCompleteGate;
|
||||
|
||||
/* Get the arguments */
|
||||
|
||||
@@ -590,23 +614,64 @@ AcpiDbCreateExecutionThreads (
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create the synchronization semaphore */
|
||||
|
||||
Status = AcpiOsCreateSemaphore (1, 0, &ThreadGate);
|
||||
/*
|
||||
* Create the semaphore for synchronization of
|
||||
* the created threads with the main thread.
|
||||
*/
|
||||
Status = AcpiOsCreateSemaphore (1, 0, &MainThreadGate);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not create semaphore, %s\n",
|
||||
AcpiOsPrintf ("Could not create semaphore for synchronization with the main thread, %s\n",
|
||||
AcpiFormatException (Status));
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the semaphore for synchronization
|
||||
* between the created threads.
|
||||
*/
|
||||
Status = AcpiOsCreateSemaphore (1, 1, &ThreadCompleteGate);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not create semaphore for synchronization between the created threads, %s\n",
|
||||
AcpiFormatException (Status));
|
||||
(void) AcpiOsDeleteSemaphore (MainThreadGate);
|
||||
return;
|
||||
}
|
||||
|
||||
ACPI_MEMSET (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO));
|
||||
|
||||
/* Array to store IDs of threads */
|
||||
|
||||
AcpiGbl_DbMethodInfo.NumThreads = NumThreads;
|
||||
Size = 4 * AcpiGbl_DbMethodInfo.NumThreads;
|
||||
AcpiGbl_DbMethodInfo.Threads = (UINT32 *) AcpiOsAllocate (Size);
|
||||
if (AcpiGbl_DbMethodInfo.Threads == NULL)
|
||||
{
|
||||
AcpiOsPrintf ("No memory for thread IDs array\n");
|
||||
(void) AcpiOsDeleteSemaphore (MainThreadGate);
|
||||
(void) AcpiOsDeleteSemaphore (ThreadCompleteGate);
|
||||
return;
|
||||
}
|
||||
ACPI_MEMSET (AcpiGbl_DbMethodInfo.Threads, 0, Size);
|
||||
|
||||
/* Setup the context to be passed to each thread */
|
||||
|
||||
AcpiGbl_DbMethodInfo.Name = MethodNameArg;
|
||||
AcpiGbl_DbMethodInfo.Args = NULL;
|
||||
AcpiGbl_DbMethodInfo.Flags = 0;
|
||||
AcpiGbl_DbMethodInfo.NumLoops = NumLoops;
|
||||
AcpiGbl_DbMethodInfo.ThreadGate = ThreadGate;
|
||||
AcpiGbl_DbMethodInfo.MainThreadGate = MainThreadGate;
|
||||
AcpiGbl_DbMethodInfo.ThreadCompleteGate = ThreadCompleteGate;
|
||||
|
||||
/* Init arguments to be passed to method */
|
||||
|
||||
AcpiGbl_DbMethodInfo.InitArgs = 1;
|
||||
AcpiGbl_DbMethodInfo.Args = AcpiGbl_DbMethodInfo.Arguments;
|
||||
AcpiGbl_DbMethodInfo.Arguments[0] = AcpiGbl_DbMethodInfo.NumThreadsStr;
|
||||
AcpiGbl_DbMethodInfo.Arguments[1] = AcpiGbl_DbMethodInfo.IdOfThreadStr;
|
||||
AcpiGbl_DbMethodInfo.Arguments[2] = AcpiGbl_DbMethodInfo.IndexOfThreadStr;
|
||||
AcpiGbl_DbMethodInfo.Arguments[3] = NULL;
|
||||
AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
|
||||
|
||||
AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
|
||||
|
||||
@@ -627,20 +692,19 @@ AcpiDbCreateExecutionThreads (
|
||||
|
||||
/* Wait for all threads to complete */
|
||||
|
||||
i = NumThreads;
|
||||
while (i) /* Brain damage for host OSs that only support wait of 1 unit */
|
||||
{
|
||||
Status = AcpiOsWaitSemaphore (ThreadGate, 1, ACPI_WAIT_FOREVER);
|
||||
i--;
|
||||
}
|
||||
|
||||
/* Cleanup and exit */
|
||||
|
||||
(void) AcpiOsDeleteSemaphore (ThreadGate);
|
||||
(void) AcpiOsWaitSemaphore (MainThreadGate, 1, ACPI_WAIT_FOREVER);
|
||||
|
||||
AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT);
|
||||
AcpiOsPrintf ("All threads (%X) have completed\n", NumThreads);
|
||||
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
|
||||
|
||||
/* Cleanup and exit */
|
||||
|
||||
(void) AcpiOsDeleteSemaphore (MainThreadGate);
|
||||
(void) AcpiOsDeleteSemaphore (ThreadCompleteGate);
|
||||
|
||||
AcpiOsFree (AcpiGbl_DbMethodInfo.Threads);
|
||||
AcpiGbl_DbMethodInfo.Threads = NULL;
|
||||
}
|
||||
|
||||
#endif /* ACPI_DEBUGGER */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
|
||||
* be used when running the debugger in Ring 0 (Kernel mode)
|
||||
* $Revision: 1.93 $
|
||||
* $Revision: 1.96 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -118,9 +118,7 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acdebug.h"
|
||||
#include "acnamesp.h"
|
||||
#include "actables.h"
|
||||
#include "acdisasm.h"
|
||||
|
||||
#if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dbhistry - debugger HISTORY command
|
||||
* $Revision: 1.33 $
|
||||
* $Revision: 1.35 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbinput - user front-end to the AML debugger
|
||||
* $Revision: 1.113 $
|
||||
* $Revision: 1.116 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -866,7 +866,7 @@ AcpiDbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_TRACE:
|
||||
AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
|
||||
(void) AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
|
||||
break;
|
||||
|
||||
case CMD_TREE:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbstats - Generation and display of ACPI table statistics
|
||||
* $Revision: 1.84 $
|
||||
* $Revision: 1.90 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -141,9 +141,11 @@ AcpiDbClassifyOneObject (
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
#if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
|
||||
static void
|
||||
AcpiDbListInfo (
|
||||
ACPI_MEMORY_LIST *List);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -171,7 +173,6 @@ static ARGUMENT_INFO AcpiDbStatTypes [] =
|
||||
|
||||
|
||||
#if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbListInfo
|
||||
@@ -190,7 +191,6 @@ AcpiDbListInfo (
|
||||
{
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
UINT32 Outstanding;
|
||||
UINT32 Temp;
|
||||
#endif
|
||||
|
||||
AcpiOsPrintf ("\n%s\n", List->ListName);
|
||||
@@ -200,7 +200,7 @@ AcpiDbListInfo (
|
||||
if (List->MaxDepth > 0)
|
||||
{
|
||||
AcpiOsPrintf (
|
||||
" Cache: [Depth Max Avail Size] % 7d % 7d % 7d % 7d B\n",
|
||||
" Cache: [Depth MaxD Avail Size] %8.2X %8.2X %8.2X %8.2X\n",
|
||||
List->CurrentDepth,
|
||||
List->MaxDepth,
|
||||
List->MaxDepth - List->CurrentDepth,
|
||||
@@ -211,31 +211,36 @@ AcpiDbListInfo (
|
||||
if (List->MaxDepth > 0)
|
||||
{
|
||||
AcpiOsPrintf (
|
||||
" Cache: [Requests Hits Misses ObjSize] % 7d % 7d % 7d % 7d B\n",
|
||||
" Cache: [Requests Hits Misses ObjSize] %8.2X %8.2X %8.2X %8.2X\n",
|
||||
List->Requests,
|
||||
List->Hits,
|
||||
List->Requests - List->Hits,
|
||||
List->ObjectSize);
|
||||
}
|
||||
|
||||
Outstanding = List->TotalAllocated -
|
||||
List->TotalFreed -
|
||||
List->CurrentDepth;
|
||||
Outstanding = AcpiDbGetCacheInfo (List);
|
||||
|
||||
if (List->ObjectSize)
|
||||
{
|
||||
Temp = ACPI_ROUND_UP_TO_1K (Outstanding * List->ObjectSize);
|
||||
AcpiOsPrintf (
|
||||
" Mem: [Alloc Free Max CurSize Outstanding] %8.2X %8.2X %8.2X %8.2X %8.2X\n",
|
||||
List->TotalAllocated,
|
||||
List->TotalFreed,
|
||||
List->MaxOccupied,
|
||||
Outstanding * List->ObjectSize,
|
||||
Outstanding);
|
||||
}
|
||||
else
|
||||
{
|
||||
Temp = ACPI_ROUND_UP_TO_1K (List->CurrentTotalSize);
|
||||
AcpiOsPrintf (
|
||||
" Mem: [Alloc Free Max CurSize Outstanding Total] %8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",
|
||||
List->TotalAllocated,
|
||||
List->TotalFreed,
|
||||
List->MaxOccupied,
|
||||
List->CurrentTotalSize,
|
||||
Outstanding,
|
||||
List->TotalSize);
|
||||
}
|
||||
|
||||
AcpiOsPrintf (
|
||||
" Mem: [Alloc Free Outstanding Size] % 7d % 7d % 7d % 7d Kb\n",
|
||||
List->TotalAllocated,
|
||||
List->TotalFreed,
|
||||
Outstanding, Temp);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -518,17 +523,18 @@ AcpiDbDisplayStatistics (
|
||||
case CMD_STAT_MEMORY:
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
AcpiOsPrintf ("\n----Object and Cache Statistics---------------------------------------------\n");
|
||||
AcpiOsPrintf ("\n----Object Statistics (all in hex)---------\n");
|
||||
|
||||
AcpiDbListInfo (AcpiGbl_GlobalList);
|
||||
AcpiDbListInfo (AcpiGbl_NsNodeList);
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_USE_LOCAL_CACHE
|
||||
AcpiOsPrintf ("\n----Cache Statistics (all in hex)---------\n");
|
||||
AcpiDbListInfo (AcpiGbl_OperandCache);
|
||||
AcpiDbListInfo (AcpiGbl_PsNodeCache);
|
||||
AcpiDbListInfo (AcpiGbl_PsNodeExtCache);
|
||||
AcpiDbListInfo (AcpiGbl_StateCache);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
break;
|
||||
@@ -586,6 +592,7 @@ AcpiDbDisplayStatistics (
|
||||
AcpiOsPrintf ("ParseObjectAsl %3d\n", sizeof (ACPI_PARSE_OBJ_ASL));
|
||||
AcpiOsPrintf ("OperandObject %3d\n", sizeof (ACPI_OPERAND_OBJECT));
|
||||
AcpiOsPrintf ("NamespaceNode %3d\n", sizeof (ACPI_NAMESPACE_NODE));
|
||||
AcpiOsPrintf ("AcpiObject %3d\n", sizeof (ACPI_OBJECT));
|
||||
|
||||
break;
|
||||
|
||||
@@ -593,13 +600,13 @@ AcpiDbDisplayStatistics (
|
||||
case CMD_STAT_STACK:
|
||||
#if defined(ACPI_DEBUG_OUTPUT)
|
||||
|
||||
Temp = (UINT32) (AcpiGbl_EntryStackPointer - AcpiGbl_LowestStackPointer);
|
||||
Temp = (UINT32) ACPI_PTR_DIFF (AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
|
||||
|
||||
AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
|
||||
AcpiOsPrintf ("Entry Stack Pointer %X\n", AcpiGbl_EntryStackPointer);
|
||||
AcpiOsPrintf ("Lowest Stack Pointer %X\n", AcpiGbl_LowestStackPointer);
|
||||
AcpiOsPrintf ("Stack Use %X (%d)\n", Temp, Temp);
|
||||
AcpiOsPrintf ("Deepest Procedure Nesting %d\n", AcpiGbl_DeepestNesting);
|
||||
AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer);
|
||||
AcpiOsPrintf ("Lowest Stack Pointer %p\n", AcpiGbl_LowestStackPointer);
|
||||
AcpiOsPrintf ("Stack Use %X (%u)\n", Temp, Temp);
|
||||
AcpiOsPrintf ("Deepest Procedure Nesting %u\n", AcpiGbl_DeepestNesting);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbutils - AML debugger utilities
|
||||
* $Revision: 1.81 $
|
||||
* $Revision: 1.87 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -138,6 +138,8 @@ AcpiDbDumpBuffer (
|
||||
UINT32 Address);
|
||||
#endif
|
||||
|
||||
static char *Converter = "0123456789ABCDEF";
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -246,8 +248,7 @@ AcpiDbDumpExternalObject (
|
||||
{
|
||||
case ACPI_TYPE_ANY:
|
||||
|
||||
AcpiOsPrintf ("[Object Reference] = %p", ObjDesc->Reference.Handle);
|
||||
AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
|
||||
AcpiOsPrintf ("[Null Object] (Type=0)\n");
|
||||
break;
|
||||
|
||||
|
||||
@@ -298,7 +299,7 @@ AcpiDbDumpExternalObject (
|
||||
|
||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||
|
||||
AcpiOsPrintf ("[Object Reference] = %p", ObjDesc->Reference.Handle);
|
||||
AcpiOsPrintf ("[Object Reference] = ", ObjDesc->Reference.Handle);
|
||||
AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
|
||||
break;
|
||||
|
||||
@@ -428,6 +429,47 @@ AcpiDbLocalNsLookup (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbUInt32ToHexString
|
||||
*
|
||||
* PARAMETERS: Value - The value to be converted to string
|
||||
* Buffer - Buffer for result (not less than 11 bytes)
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Convert the unsigned 32-bit value to the hexadecimal image
|
||||
*
|
||||
* NOTE: It is the caller's responsibility to ensure that the length of buffer
|
||||
* is sufficient.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDbUInt32ToHexString (
|
||||
UINT32 Value,
|
||||
char *Buffer)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
|
||||
if (Value == 0)
|
||||
{
|
||||
ACPI_STRCPY (Buffer, "0");
|
||||
return;
|
||||
}
|
||||
|
||||
ACPI_STRCPY (Buffer, "0x");
|
||||
Buffer[10] = '\0';
|
||||
|
||||
for (i = 9; i > 1; i--)
|
||||
{
|
||||
Buffer[i] = Converter [Value & 0x0F];
|
||||
Value = Value >> 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbxface - AML Debugger external interfaces
|
||||
* $Revision: 1.77 $
|
||||
* $Revision: 1.79 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmbuffer - AML disassembler, buffer and string support
|
||||
* $Revision: 1.24 $
|
||||
* $Revision: 1.26 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmnames - AML disassembler, names, namestrings, pathnames
|
||||
* $Revision: 1.16 $
|
||||
* $Revision: 1.18 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmobject - ACPI object decode and display
|
||||
* $Revision: 1.21 $
|
||||
* $Revision: 1.24 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -352,7 +352,22 @@ AcpiDmDecodeNode (
|
||||
AcpiOsPrintf (" [Method Local]");
|
||||
}
|
||||
|
||||
AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
|
||||
switch (Node->Type)
|
||||
{
|
||||
/* These types have no attached object */
|
||||
|
||||
case ACPI_TYPE_DEVICE:
|
||||
AcpiOsPrintf (" Device");
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_THERMAL:
|
||||
AcpiOsPrintf (" Thermal Zone");
|
||||
break;
|
||||
|
||||
default:
|
||||
AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmopcode - AML disassembler, specific AML opcodes
|
||||
* $Revision: 1.99 $
|
||||
* $Revision: 1.105 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -202,8 +202,6 @@ AcpiDmFieldFlags (
|
||||
UINT32 Flags;
|
||||
|
||||
|
||||
/* The next peer Op (not child op) contains the flags */
|
||||
|
||||
Op = Op->Common.Next;
|
||||
Flags = (UINT8) Op->Common.Value.Integer;
|
||||
|
||||
@@ -406,6 +404,9 @@ AcpiDmDisassembleOneOp (
|
||||
case AML_LLESS_OP:
|
||||
AcpiOsPrintf ("LGreaterEqual");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Op->Common.DisasmOpcode = 0;
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
|
||||
@@ -615,13 +616,15 @@ AcpiDmDisassembleOneOp (
|
||||
if ((Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) &&
|
||||
(WalkState) &&
|
||||
(WalkState->Results) &&
|
||||
(WalkState->Results->Results.NumResults))
|
||||
(WalkState->ResultCount))
|
||||
{
|
||||
AcpiDmDecodeInternalObject (
|
||||
WalkState->Results->Results.ObjDesc [
|
||||
WalkState->Results->Results.NumResults-1]);
|
||||
(WalkState->ResultCount - 1) %
|
||||
ACPI_RESULTS_FRAME_OBJ_NUM]);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrc.c - Resource Descriptor disassembly
|
||||
* $Revision: 1.33 $
|
||||
* $Revision: 1.36 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -248,8 +248,7 @@ AcpiDmDumpInteger64 (
|
||||
UINT64 Value,
|
||||
char *Name)
|
||||
{
|
||||
AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n",
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Value)), Name);
|
||||
AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n", ACPI_FORMAT_UINT64 (Value), Name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
|
||||
* $Revision: 1.36 $
|
||||
* $Revision: 1.38 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
|
||||
* $Revision: 1.15 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmutils - AML disassembler utilities
|
||||
* $Revision: 1.24 $
|
||||
* $Revision: 1.26 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmwalk - AML disassembly tree walk
|
||||
* $Revision: 1.32 $
|
||||
* $Revision: 1.34 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evevent - Fixed Event handling and dispatch
|
||||
* $Revision: 1.124 $
|
||||
* $Revision: 1.127 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -369,6 +369,7 @@ AcpiEvFixedEventDetect (
|
||||
{
|
||||
/* Found an active (signalled) event */
|
||||
|
||||
AcpiFixedEventCount[i]++;
|
||||
IntStatus |= AcpiEvFixedEventDispatch ((UINT32) i);
|
||||
}
|
||||
}
|
||||
@@ -395,7 +396,6 @@ AcpiEvFixedEventDispatch (
|
||||
UINT32 Event)
|
||||
{
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evgpe - General Purpose Event handling and dispatch
|
||||
* $Revision: 1.67 $
|
||||
* $Revision: 1.72 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -127,6 +127,10 @@ static void ACPI_SYSTEM_XFACE
|
||||
AcpiEvAsynchExecuteGpeMethod (
|
||||
void *Context);
|
||||
|
||||
static void ACPI_SYSTEM_XFACE
|
||||
AcpiEvAsynchEnableGpe (
|
||||
void *Context);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -345,7 +349,14 @@ AcpiEvDisableGpe (
|
||||
ACPI_FUNCTION_TRACE (EvDisableGpe);
|
||||
|
||||
|
||||
if (!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK))
|
||||
/*
|
||||
* Ignore this if the GPE is valid and not enabled.
|
||||
*
|
||||
* Flags is only zero if GPE is neither enabled or disabled -- it may
|
||||
* be a spurious or stray GPE -- disable it in the default case below.
|
||||
*/
|
||||
if (GpeEventInfo->Flags &&
|
||||
(!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK)))
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
@@ -376,11 +387,18 @@ AcpiEvDisableGpe (
|
||||
/* Disable the requested runtime GPE */
|
||||
|
||||
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED);
|
||||
Status = AcpiHwWriteGpeEnableReg (GpeEventInfo);
|
||||
break;
|
||||
|
||||
/*lint -fallthrough */
|
||||
|
||||
default:
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
/*
|
||||
* Even if we don't know the GPE type, make sure that we always
|
||||
* disable it. This can prevent a certain type of GPE flood, where
|
||||
* the GPE has no _Lxx/_Exx method, and it cannot be determined
|
||||
* whether the GPE is wake, run, or wake/run.
|
||||
*/
|
||||
Status = AcpiHwWriteGpeEnableReg (GpeEventInfo);
|
||||
break;
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
@@ -607,15 +625,25 @@ static void ACPI_SYSTEM_XFACE
|
||||
AcpiEvAsynchExecuteGpeMethod (
|
||||
void *Context)
|
||||
{
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo = (void *) Context;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_EVENT_INFO LocalGpeEventInfo;
|
||||
ACPI_GPE_EVENT_INFO *LocalGpeEventInfo;
|
||||
ACPI_EVALUATE_INFO *Info;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
|
||||
|
||||
|
||||
/* Allocate a local GPE block */
|
||||
|
||||
LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO));
|
||||
if (!LocalGpeEventInfo)
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
|
||||
"while handling a GPE"));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@@ -638,7 +666,7 @@ AcpiEvAsynchExecuteGpeMethod (
|
||||
* Take a snapshot of the GPE info for this level - we copy the
|
||||
* info to prevent a race condition with RemoveHandler/RemoveBlock.
|
||||
*/
|
||||
ACPI_MEMCPY (&LocalGpeEventInfo, GpeEventInfo,
|
||||
ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo,
|
||||
sizeof (ACPI_GPE_EVENT_INFO));
|
||||
|
||||
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
|
||||
@@ -651,7 +679,7 @@ AcpiEvAsynchExecuteGpeMethod (
|
||||
* Must check for control method type dispatch one more
|
||||
* time to avoid race with EvGpeInstallHandler
|
||||
*/
|
||||
if ((LocalGpeEventInfo.Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if ((LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_METHOD)
|
||||
{
|
||||
/* Allocate the evaluation information block */
|
||||
@@ -667,8 +695,8 @@ AcpiEvAsynchExecuteGpeMethod (
|
||||
* Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
|
||||
* control method that corresponds to this GPE
|
||||
*/
|
||||
Info->PrefixNode = LocalGpeEventInfo.Dispatch.MethodNode;
|
||||
Info->Parameters = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT *, GpeEventInfo);
|
||||
Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode;
|
||||
Info->Parameters = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT *, LocalGpeEventInfo);
|
||||
Info->ParameterType = ACPI_PARAM_GPE;
|
||||
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
|
||||
|
||||
@@ -680,28 +708,64 @@ AcpiEvAsynchExecuteGpeMethod (
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"while evaluating GPE method [%4.4s]",
|
||||
AcpiUtGetNodeName (LocalGpeEventInfo.Dispatch.MethodNode)));
|
||||
AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode)));
|
||||
}
|
||||
}
|
||||
|
||||
if ((LocalGpeEventInfo.Flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
|
||||
/* Defer enabling of GPE until all notify handlers are done */
|
||||
|
||||
Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
|
||||
AcpiEvAsynchEnableGpe, LocalGpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_FREE (LocalGpeEventInfo);
|
||||
}
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvAsynchEnableGpe
|
||||
*
|
||||
* PARAMETERS: Context (GpeEventInfo) - Info for this GPE
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Asynchronous clear/enable for GPE. This allows the GPE to
|
||||
* complete (i.e., finish execution of Notify)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void ACPI_SYSTEM_XFACE
|
||||
AcpiEvAsynchEnableGpe (
|
||||
void *Context)
|
||||
{
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
|
||||
ACPI_GPE_LEVEL_TRIGGERED)
|
||||
{
|
||||
/*
|
||||
* GPE is level-triggered, we clear the GPE status bit after
|
||||
* handling the event.
|
||||
*/
|
||||
Status = AcpiHwClearGpe (&LocalGpeEventInfo);
|
||||
Status = AcpiHwClearGpe (GpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_VOID;
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable this GPE */
|
||||
|
||||
(void) AcpiHwWriteGpeEnableReg (&LocalGpeEventInfo);
|
||||
return_VOID;
|
||||
(void) AcpiHwWriteGpeEnableReg (GpeEventInfo);
|
||||
|
||||
Exit:
|
||||
ACPI_FREE (GpeEventInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evgpeblk - GPE block creation and initialization.
|
||||
* $Revision: 1.58 $
|
||||
* $Revision: 1.62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -709,6 +709,12 @@ AcpiEvDeleteGpeXrupt (
|
||||
{
|
||||
GpeXrupt->Previous->Next = GpeXrupt->Next;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No previous, update list head */
|
||||
|
||||
AcpiGbl_GpeXruptListHead = GpeXrupt->Next;
|
||||
}
|
||||
|
||||
if (GpeXrupt->Next)
|
||||
{
|
||||
@@ -945,14 +951,11 @@ AcpiEvCreateGpeInfoBlocks (
|
||||
ThisRegister->BaseGpeNumber = (UINT8) (GpeBlock->BlockBaseNumber +
|
||||
(i * ACPI_GPE_REGISTER_WIDTH));
|
||||
|
||||
ACPI_STORE_ADDRESS (ThisRegister->StatusAddress.Address,
|
||||
(ACPI_GET_ADDRESS (GpeBlock->BlockAddress.Address)
|
||||
+ i));
|
||||
ThisRegister->StatusAddress.Address =
|
||||
GpeBlock->BlockAddress.Address + i;
|
||||
|
||||
ACPI_STORE_ADDRESS (ThisRegister->EnableAddress.Address,
|
||||
(ACPI_GET_ADDRESS (GpeBlock->BlockAddress.Address)
|
||||
+ i
|
||||
+ GpeBlock->RegisterCount));
|
||||
ThisRegister->EnableAddress.Address =
|
||||
GpeBlock->BlockAddress.Address + i + GpeBlock->RegisterCount;
|
||||
|
||||
ThisRegister->StatusAddress.SpaceId = GpeBlock->BlockAddress.SpaceId;
|
||||
ThisRegister->EnableAddress.SpaceId = GpeBlock->BlockAddress.SpaceId;
|
||||
@@ -1277,7 +1280,7 @@ AcpiEvGpeInitialize (
|
||||
* particular block is not supported.
|
||||
*/
|
||||
if (AcpiGbl_FADT.Gpe0BlockLength &&
|
||||
ACPI_GET_ADDRESS (AcpiGbl_FADT.XGpe0Block.Address))
|
||||
AcpiGbl_FADT.XGpe0Block.Address)
|
||||
{
|
||||
/* GPE block 0 exists (has both length and address > 0) */
|
||||
|
||||
@@ -1299,7 +1302,7 @@ AcpiEvGpeInitialize (
|
||||
}
|
||||
|
||||
if (AcpiGbl_FADT.Gpe1BlockLength &&
|
||||
ACPI_GET_ADDRESS (AcpiGbl_FADT.XGpe1Block.Address))
|
||||
AcpiGbl_FADT.XGpe1Block.Address)
|
||||
{
|
||||
/* GPE block 1 exists (has both length and address > 0) */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evmisc - Miscellaneous event manager support functions
|
||||
* $Revision: 1.99 $
|
||||
* $Revision: 1.109 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -123,22 +123,6 @@
|
||||
ACPI_MODULE_NAME ("evmisc")
|
||||
|
||||
|
||||
/* Names for Notify() values, used for debug output */
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
static const char *AcpiNotifyValueNames[] =
|
||||
{
|
||||
"Bus Check",
|
||||
"Device Check",
|
||||
"Device Wake",
|
||||
"Eject Request",
|
||||
"Device Check Light",
|
||||
"Frequency Mismatch",
|
||||
"Bus Mode Mismatch",
|
||||
"Power Fault"
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Pointer to FACS needed for the Global Lock */
|
||||
|
||||
static ACPI_TABLE_FACS *Facs = NULL;
|
||||
@@ -153,6 +137,10 @@ static UINT32
|
||||
AcpiEvGlobalLockHandler (
|
||||
void *Context);
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiEvRemoveGlobalLockHandler (
|
||||
void);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -176,7 +164,6 @@ AcpiEvIsNotifyObject (
|
||||
{
|
||||
case ACPI_TYPE_DEVICE:
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
case ACPI_TYPE_POWER:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
/*
|
||||
* These are the ONLY objects that can receive ACPI notifications
|
||||
@@ -225,19 +212,9 @@ AcpiEvQueueNotifyRequest (
|
||||
* initiate soft-off or sleep operation?
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Dispatching Notify(%X) on node %p\n", NotifyValue, Node));
|
||||
|
||||
if (NotifyValue <= 7)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: %s\n",
|
||||
AcpiNotifyValueNames[NotifyValue]));
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Notify value: 0x%2.2X **Device Specific**\n",
|
||||
NotifyValue));
|
||||
}
|
||||
"Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n",
|
||||
AcpiUtGetNodeName (Node), Node, NotifyValue,
|
||||
AcpiUtGetNotifyName (NotifyValue)));
|
||||
|
||||
/* Get the notify object attached to the NS Node */
|
||||
|
||||
@@ -248,10 +225,11 @@ AcpiEvQueueNotifyRequest (
|
||||
|
||||
switch (Node->Type)
|
||||
{
|
||||
/* Notify allowed only on these types */
|
||||
|
||||
case ACPI_TYPE_DEVICE:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
case ACPI_TYPE_POWER:
|
||||
|
||||
if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
|
||||
{
|
||||
@@ -269,8 +247,13 @@ AcpiEvQueueNotifyRequest (
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is any handler to run, schedule the dispatcher */
|
||||
|
||||
/*
|
||||
* If there is any handler to run, schedule the dispatcher.
|
||||
* Check for:
|
||||
* 1) Global system notify handler
|
||||
* 2) Global device notify handler
|
||||
* 3) Per-device notify handler
|
||||
*/
|
||||
if ((AcpiGbl_SystemNotify.Handler && (NotifyValue <= ACPI_MAX_SYS_NOTIFY)) ||
|
||||
(AcpiGbl_DeviceNotify.Handler && (NotifyValue > ACPI_MAX_SYS_NOTIFY)) ||
|
||||
HandlerObj)
|
||||
@@ -281,6 +264,13 @@ AcpiEvQueueNotifyRequest (
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
if (!HandlerObj)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Executing system notify handler for Notify (%4.4s, %X) node %p\n",
|
||||
AcpiUtGetNodeName (Node), NotifyValue, Node));
|
||||
}
|
||||
|
||||
NotifyInfo->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
|
||||
NotifyInfo->Notify.Node = Node;
|
||||
NotifyInfo->Notify.Value = (UINT16) NotifyValue;
|
||||
@@ -293,15 +283,13 @@ AcpiEvQueueNotifyRequest (
|
||||
AcpiUtDeleteGenericState (NotifyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (!HandlerObj)
|
||||
else
|
||||
{
|
||||
/*
|
||||
* There is no per-device notify handler for this device.
|
||||
* This may or may not be a problem.
|
||||
* There is no notify handler (per-device or system) for this device.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"No notify handler for Notify(%4.4s, %X) node %p\n",
|
||||
"No notify handler for Notify (%4.4s, %X) node %p\n",
|
||||
AcpiUtGetNodeName (Node), NotifyValue, Node));
|
||||
}
|
||||
|
||||
@@ -459,7 +447,8 @@ AcpiEvInitGlobalLockHandler (
|
||||
ACPI_FUNCTION_TRACE (EvInitGlobalLockHandler);
|
||||
|
||||
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, (ACPI_TABLE_HEADER **) &Facs);
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
|
||||
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@@ -489,6 +478,35 @@ AcpiEvInitGlobalLockHandler (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvRemoveGlobalLockHandler
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Remove the handler for the Global Lock
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiEvRemoveGlobalLockHandler (
|
||||
void)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (EvRemoveGlobalLockHandler);
|
||||
|
||||
AcpiGbl_GlobalLockPresent = FALSE;
|
||||
Status = AcpiRemoveFixedEventHandler (ACPI_EVENT_GLOBAL,
|
||||
AcpiEvGlobalLockHandler);
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvAcquireGlobalLock
|
||||
@@ -526,12 +544,27 @@ AcpiEvAcquireGlobalLock (
|
||||
* Only one thread can acquire the GL at a time, the GlobalLockMutex
|
||||
* enforces this. This interface releases the interpreter if we must wait.
|
||||
*/
|
||||
Status = AcpiExSystemWaitMutex (AcpiGbl_GlobalLockMutex, Timeout);
|
||||
Status = AcpiExSystemWaitMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex,
|
||||
Timeout);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the global lock handle and check for wraparound. The handle is
|
||||
* only used for the external global lock interfaces, but it is updated
|
||||
* here to properly handle the case where a single thread may acquire the
|
||||
* lock via both the AML and the AcpiAcquireGlobalLock interfaces. The
|
||||
* handle is therefore updated on the first acquire from a given thread
|
||||
* regardless of where the acquisition request originated.
|
||||
*/
|
||||
AcpiGbl_GlobalLockHandle++;
|
||||
if (AcpiGbl_GlobalLockHandle == 0)
|
||||
{
|
||||
AcpiGbl_GlobalLockHandle = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure that a global lock actually exists. If not, just treat
|
||||
* the lock as a standard mutex.
|
||||
@@ -627,7 +660,7 @@ AcpiEvReleaseGlobalLock (
|
||||
|
||||
/* Release the local GL mutex */
|
||||
|
||||
AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex);
|
||||
AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@@ -686,6 +719,13 @@ AcpiEvTerminate (
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Could not remove SCI handler"));
|
||||
}
|
||||
|
||||
Status = AcpiEvRemoveGlobalLockHandler ();
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Could not remove Global Lock handler"));
|
||||
}
|
||||
}
|
||||
|
||||
/* Deallocate all handler objects installed within GPE info structs */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
|
||||
* $Revision: 1.167 $
|
||||
* $Revision: 1.171 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -454,14 +454,14 @@ AcpiEvAddressSpaceDispatch (
|
||||
* setup will potentially execute control methods
|
||||
* (e.g., _REG method for this region)
|
||||
*/
|
||||
AcpiExRelinquishInterpreter ();
|
||||
AcpiExExitInterpreter ();
|
||||
|
||||
Status = RegionSetup (RegionObj, ACPI_REGION_ACTIVATE,
|
||||
HandlerDesc->AddressSpace.Context, &RegionContext);
|
||||
|
||||
/* Re-enter the interpreter */
|
||||
|
||||
AcpiExReacquireInterpreter ();
|
||||
AcpiExEnterInterpreter ();
|
||||
|
||||
/* Check for failure of the Region Setup */
|
||||
|
||||
@@ -504,7 +504,7 @@ AcpiEvAddressSpaceDispatch (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
|
||||
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
|
||||
&RegionObj->Region.Handler->AddressSpace, Handler,
|
||||
ACPI_FORMAT_UINT64 (Address),
|
||||
ACPI_FORMAT_NATIVE_UINT (Address),
|
||||
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
|
||||
|
||||
if (!(HandlerDesc->AddressSpace.HandlerFlags &
|
||||
@@ -515,7 +515,7 @@ AcpiEvAddressSpaceDispatch (
|
||||
* exit the interpreter because the handler *might* block -- we don't
|
||||
* know what it will do, so we can't hold the lock on the intepreter.
|
||||
*/
|
||||
AcpiExRelinquishInterpreter();
|
||||
AcpiExExitInterpreter();
|
||||
}
|
||||
|
||||
/* Call the handler */
|
||||
@@ -536,7 +536,7 @@ AcpiEvAddressSpaceDispatch (
|
||||
* We just returned from a non-default handler, we must re-enter the
|
||||
* interpreter
|
||||
*/
|
||||
AcpiExReacquireInterpreter ();
|
||||
AcpiExEnterInterpreter ();
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
|
||||
* $Revision: 1.87 $
|
||||
* $Revision: 1.89 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: evsci - System Control Interrupt configuration and
|
||||
* legacy to ACPI mode state transition functions
|
||||
* $Revision: 1.101 $
|
||||
* $Revision: 1.104 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -171,6 +171,7 @@ AcpiEvSciXruptHandler (
|
||||
*/
|
||||
InterruptHandled |= AcpiEvGpeDetect (GpeXruptList);
|
||||
|
||||
AcpiSciCount++;
|
||||
return_UINT32 (InterruptHandled);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evxface - External interfaces for ACPI events
|
||||
* $Revision: 1.162 $
|
||||
* $Revision: 1.167 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -891,6 +891,12 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveGpeHandler)
|
||||
*
|
||||
* DESCRIPTION: Acquire the ACPI Global Lock
|
||||
*
|
||||
* Note: Allows callers with the same thread ID to acquire the global lock
|
||||
* multiple times. In other words, externally, the behavior of the global lock
|
||||
* is identical to an AML mutex. On the first acquire, a new handle is
|
||||
* returned. On any subsequent calls to acquire by the same thread, the same
|
||||
* handle is returned.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
@@ -909,15 +915,18 @@ AcpiAcquireGlobalLock (
|
||||
/* Must lock interpreter to prevent race conditions */
|
||||
|
||||
AcpiExEnterInterpreter ();
|
||||
Status = AcpiEvAcquireGlobalLock (Timeout);
|
||||
AcpiExExitInterpreter ();
|
||||
|
||||
Status = AcpiExAcquireMutexObject (Timeout,
|
||||
AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
|
||||
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
AcpiGbl_GlobalLockHandle++;
|
||||
/* Return the global lock handle (updated in AcpiEvAcquireGlobalLock) */
|
||||
|
||||
*Handle = AcpiGbl_GlobalLockHandle;
|
||||
}
|
||||
|
||||
AcpiExExitInterpreter ();
|
||||
return (Status);
|
||||
}
|
||||
|
||||
@@ -943,12 +952,12 @@ AcpiReleaseGlobalLock (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
if (Handle != AcpiGbl_GlobalLockHandle)
|
||||
if (!Handle || (Handle != AcpiGbl_GlobalLockHandle))
|
||||
{
|
||||
return (AE_NOT_ACQUIRED);
|
||||
}
|
||||
|
||||
Status = AcpiEvReleaseGlobalLock ();
|
||||
Status = AcpiExReleaseMutexObject (AcpiGbl_GlobalLockMutex);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
|
||||
* $Revision: 1.92 $
|
||||
* $Revision: 1.94 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
|
||||
* Address Spaces.
|
||||
* $Revision: 1.69 $
|
||||
* $Revision: 1.71 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
|
||||
* $Revision: 1.77 $
|
||||
* $Revision: 1.79 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
|
||||
* $Revision: 1.74 $
|
||||
* $Revision: 1.76 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Module Name: hwregs - Read/write access functions for the various ACPI
|
||||
* control and status registers.
|
||||
* $Revision: 1.185 $
|
||||
* $Revision: 1.188 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -152,7 +152,7 @@ AcpiHwClearAcpiStatus (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %04X\n",
|
||||
ACPI_BITMASK_ALL_FIXED_STATUS,
|
||||
(UINT16) ACPI_GET_ADDRESS (AcpiGbl_FADT.XPm1aEventBlock.Address)));
|
||||
(UINT16) AcpiGbl_FADT.XPm1aEventBlock.Address));
|
||||
|
||||
LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
|
||||
|
||||
@@ -166,7 +166,7 @@ AcpiHwClearAcpiStatus (
|
||||
|
||||
/* Clear the fixed events */
|
||||
|
||||
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm1bEventBlock.Address))
|
||||
if (AcpiGbl_FADT.XPm1bEventBlock.Address)
|
||||
{
|
||||
Status = AcpiHwLowLevelWrite (16, ACPI_BITMASK_ALL_FIXED_STATUS,
|
||||
&AcpiGbl_FADT.XPm1bEventBlock);
|
||||
@@ -519,16 +519,14 @@ AcpiSetRegister (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n",
|
||||
RegisterValue,
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (
|
||||
AcpiGbl_FADT.XPm2ControlBlock.Address))));
|
||||
ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XPm2ControlBlock.Address)));
|
||||
|
||||
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
|
||||
BitRegInfo->AccessBitMask, Value);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n",
|
||||
RegisterValue,
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (
|
||||
AcpiGbl_FADT.XPm2ControlBlock.Address))));
|
||||
ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XPm2ControlBlock.Address)));
|
||||
|
||||
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
|
||||
ACPI_REGISTER_PM2_CONTROL, (UINT8) (RegisterValue));
|
||||
@@ -883,7 +881,7 @@ AcpiHwLowLevelRead (
|
||||
/* Get a local copy of the address. Handles possible alignment issues */
|
||||
|
||||
ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
|
||||
if (!ACPI_VALID_ADDRESS (Address))
|
||||
if (!Address)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
@@ -898,15 +896,13 @@ AcpiHwLowLevelRead (
|
||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||
|
||||
Status = AcpiOsReadMemory (
|
||||
(ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Address),
|
||||
Value, Width);
|
||||
(ACPI_PHYSICAL_ADDRESS) Address, Value, Width);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_ADR_SPACE_SYSTEM_IO:
|
||||
|
||||
Status = AcpiOsReadPort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address),
|
||||
Value, Width);
|
||||
Status = AcpiOsReadPort ((ACPI_IO_ADDRESS) Address, Value, Width);
|
||||
break;
|
||||
|
||||
|
||||
@@ -918,8 +914,7 @@ AcpiHwLowLevelRead (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
|
||||
"Read: %8.8X width %2d from %8.8X%8.8X (%s)\n",
|
||||
*Value, Width,
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Address)),
|
||||
*Value, Width, ACPI_FORMAT_UINT64 (Address),
|
||||
AcpiUtGetRegionName (Reg->SpaceId)));
|
||||
|
||||
return (Status);
|
||||
@@ -966,7 +961,7 @@ AcpiHwLowLevelWrite (
|
||||
/* Get a local copy of the address. Handles possible alignment issues */
|
||||
|
||||
ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
|
||||
if (!ACPI_VALID_ADDRESS (Address))
|
||||
if (!Address)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
@@ -980,15 +975,14 @@ AcpiHwLowLevelWrite (
|
||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||
|
||||
Status = AcpiOsWriteMemory (
|
||||
(ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Address),
|
||||
Value, Width);
|
||||
(ACPI_PHYSICAL_ADDRESS) Address, Value, Width);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_ADR_SPACE_SYSTEM_IO:
|
||||
|
||||
Status = AcpiOsWritePort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address),
|
||||
Value, Width);
|
||||
Status = AcpiOsWritePort (
|
||||
(ACPI_IO_ADDRESS) Address, Value, Width);
|
||||
break;
|
||||
|
||||
|
||||
@@ -1000,8 +994,7 @@ AcpiHwLowLevelWrite (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
|
||||
"Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n",
|
||||
Value, Width,
|
||||
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Address)),
|
||||
Value, Width, ACPI_FORMAT_UINT64 (Address),
|
||||
AcpiUtGetRegionName (Reg->SpaceId)));
|
||||
|
||||
return (Status);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
|
||||
* $Revision: 1.85 $
|
||||
* $Revision: 1.89 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -116,7 +116,6 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "acpi.h"
|
||||
#include "actables.h"
|
||||
|
||||
#define _COMPONENT ACPI_HARDWARE
|
||||
ACPI_MODULE_NAME ("hwsleep")
|
||||
@@ -147,7 +146,8 @@ AcpiSetFirmwareWakingVector (
|
||||
|
||||
/* Get the FACS */
|
||||
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, (ACPI_TABLE_HEADER **) &Facs);
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
|
||||
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@@ -156,7 +156,7 @@ AcpiSetFirmwareWakingVector (
|
||||
/* Set the vector */
|
||||
|
||||
if ((Facs->Length < 32) ||
|
||||
(!(ACPI_GET_ADDRESS (Facs->XFirmwareWakingVector))))
|
||||
(!(Facs->XFirmwareWakingVector)))
|
||||
{
|
||||
/*
|
||||
* ACPI 1.0 FACS or short table or optional X_ field is zero
|
||||
@@ -209,7 +209,8 @@ AcpiGetFirmwareWakingVector (
|
||||
|
||||
/* Get the FACS */
|
||||
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, (ACPI_TABLE_HEADER **) &Facs);
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
|
||||
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@@ -218,7 +219,7 @@ AcpiGetFirmwareWakingVector (
|
||||
/* Get the vector */
|
||||
|
||||
if ((Facs->Length < 32) ||
|
||||
(!(ACPI_GET_ADDRESS (Facs->XFirmwareWakingVector))))
|
||||
(!(Facs->XFirmwareWakingVector)))
|
||||
{
|
||||
/*
|
||||
* ACPI 1.0 FACS or short table or optional X_ field is zero
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: hwtimer.c - ACPI Power Management Timer Interface
|
||||
* $Revision: 1.36 $
|
||||
* $Revision: 1.38 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -168,7 +168,8 @@ AdGetLocalTables (
|
||||
|
||||
ACPI_STATUS
|
||||
AdParseTable (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
BOOLEAN LoadTable);
|
||||
|
||||
ACPI_STATUS
|
||||
AdDisplayTables (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acconfig.h - Global configuration constants
|
||||
* $Revision: 1.229 $
|
||||
* $Revision: 1.243 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20061109
|
||||
#define ACPI_CA_VERSION 0x20080321
|
||||
|
||||
/*
|
||||
* OS name, used for the _OS object. The _OS object is essentially obsolete,
|
||||
@@ -226,6 +226,17 @@
|
||||
#define ACPI_OBJ_NUM_OPERANDS 8
|
||||
#define ACPI_OBJ_MAX_OPERAND 7
|
||||
|
||||
/* Number of elements in the Result Stack frame, can be an arbitrary value */
|
||||
|
||||
#define ACPI_RESULTS_FRAME_OBJ_NUM 8
|
||||
|
||||
/*
|
||||
* Maximal number of elements the Result Stack can contain,
|
||||
* it may be an arbitray value not exceeding the types of
|
||||
* ResultSize and ResultCount (now UINT8).
|
||||
*/
|
||||
#define ACPI_RESULTS_OBJ_NUM_MAX 255
|
||||
|
||||
/* Names within the namespace are 4 bytes long */
|
||||
|
||||
#define ACPI_NAME_SIZE 4
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdebug.h - ACPI/AML debugger
|
||||
* $Revision: 1.81 $
|
||||
* $Revision: 1.85 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -323,6 +323,12 @@ AcpiDbCreateExecutionThreads (
|
||||
char *NumLoopsArg,
|
||||
char *MethodNameArg);
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
UINT32
|
||||
AcpiDbGetCacheInfo (
|
||||
ACPI_MEMORY_LIST *Cache);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* dbfileio - Debugger file I/O commands
|
||||
@@ -423,4 +429,9 @@ ACPI_NAMESPACE_NODE *
|
||||
AcpiDbLocalNsLookup (
|
||||
char *Name);
|
||||
|
||||
void
|
||||
AcpiDbUInt32ToHexString (
|
||||
UINT32 Value,
|
||||
char *Buffer);
|
||||
|
||||
#endif /* __ACDEBUG_H__ */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdisasm.h - AML disassembler
|
||||
* $Revision: 1.38 $
|
||||
* $Revision: 1.44 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -174,21 +174,25 @@ typedef const struct acpi_dmtable_info
|
||||
#define ACPI_DMT_CHKSUM 20
|
||||
#define ACPI_DMT_SPACEID 21
|
||||
#define ACPI_DMT_GAS 22
|
||||
#define ACPI_DMT_DMAR 23
|
||||
#define ACPI_DMT_MADT 24
|
||||
#define ACPI_DMT_SRAT 25
|
||||
#define ACPI_DMT_EXIT 26
|
||||
#define ACPI_DMT_SIG 27
|
||||
#define ACPI_DMT_ASF 23
|
||||
#define ACPI_DMT_DMAR 24
|
||||
#define ACPI_DMT_HEST 25
|
||||
#define ACPI_DMT_HESTNTFY 26
|
||||
#define ACPI_DMT_HESTNTYP 27
|
||||
#define ACPI_DMT_MADT 28
|
||||
#define ACPI_DMT_SRAT 29
|
||||
#define ACPI_DMT_EXIT 30
|
||||
#define ACPI_DMT_SIG 31
|
||||
|
||||
typedef
|
||||
void (*ACPI_TABLE_HANDLER) (
|
||||
void (*ACPI_DMTABLE_HANDLER) (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
typedef struct acpi_dmtable_data
|
||||
{
|
||||
char *Signature;
|
||||
ACPI_DMTABLE_INFO *TableInfo;
|
||||
ACPI_TABLE_HANDLER TableHandler;
|
||||
ACPI_DMTABLE_INFO *TableInfo;
|
||||
ACPI_DMTABLE_HANDLER TableHandler;
|
||||
char *Name;
|
||||
|
||||
} ACPI_DMTABLE_DATA;
|
||||
@@ -236,6 +240,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbgp[];
|
||||
@@ -245,11 +250,17 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHeader[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt0[];
|
||||
@@ -267,6 +278,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
|
||||
@@ -284,7 +296,7 @@ void
|
||||
AcpiDmDumpDataTable (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiDmDumpTable (
|
||||
UINT32 TableLength,
|
||||
UINT32 TableOffset,
|
||||
@@ -321,12 +333,20 @@ void
|
||||
AcpiDmDumpDmar (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpEinj (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpErst (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpFadt (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpSrat (
|
||||
AcpiDmDumpHest (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
@@ -349,6 +369,10 @@ void
|
||||
AcpiDmDumpSlit (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpSrat (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpXsdt (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdispat.h - dispatcher (parser to interpreter interface)
|
||||
* $Revision: 1.73 $
|
||||
* $Revision: 1.79 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -130,6 +130,10 @@ ACPI_STATUS
|
||||
AcpiDsGetBufferFieldArguments (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetBankFieldArguments (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetRegionArguments (
|
||||
ACPI_OPERAND_OBJECT *RgnDesc);
|
||||
@@ -152,12 +156,22 @@ AcpiDsEvalRegionOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsEvalTableRegionOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsEvalDataObjectOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsEvalBankFieldOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsInitializeRegion (
|
||||
ACPI_HANDLE ObjHandle);
|
||||
@@ -421,6 +435,10 @@ void
|
||||
AcpiDsClearOperands (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsEvaluateNamePath (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
|
||||
/*
|
||||
* dswscope - Scope Stack manipulation
|
||||
@@ -471,7 +489,7 @@ AcpiDsInitAmlWalk (
|
||||
ACPI_EVALUATE_INFO *Info,
|
||||
UINT8 PassNumber);
|
||||
|
||||
ACPI_STATUS
|
||||
void
|
||||
AcpiDsObjStackPopAndDelete (
|
||||
UINT32 PopCount,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
@@ -489,14 +507,6 @@ AcpiDsPushWalkState (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_THREAD_STATE *Thread);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsResultStackPop (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsResultStackPush (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsResultStackClear (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
@@ -505,12 +515,6 @@ ACPI_WALK_STATE *
|
||||
AcpiDsGetCurrentWalkState (
|
||||
ACPI_THREAD_STATE *Thread);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsResultRemove (
|
||||
ACPI_OPERAND_OBJECT **Object,
|
||||
UINT32 Index,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsResultPop (
|
||||
ACPI_OPERAND_OBJECT **Object,
|
||||
@@ -521,9 +525,4 @@ AcpiDsResultPush (
|
||||
ACPI_OPERAND_OBJECT *Object,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsResultPopFromBottom (
|
||||
ACPI_OPERAND_OBJECT **Object,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
#endif /* _ACDISPAT_H_ */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acevents.h - Event subcomponent prototypes and defines
|
||||
* $Revision: 1.106 $
|
||||
* $Revision: 1.110 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
|
||||
* $Revision: 1.78 $
|
||||
* $Revision: 1.80 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acglobal.h - Declarations for global variables
|
||||
* $Revision: 1.190 $
|
||||
* $Revision: 1.199 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -178,35 +178,6 @@ ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_CreateOsiMethod, TRUE);
|
||||
ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_LeaveWakeGpesDisabled, TRUE);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Debug support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Runtime configuration of debug print levels */
|
||||
|
||||
extern UINT32 AcpiDbgLevel;
|
||||
extern UINT32 AcpiDbgLayer;
|
||||
|
||||
/* Procedure nesting level for debug output */
|
||||
|
||||
extern UINT32 AcpiGbl_NestingLevel;
|
||||
|
||||
/* Event counters */
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiGpeCount;
|
||||
|
||||
/* Support for dynamic control method tracing mechanism */
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLevel;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLayer;
|
||||
ACPI_EXTERN ACPI_NAME AcpiGbl_TraceMethodName;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLevel;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLayer;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TraceFlags;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ACPI Table globals
|
||||
@@ -251,10 +222,14 @@ ACPI_EXTERN UINT8 AcpiGbl_IntegerNybbleWidth;
|
||||
ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
|
||||
|
||||
/*
|
||||
* Global lock semaphore works in conjunction with the actual HW global lock
|
||||
* Global lock mutex is an actual AML mutex object
|
||||
* Global lock semaphore works in conjunction with the HW global lock
|
||||
*/
|
||||
ACPI_EXTERN ACPI_MUTEX AcpiGbl_GlobalLockMutex;
|
||||
ACPI_EXTERN ACPI_OPERAND_OBJECT *AcpiGbl_GlobalLockMutex;
|
||||
ACPI_EXTERN ACPI_SEMAPHORE AcpiGbl_GlobalLockSemaphore;
|
||||
ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
|
||||
|
||||
/*
|
||||
* Spinlocks are used for interfaces that can be possibly called at
|
||||
@@ -270,14 +245,6 @@ ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_HardwareLock; /* For ACPI H/W ex
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
|
||||
/* Lists for tracking memory allocations */
|
||||
|
||||
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList;
|
||||
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList;
|
||||
#endif
|
||||
|
||||
/* Object caches */
|
||||
|
||||
ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_NamespaceCache;
|
||||
@@ -292,41 +259,60 @@ ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_DeviceNotify;
|
||||
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SystemNotify;
|
||||
ACPI_EXTERN ACPI_EXCEPTION_HANDLER AcpiGbl_ExceptionHandler;
|
||||
ACPI_EXTERN ACPI_INIT_HANDLER AcpiGbl_InitHandler;
|
||||
ACPI_EXTERN ACPI_TABLE_HANDLER AcpiGbl_TableHandler;
|
||||
ACPI_EXTERN void *AcpiGbl_TableHandlerContext;
|
||||
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_BreakpointWalk;
|
||||
|
||||
|
||||
/* Owner ID support */
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
|
||||
ACPI_EXTERN UINT8 AcpiGbl_LastOwnerIdIndex;
|
||||
ACPI_EXTERN UINT8 AcpiGbl_NextOwnerIdOffset;
|
||||
|
||||
/* Misc */
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OriginalMode;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_RsdpOriginalLocation;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_NsLookupCount;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_PsFindCount;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
|
||||
ACPI_EXTERN UINT16 AcpiGbl_Pm1EnableRegisterSave;
|
||||
ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle;
|
||||
ACPI_EXTERN UINT8 AcpiGbl_LastOwnerIdIndex;
|
||||
ACPI_EXTERN UINT8 AcpiGbl_NextOwnerIdOffset;
|
||||
ACPI_EXTERN UINT8 AcpiGbl_DebuggerConfiguration;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_SystemAwakeAndRunning;
|
||||
|
||||
|
||||
#ifndef DEFINE_ACPI_GLOBALS
|
||||
|
||||
/* Exception codes */
|
||||
|
||||
extern char const *AcpiGbl_ExceptionNames_Env[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Pgm[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Tbl[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Aml[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Ctrl[];
|
||||
|
||||
/* Other miscellaneous */
|
||||
|
||||
extern BOOLEAN AcpiGbl_Shutdown;
|
||||
extern UINT32 AcpiGbl_StartupFlags;
|
||||
extern const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
|
||||
extern const char *AcpiGbl_HighestDstateNames[4];
|
||||
extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
|
||||
extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
|
||||
#endif
|
||||
|
||||
/* Exception codes */
|
||||
|
||||
extern char const *AcpiGbl_ExceptionNames_Env[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Pgm[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Tbl[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Aml[];
|
||||
extern char const *AcpiGbl_ExceptionNames_Ctrl[];
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
|
||||
/* Lists for tracking memory allocations */
|
||||
|
||||
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList;
|
||||
ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DisplayFinalMemStats;
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -335,8 +321,6 @@ extern char const *AcpiGbl_ExceptionNames_Ctrl[];
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define NUM_NS_TYPES ACPI_TYPE_INVALID+1
|
||||
|
||||
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
||||
#define NUM_PREDEFINED_NAMES 10
|
||||
#else
|
||||
@@ -347,15 +331,15 @@ ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct;
|
||||
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode;
|
||||
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_FadtGpeDevice;
|
||||
|
||||
extern const UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
|
||||
extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
|
||||
extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
|
||||
ACPI_EXTERN ACPI_SIZE AcpiGbl_EntryStackPointer;
|
||||
ACPI_EXTERN ACPI_SIZE AcpiGbl_LowestStackPointer;
|
||||
ACPI_EXTERN ACPI_SIZE *AcpiGbl_EntryStackPointer;
|
||||
ACPI_EXTERN ACPI_SIZE *AcpiGbl_LowestStackPointer;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_DeepestNesting;
|
||||
#endif
|
||||
|
||||
@@ -397,6 +381,38 @@ ACPI_EXTERN ACPI_GPE_XRUPT_INFO *AcpiGbl_GpeXruptListHead;
|
||||
ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Debug support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Runtime configuration of debug print levels */
|
||||
|
||||
extern UINT32 AcpiDbgLevel;
|
||||
extern UINT32 AcpiDbgLayer;
|
||||
|
||||
/* Procedure nesting level for debug output */
|
||||
|
||||
extern UINT32 AcpiGbl_NestingLevel;
|
||||
|
||||
/* Event counters */
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiMethodCount;
|
||||
ACPI_EXTERN UINT32 AcpiGpeCount;
|
||||
ACPI_EXTERN UINT32 AcpiSciCount;
|
||||
ACPI_EXTERN UINT32 AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS];
|
||||
|
||||
/* Support for dynamic control method tracing mechanism */
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLevel;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLayer;
|
||||
ACPI_EXTERN ACPI_NAME AcpiGbl_TraceMethodName;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLevel;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLayer;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TraceFlags;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Debugger globals
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: achware.h -- hardware specific interfaces
|
||||
* $Revision: 1.82 $
|
||||
* $Revision: 1.84 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
|
||||
* $Revision: 1.168 $
|
||||
* $Revision: 1.173 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -333,10 +333,6 @@ AcpiExCreateRegion (
|
||||
UINT8 RegionSpace,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExCreateTableRegion (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExCreateEvent (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
@@ -380,11 +376,21 @@ AcpiExAcquireMutex (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExAcquireMutexObject (
|
||||
UINT16 Timeout,
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
ACPI_THREAD_ID ThreadId);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExReleaseMutex (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExReleaseMutexObject (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
void
|
||||
AcpiExReleaseAllMutexes (
|
||||
ACPI_THREAD_STATE *Thread);
|
||||
@@ -685,13 +691,13 @@ void
|
||||
AcpiExTruncateFor32bitTable (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
BOOLEAN
|
||||
void
|
||||
AcpiExAcquireGlobalLock (
|
||||
UINT32 Rule);
|
||||
|
||||
void
|
||||
AcpiExReleaseGlobalLock (
|
||||
BOOLEAN Locked);
|
||||
UINT32 Rule);
|
||||
|
||||
void
|
||||
AcpiExEisaIdToString (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: aclocal.h - Internal data types used across the ACPI subsystem
|
||||
* $Revision: 1.242 $
|
||||
* $Revision: 1.250 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -693,9 +693,7 @@ typedef struct acpi_thread_state
|
||||
typedef struct acpi_result_values
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
UINT8 NumResults;
|
||||
UINT8 LastInsert;
|
||||
union acpi_operand_object *ObjDesc [ACPI_OBJ_NUM_OPERANDS];
|
||||
union acpi_operand_object *ObjDesc [ACPI_RESULTS_FRAME_OBJ_NUM];
|
||||
|
||||
} ACPI_RESULT_VALUES;
|
||||
|
||||
@@ -795,6 +793,7 @@ typedef union acpi_parse_value
|
||||
union acpi_parse_object *Next; /* Next op */\
|
||||
ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\
|
||||
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
|
||||
UINT8 ArgListLength; /* Number of elements in the arg list */\
|
||||
ACPI_DISASM_ONLY_MEMBERS (\
|
||||
UINT8 DisasmFlags; /* Used during AML disassembly */\
|
||||
UINT8 DisasmOpcode; /* Subtype used for disassembly */\
|
||||
@@ -904,6 +903,8 @@ typedef struct acpi_parse_state
|
||||
#define ACPI_PARSEOP_NAMED 0x02
|
||||
#define ACPI_PARSEOP_DEFERRED 0x04
|
||||
#define ACPI_PARSEOP_BYTELIST 0x08
|
||||
#define ACPI_PARSEOP_IN_STACK 0x10
|
||||
#define ACPI_PARSEOP_TARGET 0x20
|
||||
#define ACPI_PARSEOP_IN_CACHE 0x80
|
||||
|
||||
/* Parse object DisasmFlags */
|
||||
@@ -1092,12 +1093,30 @@ typedef struct acpi_bit_register_info
|
||||
|
||||
typedef struct acpi_db_method_info
|
||||
{
|
||||
ACPI_HANDLE ThreadGate;
|
||||
ACPI_HANDLE MainThreadGate;
|
||||
ACPI_HANDLE ThreadCompleteGate;
|
||||
UINT32 *Threads;
|
||||
UINT32 NumThreads;
|
||||
UINT32 NumCreated;
|
||||
UINT32 NumCompleted;
|
||||
|
||||
char *Name;
|
||||
char **Args;
|
||||
UINT32 Flags;
|
||||
UINT32 NumLoops;
|
||||
char Pathname[128];
|
||||
char **Args;
|
||||
|
||||
/*
|
||||
* Arguments to be passed to method for the command
|
||||
* Threads -
|
||||
* the Number of threads, ID of current thread and
|
||||
* Index of current thread inside all them created.
|
||||
*/
|
||||
char InitArgs;
|
||||
char *Arguments[4];
|
||||
char NumThreadsStr[11];
|
||||
char IdOfThreadStr[11];
|
||||
char IndexOfThreadStr[11];
|
||||
|
||||
} ACPI_DB_METHOD_INFO;
|
||||
|
||||
@@ -1170,6 +1189,8 @@ typedef struct acpi_memory_list
|
||||
|
||||
UINT32 TotalAllocated;
|
||||
UINT32 TotalFreed;
|
||||
UINT32 MaxOccupied;
|
||||
UINT32 TotalSize;
|
||||
UINT32 CurrentTotalSize;
|
||||
UINT32 Requests;
|
||||
UINT32 Hits;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
* $Revision: 1.192 $
|
||||
* $Revision: 1.199 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -136,53 +136,6 @@
|
||||
#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
|
||||
/*
|
||||
* For 16-bit addresses, we have to assume that the upper 32 bits
|
||||
* (out of 64) are zero.
|
||||
*/
|
||||
#define ACPI_LODWORD(l) ((UINT32)(l))
|
||||
#define ACPI_HIDWORD(l) ((UINT32)(0))
|
||||
|
||||
#define ACPI_GET_ADDRESS(a) ((a).Lo)
|
||||
#define ACPI_STORE_ADDRESS(a,b) {(a).Hi=0;(a).Lo=(UINT32)(b);}
|
||||
#define ACPI_VALID_ADDRESS(a) ((a).Hi | (a).Lo)
|
||||
|
||||
#else
|
||||
#ifdef ACPI_NO_INTEGER64_SUPPORT
|
||||
/*
|
||||
* ACPI_INTEGER is 32-bits, no 64-bit support on this platform
|
||||
*/
|
||||
#define ACPI_LODWORD(l) ((UINT32)(l))
|
||||
#define ACPI_HIDWORD(l) ((UINT32)(0))
|
||||
|
||||
#define ACPI_GET_ADDRESS(a) (a)
|
||||
#define ACPI_STORE_ADDRESS(a,b) ((a)=(b))
|
||||
#define ACPI_VALID_ADDRESS(a) (a)
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Full 64-bit address/integer on both 32-bit and 64-bit platforms
|
||||
*/
|
||||
#define ACPI_LODWORD(l) ((UINT32)(UINT64)(l))
|
||||
#define ACPI_HIDWORD(l) ((UINT32)(((*(UINT64_STRUCT *)(void *)(&l))).Hi))
|
||||
|
||||
#define ACPI_GET_ADDRESS(a) (a)
|
||||
#define ACPI_STORE_ADDRESS(a,b) ((a)=(ACPI_PHYSICAL_ADDRESS)(b))
|
||||
#define ACPI_VALID_ADDRESS(a) (a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* printf() format helpers
|
||||
*/
|
||||
|
||||
/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
|
||||
|
||||
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i)
|
||||
|
||||
/*
|
||||
* Extract data using a pointer. Any more than a byte and we
|
||||
* get into potential aligment issues -- see the STORE macros below.
|
||||
@@ -210,15 +163,8 @@
|
||||
#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(ACPI_NATIVE_UINT) i)
|
||||
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
|
||||
#define ACPI_OFFSET(d,f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
|
||||
#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i)
|
||||
#define ACPI_PTR_TO_PHYSADDR(i) (UINT32) ACPI_CAST_PTR (UINT8,(i))
|
||||
#else
|
||||
#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
|
||||
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
|
||||
#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32,(a)) == *ACPI_CAST_PTR (UINT32,(b)))
|
||||
@@ -226,6 +172,34 @@
|
||||
#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Full 64-bit integer must be available on both 32-bit and 64-bit platforms
|
||||
*/
|
||||
typedef struct acpi_integer_overlay
|
||||
{
|
||||
UINT32 LoDword;
|
||||
UINT32 HiDword;
|
||||
|
||||
} ACPI_INTEGER_OVERLAY;
|
||||
|
||||
#define ACPI_LODWORD(Integer) (ACPI_CAST_PTR (ACPI_INTEGER_OVERLAY, &Integer)->LoDword)
|
||||
#define ACPI_HIDWORD(Integer) (ACPI_CAST_PTR (ACPI_INTEGER_OVERLAY, &Integer)->HiDword)
|
||||
|
||||
/*
|
||||
* printf() format helpers
|
||||
*/
|
||||
|
||||
/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
|
||||
|
||||
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i)
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
|
||||
#else
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) 0, (i)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Macros for moving data around to/from buffers that are possibly unaligned.
|
||||
* If the hardware supports the transfer of unaligned data, just do the store.
|
||||
@@ -299,28 +273,6 @@
|
||||
|
||||
/* The hardware supports unaligned transfers, just do the little-endian move */
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
|
||||
/* No 64-bit integers */
|
||||
/* 16-bit source, 16/32/64 destination */
|
||||
|
||||
#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
|
||||
#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
|
||||
#define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s)
|
||||
|
||||
/* 32-bit source, 16/32/64 destination */
|
||||
|
||||
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
|
||||
#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
|
||||
#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
|
||||
|
||||
/* 64-bit source, 16/32/64 destination */
|
||||
|
||||
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
|
||||
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
|
||||
#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
|
||||
|
||||
#else
|
||||
/* 16-bit source, 16/32/64 destination */
|
||||
|
||||
#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
|
||||
@@ -338,7 +290,6 @@
|
||||
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
|
||||
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
|
||||
#define ACPI_MOVE_64_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s)
|
||||
#endif
|
||||
|
||||
#else
|
||||
/*
|
||||
@@ -383,10 +334,7 @@
|
||||
|
||||
/* Macros based on machine integer width */
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s)
|
||||
|
||||
#elif ACPI_MACHINE_WIDTH == 32
|
||||
#if ACPI_MACHINE_WIDTH == 32
|
||||
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s)
|
||||
|
||||
#elif ACPI_MACHINE_WIDTH == 64
|
||||
@@ -780,17 +728,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* For 16-bit code, we want to shrink some things even though
|
||||
* we are using ACPI_DEBUG_OUTPUT to get the debug output
|
||||
*/
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
#undef ACPI_DEBUG_ONLY_MEMBERS
|
||||
#undef _VERBOSE_STRUCTURES
|
||||
#define ACPI_DEBUG_ONLY_MEMBERS(a)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
/*
|
||||
* 1) Set name to blanks
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acnames.h - Global names and strings
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
|
||||
* $Revision: 1.151 $
|
||||
* $Revision: 1.154 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -204,7 +204,8 @@ AcpiNsParseTable (
|
||||
ACPI_STATUS
|
||||
AcpiNsOneCompleteParse (
|
||||
ACPI_NATIVE_UINT PassNumber,
|
||||
ACPI_NATIVE_UINT TableIndex);
|
||||
ACPI_NATIVE_UINT TableIndex,
|
||||
ACPI_NAMESPACE_NODE *StartNode);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
|
||||
* $Revision: 1.141 $
|
||||
* $Revision: 1.144 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -257,8 +257,9 @@ typedef struct acpi_object_mutex
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 SyncLevel; /* 0-15, specified in Mutex() call */
|
||||
UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */
|
||||
struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */
|
||||
ACPI_MUTEX OsMutex; /* Actual OS synchronization object */
|
||||
ACPI_THREAD_ID ThreadId; /* Current owner of the mutex */
|
||||
struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */
|
||||
union acpi_operand_object *Prev; /* Link for list of acquired mutexes */
|
||||
union acpi_operand_object *Next; /* Link for list of acquired mutexes */
|
||||
ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acopcode.h - AML opcode information for the AML parser and interpreter
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.9 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -308,7 +308,7 @@
|
||||
#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
|
||||
#define ARGI_DEBUG_OP ARG_NONE
|
||||
#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
|
||||
#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_TARGETREF)
|
||||
#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REF_OR_STRING)
|
||||
#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
|
||||
@@ -321,7 +321,7 @@
|
||||
#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
|
||||
#define ARGI_IF_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
|
||||
#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_TARGETREF)
|
||||
#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acoutput.h -- debug output
|
||||
* $Revision: 1.100 $
|
||||
* $Revision: 1.102 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
|
||||
* $Revision: 1.81 $
|
||||
* $Revision: 1.84 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -211,6 +211,10 @@ char *
|
||||
AcpiPsGetOpcodeName (
|
||||
UINT16 Opcode);
|
||||
|
||||
UINT8
|
||||
AcpiPsGetArgumentCount (
|
||||
UINT32 OpType);
|
||||
|
||||
|
||||
/*
|
||||
* psparse - top level parsing routines
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acpi.h - Master include file, Publics and external data.
|
||||
* $Revision: 1.60 $
|
||||
* $Revision: 1.62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -163,6 +163,10 @@ ACPI_STATUS
|
||||
AcpiGetSystemInfo (
|
||||
ACPI_BUFFER *RetBuffer);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetStatistics (
|
||||
ACPI_STATISTICS *Stats);
|
||||
|
||||
const char *
|
||||
AcpiFormatException (
|
||||
ACPI_STATUS Exception);
|
||||
@@ -224,6 +228,15 @@ AcpiGetTableByIndex (
|
||||
ACPI_NATIVE_UINT TableIndex,
|
||||
ACPI_TABLE_HEADER **OutTable);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInstallTableHandler (
|
||||
ACPI_TABLE_HANDLER Handler,
|
||||
void *Context);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiRemoveTableHandler (
|
||||
ACPI_TABLE_HANDLER Handler);
|
||||
|
||||
|
||||
/*
|
||||
* Namespace and name interfaces
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acresrc.h - Resource Manager function prototypes
|
||||
* $Revision: 1.59 $
|
||||
* $Revision: 1.62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -170,6 +170,7 @@ typedef const struct acpi_rsconvert_info
|
||||
#define ACPI_RSC_BITMASK16 18
|
||||
#define ACPI_RSC_EXIT_NE 19
|
||||
#define ACPI_RSC_EXIT_LE 20
|
||||
#define ACPI_RSC_EXIT_EQ 21
|
||||
|
||||
/* Resource Conversion sub-opcodes */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acstruct.h - Internal structs
|
||||
* $Revision: 1.45 $
|
||||
* $Revision: 1.50 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -156,12 +156,15 @@ typedef struct acpi_walk_state
|
||||
UINT16 Opcode; /* Current AML opcode */
|
||||
UINT8 NextOpInfo; /* Info about NextOp */
|
||||
UINT8 NumOperands; /* Stack pointer for Operands[] array */
|
||||
UINT8 OperandIndex; /* Index into operand stack, to be used by AcpiDsObjStackPush */
|
||||
ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
|
||||
BOOLEAN LastPredicate; /* Result of last predicate */
|
||||
UINT8 CurrentResult;
|
||||
UINT8 ReturnUsed;
|
||||
UINT8 ScopeDepth;
|
||||
UINT8 PassNumber; /* Parse pass during table load */
|
||||
UINT8 ResultSize; /* Total elements for the result stack */
|
||||
UINT8 ResultCount; /* Current number of occupied elements of result stack */
|
||||
UINT32 AmlOffset;
|
||||
UINT32 ArgTypes;
|
||||
UINT32 MethodBreakpoint; /* For single stepping */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actables.h - ACPI table management
|
||||
* $Revision: 1.63 $
|
||||
* $Revision: 1.65 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl.h - Basic ACPI Table Definitions
|
||||
* $Revision: 1.83 $
|
||||
* $Revision: 1.85 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl1.h - Additional ACPI table definitions
|
||||
* $Revision: 1.46 $
|
||||
* $Revision: 1.51 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -133,20 +133,28 @@
|
||||
* it more difficult to inadvertently type in the wrong signature.
|
||||
*/
|
||||
#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
|
||||
#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
|
||||
#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
|
||||
#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
|
||||
#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
|
||||
#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
|
||||
#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
|
||||
#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
|
||||
#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
|
||||
#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
|
||||
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
|
||||
#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
|
||||
#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
|
||||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||
#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
|
||||
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
|
||||
#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
|
||||
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
|
||||
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
|
||||
#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
|
||||
#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
|
||||
#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
|
||||
#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
|
||||
#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
|
||||
|
||||
|
||||
@@ -163,7 +171,7 @@
|
||||
*/
|
||||
|
||||
|
||||
/* Common Sub-table header (used in MADT, SRAT, etc.) */
|
||||
/* Common Subtable header (used in MADT, SRAT, etc.) */
|
||||
|
||||
typedef struct acpi_subtable_header
|
||||
{
|
||||
@@ -173,6 +181,21 @@ typedef struct acpi_subtable_header
|
||||
} ACPI_SUBTABLE_HEADER;
|
||||
|
||||
|
||||
/* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
|
||||
|
||||
typedef struct acpi_whea_header
|
||||
{
|
||||
UINT8 Action;
|
||||
UINT8 Instruction;
|
||||
UINT8 Flags;
|
||||
UINT8 Reserved;
|
||||
ACPI_GENERIC_ADDRESS RegisterRegion;
|
||||
UINT64 Value; /* Value used with Read/Write register */
|
||||
UINT64 Mask; /* Bitmask required for this register instruction */
|
||||
|
||||
} ACPI_WHEA_HEADER;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* ASF - Alert Standard Format table (Signature "ASF!")
|
||||
@@ -304,6 +327,41 @@ typedef struct acpi_asf_address
|
||||
} ACPI_ASF_ADDRESS;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* BERT - Boot Error Record Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_bert
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT32 RegionLength; /* Length of the boot error region */
|
||||
UINT64 Address; /* Physical addresss of the error region */
|
||||
|
||||
} ACPI_TABLE_BERT;
|
||||
|
||||
|
||||
/* Boot Error Region */
|
||||
|
||||
typedef struct acpi_bert_region
|
||||
{
|
||||
UINT32 BlockStatus;
|
||||
UINT32 RawDataOffset;
|
||||
UINT32 RawDataLength;
|
||||
UINT32 DataLength;
|
||||
UINT32 ErrorSeverity;
|
||||
|
||||
} ACPI_BERT_REGION;
|
||||
|
||||
/* BlockStatus Flags */
|
||||
|
||||
#define ACPI_BERT_UNCORRECTABLE (1)
|
||||
#define ACPI_BERT_CORRECTABLE (2)
|
||||
#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4)
|
||||
#define ACPI_BERT_MULTIPLE_CORRECTABLE (8)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* BOOT - Simple Boot Flag Table
|
||||
@@ -466,6 +524,419 @@ typedef struct acpi_table_ecdt
|
||||
} ACPI_TABLE_ECDT;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* EINJ - Error Injection Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_einj
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT32 HeaderLength;
|
||||
UINT32 Reserved;
|
||||
UINT32 Entries;
|
||||
|
||||
} ACPI_TABLE_EINJ;
|
||||
|
||||
/* EINJ Injection Instruction Entries (actions) */
|
||||
|
||||
typedef struct acpi_einj_entry
|
||||
{
|
||||
ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
|
||||
|
||||
} ACPI_EINJ_ENTRY;
|
||||
|
||||
/* Values for Action field above */
|
||||
|
||||
enum AcpiEinjActions
|
||||
{
|
||||
ACPI_EINJ_BEGIN_OPERATION = 0,
|
||||
ACPI_EINJ_GET_TRIGGER_TABLE = 1,
|
||||
ACPI_EINJ_SET_ERROR_TYPE = 2,
|
||||
ACPI_EINJ_GET_ERROR_TYPE = 3,
|
||||
ACPI_EINJ_END_OPERATION = 4,
|
||||
ACPI_EINJ_EXECUTE_OPERATION = 5,
|
||||
ACPI_EINJ_CHECK_BUSY_STATUS = 6,
|
||||
ACPI_EINJ_GET_COMMAND_STATUS = 7,
|
||||
ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */
|
||||
ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
|
||||
};
|
||||
|
||||
/* Values for Instruction field above */
|
||||
|
||||
enum AcpiEinjInstructions
|
||||
{
|
||||
ACPI_EINJ_READ_REGISTER = 0,
|
||||
ACPI_EINJ_READ_REGISTER_VALUE = 1,
|
||||
ACPI_EINJ_WRITE_REGISTER = 2,
|
||||
ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
|
||||
ACPI_EINJ_NOOP = 4,
|
||||
ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */
|
||||
};
|
||||
|
||||
/* EINJ Trigger Error Action Table */
|
||||
|
||||
typedef struct acpi_einj_trigger
|
||||
{
|
||||
UINT32 HeaderSize;
|
||||
UINT32 Revision;
|
||||
UINT32 TableSize;
|
||||
UINT32 EntryCount;
|
||||
|
||||
} ACPI_EINJ_TRIGGER;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* ERST - Error Record Serialization Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_erst
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT32 HeaderLength;
|
||||
UINT32 Reserved;
|
||||
UINT32 Entries;
|
||||
|
||||
} ACPI_TABLE_ERST;
|
||||
|
||||
/* ERST Serialization Entries (actions) */
|
||||
|
||||
typedef struct acpi_erst_entry
|
||||
{
|
||||
ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
|
||||
|
||||
} ACPI_ERST_ENTRY;
|
||||
|
||||
/* Values for Action field above */
|
||||
|
||||
enum AcpiErstActions
|
||||
{
|
||||
ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
|
||||
ACPI_ERST_BEGIN_READ_OPERATION = 1,
|
||||
ACPI_ERST_BETGIN_CLEAR_OPERATION= 2,
|
||||
ACPI_ERST_END_OPERATION = 3,
|
||||
ACPI_ERST_SET_RECORD_OFFSET = 4,
|
||||
ACPI_ERST_EXECUTE_OPERATION = 5,
|
||||
ACPI_ERST_CHECK_BUSY_STATUS = 6,
|
||||
ACPI_ERST_GET_COMMAND_STATUS = 7,
|
||||
ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
|
||||
ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
|
||||
ACPI_ERST_GET_RECORD_COUNT = 10,
|
||||
ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
|
||||
ACPI_ERST_NOT_USED = 12,
|
||||
ACPI_ERST_GET_ERROR_RANGE = 13,
|
||||
ACPI_ERST_GET_ERROR_LENGTH = 14,
|
||||
ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
|
||||
ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
|
||||
};
|
||||
|
||||
/* Values for Instruction field above */
|
||||
|
||||
enum AcpiErstInstructions
|
||||
{
|
||||
ACPI_ERST_READ_REGISTER = 0,
|
||||
ACPI_ERST_READ_REGISTER_VALUE = 1,
|
||||
ACPI_ERST_WRITE_REGISTER = 2,
|
||||
ACPI_ERST_WRITE_REGISTER_VALUE = 3,
|
||||
ACPI_ERST_NOOP = 4,
|
||||
ACPI_ERST_LOAD_VAR1 = 5,
|
||||
ACPI_ERST_LOAD_VAR2 = 6,
|
||||
ACPI_ERST_STORE_VAR1 = 7,
|
||||
ACPI_ERST_ADD = 8,
|
||||
ACPI_ERST_SUBTRACT = 9,
|
||||
ACPI_ERST_ADD_VALUE = 10,
|
||||
ACPI_ERST_SUBTRACT_VALUE = 11,
|
||||
ACPI_ERST_STALL = 12,
|
||||
ACPI_ERST_STALL_WHILE_TRUE = 13,
|
||||
ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
|
||||
ACPI_ERST_GOTO = 15,
|
||||
ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
|
||||
ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
|
||||
ACPI_ERST_MOVE_DATA = 18,
|
||||
ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* HEST - Hardware Error Source Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_hest
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT32 ErrorSourceCount;
|
||||
|
||||
} ACPI_TABLE_HEST;
|
||||
|
||||
|
||||
/* HEST subtable header */
|
||||
|
||||
typedef struct acpi_hest_header
|
||||
{
|
||||
UINT16 Type;
|
||||
|
||||
} ACPI_HEST_HEADER;
|
||||
|
||||
|
||||
/* Values for Type field above for subtables */
|
||||
|
||||
enum AcpiHestTypes
|
||||
{
|
||||
ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0,
|
||||
ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1,
|
||||
ACPI_HEST_TYPE_XPF_UNUSED = 2,
|
||||
ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3,
|
||||
ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4,
|
||||
ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5,
|
||||
ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
|
||||
ACPI_HEST_TYPE_AER_ENDPOINT = 7,
|
||||
ACPI_HEST_TYPE_AER_BRIDGE = 8,
|
||||
ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
|
||||
ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* HEST Sub-subtables
|
||||
*/
|
||||
|
||||
/* XPF Machine Check Error Bank */
|
||||
|
||||
typedef struct acpi_hest_xpf_error_bank
|
||||
{
|
||||
UINT8 BankNumber;
|
||||
UINT8 ClearStatusOnInit;
|
||||
UINT8 StatusFormat;
|
||||
UINT8 ConfigWriteEnable;
|
||||
UINT32 ControlRegister;
|
||||
UINT64 ControlInitData;
|
||||
UINT32 StatusRegister;
|
||||
UINT32 AddressRegister;
|
||||
UINT32 MiscRegister;
|
||||
|
||||
} ACPI_HEST_XPF_ERROR_BANK;
|
||||
|
||||
|
||||
/* Generic Error Status */
|
||||
|
||||
typedef struct acpi_hest_generic_status
|
||||
{
|
||||
UINT32 BlockStatus;
|
||||
UINT32 RawDataOffset;
|
||||
UINT32 RawDataLength;
|
||||
UINT32 DataLength;
|
||||
UINT32 ErrorSeverity;
|
||||
|
||||
} ACPI_HEST_GENERIC_STATUS;
|
||||
|
||||
|
||||
/* Generic Error Data */
|
||||
|
||||
typedef struct acpi_hest_generic_data
|
||||
{
|
||||
UINT8 SectionType[16];
|
||||
UINT32 ErrorSeverity;
|
||||
UINT16 Revision;
|
||||
UINT8 ValidationBits;
|
||||
UINT8 Flags;
|
||||
UINT32 ErrorDataLength;
|
||||
UINT8 FruId[16];
|
||||
UINT8 FruText[20];
|
||||
|
||||
} ACPI_HEST_GENERIC_DATA;
|
||||
|
||||
|
||||
/* Common HEST structure for PCI/AER types below (6,7,8) */
|
||||
|
||||
typedef struct acpi_hest_aer_common
|
||||
{
|
||||
UINT16 SourceId;
|
||||
UINT16 ConfigWriteEnable;
|
||||
UINT8 Flags;
|
||||
UINT8 Enabled;
|
||||
UINT32 RecordsToPreAllocate;
|
||||
UINT32 MaxSectionsPerRecord;
|
||||
UINT32 Bus;
|
||||
UINT16 Device;
|
||||
UINT16 Function;
|
||||
UINT16 DeviceControl;
|
||||
UINT16 Reserved;
|
||||
UINT32 UncorrectableErrorMask;
|
||||
UINT32 UncorrectableErrorSeverity;
|
||||
UINT32 CorrectableErrorMask;
|
||||
UINT32 AdvancedErrorCababilities;
|
||||
|
||||
} ACPI_HEST_AER_COMMON;
|
||||
|
||||
|
||||
/* Hardware Error Notification */
|
||||
|
||||
typedef struct acpi_hest_notify
|
||||
{
|
||||
UINT8 Type;
|
||||
UINT8 Length;
|
||||
UINT16 ConfigWriteEnable;
|
||||
UINT32 PollInterval;
|
||||
UINT32 Vector;
|
||||
UINT32 PollingThresholdValue;
|
||||
UINT32 PollingThresholdWindow;
|
||||
UINT32 ErrorThresholdValue;
|
||||
UINT32 ErrorThresholdWindow;
|
||||
|
||||
} ACPI_HEST_NOTIFY;
|
||||
|
||||
/* Values for Notify Type field above */
|
||||
|
||||
enum AcpiHestNotifyTypes
|
||||
{
|
||||
ACPI_HEST_NOTIFY_POLLED = 0,
|
||||
ACPI_HEST_NOTIFY_EXTERNAL = 1,
|
||||
ACPI_HEST_NOTIFY_LOCAL = 2,
|
||||
ACPI_HEST_NOTIFY_SCI = 3,
|
||||
ACPI_HEST_NOTIFY_NMI = 4,
|
||||
ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* HEST subtables
|
||||
*
|
||||
* From WHEA Design Document, 16 May 2007.
|
||||
* Note: There is no subtable type 2 in this version of the document,
|
||||
* and there are two different subtable type 3s.
|
||||
*/
|
||||
|
||||
/* 0: XPF Machine Check Exception */
|
||||
|
||||
typedef struct acpi_hest_xpf_machine_check
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
UINT16 SourceId;
|
||||
UINT16 ConfigWriteEnable;
|
||||
UINT8 Flags;
|
||||
UINT8 Reserved1;
|
||||
UINT32 RecordsToPreAllocate;
|
||||
UINT32 MaxSectionsPerRecord;
|
||||
UINT64 GlobalCapabilityData;
|
||||
UINT64 GlobalControlData;
|
||||
UINT8 NumHardwareBanks;
|
||||
UINT8 Reserved2[7];
|
||||
|
||||
} ACPI_HEST_XPF_MACHINE_CHECK;
|
||||
|
||||
|
||||
/* 1: XPF Corrected Machine Check */
|
||||
|
||||
typedef struct acpi_table_hest_xpf_corrected
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
UINT16 SourceId;
|
||||
UINT16 ConfigWriteEnable;
|
||||
UINT8 Flags;
|
||||
UINT8 Enabled;
|
||||
UINT32 RecordsToPreAllocate;
|
||||
UINT32 MaxSectionsPerRecord;
|
||||
ACPI_HEST_NOTIFY Notify;
|
||||
UINT8 NumHardwareBanks;
|
||||
UINT8 Reserved[3];
|
||||
|
||||
} ACPI_HEST_XPF_CORRECTED;
|
||||
|
||||
|
||||
/* 3: XPF Non-Maskable Interrupt */
|
||||
|
||||
typedef struct acpi_hest_xpf_nmi
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
UINT16 SourceId;
|
||||
UINT32 Reserved;
|
||||
UINT32 RecordsToPreAllocate;
|
||||
UINT32 MaxSectionsPerRecord;
|
||||
UINT32 MaxRawDataLength;
|
||||
|
||||
} ACPI_HEST_XPF_NMI;
|
||||
|
||||
|
||||
/* 4: IPF Corrected Machine Check */
|
||||
|
||||
typedef struct acpi_hest_ipf_corrected
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
UINT8 Enabled;
|
||||
UINT8 Reserved;
|
||||
|
||||
} ACPI_HEST_IPF_CORRECTED;
|
||||
|
||||
|
||||
/* 5: IPF Corrected Platform Error */
|
||||
|
||||
typedef struct acpi_hest_ipf_corrected_platform
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
UINT8 Enabled;
|
||||
UINT8 Reserved;
|
||||
|
||||
} ACPI_HEST_IPF_CORRECTED_PLATFORM;
|
||||
|
||||
|
||||
/* 6: PCI Express Root Port AER */
|
||||
|
||||
typedef struct acpi_hest_aer_root
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
ACPI_HEST_AER_COMMON Aer;
|
||||
UINT32 RootErrorCommand;
|
||||
|
||||
} ACPI_HEST_AER_ROOT;
|
||||
|
||||
|
||||
/* 7: PCI Express AER (AER Endpoint) */
|
||||
|
||||
typedef struct acpi_hest_aer
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
ACPI_HEST_AER_COMMON Aer;
|
||||
|
||||
} ACPI_HEST_AER;
|
||||
|
||||
|
||||
/* 8: PCI Express/PCI-X Bridge AER */
|
||||
|
||||
typedef struct acpi_hest_aer_bridge
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
ACPI_HEST_AER_COMMON Aer;
|
||||
UINT32 SecondaryUncorrectableErrorMask;
|
||||
UINT32 SecondaryUncorrectableErrorSeverity;
|
||||
UINT32 SecondaryAdvancedCapabilities;
|
||||
|
||||
} ACPI_HEST_AER_BRIDGE;
|
||||
|
||||
|
||||
/* 9: Generic Hardware Error Source */
|
||||
|
||||
typedef struct acpi_hest_generic
|
||||
{
|
||||
ACPI_HEST_HEADER Header;
|
||||
UINT16 SourceId;
|
||||
UINT16 RelatedSourceId;
|
||||
UINT8 ConfigWriteEnable;
|
||||
UINT8 Enabled;
|
||||
UINT32 RecordsToPreAllocate;
|
||||
UINT32 MaxSectionsPerRecord;
|
||||
UINT32 MaxRawDataLength;
|
||||
ACPI_GENERIC_ADDRESS ErrorStatusAddress;
|
||||
ACPI_HEST_NOTIFY Notify;
|
||||
UINT32 ErrorStatusBlockLength;
|
||||
|
||||
} ACPI_HEST_GENERIC;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* HPET - High Precision Event Timer table
|
||||
@@ -492,6 +963,113 @@ typedef struct acpi_table_hpet
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* IBFT - Boot Firmware Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_ibft
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT8 Reserved[12];
|
||||
|
||||
} ACPI_TABLE_IBFT;
|
||||
|
||||
|
||||
/* IBFT common subtable header */
|
||||
|
||||
typedef struct acpi_ibft_header
|
||||
{
|
||||
UINT8 Type;
|
||||
UINT8 Version;
|
||||
UINT16 Length;
|
||||
UINT8 Index;
|
||||
UINT8 Flags;
|
||||
|
||||
} ACPI_IBFT_HEADER;
|
||||
|
||||
|
||||
/* Values for Type field above */
|
||||
|
||||
enum AcpiIbftType
|
||||
{
|
||||
ACPI_IBFT_TYPE_NOT_USED = 0,
|
||||
ACPI_IBFT_TYPE_CONTROL = 1,
|
||||
ACPI_IBFT_TYPE_INITIATOR = 2,
|
||||
ACPI_IBFT_TYPE_NIC = 3,
|
||||
ACPI_IBFT_TYPE_TARGET = 4,
|
||||
ACPI_IBFT_TYPE_EXTENSIONS = 5,
|
||||
ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
|
||||
};
|
||||
|
||||
|
||||
/* IBFT subtables */
|
||||
|
||||
typedef struct acpi_ibft_control
|
||||
{
|
||||
ACPI_IBFT_HEADER Header;
|
||||
UINT16 Extensions;
|
||||
UINT16 InitiatorOffset;
|
||||
UINT16 Nic0Offset;
|
||||
UINT16 Target0Offset;
|
||||
UINT16 Nic1Offset;
|
||||
UINT16 Target1Offset;
|
||||
|
||||
} ACPI_IBFT_CONTROL;
|
||||
|
||||
typedef struct acpi_ibft_initiator
|
||||
{
|
||||
ACPI_IBFT_HEADER Header;
|
||||
UINT8 SnsServer[16];
|
||||
UINT8 SlpServer[16];
|
||||
UINT8 PrimaryServer[16];
|
||||
UINT8 SecondaryServer[16];
|
||||
UINT16 NameLength;
|
||||
UINT16 NameOffset;
|
||||
|
||||
} ACPI_IBFT_INITIATOR;
|
||||
|
||||
typedef struct acpi_ibft_nic
|
||||
{
|
||||
ACPI_IBFT_HEADER Header;
|
||||
UINT8 IpAddress[16];
|
||||
UINT8 SubnetMaskPrefix;
|
||||
UINT8 Origin;
|
||||
UINT8 Gateway[16];
|
||||
UINT8 PrimaryDns[16];
|
||||
UINT8 SecondaryDns[16];
|
||||
UINT8 Dhcp[16];
|
||||
UINT16 Vlan;
|
||||
UINT8 MacAddress[6];
|
||||
UINT16 PciAddress;
|
||||
UINT16 NameLength;
|
||||
UINT16 NameOffset;
|
||||
|
||||
} ACPI_IBFT_NIC;
|
||||
|
||||
typedef struct acpi_ibft_target
|
||||
{
|
||||
ACPI_IBFT_HEADER Header;
|
||||
UINT8 TargetIpAddress[16];
|
||||
UINT16 TargetIpSocket;
|
||||
UINT8 TargetBootLun[8];
|
||||
UINT8 ChapType;
|
||||
UINT8 NicAssociation;
|
||||
UINT16 TargetNameLength;
|
||||
UINT16 TargetNameOffset;
|
||||
UINT16 ChapNameLength;
|
||||
UINT16 ChapNameOffset;
|
||||
UINT16 ChapSecretLength;
|
||||
UINT16 ChapSecretOffset;
|
||||
UINT16 ReverseChapNameLength;
|
||||
UINT16 ReverseChapNameOffset;
|
||||
UINT16 ReverseChapSecretLength;
|
||||
UINT16 ReverseChapSecretOffset;
|
||||
|
||||
} ACPI_IBFT_TARGET;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MADT - Multiple APIC Description Table
|
||||
@@ -882,6 +1460,88 @@ typedef struct acpi_table_tcpa
|
||||
} ACPI_TABLE_TCPA;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* UEFI - UEFI Boot optimization Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_uefi
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT8 Identifier[16]; /* UUID identifier */
|
||||
UINT16 DataOffset; /* Offset of remaining data in table */
|
||||
UINT8 Data;
|
||||
|
||||
} ACPI_TABLE_UEFI;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* WDAT - Watchdog Action Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_wdat
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT32 HeaderLength; /* Watchdog Header Length */
|
||||
UINT16 PciSegment; /* PCI Segment number */
|
||||
UINT8 PciBus; /* PCI Bus number */
|
||||
UINT8 PciDevice; /* PCI Device number */
|
||||
UINT8 PciFunction; /* PCI Function number */
|
||||
UINT8 Reserved[3];
|
||||
UINT32 TimerPeriod; /* Period of one timer count (msec) */
|
||||
UINT32 MaxCount; /* Maximum counter value supported */
|
||||
UINT32 MinCount; /* Minimum counter value */
|
||||
UINT8 Flags;
|
||||
UINT8 Reserved2[3];
|
||||
UINT32 Entries; /* Number of watchdog entries that follow */
|
||||
|
||||
} ACPI_TABLE_WDAT;
|
||||
|
||||
/* WDAT Instruction Entries (actions) */
|
||||
|
||||
typedef struct acpi_wdat_entry
|
||||
{
|
||||
ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
|
||||
|
||||
} ACPI_WDAT_ENTRY;
|
||||
|
||||
/* Values for Action field above */
|
||||
|
||||
enum AcpiWdatActions
|
||||
{
|
||||
ACPI_WDAT_RESET = 1,
|
||||
ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
|
||||
ACPI_WDAT_GET_COUNTDOWN = 5,
|
||||
ACPI_WDAT_SET_COUNTDOWN = 6,
|
||||
ACPI_WDAT_GET_RUNNING_STATE = 8,
|
||||
ACPI_WDAT_SET_RUNNING_STATE = 9,
|
||||
ACPI_WDAT_GET_STOPPED_STATE = 10,
|
||||
ACPI_WDAT_SET_STOPPED_STATE = 11,
|
||||
ACPI_WDAT_GET_REBOOT = 16,
|
||||
ACPI_WDAT_SET_REBOOT = 17,
|
||||
ACPI_WDAT_GET_SHUTDOWN = 18,
|
||||
ACPI_WDAT_SET_SHUTDOWN = 19,
|
||||
ACPI_WDAT_GET_STATUS = 32,
|
||||
ACPI_WDAT_SET_STATUS = 33,
|
||||
ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
|
||||
};
|
||||
|
||||
/* Values for Instruction field above */
|
||||
|
||||
enum AcpiWdatInstructions
|
||||
{
|
||||
ACPI_WDAT_READ_VALUE = 0,
|
||||
ACPI_WDAT_READ_COUNTDOWN = 1,
|
||||
ACPI_WDAT_WRITE_VALUE = 2,
|
||||
ACPI_WDAT_WRITE_COUNTDOWN = 3,
|
||||
ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
|
||||
ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* WDRT - Watchdog Resource Table
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
|
||||
* $Revision: 1.50 $
|
||||
* $Revision: 1.52 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user