Import ACPICA 20111123.

This commit is contained in:
jkim 2011-11-23 18:05:37 +00:00
parent c5bb53cc04
commit 371a323d3d
131 changed files with 11027 additions and 1546 deletions

View File

@ -1,7 +1,214 @@
----------------------------------------
22 September 2011. Summary of changes for version 20110922:
23 November 2011. Summary of changes for version 20111123:
This release is available at www.acpica.org/downloads
The ACPI 5.0 specification is available at www.acpi.info
0) ACPI 5.0 Support:
This release contains full support for the ACPI 5.0 specification, as
summarized below.
Reduced Hardware Support:
-------------------------
This support allows for ACPI systems without the usual ACPI hardware. This
support is enabled by a flag in the revision 5 FADT. If it is set, ACPICA will
not attempt to initialize or use any of the usual ACPI hardware. Note, when
this flag is set, all of the following ACPI hardware is assumed to be not
present and is not initialized or accessed:
General Purpose Events (GPEs)
Fixed Events (PM1a/PM1b and PM Control)
Power Management Timer and Console Buttons (power/sleep)
Real-time Clock Alarm
Global Lock
System Control Interrupt (SCI)
The FACS is assumed to be non-existent
ACPI Tables:
------------
All new tables and updates to existing tables are fully supported in the
ACPICA headers (for use by device drivers), the disassembler, and the iASL
Data Table Compiler. ACPI 5.0 defines these new tables:
BGRT /* Boot Graphics Resource Table */
DRTM /* Dynamic Root of Trust for Measurement table */
FPDT /* Firmware Performance Data Table */
GTDT /* Generic Timer Description Table */
MPST /* Memory Power State Table */
PCCT /* Platform Communications Channel Table */
PMTT /* Platform Memory Topology Table */
RASF /* RAS Feature table */
Operation Regions/SpaceIDs:
---------------------------
All new operation regions are fully supported by the iASL compiler, the
disassembler, and the ACPICA runtime code (for dispatch to region handlers.)
The new operation region Space IDs are:
GeneralPurposeIo
GenericSerialBus
Resource Descriptors:
---------------------
All new ASL resource descriptors are fully supported by the iASL compiler, the
ASL/AML disassembler, and the ACPICA runtime Resource Manager code (including
all new predefined resource tags). New descriptors are:
FixedDma
GpioIo
GpioInt
I2cSerialBus
SpiSerialBus
UartSerialBus
ASL/AML Operators, New and Modified:
------------------------------------
One new operator is added, the Connection operator, which is used to associate
a GeneralPurposeIo or GenericSerialBus resource descriptor with individual
field objects within an operation region. Several new protocols are associated
with the AccessAs operator. All are fully supported by the iASL compiler,
disassembler, and runtime ACPICA AML interpreter:
Connection // Declare Field Connection attributes
AccessAs: AttribBytes (n) // Read/Write N-Bytes Protocol
AccessAs: AttribRawBytes (n) // Raw Read/Write N-Bytes Protocol
AccessAs: AttribRawProcessBytes (n) // Raw Process Call Protocol
RawDataBuffer // Data type for Vendor Data fields
Predefined ASL/AML Objects:
---------------------------
All new predefined objects/control-methods are supported by the iASL compiler
and the ACPICA runtime validation/repair (arguments and return values.) New
predefined names include the following:
Standard Predefined Names (Objects or Control Methods):
_AEI, _CLS, _CPC, _CWS, _DEP,
_DLM, _EVT, _GCP, _CRT, _GWS,
_HRV, _PRE, _PSE, _SRT, _SUB.
Resource Tags (Names used to access individual fields within resource
descriptors):
_DBT, _DPL, _DRS, _END, _FLC,
_IOR, _LIN, _MOD, _PAR, _PHA,
_PIN, _PPI, _POL, _RXL, _SLV,
_SPE, _STB, _TXL, _VEN.
ACPICA External Interfaces:
---------------------------
Several new interfaces have been defined for use by ACPI-related device
drivers and other host OS services:
AcpiAcquireMutex and AcpiReleaseMutex: These interfaces allow the host OS to
acquire and release AML mutexes that are defined in the DSDT/SSDT tables
provided by the BIOS. They are intended to be used in conjunction with the
ACPI 5.0 _DLM (Device Lock Method) in order to provide transaction-level
mutual exclusion with the AML code/interpreter.
AcpiGetEventResources: Returns the (formatted) resource descriptors as defined
by the ACPI 5.0 _AEI object (ACPI Event Information). This object provides
resource descriptors associated with hardware-reduced platform events, similar
to the AcpiGetCurrentResources interface.
Operation Region Handlers: For General Purpose IO and Generic Serial Bus
operation regions, information about the Connection() object and any optional
length information is passed to the region handler within the Context
parameter.
AcpiBufferToResource: This interface converts a raw AML buffer containing a
resource template or resource descriptor to the ACPI_RESOURCE internal format
suitable for use by device drivers. Can be used by an operation region handler
to convert the Connection() buffer object into a ACPI_RESOURCE.
Miscellaneous/Tools/TestSuites:
-------------------------------
Support for extended _HID names (Four alpha characters instead of three).
Support for ACPI 5.0 features in the AcpiExec and AcpiHelp utilities.
Support for ACPI 5.0 features in the ASLTS test suite.
Fully updated documentation (ACPICA and iASL reference documents.)
ACPI Table Definition Language:
-------------------------------
Support for this language was implemented and released as a subsystem of the
iASL compiler in 2010. (See the iASL compiler User Guide.)
Non-ACPI 5.0 changes for this release:
--------------------------------------
1) ACPICA Core Subsystem:
Fix a problem with operation region declarations where a failure can occur if
the region name and an argument that evaluates to an object (such as the
region address) are in different namespace scopes. Lin Ming, ACPICA BZ 937.
Do not abort an ACPI table load if an invalid space ID is found within. This
will be caught later if the offending method is executed. ACPICA BZ 925.
Fixed an issue with the FFixedHW space ID where the ID was not always
recognized properly (Both ACPICA and iASL). ACPICA BZ 926.
Fixed a problem with the 32-bit generation of the unix-specific OSL
(osunixxf.c). Lin Ming, ACPICA BZ 936.
Several changes made to enable generation with the GCC 4.6 compiler. ACPICA BZ
935.
New error messages: Unsupported I/O requests (not 8/16/32 bit), and Index/Bank
field registers out-of-range.
2) iASL Compiler/Disassembler and Tools:
iASL: Implemented the __PATH__ operator, which returns the full pathname of
the current source file.
AcpiHelp: Automatically display expanded keyword information for all ASL
operators.
Debugger: Add "Template" command to disassemble/dump resource template
buffers.
Added a new master script to generate and execute the ASLTS test suite.
Automatically handles 32- and 64-bit generation. See tests/aslts.sh
iASL: Fix problem with listing generation during processing of the Switch()
operator where AML listing was disabled until the entire Switch block was
completed.
iASL: Improve support for semicolon statement terminators. Fix "invalid
character" message for some cases when the semicolon is used. Semicolons are
now allowed after every <Term> grammar element. ACPICA BZ 927.
iASL: Fixed some possible aliasing warnings during generation. ACPICA BZ 923.
Disassembler: Fix problem with disassembly of the DataTableRegion operator
where an inadvertent "Unhandled deferred opcode" message could be generated.
3) Example Code and Data Size
These are the sizes for the OS-independent acpica.lib produced by the
Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code
includes the debug output trace mechanism and has a much larger code and data
size.
Previous Release:
Non-Debug Version: 90.2K Code, 23.9K Data, 114.1K Total
Debug Version: 165.6K Code, 68.4K Data, 234.0K Total
Current Release:
Non-Debug Version: 92.3K Code, 24.9K Data, 117.2K Total
Debug Version: 170.8K Code, 72.6K Data, 243.4K Total
----------------------------------------
22 September 2011. Summary of changes for version 20110922:
0) ACPI 5.0 News:

View File

@ -868,6 +868,7 @@ AdParseDeferredOps (
break;
case AML_REGION_OP:
case AML_DATA_REGION_OP:
case AML_CREATE_QWORD_FIELD_OP:
case AML_CREATE_DWORD_FIELD_OP:
case AML_CREATE_WORD_FIELD_OP:

View File

@ -378,6 +378,10 @@ AcpiDmDumpDescending (
AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer);
break;
case AML_QWORD_OP:
AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
break;
case AML_INT_NAMEPATH_OP:
if (Op->Common.Value.String)
{

View File

@ -63,7 +63,7 @@ AcpiDmUpdateResourceName (
static char *
AcpiDmSearchTagList (
UINT32 BitIndex,
ACPI_RESOURCE_TAG *TagList);
const ACPI_RESOURCE_TAG *TagList);
static char *
AcpiDmGetResourceTag (
@ -108,7 +108,7 @@ AcpiDmAddResourcesToNamespace (
*
******************************************************************************/
static ACPI_RESOURCE_TAG AcpiDmIrqTags[] =
static const ACPI_RESOURCE_TAG AcpiDmIrqTags[] =
{
{( 1 * 8), ACPI_RESTAG_INTERRUPT},
{( 3 * 8) + 0, ACPI_RESTAG_INTERRUPTTYPE},
@ -117,7 +117,7 @@ static ACPI_RESOURCE_TAG AcpiDmIrqTags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmDmaTags[] =
static const ACPI_RESOURCE_TAG AcpiDmDmaTags[] =
{
{( 1 * 8), ACPI_RESTAG_DMA},
{( 2 * 8) + 0, ACPI_RESTAG_XFERTYPE},
@ -126,7 +126,7 @@ static ACPI_RESOURCE_TAG AcpiDmDmaTags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmIoTags[] =
static const ACPI_RESOURCE_TAG AcpiDmIoTags[] =
{
{( 1 * 8) + 0, ACPI_RESTAG_DECODE},
{( 2 * 8), ACPI_RESTAG_MINADDR},
@ -136,14 +136,22 @@ static ACPI_RESOURCE_TAG AcpiDmIoTags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmFixedIoTags[] =
static const ACPI_RESOURCE_TAG AcpiDmFixedIoTags[] =
{
{( 1 * 8), ACPI_RESTAG_BASEADDRESS},
{( 3 * 8), ACPI_RESTAG_LENGTH},
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmMemory24Tags[] =
static const ACPI_RESOURCE_TAG AcpiDmFixedDmaTags[] =
{
{( 1 * 8), ACPI_RESTAG_DMA},
{( 3 * 8), ACPI_RESTAG_DMATYPE},
{( 5 * 8), ACPI_RESTAG_XFERTYPE},
{0, NULL}
};
static const ACPI_RESOURCE_TAG AcpiDmMemory24Tags[] =
{
{( 3 * 8) + 0, ACPI_RESTAG_READWRITETYPE},
{( 4 * 8), ACPI_RESTAG_MINADDR},
@ -153,7 +161,7 @@ static ACPI_RESOURCE_TAG AcpiDmMemory24Tags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmRegisterTags[] =
static const ACPI_RESOURCE_TAG AcpiDmRegisterTags[] =
{
{( 3 * 8), ACPI_RESTAG_ADDRESSSPACE},
{( 4 * 8), ACPI_RESTAG_REGISTERBITWIDTH},
@ -163,7 +171,7 @@ static ACPI_RESOURCE_TAG AcpiDmRegisterTags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmMemory32Tags[] =
static const ACPI_RESOURCE_TAG AcpiDmMemory32Tags[] =
{
{( 3 * 8) + 0, ACPI_RESTAG_READWRITETYPE},
{( 4 * 8), ACPI_RESTAG_MINADDR},
@ -173,7 +181,7 @@ static ACPI_RESOURCE_TAG AcpiDmMemory32Tags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmFixedMemory32Tags[] =
static const ACPI_RESOURCE_TAG AcpiDmFixedMemory32Tags[] =
{
{( 3 * 8) + 0, ACPI_RESTAG_READWRITETYPE},
{( 4 * 8), ACPI_RESTAG_BASEADDRESS},
@ -181,7 +189,7 @@ static ACPI_RESOURCE_TAG AcpiDmFixedMemory32Tags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmInterruptTags[] =
static const ACPI_RESOURCE_TAG AcpiDmInterruptTags[] =
{
{( 3 * 8) + 1, ACPI_RESTAG_INTERRUPTTYPE},
{( 3 * 8) + 2, ACPI_RESTAG_INTERRUPTLEVEL},
@ -190,7 +198,7 @@ static ACPI_RESOURCE_TAG AcpiDmInterruptTags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmAddress16Tags[] =
static const ACPI_RESOURCE_TAG AcpiDmAddress16Tags[] =
{
{( 4 * 8) + 1, ACPI_RESTAG_DECODE},
{( 4 * 8) + 2, ACPI_RESTAG_MINTYPE},
@ -203,7 +211,7 @@ static ACPI_RESOURCE_TAG AcpiDmAddress16Tags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmAddress32Tags[] =
static const ACPI_RESOURCE_TAG AcpiDmAddress32Tags[] =
{
{( 4 * 8) + 1, ACPI_RESTAG_DECODE},
{( 4 * 8) + 2, ACPI_RESTAG_MINTYPE},
@ -216,7 +224,7 @@ static ACPI_RESOURCE_TAG AcpiDmAddress32Tags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmAddress64Tags[] =
static const ACPI_RESOURCE_TAG AcpiDmAddress64Tags[] =
{
{( 4 * 8) + 1, ACPI_RESTAG_DECODE},
{( 4 * 8) + 2, ACPI_RESTAG_MINTYPE},
@ -229,7 +237,7 @@ static ACPI_RESOURCE_TAG AcpiDmAddress64Tags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmExtendedAddressTags[] =
static const ACPI_RESOURCE_TAG AcpiDmExtendedAddressTags[] =
{
{( 4 * 8) + 1, ACPI_RESTAG_DECODE},
{( 4 * 8) + 2, ACPI_RESTAG_MINTYPE},
@ -243,9 +251,71 @@ static ACPI_RESOURCE_TAG AcpiDmExtendedAddressTags[] =
{0, NULL}
};
/* Special-case tables for the type-specific flags */
/* Subtype tables for GPIO descriptors */
static ACPI_RESOURCE_TAG AcpiDmMemoryFlagTags[] =
static const ACPI_RESOURCE_TAG AcpiDmGpioIntTags[] =
{
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
{( 7 * 8) + 1, ACPI_RESTAG_POLARITY},
{( 7 * 8) + 3, ACPI_RESTAG_INTERRUPTSHARE},
{( 9 * 8), ACPI_RESTAG_PINCONFIG},
{(10 * 8), ACPI_RESTAG_DRIVESTRENGTH},
{(12 * 8), ACPI_RESTAG_DEBOUNCETIME},
{0, NULL}
};
static const ACPI_RESOURCE_TAG AcpiDmGpioIoTags[] =
{
{( 7 * 8) + 0, ACPI_RESTAG_IORESTRICTION},
{( 7 * 8) + 3, ACPI_RESTAG_INTERRUPTSHARE},
{( 9 * 8), ACPI_RESTAG_PINCONFIG},
{(10 * 8), ACPI_RESTAG_DRIVESTRENGTH},
{(12 * 8), ACPI_RESTAG_DEBOUNCETIME},
{0, NULL}
};
/* Subtype tables for SerialBus descriptors */
static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] =
{
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
{(12 * 8), ACPI_RESTAG_SPEED},
{(16 * 8), ACPI_RESTAG_ADDRESS},
{0, NULL}
};
static const ACPI_RESOURCE_TAG AcpiDmSpiSerialBusTags[] =
{
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
{( 7 * 8) + 1, ACPI_RESTAG_DEVICEPOLARITY},
{(12 * 8), ACPI_RESTAG_SPEED},
{(16 * 8), ACPI_RESTAG_LENGTH},
{(17 * 8), ACPI_RESTAG_PHASE},
{(18 * 8), ACPI_RESTAG_POLARITY},
{(19 * 8), ACPI_RESTAG_ADDRESS},
{0, NULL}
};
static const ACPI_RESOURCE_TAG AcpiDmUartSerialBusTags[] =
{
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */
{( 7 * 8) + 0, ACPI_RESTAG_FLOWCONTROL},
{( 7 * 8) + 2, ACPI_RESTAG_STOPBITS},
{( 7 * 8) + 4, ACPI_RESTAG_LENGTH},
{( 7 * 8) + 7, ACPI_RESTAG_ENDIANNESS},
{(12 * 8), ACPI_RESTAG_SPEED},
{(16 * 8), ACPI_RESTAG_LENGTH_RX},
{(18 * 8), ACPI_RESTAG_LENGTH_TX},
{(20 * 8), ACPI_RESTAG_PARITY},
{(21 * 8), ACPI_RESTAG_LINE},
{0, NULL}
};
/* Subtype tables for Address descriptor type-specific flags */
static const ACPI_RESOURCE_TAG AcpiDmMemoryFlagTags[] =
{
{( 5 * 8) + 0, ACPI_RESTAG_READWRITETYPE},
{( 5 * 8) + 1, ACPI_RESTAG_MEMTYPE},
@ -254,7 +324,7 @@ static ACPI_RESOURCE_TAG AcpiDmMemoryFlagTags[] =
{0, NULL}
};
static ACPI_RESOURCE_TAG AcpiDmIoFlagTags[] =
static const ACPI_RESOURCE_TAG AcpiDmIoFlagTags[] =
{
{( 5 * 8) + 0, ACPI_RESTAG_RANGETYPE},
{( 5 * 8) + 4, ACPI_RESTAG_TYPE},
@ -263,9 +333,15 @@ static ACPI_RESOURCE_TAG AcpiDmIoFlagTags[] =
};
/* Dispatch table used to obtain the correct tag table for a descriptor */
static ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags [] =
/*
* Dispatch table used to obtain the correct tag table for a descriptor.
*
* A NULL in this table means one of three things:
* 1) The descriptor ID is reserved and invalid
* 2) The descriptor has no tags associated with it
* 3) The descriptor has subtypes and a separate table will be used.
*/
static const ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags[] =
{
/* Small descriptors */
@ -279,7 +355,7 @@ static ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags [] =
NULL, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
AcpiDmIoTags, /* 0x08, ACPI_RESOURCE_NAME_IO_PORT */
AcpiDmFixedIoTags, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO_PORT */
NULL, /* 0x0A, Reserved */
AcpiDmFixedDmaTags, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */
NULL, /* 0x0B, Reserved */
NULL, /* 0x0C, Reserved */
NULL, /* 0x0D, Reserved */
@ -299,9 +375,29 @@ static ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags [] =
AcpiDmAddress16Tags, /* 0x08, ACPI_RESOURCE_NAME_WORD_ADDRESS_SPACE */
AcpiDmInterruptTags, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_XRUPT */
AcpiDmAddress64Tags, /* 0x0A, ACPI_RESOURCE_NAME_QWORD_ADDRESS_SPACE */
AcpiDmExtendedAddressTags /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
AcpiDmExtendedAddressTags, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
NULL, /* 0x0C, ACPI_RESOURCE_NAME_GPIO - Use Subtype table below */
NULL, /* 0x0D, Reserved */
NULL /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use Subtype table below */
};
/* GPIO Subtypes */
static const ACPI_RESOURCE_TAG *AcpiGbl_GpioResourceTags[] =
{
AcpiDmGpioIntTags, /* 0x00 Interrupt Connection */
AcpiDmGpioIoTags /* 0x01 I/O Connection */
};
/* Serial Bus Subtypes */
static const ACPI_RESOURCE_TAG *AcpiGbl_SerialResourceTags[] =
{
NULL, /* 0x00 Reserved */
AcpiDmI2cSerialBusTags, /* 0x01 I2C SerialBus */
AcpiDmSpiSerialBusTags, /* 0x02 SPI SerialBus */
AcpiDmUartSerialBusTags /* 0x03 UART SerialBus */
};
/*
* Globals used to generate unique resource descriptor names. We use names that
@ -666,6 +762,9 @@ AcpiDmUpdateResourceName (
*
* DESCRIPTION: Convert a BitIndex into a symbolic resource tag.
*
* Note: ResourceIndex should be previously validated and guaranteed to ve
* valid.
*
******************************************************************************/
static char *
@ -674,23 +773,16 @@ AcpiDmGetResourceTag (
AML_RESOURCE *Resource,
UINT8 ResourceIndex)
{
ACPI_RESOURCE_TAG *TagList;
const ACPI_RESOURCE_TAG *TagList;
char *Tag = NULL;
/* Get the tag list for this resource descriptor type */
TagList = AcpiGbl_ResourceTags[ResourceIndex];
if (!TagList)
{
/* There are no tags for this resource type */
return (NULL);
}
/*
* Handle the type-specific flags field for the address descriptors.
* Kindof brute force, but just blindly search for an index match.
* Handle descriptors that have multiple subtypes
*/
switch (Resource->DescriptorType)
{
@ -699,6 +791,10 @@ AcpiDmGetResourceTag (
case ACPI_RESOURCE_NAME_ADDRESS64:
case ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64:
/*
* Subtype differentiation is the flags.
* Kindof brute force, but just blindly search for an index match
*/
if (Resource->Address.ResourceType == ACPI_ADDRESS_TYPE_MEMORY_RANGE)
{
Tag = AcpiDmSearchTagList (BitIndex, AcpiDmMemoryFlagTags);
@ -716,13 +812,42 @@ AcpiDmGetResourceTag (
}
break;
case ACPI_RESOURCE_NAME_GPIO:
/* GPIO connection has 2 subtypes: Interrupt and I/O */
if (Resource->Gpio.ConnectionType > AML_RESOURCE_MAX_GPIOTYPE)
{
return (NULL);
}
TagList = AcpiGbl_GpioResourceTags[Resource->Gpio.ConnectionType];
break;
case ACPI_RESOURCE_NAME_SERIAL_BUS:
/* SerialBus has 3 subtypes: I2C, SPI, and UART */
if ((Resource->CommonSerialBus.Type == 0) ||
(Resource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE))
{
return (NULL);
}
TagList = AcpiGbl_SerialResourceTags[Resource->CommonSerialBus.Type];
break;
default:
break;
}
/* Search the tag list for this descriptor type */
/* Search for a match against the BitIndex */
if (TagList)
{
Tag = AcpiDmSearchTagList (BitIndex, TagList);
}
Tag = AcpiDmSearchTagList (BitIndex, TagList);
return (Tag);
}
@ -744,7 +869,7 @@ AcpiDmGetResourceTag (
static char *
AcpiDmSearchTagList (
UINT32 BitIndex,
ACPI_RESOURCE_TAG *TagList)
const ACPI_RESOURCE_TAG *TagList)
{
/*

View File

@ -196,6 +196,16 @@ static const char *AcpiDmMadtSubnames[] =
"Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
"Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
"Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
"Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
"Generic Interrupt Distributor",/* ACPI_MADT_GENERIC_DISTRIBUTOR */
"Unknown SubTable Type" /* Reserved */
};
static const char *AcpiDmPmttSubnames[] =
{
"Socket", /* ACPI_PMTT_TYPE_SOCKET */
"Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
"Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
"Unknown SubTable Type" /* Reserved */
};
@ -268,6 +278,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf, "Alert Standard Format table"},
{ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot, "Simple Boot Flag Table"},
{ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert, "Boot Error Record Table"},
{ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt, "Boot Graphics Resource Table"},
{ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep, "Corrected Platform Error Polling table"},
{ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp, "Debug Port table"},
{ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar, "DMA Remapping table"},
@ -275,14 +286,20 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj, "Error Injection table"},
{ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst, "Error Record Serialization Table"},
{ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt, "Fixed ACPI Description Table"},
{ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt, "Firmware Performance Data Table"},
{ACPI_SIG_GTDT, AcpiDmTableInfoGtdt, NULL, NULL, TemplateGtdt, "Generic Timer Description Table"},
{ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest, "Hardware Error Source Table"},
{ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet, "High Precision Event Timer table"},
{ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs, "I/O Virtualization Reporting Structure"},
{ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt, "Multiple APIC Description Table"},
{ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg, "Memory Mapped Configuration table"},
{ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"},
{ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"},
{ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"},
{ACPI_SIG_PCCT, NULL, AcpiDmDumpPcct, NULL, NULL, "Platform Communications Channel Table"},
{ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"},
{ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt, "Root System Description Table"},
{ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt, "S3 Performance Table"},
{ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst, "Smart Battery Specification Table"},
{ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic, "Software Licensing Description Table"},
{ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit, "System Locality Information Table"},
@ -400,7 +417,7 @@ AcpiDmDumpDataTable (
/*
* Handle tables that don't use the common ACPI table header structure.
* Currently, these are the FACS and RSDP.
* Currently, these are the FACS, RSDP, and S3PT.
*/
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS))
{
@ -411,6 +428,10 @@ AcpiDmDumpDataTable (
{
Length = AcpiDmDumpRsdp (Table);
}
else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT))
{
Length = AcpiDmDumpS3pt (Table);
}
else
{
/*
@ -646,6 +667,7 @@ AcpiDmDumpTable (
case ACPI_DMT_ACCWIDTH:
case ACPI_DMT_IVRS:
case ACPI_DMT_MADT:
case ACPI_DMT_PMTT:
case ACPI_DMT_SRAT:
case ACPI_DMT_ASF:
case ACPI_DMT_HESTNTYP:
@ -670,6 +692,10 @@ AcpiDmDumpTable (
case ACPI_DMT_SLIC:
ByteLength = 4;
break;
case ACPI_DMT_UINT40:
ByteLength = 5;
break;
case ACPI_DMT_UINT48:
case ACPI_DMT_NAME6:
ByteLength = 6;
break;
@ -718,6 +744,12 @@ AcpiDmDumpTable (
return (AE_BAD_DATA);
}
if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
{
AcpiOsPrintf ("%s", Info->Name);
continue;
}
/* Start a new line and decode the opcode */
AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
@ -745,17 +777,29 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%1.1X\n", *Target & 0x03);
break;
case ACPI_DMT_FLAGS1:
AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03);
break;
case ACPI_DMT_FLAGS2:
AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
break;
case ACPI_DMT_FLAGS4:
AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
break;
/* Integer Data Types */
case ACPI_DMT_UINT8:
case ACPI_DMT_UINT16:
case ACPI_DMT_UINT24:
case ACPI_DMT_UINT32:
case ACPI_DMT_UINT40:
case ACPI_DMT_UINT48:
case ACPI_DMT_UINT56:
case ACPI_DMT_UINT64:
/*
@ -1021,6 +1065,19 @@ AcpiDmDumpTable (
AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmMadtSubnames[Temp8]);
break;
case ACPI_DMT_PMTT:
/* PMTT subtable types */
Temp8 = *Target;
if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
{
Temp8 = ACPI_PMTT_TYPE_RESERVED;
}
AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPmttSubnames[Temp8]);
break;
case ACPI_DMT_SLIC:
/* SLIC subtable types */

View File

@ -230,11 +230,18 @@ AcpiDmDumpFadt (
AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt2);
}
/* Check for FADT revision 3 fields and up (ACPI 2.0+ extended data) */
/* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */
else if (Table->Length > ACPI_FADT_V2_SIZE)
{
AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt3);
/* Check for FADT revision 5 fields and up (ACPI 5.0+) */
if (Table->Length > ACPI_FADT_V3_SIZE)
{
AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt5);
}
}
/* Validate various fields in the FADT, including length */
@ -290,6 +297,10 @@ AcpiDmValidateFadtLength (
ExpectedLength = ACPI_FADT_V3_SIZE;
break;
case 5:
ExpectedLength = ACPI_FADT_V5_SIZE;
break;
default:
return;
}
@ -749,6 +760,84 @@ AcpiDmDumpErst (
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpFpdt
*
* PARAMETERS: Table - A FPDT table
*
* RETURN: None
*
* DESCRIPTION: Format the contents of a FPDT. This table type consists
* of an open-ended number of subtables.
*
******************************************************************************/
void
AcpiDmDumpFpdt (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
ACPI_FPDT_HEADER *SubTable;
UINT32 Length = Table->Length;
UINT32 Offset = sizeof (ACPI_TABLE_FPDT);
ACPI_DMTABLE_INFO *InfoTable;
/* There is no main table (other than the standard ACPI header) */
/* Sub-tables */
SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset);
while (Offset < Table->Length)
{
/* Common sub-table header */
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length, Offset, SubTable,
SubTable->Length, AcpiDmTableInfoFpdtHdr);
if (ACPI_FAILURE (Status))
{
return;
}
switch (SubTable->Type)
{
case ACPI_FPDT_TYPE_BOOT:
InfoTable = AcpiDmTableInfoFpdt0;
break;
case ACPI_FPDT_TYPE_S3PERF:
InfoTable = AcpiDmTableInfoFpdt1;
break;
default:
AcpiOsPrintf ("\n**** Unknown FPDT sub-table type 0x%X\n\n", SubTable->Type);
/* Attempt to continue */
if (!SubTable->Length)
{
AcpiOsPrintf ("Invalid zero length subtable\n");
return;
}
goto NextSubTable;
}
Status = AcpiDmDumpTable (Length, Offset, SubTable,
SubTable->Length, InfoTable);
if (ACPI_FAILURE (Status))
{
return;
}
NextSubTable:
/* Point to next sub-table */
Offset += SubTable->Length;
SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, SubTable, SubTable->Length);
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpHest
@ -1134,6 +1223,12 @@ AcpiDmDumpMadt (
case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
InfoTable = AcpiDmTableInfoMadt10;
break;
case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
InfoTable = AcpiDmTableInfoMadt11;
break;
case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
InfoTable = AcpiDmTableInfoMadt12;
break;
default:
AcpiOsPrintf ("\n**** Unknown MADT sub-table type 0x%X\n\n", SubTable->Type);
@ -1221,6 +1316,150 @@ AcpiDmDumpMcfg (
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpMpst
*
* PARAMETERS: Table - A MPST Table
*
* RETURN: None
*
* DESCRIPTION: Format the contents of a MPST table
*
******************************************************************************/
void
AcpiDmDumpMpst (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
UINT32 Offset = sizeof (ACPI_TABLE_MPST);
ACPI_MPST_POWER_NODE *SubTable0;
ACPI_MPST_POWER_STATE *SubTable0A;
ACPI_MPST_COMPONENT *SubTable0B;
ACPI_MPST_DATA_HDR *SubTable1;
ACPI_MPST_POWER_DATA *SubTable2;
UINT16 SubtableCount;
UINT8 PowerStateCount;
UINT8 ComponentCount;
/* Main table */
Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMpst);
if (ACPI_FAILURE (Status))
{
return;
}
/* Subtable: Memory Power Node(s) */
SubtableCount = (ACPI_CAST_PTR (ACPI_TABLE_MPST, Table))->PowerNodeCount;
SubTable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Table, Offset);
while ((Offset < Table->Length) && SubtableCount)
{
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable0,
sizeof (ACPI_MPST_POWER_NODE), AcpiDmTableInfoMpst0);
if (ACPI_FAILURE (Status))
{
return;
}
/* Extract the sub-subtable counts */
PowerStateCount = SubTable0->NumPowerStates;
ComponentCount = SubTable0->NumPhysicalComponents;
Offset += sizeof (ACPI_MPST_POWER_NODE);
/* Sub-subtables - Memory Power State Structure(s) */
SubTable0A = ACPI_ADD_PTR (ACPI_MPST_POWER_STATE, SubTable0,
sizeof (ACPI_MPST_POWER_NODE));
while (PowerStateCount)
{
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable0A,
sizeof (ACPI_MPST_POWER_STATE), AcpiDmTableInfoMpst0A);
if (ACPI_FAILURE (Status))
{
return;
}
SubTable0A++;
PowerStateCount--;
Offset += sizeof (ACPI_MPST_POWER_STATE);
}
/* Sub-subtables - Physical Component ID Structure(s) */
SubTable0B = ACPI_CAST_PTR (ACPI_MPST_COMPONENT, SubTable0A);
if (ComponentCount)
{
AcpiOsPrintf ("\n");
}
while (ComponentCount)
{
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable0B,
sizeof (ACPI_MPST_COMPONENT), AcpiDmTableInfoMpst0B);
if (ACPI_FAILURE (Status))
{
return;
}
SubTable0B++;
ComponentCount--;
Offset += sizeof (ACPI_MPST_COMPONENT);
}
/* Point to next Memory Power Node subtable */
SubtableCount--;
SubTable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, SubTable0,
sizeof (ACPI_MPST_POWER_NODE) +
(sizeof (ACPI_MPST_POWER_STATE) * SubTable0->NumPowerStates) +
(sizeof (ACPI_MPST_COMPONENT) * SubTable0->NumPhysicalComponents));
}
/* Subtable: Count of Memory Power State Characteristic structures */
AcpiOsPrintf ("\n");
SubTable1 = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, SubTable0);
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable1,
sizeof (ACPI_MPST_DATA_HDR), AcpiDmTableInfoMpst1);
if (ACPI_FAILURE (Status))
{
return;
}
SubtableCount = SubTable1->CharacteristicsCount;
Offset += sizeof (ACPI_MPST_DATA_HDR);
/* Subtable: Memory Power State Characteristics structure(s) */
SubTable2 = ACPI_ADD_PTR (ACPI_MPST_POWER_DATA, SubTable1, sizeof (ACPI_MPST_DATA_HDR));
while ((Offset < Table->Length) && SubtableCount)
{
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Table->Length, Offset, SubTable2,
sizeof (ACPI_MPST_POWER_DATA), AcpiDmTableInfoMpst2);
if (ACPI_FAILURE (Status))
{
return;
}
SubTable2++;
SubtableCount--;
Offset += sizeof (ACPI_MPST_POWER_DATA);
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpMsct
@ -1273,6 +1512,349 @@ AcpiDmDumpMsct (
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpPcct
*
* PARAMETERS: Table - A PCCT table
*
* RETURN: None
*
* DESCRIPTION: Format the contents of a PCCT. This table type consists
* of an open-ended number of subtables.
*
******************************************************************************/
void
AcpiDmDumpPcct (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
ACPI_PCCT_SUBSPACE *SubTable;
UINT32 Length = Table->Length;
UINT32 Offset = sizeof (ACPI_TABLE_PCCT);
/* Main table */
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPcct);
if (ACPI_FAILURE (Status))
{
return;
}
/* Sub-tables */
SubTable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset);
while (Offset < Table->Length)
{
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length, Offset, SubTable,
SubTable->Header.Length, AcpiDmTableInfoPcct0);
if (ACPI_FAILURE (Status))
{
return;
}
/* Point to next sub-table */
Offset += SubTable->Header.Length;
SubTable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, SubTable,
SubTable->Header.Length);
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpPmtt
*
* PARAMETERS: Table - A PMTT table
*
* RETURN: None
*
* DESCRIPTION: Format the contents of a PMTT. This table type consists
* of an open-ended number of subtables.
*
******************************************************************************/
void
AcpiDmDumpPmtt (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
ACPI_PMTT_HEADER *SubTable;
ACPI_PMTT_HEADER *MemSubTable;
ACPI_PMTT_HEADER *DimmSubTable;
ACPI_PMTT_DOMAIN *DomainArray;
UINT32 Length = Table->Length;
UINT32 Offset = sizeof (ACPI_TABLE_PMTT);
UINT32 MemOffset;
UINT32 DimmOffset;
UINT32 DomainOffset;
UINT32 DomainCount;
/* Main table */
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPmtt);
if (ACPI_FAILURE (Status))
{
return;
}
/* Subtables */
SubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset);
while (Offset < Table->Length)
{
/* Common subtable header */
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length, Offset, SubTable,
SubTable->Length, AcpiDmTableInfoPmttHdr);
if (ACPI_FAILURE (Status))
{
return;
}
/* Only Socket subtables are expected at this level */
if (SubTable->Type != ACPI_PMTT_TYPE_SOCKET)
{
AcpiOsPrintf (
"\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
SubTable->Type);
return;
}
/* Dump the fixed-length portion of the subtable */
Status = AcpiDmDumpTable (Length, Offset, SubTable,
SubTable->Length, AcpiDmTableInfoPmtt0);
if (ACPI_FAILURE (Status))
{
return;
}
/* Walk the memory controller subtables */
MemOffset = sizeof (ACPI_PMTT_SOCKET);
MemSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, SubTable,
sizeof (ACPI_PMTT_SOCKET));
while (((Offset + MemOffset) < Table->Length) &&
(MemOffset < SubTable->Length))
{
/* Common subtable header */
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length,
Offset + MemOffset, MemSubTable,
MemSubTable->Length, AcpiDmTableInfoPmttHdr);
if (ACPI_FAILURE (Status))
{
return;
}
/* Only memory controller subtables are expected at this level */
if (MemSubTable->Type != ACPI_PMTT_TYPE_CONTROLLER)
{
AcpiOsPrintf (
"\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
MemSubTable->Type);
return;
}
/* Dump the fixed-length portion of the controller subtable */
Status = AcpiDmDumpTable (Length,
Offset + MemOffset, MemSubTable,
MemSubTable->Length, AcpiDmTableInfoPmtt1);
if (ACPI_FAILURE (Status))
{
return;
}
/* Walk the variable count of proximity domains */
DomainCount = ((ACPI_PMTT_CONTROLLER *) MemSubTable)->DomainCount;
DomainOffset = sizeof (ACPI_PMTT_CONTROLLER);
DomainArray = ACPI_ADD_PTR (ACPI_PMTT_DOMAIN, MemSubTable,
sizeof (ACPI_PMTT_CONTROLLER));
while (((Offset + MemOffset + DomainOffset) < Table->Length) &&
((MemOffset + DomainOffset) < SubTable->Length) &&
DomainCount)
{
Status = AcpiDmDumpTable (Length,
Offset + MemOffset + DomainOffset, DomainArray,
sizeof (ACPI_PMTT_DOMAIN), AcpiDmTableInfoPmtt1a);
if (ACPI_FAILURE (Status))
{
return;
}
DomainOffset += sizeof (ACPI_PMTT_DOMAIN);
DomainArray++;
DomainCount--;
}
if (DomainCount)
{
AcpiOsPrintf (
"\n**** DomainCount exceeds subtable length\n\n",
MemSubTable->Type);
}
/* Walk the physical component (DIMM) subtables */
DimmOffset = DomainOffset;
DimmSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, MemSubTable,
DomainOffset);
while (((Offset + MemOffset + DimmOffset) < Table->Length) &&
(DimmOffset < MemSubTable->Length))
{
/* Common subtable header */
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length,
Offset + MemOffset + DimmOffset, DimmSubTable,
DimmSubTable->Length, AcpiDmTableInfoPmttHdr);
if (ACPI_FAILURE (Status))
{
return;
}
/* Only DIMM subtables are expected at this level */
if (DimmSubTable->Type != ACPI_PMTT_TYPE_DIMM)
{
AcpiOsPrintf (
"\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
DimmSubTable->Type);
return;
}
/* Dump the fixed-length DIMM subtable */
Status = AcpiDmDumpTable (Length,
Offset + MemOffset + DimmOffset, DimmSubTable,
DimmSubTable->Length, AcpiDmTableInfoPmtt2);
if (ACPI_FAILURE (Status))
{
return;
}
/* Point to next DIMM subtable */
DimmOffset += DimmSubTable->Length;
DimmSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER,
DimmSubTable, DimmSubTable->Length);
}
/* Point to next Controller subtable */
MemOffset += MemSubTable->Length;
MemSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER,
MemSubTable, MemSubTable->Length);
}
/* Point to next Socket subtable */
Offset += SubTable->Length;
SubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER,
SubTable, SubTable->Length);
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpS3pt
*
* PARAMETERS: Table - A S3PT table
*
* RETURN: Length of the table
*
* DESCRIPTION: Format the contents of a S3PT
*
******************************************************************************/
UINT32
AcpiDmDumpS3pt (
ACPI_TABLE_HEADER *Tables)
{
ACPI_STATUS Status;
UINT32 Offset = sizeof (ACPI_TABLE_S3PT);
ACPI_S3PT_HEADER *SubTable;
ACPI_DMTABLE_INFO *InfoTable;
ACPI_TABLE_S3PT *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables);
/* Main table */
Status = AcpiDmDumpTable (Offset, 0, S3ptTable, 0, AcpiDmTableInfoS3pt);
if (ACPI_FAILURE (Status))
{
return 0;
}
SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, S3ptTable, Offset);
while (Offset < S3ptTable->Length)
{
/* Common sub-table header */
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (S3ptTable->Length, Offset, SubTable,
SubTable->Length, AcpiDmTableInfoS3ptHdr);
if (ACPI_FAILURE (Status))
{
return 0;
}
switch (SubTable->Type)
{
case ACPI_S3PT_TYPE_RESUME:
InfoTable = AcpiDmTableInfoS3pt0;
break;
case ACPI_S3PT_TYPE_SUSPEND:
InfoTable = AcpiDmTableInfoS3pt1;
break;
default:
AcpiOsPrintf ("\n**** Unknown S3PT sub-table type 0x%X\n", SubTable->Type);
/* Attempt to continue */
if (!SubTable->Length)
{
AcpiOsPrintf ("Invalid zero length subtable\n");
return 0;
}
goto NextSubTable;
}
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (S3ptTable->Length, Offset, SubTable,
SubTable->Length, InfoTable);
if (ACPI_FAILURE (Status))
{
return 0;
}
NextSubTable:
/* Point to next sub-table */
Offset += SubTable->Length;
SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, SubTable, SubTable->Length);
}
return (S3ptTable->Length);
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpSlic

View File

@ -82,21 +82,28 @@
#define ACPI_GAS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
#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_BGRT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
#define ACPI_BOOT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,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_DRTM_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DRTM,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_GTDT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_GTDT,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_IVRS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_IVRS,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)
#define ACPI_MCHI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCHI,f)
#define ACPI_MPST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MPST,f)
#define ACPI_MSCT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
#define ACPI_PCCT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
#define ACPI_PMTT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
#define ACPI_S3PT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
#define ACPI_SBST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SBST,f)
#define ACPI_SLIT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
#define ACPI_SPCR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
@ -126,6 +133,9 @@
#define ACPI_DMAR3_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
#define ACPI_EINJ0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
#define ACPI_ERST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
#define ACPI_FPDTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
#define ACPI_FPDT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_FPDT_BOOT,f)
#define ACPI_FPDT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_FPDT_S3PT_PTR,f)
#define ACPI_HEST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f)
#define ACPI_HEST1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f)
#define ACPI_HEST2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_NMI,f)
@ -153,9 +163,25 @@
#define ACPI_MADT8_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f)
#define ACPI_MADT9_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC,f)
#define ACPI_MADT10_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f)
#define ACPI_MADT11_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f)
#define ACPI_MADT12_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_GENERIC_DISTRIBUTOR,f)
#define ACPI_MADTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_MCFG0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
#define ACPI_MPST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f)
#define ACPI_MPST0A_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_POWER_STATE,f)
#define ACPI_MPST0B_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_COMPONENT,f)
#define ACPI_MPST1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f)
#define ACPI_MPST2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f)
#define ACPI_MSCT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
#define ACPI_PCCT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
#define ACPI_PMTT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
#define ACPI_PMTT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
#define ACPI_PMTT1A_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
#define ACPI_PMTT2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
#define ACPI_PMTTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
#define ACPI_S3PTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_S3PT_HEADER,f)
#define ACPI_S3PT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
#define ACPI_S3PT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
#define ACPI_SLICH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
#define ACPI_SLIC0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_KEY,f)
#define ACPI_SLIC1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
@ -178,6 +204,7 @@
#define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o)
#define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o)
#define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o)
#define ACPI_GTDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o)
#define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_MADT,f,o)
#define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC,f,o)
#define ACPI_MADT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f,o)
@ -187,6 +214,11 @@
#define ACPI_MADT8_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f,o)
#define ACPI_MADT9_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC,f,o)
#define ACPI_MADT10_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f,o)
#define ACPI_MADT11_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f,o)
#define ACPI_MPST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MPST_POWER_NODE,f,o)
#define ACPI_MPST2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MPST_POWER_DATA,f,o)
#define ACPI_PCCT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
#define ACPI_PMTTH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
#define ACPI_WDDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
#define ACPI_EINJ0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
#define ACPI_ERST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
@ -198,6 +230,7 @@
* Required terminator for all tables below
*/
#define ACPI_DMT_TERMINATOR {ACPI_DMT_EXIT, 0, NULL, 0}
#define ACPI_DMT_NEW_LINE {ACPI_DMT_EXTRA_TEXT, 0, "\n", 0}
/*
@ -383,6 +416,9 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{ACPI_DMT_FLAG1, ACPI_FADT_FLAG_OFFSET (Flags,2), "Remote Power-on capable (V4)", 0},
{ACPI_DMT_FLAG2, ACPI_FADT_FLAG_OFFSET (Flags,2), "Use APIC Cluster Model (V4)", 0},
{ACPI_DMT_FLAG3, ACPI_FADT_FLAG_OFFSET (Flags,2), "Use APIC Physical Destination Mode (V4)", 0},
{ACPI_DMT_FLAG4, ACPI_FADT_FLAG_OFFSET (Flags,2), "Hardware Reduced (V5)", 0},
{ACPI_DMT_FLAG5, ACPI_FADT_FLAG_OFFSET (Flags,2), "Prefer S0 Idle (V5)", 0},
{ACPI_DMT_FLAG6, ACPI_FADT_FLAG_OFFSET (Flags,2), "Use Sleep Register (V5)", 0},
ACPI_DMT_TERMINATOR
};
@ -396,7 +432,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[] =
ACPI_DMT_TERMINATOR
};
/* ACPI 2.0+ Extensions (FADT version 3+) */
/* ACPI 2.0+ Extensions (FADT version 3 and 4) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] =
{
@ -416,6 +452,14 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] =
ACPI_DMT_TERMINATOR
};
/* ACPI 5.0 Extensions (FADT version 5) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] =
{
{ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepRegister), "Sleep Register", 0},
ACPI_DMT_TERMINATOR
};
/*
* Remaining tables are not consumed directly by the ACPICA subsystem
@ -539,6 +583,24 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoBert[] =
};
/*******************************************************************************
*
* BGRT - Boot Graphics Resource Table (ACPI 5.0)
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[] =
{
{ACPI_DMT_UINT16, ACPI_BGRT_OFFSET (Version), "Version", 0},
{ACPI_DMT_UINT8, ACPI_BGRT_OFFSET (Status), "Status", 0},
{ACPI_DMT_UINT8, ACPI_BGRT_OFFSET (ImageType), "Image Type", 0},
{ACPI_DMT_UINT64, ACPI_BGRT_OFFSET (ImageAddress), "Image Address", 0},
{ACPI_DMT_UINT32, ACPI_BGRT_OFFSET (ImageOffsetX), "Image OffsetX", 0},
{ACPI_DMT_UINT32, ACPI_BGRT_OFFSET (ImageOffsetY), "Image OffsetY", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* BOOT - Simple Boot Flag Table
@ -670,6 +732,19 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmar3[] =
};
/*******************************************************************************
*
* DRTM - Dynamic Root of Trust for Measurement table
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm[] =
{
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* ECDT - Embedded Controller Boot Resources Table
@ -746,6 +821,82 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[] =
};
/*******************************************************************************
*
* FPDT - Firmware Performance Data Table (ACPI 5.0)
*
******************************************************************************/
/* Main table consists of only the standard ACPI header - subtables follow */
/* FPDT subtable header */
ACPI_DMTABLE_INFO AcpiDmTableInfoFpdtHdr[] =
{
{ACPI_DMT_UINT16, ACPI_FPDTH_OFFSET (Type), "Subtable Type", 0},
{ACPI_DMT_UINT8, ACPI_FPDTH_OFFSET (Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT8, ACPI_FPDTH_OFFSET (Revision), "Revision", 0},
ACPI_DMT_TERMINATOR
};
/* 0: Firmware Basic Boot Performance Record */
ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt0[] =
{
{ACPI_DMT_UINT32, ACPI_FPDT0_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_FPDT0_OFFSET (ResetEnd), "Reset End", 0},
{ACPI_DMT_UINT64, ACPI_FPDT0_OFFSET (LoadStart), "Load Image Start", 0},
{ACPI_DMT_UINT64, ACPI_FPDT0_OFFSET (StartupStart), "Start Image Start", 0},
{ACPI_DMT_UINT64, ACPI_FPDT0_OFFSET (ExitServicesEntry), "Exit Services Entry", 0},
{ACPI_DMT_UINT64, ACPI_FPDT0_OFFSET (ExitServicesExit), "Exit Services Exit", 0},
ACPI_DMT_TERMINATOR
};
/* 1: S3 Performance Table Pointer Record */
ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt1[] =
{
{ACPI_DMT_UINT32, ACPI_FPDT1_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_FPDT1_OFFSET (Address), "S3PT Address", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* GTDT - Generic Timer Description Table
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt[] =
{
{ACPI_DMT_UINT64, ACPI_GTDT_OFFSET (Address), "Timer Address", 0},
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_GTDT_FLAG_OFFSET (Flags,0), "Memory Present", 0},
ACPI_DMT_NEW_LINE,
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (SecurePl1Interrupt), "Secure PL1 Interrupt", 0},
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (SecurePl1Flags), "SPL1 Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_GTDT_FLAG_OFFSET (SecurePl1Flags,0), "Trigger Mode", 0},
{ACPI_DMT_FLAG1, ACPI_GTDT_FLAG_OFFSET (SecurePl1Flags,0), "Polarity", 0},
ACPI_DMT_NEW_LINE,
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (NonSecurePl1Interrupt), "Non-Secure PL1 Interrupt", 0},
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (NonSecurePl1Flags), "NSPL1 Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_GTDT_FLAG_OFFSET (NonSecurePl1Flags,0),"Trigger Mode", 0},
{ACPI_DMT_FLAG1, ACPI_GTDT_FLAG_OFFSET (NonSecurePl1Flags,0),"Polarity", 0},
ACPI_DMT_NEW_LINE,
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (VirtualTimerInterrupt), "Virtual Timer Interrupt", 0},
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (VirtualTimerFlags), "VT Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_GTDT_FLAG_OFFSET (VirtualTimerFlags,0),"Trigger Mode", 0},
{ACPI_DMT_FLAG1, ACPI_GTDT_FLAG_OFFSET (VirtualTimerFlags,0),"Polarity", 0},
ACPI_DMT_NEW_LINE,
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (NonSecurePl2Interrupt), "Non-Secure PL2 Interrupt", 0},
{ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (NonSecurePl2Flags), "NSPL2 Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_GTDT_FLAG_OFFSET (NonSecurePl2Flags,0),"Trigger Mode", 0},
{ACPI_DMT_FLAG1, ACPI_GTDT_FLAG_OFFSET (NonSecurePl2Flags,0),"Polarity", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* HEST - Hardware Error Source table
@ -1190,6 +1341,34 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMadt10[] =
ACPI_DMT_TERMINATOR
};
/* 11: Generic Interrupt Controller (ACPI 5.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoMadt11[] =
{
{ACPI_DMT_UINT16, ACPI_MADT11_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_MADT11_OFFSET (GicId), "Local GIC Hardware ID", 0},
{ACPI_DMT_UINT32, ACPI_MADT11_OFFSET (Uid), "Processor UID", 0},
{ACPI_DMT_UINT32, ACPI_MADT11_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_MADT11_FLAG_OFFSET (Flags,0), "Processor Enabled", 0},
{ACPI_DMT_UINT32, ACPI_MADT11_OFFSET (ParkingVersion), "Parking Protocol Version", 0},
{ACPI_DMT_UINT32, ACPI_MADT11_OFFSET (PerformanceInterrupt), "Performance Interrupt", 0},
{ACPI_DMT_UINT64, ACPI_MADT11_OFFSET (ParkedAddress), "Parked Address", 0},
{ACPI_DMT_UINT64, ACPI_MADT11_OFFSET (BaseAddress), "Base Address", 0},
ACPI_DMT_TERMINATOR
};
/* 12: Generic Interrupt Distributor (ACPI 5.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoMadt12[] =
{
{ACPI_DMT_UINT16, ACPI_MADT12_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_MADT12_OFFSET (GicId), "Local GIC Hardware ID", 0},
{ACPI_DMT_UINT64, ACPI_MADT12_OFFSET (BaseAddress), "Base Address", 0},
{ACPI_DMT_UINT32, ACPI_MADT12_OFFSET (GlobalIrqBase), "Interrupt Base", 0},
{ACPI_DMT_UINT32, ACPI_MADT12_OFFSET (Reserved2), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
@ -1238,6 +1417,87 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[] =
};
/*******************************************************************************
*
* MPST - Memory Power State Table
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoMpst[] =
{
{ACPI_DMT_UINT16, ACPI_MPST_OFFSET (Reserved1), "Reserved", 0},
{ACPI_DMT_UINT8, ACPI_MPST_OFFSET (ChannelId), "Channel ID", 0},
{ACPI_DMT_UINT8, ACPI_MPST_OFFSET (Reserved2), "Reserved", 0},
{ACPI_DMT_UINT16, ACPI_MPST_OFFSET (PowerNodeCount), "Power Node Count", 0},
ACPI_DMT_TERMINATOR
};
/* MPST subtables */
/* 0: Memory Power Node Structure */
ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0[] =
{
{ACPI_DMT_UINT8, ACPI_MPST0_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_MPST0_FLAG_OFFSET (Flags,0), "Node Enabled", 0},
{ACPI_DMT_FLAG1, ACPI_MPST0_FLAG_OFFSET (Flags,0), "Power Managed", 0},
{ACPI_DMT_FLAG2, ACPI_MPST0_FLAG_OFFSET (Flags,0), "Hot Plug Capable", 0},
{ACPI_DMT_UINT8, ACPI_MPST0_OFFSET (Reserved1), "Reserved", 0},
{ACPI_DMT_UINT16, ACPI_MPST0_OFFSET (NodeId), "Node ID", 0},
{ACPI_DMT_UINT32, ACPI_MPST0_OFFSET (Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT64, ACPI_MPST0_OFFSET (RangeAddress), "Range Address", 0},
{ACPI_DMT_UINT64, ACPI_MPST0_OFFSET (RangeLength), "Range Length", 0},
{ACPI_DMT_UINT8, ACPI_MPST0_OFFSET (NumPowerStates), "Num Power States", 0},
{ACPI_DMT_UINT8, ACPI_MPST0_OFFSET (NumPhysicalComponents), "Num Physical Components", 0},
{ACPI_DMT_UINT16, ACPI_MPST0_OFFSET (Reserved2), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/* 0A: Sub-subtable - Memory Power State Structure (follows Memory Power Node above) */
ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0A[] =
{
{ACPI_DMT_UINT8, ACPI_MPST0A_OFFSET (PowerState), "Power State", 0},
{ACPI_DMT_UINT8, ACPI_MPST0A_OFFSET (InfoIndex), "InfoIndex", 0},
ACPI_DMT_TERMINATOR
};
/* 0B: Sub-subtable - Physical Component ID Structure (follows Memory Power State(s) above) */
ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0B[] =
{
{ACPI_DMT_UINT16, ACPI_MPST0B_OFFSET (ComponentId), "Component Id", 0},
ACPI_DMT_TERMINATOR
};
/* 01: Power Characteristics Count (follows all Power Node(s) above) */
ACPI_DMTABLE_INFO AcpiDmTableInfoMpst1[] =
{
{ACPI_DMT_UINT16, ACPI_MPST1_OFFSET (CharacteristicsCount), "Characteristics Count", 0},
ACPI_DMT_TERMINATOR
};
/* 02: Memory Power State Characteristics Structure */
ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[] =
{
{ACPI_DMT_UINT8, ACPI_MPST2_OFFSET (Revision), "Revision", 0},
{ACPI_DMT_UINT8, ACPI_MPST2_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_MPST2_FLAG_OFFSET (Flags,0), "Memory Preserved", 0},
{ACPI_DMT_FLAG1, ACPI_MPST2_FLAG_OFFSET (Flags,0), "Auto Entry", 0},
{ACPI_DMT_FLAG2, ACPI_MPST2_FLAG_OFFSET (Flags,0), "Auto Exit", 0},
{ACPI_DMT_UINT16, ACPI_MPST2_OFFSET (Reserved1), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_MPST2_OFFSET (AveragePower), "Average Power", 0},
{ACPI_DMT_UINT32, ACPI_MPST2_OFFSET (PowerSaving), "Power Saving", 0},
{ACPI_DMT_UINT64, ACPI_MPST2_OFFSET (ExitLatency), "Exit Latency", 0},
{ACPI_DMT_UINT64, ACPI_MPST2_OFFSET (Reserved2), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* MSCT - Maximum System Characteristics Table (ACPI 4.0)
@ -1267,6 +1527,155 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[] =
};
/*******************************************************************************
*
* PCCT - Platform Communications Channel Table (ACPI 5.0)
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[] =
{
{ACPI_DMT_UINT32, ACPI_PCCT_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_PCCT_FLAG_OFFSET (Flags,0), "Doorbell", 0},
{ACPI_DMT_UINT32, ACPI_PCCT_OFFSET (Latency), "Command Latency", 0},
{ACPI_DMT_UINT32, ACPI_PCCT_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/* PCCT subtables */
/* 0: Generic Communications Subspace */
ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[] =
{
{ACPI_DMT_UINT8, ACPI_PCCT0_OFFSET (Header.Type), "Subtable Type", 0},
{ACPI_DMT_UINT8, ACPI_PCCT0_OFFSET (Header.Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT48, ACPI_PCCT0_OFFSET (Reserved[0]), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_PCCT0_OFFSET (BaseAddress), "Base Address", 0},
{ACPI_DMT_UINT64, ACPI_PCCT0_OFFSET (Length), "Address Length", 0},
{ACPI_DMT_GAS, ACPI_PCCT0_OFFSET (DoorbellRegister), "Doorbell Register", 0},
{ACPI_DMT_UINT64, ACPI_PCCT0_OFFSET (PreserveMask), "Preserve Mask", 0},
{ACPI_DMT_UINT64, ACPI_PCCT0_OFFSET (WriteMask), "Write Mask", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* PMTT - Platform Memory Topology Table
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[] =
{
{ACPI_DMT_UINT32, ACPI_PMTT_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/* Common Subtable header (one per Subtable) */
ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[] =
{
{ACPI_DMT_PMTT, ACPI_PMTTH_OFFSET (Type), "Subtable Type", 0},
{ACPI_DMT_UINT8, ACPI_PMTTH_OFFSET (Reserved1), "Reserved", 0},
{ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Top-level Device", 0},
{ACPI_DMT_FLAG1, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Physical Element", 0},
{ACPI_DMT_FLAGS2, ACPI_PMTTH_FLAG_OFFSET (Flags,0), "Memory Type", 0},
{ACPI_DMT_UINT16, ACPI_PMTTH_OFFSET (Reserved2), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/* PMTT Subtables */
/* 0: Socket */
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[] =
{
{ACPI_DMT_UINT16, ACPI_PMTT0_OFFSET (SocketId), "Socket ID", 0},
{ACPI_DMT_UINT16, ACPI_PMTT0_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
/* 1: Memory Controller */
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[] =
{
{ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (ReadLatency), "Read Latency", 0},
{ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (WriteLatency), "Write Latency", 0},
{ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (ReadBandwidth), "Read Bandwidth", 0},
{ACPI_DMT_UINT32, ACPI_PMTT1_OFFSET (WriteBandwidth), "Write Bandwidth", 0},
{ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (AccessWidth), "Access Width", 0},
{ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (Alignment), "Alignment", 0},
{ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT16, ACPI_PMTT1_OFFSET (DomainCount), "Domain Count", 0},
ACPI_DMT_TERMINATOR
};
/* 1a: Proximity Domain */
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[] =
{
{ACPI_DMT_UINT32, ACPI_PMTT1A_OFFSET (ProximityDomain), "Proximity Domain", 0},
ACPI_DMT_TERMINATOR
};
/* 2: Physical Component */
ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[] =
{
{ACPI_DMT_UINT16, ACPI_PMTT2_OFFSET (ComponentId), "Component ID", 0},
{ACPI_DMT_UINT16, ACPI_PMTT2_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_PMTT2_OFFSET (MemorySize), "Memory Size", 0},
{ACPI_DMT_UINT32, ACPI_PMTT2_OFFSET (BiosHandle), "Bios Handle", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* S3PT - S3 Performance Table
*
******************************************************************************/
ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[] =
{
{ACPI_DMT_SIG, ACPI_S3PT_OFFSET (Signature[0]), "Signature", 0},
{ACPI_DMT_UINT32, ACPI_S3PT_OFFSET (Length), "Length", DT_LENGTH},
ACPI_DMT_TERMINATOR
};
/* S3PT subtable header */
ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[] =
{
{ACPI_DMT_UINT16, ACPI_S3PTH_OFFSET (Type), "Type", 0},
{ACPI_DMT_UINT8, ACPI_S3PTH_OFFSET (Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT8, ACPI_S3PTH_OFFSET (Revision), "Revision", 0},
ACPI_DMT_TERMINATOR
};
/* 0: Basic S3 Resume Performance Record */
ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[] =
{
{ACPI_DMT_UINT32, ACPI_S3PT0_OFFSET (ResumeCount), "Resume Count", 0},
{ACPI_DMT_UINT64, ACPI_S3PT0_OFFSET (FullResume), "Full Resume", 0},
{ACPI_DMT_UINT64, ACPI_S3PT0_OFFSET (AverageResume), "Average Resume", 0},
ACPI_DMT_TERMINATOR
};
/* 1: Basic S3 Suspend Performance Record */
ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[] =
{
{ACPI_DMT_UINT64, ACPI_S3PT1_OFFSET (SuspendStart), "Suspend Start", 0},
{ACPI_DMT_UINT64, ACPI_S3PT1_OFFSET (SuspendEnd), "Suspend End", 0},
ACPI_DMT_TERMINATOR
};
/*******************************************************************************
*
* SBST - Smart Battery Specification Table
@ -1609,8 +2018,10 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[] =
ACPI_DMT_TERMINATOR
};
/*! [Begin] no source code translation */
/*
* Generic types (used in UEFI)
* Generic types (used in UEFI and custom tables)
*
* Examples:
*
@ -1629,7 +2040,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[] =
* DevicePath : "\PciRoot(0)\Pci(0x1f,1)\Usb(0,0)"
*/
#define ACPI_DM_GENERIC_ENTRY(FieldType, FieldName)\
#define ACPI_DM_GENERIC_ENTRY(FieldType, FieldName) \
{{FieldType, 0, FieldName, 0}, ACPI_DMT_TERMINATOR}
ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2] =
@ -1638,6 +2049,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2] =
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT16, "UINT16"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT24, "UINT24"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT32, "UINT32"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT40, "UINT40"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT48, "UINT48"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT56, "UINT56"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT64, "UINT64"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_STRING, "String"),
@ -1648,3 +2061,4 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2] =
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_LABEL, "Label"),
{ACPI_DMT_TERMINATOR}
};
/*! [End] no source code translation !*/

View File

@ -96,6 +96,7 @@ OBJECTS = \
aslrestype2.o \
aslrestype2d.o \
aslrestype2e.o \
aslrestype2s.o \
aslrestype2q.o \
aslrestype2w.o \
aslstartup.o \
@ -121,6 +122,7 @@ OBJECTS = \
dmopcode.o \
dmresrc.o \
dmresrcl.o \
dmresrcl2.o \
dmresrcs.o \
dmrestag.o \
dmtable.o \

View File

@ -126,7 +126,6 @@ AnCheckId (
{
UINT32 i;
ACPI_SIZE Length;
UINT32 AlphaPrefixLength;
/* Only care about string versions of _HID/_CID (integers are legal) */
@ -174,12 +173,18 @@ AnCheckId (
{
AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING,
Op, Op->Asl.Value.String);
break;
return;
}
}
/* _HID String must be of the form "XXX####" or "ACPI####" */
/*
* _HID String must be one of these forms:
*
* "AAA####" A is an uppercase letter and # is a hex digit
* "ACPI####" # is a hex digit
* "NNNN####" N is an uppercase letter or decimal digit (0-9)
* # is a hex digit (ACPI 5.0)
*/
if ((Length < 7) || (Length > 8))
{
AslError (ASL_ERROR, ASL_MSG_HID_LENGTH,
@ -187,22 +192,48 @@ AnCheckId (
return;
}
/* _HID Length is valid, now check for uppercase (first 3 or 4 chars) */
/* _HID Length is valid (7 or 8), now check the prefix (first 3 or 4 chars) */
AlphaPrefixLength = 3;
if (Length >= 8)
if (Length == 7)
{
AlphaPrefixLength = 4;
/* AAA####: Ensure the alphabetic prefix is all uppercase */
for (i = 0; i < 3; i++)
{
if (!isupper ((int) Op->Asl.Value.String[i]))
{
AslError (ASL_ERROR, ASL_MSG_UPPER_CASE,
Op, &Op->Asl.Value.String[i]);
return;
}
}
}
else /* Length == 8 */
{
/*
* ACPI#### or NNNN####:
* Ensure the prefix contains only uppercase alpha or decimal digits
*/
for (i = 0; i < 4; i++)
{
if (!isupper ((int) Op->Asl.Value.String[i]) &&
!isdigit ((int) Op->Asl.Value.String[i]))
{
AslError (ASL_ERROR, ASL_MSG_HID_PREFIX,
Op, &Op->Asl.Value.String[i]);
return;
}
}
}
/* Ensure the alphabetic prefix is all uppercase */
/* Remaining characters (suffix) must be hex digits */
for (i = 0; (i < AlphaPrefixLength) && Op->Asl.Value.String[i]; i++)
for (; i < Length; i++)
{
if (!isupper ((int) Op->Asl.Value.String[i]))
if (!isxdigit ((int) Op->Asl.Value.String[i]))
{
AslError (ASL_ERROR, ASL_MSG_UPPER_CASE,
Op, &Op->Asl.Value.String[i]);
AslError (ASL_ERROR, ASL_MSG_HID_SUFFIX,
Op, &Op->Asl.Value.String[i]);
break;
}
}

View File

@ -271,12 +271,17 @@ CgWriteAmlOpcode (
/* Special opcodes for within a field definition */
Aml.Opcode = 0x00;
Aml.Opcode = AML_FIELD_OFFSET_OP;
break;
case AML_INT_ACCESSFIELD_OP:
Aml.Opcode = 0x01;
Aml.Opcode = AML_FIELD_ACCESS_OP;
break;
case AML_INT_CONNECTION_OP:
Aml.Opcode = AML_FIELD_CONNECTION_OP;
break;
default:

View File

@ -843,6 +843,13 @@ RsSetFlagBits (
UINT8 Position,
UINT8 DefaultBit);
void
RsSetFlagBits16 (
UINT16 *Flags,
ACPI_PARSE_OBJECT *Op,
UINT8 Position,
UINT8 DefaultBit);
ACPI_PARSE_OBJECT *
RsCompleteNodeAndGetNext (
ACPI_PARSE_OBJECT *Op);
@ -925,6 +932,11 @@ RsDoDmaDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoFixedDmaDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoFixedIoDescriptor (
ACPI_PARSE_OBJECT *Op,
@ -964,6 +976,30 @@ RsDoGeneralRegisterDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoGpioIntDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoGpioIoDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoI2cSerialBusDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoSpiSerialBusDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
ASL_RESOURCE_NODE *
RsDoUartSerialBusDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset);
/*
* aslrestype2d - DWord address descriptors

View File

@ -1,8 +1,7 @@
%{
/******************************************************************************
*
* Module Name: aslcompiler.l - Flex input file
* Module Name: aslcompiler.l - Flex/lex input file
*
*****************************************************************************/
@ -60,6 +59,9 @@ YYSTYPE AslCompilerlval;
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("aslscan")
/* Local prototypes */
char
comment (void);
char
@ -74,7 +76,7 @@ copy (void);
/*! [Begin] no source code translation */
%}
/* Definitions */
LeadNameChar [A-Za-z_]
DigitChar [0-9]
@ -94,6 +96,7 @@ NonEmptyNamePath {NameSeg}{NamePathTail}*
NamePathTail [.]{NameSeg}
%%
/* Rules */
[ ] { count (0); }
[\n] { count (0); } /* Handle files with both LF and CR/LF */
@ -105,6 +108,7 @@ NamePathTail [.]{NameSeg}
"//" { if (!comment2 ()) yyterminate (); }
"\"" { if (literal ()) return (PARSEOP_STRING_LITERAL); else yyterminate (); }
";" { count (0); return(';'); }
0[xX]{HexDigitChar}+ |
@ -116,15 +120,28 @@ NamePathTail [.]{NameSeg}
"#line" { count (1); return (PARSEOP_LINE_CSTYLE); }
"External" { count (1); return (PARSEOP_EXTERNAL); }
/****************************************************************************
*
* Main ASL operators
*
****************************************************************************/
"Ones" { count (1); return (PARSEOP_ONES); }
"One" { count (1); return (PARSEOP_ONE); }
"Zero" { count (1); return (PARSEOP_ZERO); }
"Revision" { count (1); return (PARSEOP_REVISION); }
"Offset" { count (1); return (PARSEOP_OFFSET); }
"AccessAs" { count (1); return (PARSEOP_ACCESSAS); }
"Acquire" { count (3); return (PARSEOP_ACQUIRE); }
"Add" { count (3); return (PARSEOP_ADD); }
"Alias" { count (2); return (PARSEOP_ALIAS); }
"And" { count (3); return (PARSEOP_AND); }
"BankField" { count (2); return (PARSEOP_BANKFIELD); }
"Break" { count (3); return (PARSEOP_BREAK); }
"BreakPoint" { count (3); return (PARSEOP_BREAKPOINT); }
"Buffer" { count (1); return (PARSEOP_BUFFER); }
"Case" { count (3); return (PARSEOP_CASE); }
"Concatenate" { count (3); return (PARSEOP_CONCATENATE); }
"ConcatenateResTemplate" { count (3); return (PARSEOP_CONCATENATERESTEMPLATE); }
"CondRefOf" { count (3); return (PARSEOP_CONDREFOF); }
"Connection" { count (2); return (PARSEOP_CONNECTION); }
"Continue" { count (3); return (PARSEOP_CONTINUE); }
"CopyObject" { count (3); return (PARSEOP_COPYOBJECT); }
"CreateBitField" { count (2); return (PARSEOP_CREATEBITFIELD); }
"CreateByteField" { count (2); return (PARSEOP_CREATEBYTEFIELD); }
"CreateDWordField" { count (2); return (PARSEOP_CREATEDWORDFIELD); }
@ -132,57 +149,27 @@ NamePathTail [.]{NameSeg}
"CreateQWordField" { count (2); return (PARSEOP_CREATEQWORDFIELD); }
"CreateWordField" { count (2); return (PARSEOP_CREATEWORDFIELD); }
"DataTableRegion" { count (2); return (PARSEOP_DATATABLEREGION); }
"Debug" { count (1); return (PARSEOP_DEBUG); }
"Decrement" { count (3); return (PARSEOP_DECREMENT); }
"Default" { count (3); return (PARSEOP_DEFAULT); }
"DefinitionBlock" { count (1); return (PARSEOP_DEFINITIONBLOCK); }
"DeRefOf" { count (3); return (PARSEOP_DEREFOF); }
"Device" { count (2); return (PARSEOP_DEVICE); }
"Event" { count (2); return (PARSEOP_EVENT); }
"Field" { count (2); return (PARSEOP_FIELD); }
"Function" { count (2); return (PARSEOP_FUNCTION); }
"IndexField" { count (2); return (PARSEOP_INDEXFIELD); }
"Method" { count (2); return (PARSEOP_METHOD); }
"Mutex" { count (2); return (PARSEOP_MUTEX); }
"OperationRegion" { count (2); return (PARSEOP_OPERATIONREGION); }
"PowerResource" { count (2); return (PARSEOP_POWERRESOURCE); }
"Processor" { count (2); return (PARSEOP_PROCESSOR); }
"ThermalZone" { count (2); return (PARSEOP_THERMALZONE); }
"Alias" { count (2); return (PARSEOP_ALIAS); }
"Name" { count (2); return (PARSEOP_NAME); }
"Scope" { count (2); return (PARSEOP_SCOPE); }
"Break" { count (3); return (PARSEOP_BREAK); }
"BreakPoint" { count (3); return (PARSEOP_BREAKPOINT); }
"Continue" { count (3); return (PARSEOP_CONTINUE); }
"Fatal" { count (3); return (PARSEOP_FATAL); }
"If" { count (3); return (PARSEOP_IF); }
"Divide" { count (3); return (PARSEOP_DIVIDE); }
"Eisaid" { count (1); return (PARSEOP_EISAID); }
"Else" { count (3); return (PARSEOP_ELSE); }
"ElseIf" { count (3); return (PARSEOP_ELSEIF); }
"Load" { count (3); return (PARSEOP_LOAD); }
"Noop" { count (3); return (PARSEOP_NOOP); }
"Notify" { count (3); return (PARSEOP_NOTIFY); }
"Release" { count (3); return (PARSEOP_RELEASE); }
"Reset" { count (3); return (PARSEOP_RESET); }
"Return" { count (3); return (PARSEOP_RETURN); }
"Signal" { count (3); return (PARSEOP_SIGNAL); }
"Sleep" { count (3); return (PARSEOP_SLEEP); }
"Stall" { count (3); return (PARSEOP_STALL); }
"Switch" { count (3); return (PARSEOP_SWITCH); }
"Case" { count (3); return (PARSEOP_CASE); }
"Default" { count (3); return (PARSEOP_DEFAULT); }
"Unload" { count (3); return (PARSEOP_UNLOAD); }
"While" { count (3); return (PARSEOP_WHILE); }
"Acquire" { count (3); return (PARSEOP_ACQUIRE); }
"Add" { count (3); return (PARSEOP_ADD); }
"And" { count (3); return (PARSEOP_AND); }
"Concatenate" { count (3); return (PARSEOP_CONCATENATE); }
"ConcatenateResTemplate" { count (3); return (PARSEOP_CONCATENATERESTEMPLATE); }
"CondRefOf" { count (3); return (PARSEOP_CONDREFOF); }
"CopyObject" { count (3); return (PARSEOP_COPYOBJECT); }
"Decrement" { count (3); return (PARSEOP_DECREMENT); }
"DeRefOf" { count (3); return (PARSEOP_DEREFOF); }
"Divide" { count (3); return (PARSEOP_DIVIDE); }
"Event" { count (2); return (PARSEOP_EVENT); }
"Fatal" { count (3); return (PARSEOP_FATAL); }
"Field" { count (2); return (PARSEOP_FIELD); }
"FindSetLeftBit" { count (3); return (PARSEOP_FINDSETLEFTBIT); }
"FindSetRightBit" { count (3); return (PARSEOP_FINDSETRIGHTBIT); }
"FromBCD" { count (3); return (PARSEOP_FROMBCD); }
"FromBcd" { count (3); return (PARSEOP_FROMBCD); }
"Function" { count (2); return (PARSEOP_FUNCTION); }
"If" { count (3); return (PARSEOP_IF); }
"Increment" { count (3); return (PARSEOP_INCREMENT); }
"Index" { count (3); return (PARSEOP_INDEX); }
"IndexField" { count (2); return (PARSEOP_INDEXFIELD); }
"LAnd" { count (3); return (PARSEOP_LAND); }
"LEqual" { count (3); return (PARSEOP_LEQUAL); }
"LGreater" { count (3); return (PARSEOP_LGREATER); }
@ -191,32 +178,62 @@ NamePathTail [.]{NameSeg}
"LLessEqual" { count (3); return (PARSEOP_LLESSEQUAL); }
"LNot" { count (3); return (PARSEOP_LNOT); }
"LNotEqual" { count (3); return (PARSEOP_LNOTEQUAL); }
"Load" { count (3); return (PARSEOP_LOAD); }
"LoadTable" { count (3); return (PARSEOP_LOADTABLE); }
"LOr" { count (3); return (PARSEOP_LOR); }
"Match" { count (3); return (PARSEOP_MATCH); }
"Method" { count (2); return (PARSEOP_METHOD); }
"Mid" { count (3); return (PARSEOP_MID); }
"Mod" { count (3); return (PARSEOP_MOD); }
"Multiply" { count (3); return (PARSEOP_MULTIPLY); }
"Mutex" { count (2); return (PARSEOP_MUTEX); }
"Name" { count (2); return (PARSEOP_NAME); }
"NAnd" { count (3); return (PARSEOP_NAND); }
"Noop" { count (3); return (PARSEOP_NOOP); }
"NOr" { count (3); return (PARSEOP_NOR); }
"Not" { count (3); return (PARSEOP_NOT); }
"Notify" { count (3); return (PARSEOP_NOTIFY); }
"ObjectType" { count (3); return (PARSEOP_OBJECTTYPE); }
"Offset" { count (1); return (PARSEOP_OFFSET); }
"One" { count (1); return (PARSEOP_ONE); }
"Ones" { count (1); return (PARSEOP_ONES); }
"OperationRegion" { count (2); return (PARSEOP_OPERATIONREGION); }
"Or" { count (3); return (PARSEOP_OR); }
"Package" { count (1); return (PARSEOP_PACKAGE); }
"PowerResource" { count (2); return (PARSEOP_POWERRESOURCE); }
"Processor" { count (2); return (PARSEOP_PROCESSOR); }
"RefOf" { count (3); return (PARSEOP_REFOF); }
"Release" { count (3); return (PARSEOP_RELEASE); }
"Reset" { count (3); return (PARSEOP_RESET); }
"Return" { count (3); return (PARSEOP_RETURN); }
"Revision" { count (1); return (PARSEOP_REVISION); }
"Scope" { count (2); return (PARSEOP_SCOPE); }
"ShiftLeft" { count (3); return (PARSEOP_SHIFTLEFT); }
"ShiftRight" { count (3); return (PARSEOP_SHIFTRIGHT); }
"Signal" { count (3); return (PARSEOP_SIGNAL); }
"SizeOf" { count (3); return (PARSEOP_SIZEOF); }
"Sleep" { count (3); return (PARSEOP_SLEEP); }
"Stall" { count (3); return (PARSEOP_STALL); }
"Store" { count (3); return (PARSEOP_STORE); }
"Subtract" { count (3); return (PARSEOP_SUBTRACT); }
"Switch" { count (3); return (PARSEOP_SWITCH); }
"ThermalZone" { count (2); return (PARSEOP_THERMALZONE); }
"Timer" { count (3); return (PARSEOP_TIMER); }
"ToBCD" { count (3); return (PARSEOP_TOBCD); }
"ToBcd" { count (3); return (PARSEOP_TOBCD); }
"ToBuffer" { count (3); return (PARSEOP_TOBUFFER); }
"ToDecimalString" { count (3); return (PARSEOP_TODECIMALSTRING); }
"ToHexString" { count (3); return (PARSEOP_TOHEXSTRING); }
"ToInteger" { count (3); return (PARSEOP_TOINTEGER); }
"ToString" { count (3); return (PARSEOP_TOSTRING); }
"ToUuid" { count (1); return (PARSEOP_TOUUID); }
"Unicode" { count (1); return (PARSEOP_UNICODE); }
"Unload" { count (3); return (PARSEOP_UNLOAD); }
"Wait" { count (3); return (PARSEOP_WAIT); }
"While" { count (3); return (PARSEOP_WHILE); }
"XOr" { count (3); return (PARSEOP_XOR); }
"Zero" { count (1); return (PARSEOP_ZERO); }
/* Control method arguments and locals */
"Arg0" { count (1); return (PARSEOP_ARG0); }
"Arg1" { count (1); return (PARSEOP_ARG1); }
@ -225,7 +242,6 @@ NamePathTail [.]{NameSeg}
"Arg4" { count (1); return (PARSEOP_ARG4); }
"Arg5" { count (1); return (PARSEOP_ARG5); }
"Arg6" { count (1); return (PARSEOP_ARG6); }
"Local0" { count (1); return (PARSEOP_LOCAL0); }
"Local1" { count (1); return (PARSEOP_LOCAL1); }
"Local2" { count (1); return (PARSEOP_LOCAL2); }
@ -235,16 +251,16 @@ NamePathTail [.]{NameSeg}
"Local6" { count (1); return (PARSEOP_LOCAL6); }
"Local7" { count (1); return (PARSEOP_LOCAL7); }
"Debug" { count (1); return (PARSEOP_DEBUG); }
"DefinitionBlock" { count (1); return (PARSEOP_DEFINITIONBLOCK); }
"Buffer" { count (1); return (PARSEOP_BUFFER); }
"Package" { count (1); return (PARSEOP_PACKAGE); }
/****************************************************************************
*
* Resource Descriptor macros
*
****************************************************************************/
"EISAID" { count (1); return (PARSEOP_EISAID); }
"ResourceTemplate" { count (1); return (PARSEOP_RESOURCETEMPLATE); }
"ToUUID" { count (1); return (PARSEOP_TOUUID); }
"Unicode" { count (1); return (PARSEOP_UNICODE); }
"RawDataBuffer" { count (1); return (PARSEOP_DATABUFFER); }
"DMA" { count (1); return (PARSEOP_DMA); }
"DWordIO" { count (1); return (PARSEOP_DWORDIO); }
"DWordMemory" { count (1); return (PARSEOP_DWORDMEMORY); }
@ -253,26 +269,188 @@ NamePathTail [.]{NameSeg}
"ExtendedIO" { count (1); return (PARSEOP_EXTENDEDIO); }
"ExtendedMemory" { count (1); return (PARSEOP_EXTENDEDMEMORY); }
"ExtendedSpace" { count (1); return (PARSEOP_EXTENDEDSPACE); }
"FixedDma" { count (1); return (PARSEOP_FIXEDDMA); }
"FixedIO" { count (1); return (PARSEOP_FIXEDIO); }
"GpioInt" { count (1); return (PARSEOP_GPIO_INT); }
"GpioIo" { count (1); return (PARSEOP_GPIO_IO); }
"I2cSerialBus" { count (1); return (PARSEOP_I2C_SERIALBUS); }
"Interrupt" { count (1); return (PARSEOP_INTERRUPT); }
"IO" { count (1); return (PARSEOP_IO); }
"IRQNoFlags" { count (1); return (PARSEOP_IRQNOFLAGS); }
"IRQ" { count (1); return (PARSEOP_IRQ); }
"IRQNoFlags" { count (1); return (PARSEOP_IRQNOFLAGS); }
"Memory24" { count (1); return (PARSEOP_MEMORY24); }
"Memory32Fixed" { count (1); return (PARSEOP_MEMORY32FIXED); }
"Memory32" { count (1); return (PARSEOP_MEMORY32); }
"Memory32Fixed" { count (1); return (PARSEOP_MEMORY32FIXED); }
"QWordIO" { count (1); return (PARSEOP_QWORDIO); }
"QWordMemory" { count (1); return (PARSEOP_QWORDMEMORY); }
"QWordSpace" { count (1); return (PARSEOP_QWORDSPACE); }
"Register" { count (1); return (PARSEOP_REGISTER); }
"SpiSerialBus" { count (1); return (PARSEOP_SPI_SERIALBUS); }
"StartDependentFn" { count (1); return (PARSEOP_STARTDEPENDENTFN); }
"StartDependentFnNoPri" { count (1); return (PARSEOP_STARTDEPENDENTFN_NOPRI); }
"UartSerialBus" { count (1); return (PARSEOP_UART_SERIALBUS); }
"VendorLong" { count (1); return (PARSEOP_VENDORLONG); }
"VendorShort" { count (1); return (PARSEOP_VENDORSHORT); }
"WordBusNumber" { count (1); return (PARSEOP_WORDBUSNUMBER); }
"WordIO" { count (1); return (PARSEOP_WORDIO); }
"WordSpace" { count (1); return (PARSEOP_WORDSPACE); }
/****************************************************************************
*
* Keywords used as arguments to ASL operators and macros
*
****************************************************************************/
/* AccessAttribKeyword: Serial Bus Attributes (ACPI 5.0) */
"AttribQuick" { count (0); return (PARSEOP_ACCESSATTRIB_QUICK); }
"AttribSendReceive" { count (0); return (PARSEOP_ACCESSATTRIB_SND_RCV); }
"AttribByte" { count (0); return (PARSEOP_ACCESSATTRIB_BYTE); }
"AttribWord" { count (0); return (PARSEOP_ACCESSATTRIB_WORD); }
"AttribBlock" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK); }
"AttribProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_WORD_CALL); }
"AttribBlockProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK_CALL); }
/* AccessAttribKeyword: Legacy synonyms for above (pre-ACPI 5.0) */
"SMBQuick" { count (0); return (PARSEOP_ACCESSATTRIB_QUICK); }
"SMBSendReceive" { count (0); return (PARSEOP_ACCESSATTRIB_SND_RCV); }
"SMBByte" { count (0); return (PARSEOP_ACCESSATTRIB_BYTE); }
"SMBWord" { count (0); return (PARSEOP_ACCESSATTRIB_WORD); }
"SMBBlock" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK); }
"SMBProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_WORD_CALL); }
"SMBBlockProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK_CALL); }
/* AccessTypeKeyword: Field Access Types */
"AnyAcc" { count (0); return (PARSEOP_ACCESSTYPE_ANY); }
"ByteAcc" { count (0); return (PARSEOP_ACCESSTYPE_BYTE); }
"WordAcc" { count (0); return (PARSEOP_ACCESSTYPE_WORD); }
"DWordAcc" { count (0); return (PARSEOP_ACCESSTYPE_DWORD); }
"QWordAcc" { count (0); return (PARSEOP_ACCESSTYPE_QWORD); }
"BufferAcc" { count (0); return (PARSEOP_ACCESSTYPE_BUF); }
/* AddressingModeKeyword: Mode - Resource Descriptors (ACPI 5.0) */
"AddressingMode7Bit" { count (0); return (PARSEOP_ADDRESSINGMODE_7BIT); }
"AddressingMode10Bit" { count (0); return (PARSEOP_ADDRESSINGMODE_10BIT); }
/* AddressKeyword: ACPI memory range types */
"AddressRangeMemory" { count (0); return (PARSEOP_ADDRESSTYPE_MEMORY); }
"AddressRangeReserved" { count (0); return (PARSEOP_ADDRESSTYPE_RESERVED); }
"AddressRangeNVS" { count (0); return (PARSEOP_ADDRESSTYPE_NVS); }
"AddressRangeACPI" { count (0); return (PARSEOP_ADDRESSTYPE_ACPI); }
/* BusMasterKeyword: DMA Bus Mastering */
"BusMaster" { count (0); return (PARSEOP_BUSMASTERTYPE_MASTER); }
"NotBusMaster" { count (0); return (PARSEOP_BUSMASTERTYPE_NOTMASTER); }
/* ByteLengthKeyword: Bits per Byte - Resource Descriptors (ACPI 5.0) */
"DataBitsFive" { count (0); return (PARSEOP_BITSPERBYTE_FIVE); }
"DataBitsSix" { count (0); return (PARSEOP_BITSPERBYTE_SIX); }
"DataBitsSeven" { count (0); return (PARSEOP_BITSPERBYTE_SEVEN); }
"DataBitsEight" { count (0); return (PARSEOP_BITSPERBYTE_EIGHT); }
"DataBitsNine" { count (0); return (PARSEOP_BITSPERBYTE_NINE); }
/* ClockPhaseKeyword: Resource Descriptors (ACPI 5.0) */
"ClockPhaseFirst" { count (0); return (PARSEOP_CLOCKPHASE_FIRST); }
"ClockPhaseSecond" { count (0); return (PARSEOP_CLOCKPHASE_SECOND); }
/* ClockPolarityKeyword: Resource Descriptors (ACPI 5.0) */
"ClockPolarityLow" { count (0); return (PARSEOP_CLOCKPOLARITY_LOW); }
"ClockPolarityHigh" { count (0); return (PARSEOP_CLOCKPOLARITY_HIGH); }
/* DecodeKeyword: Type of Memory Decoding - Resource Descriptors */
"PosDecode" { count (0); return (PARSEOP_DECODETYPE_POS); }
"SubDecode" { count (0); return (PARSEOP_DECODETYPE_SUB); }
/* DmaTypeKeyword: DMA Types - DMA Resource Descriptor */
"Compatibility" { count (0); return (PARSEOP_DMATYPE_COMPATIBILITY); }
"TypeA" { count (0); return (PARSEOP_DMATYPE_A); }
"TypeB" { count (0); return (PARSEOP_DMATYPE_B); }
"TypeF" { count (0); return (PARSEOP_DMATYPE_F); }
/* EndianKeyword: Endian type - Resource Descriptor (ACPI 5.0) */
"LittleEndian" { count (0); return (PARSEOP_ENDIAN_LITTLE); }
"BigEndian" { count (0); return (PARSEOP_ENDIAN_BIG); }
/* ExtendedAttribKeyword: Bus attributes, AccessAs operator (ACPI 5.0) */
"AttribBytes" { count (0); return (PARSEOP_ACCESSATTRIB_MULTIBYTE); }
"AttribRawBytes" { count (0); return (PARSEOP_ACCESSATTRIB_RAW_BYTES); }
"AttribRawProcessBytes" { count (0); return (PARSEOP_ACCESSATTRIB_RAW_PROCESS); }
/* FlowControlKeyword: Resource Descriptors (ACPI 5.0) */
"FlowControlHardware" { count (0); return (PARSEOP_FLOWCONTROL_HW); }
"FlowControlNone" { count (0); return (PARSEOP_FLOWCONTROL_NONE); }
"FlowControlXon" { count (0); return (PARSEOP_FLOWCONTROL_SW); }
/* InterruptLevelKeyword: Interrupt Active Types */
"ActiveBoth" { count (0); return (PARSEOP_INTLEVEL_ACTIVEBOTH); }
"ActiveHigh" { count (0); return (PARSEOP_INTLEVEL_ACTIVEHIGH); }
"ActiveLow" { count (0); return (PARSEOP_INTLEVEL_ACTIVELOW); }
/* InterruptTypeKeyword: Interrupt Types */
"Edge" { count (0); return (PARSEOP_INTTYPE_EDGE); }
"Level" { count (0); return (PARSEOP_INTTYPE_LEVEL); }
/* IoDecodeKeyword: Type of Memory Decoding - Resource Descriptors */
"Decode10" { count (0); return (PARSEOP_IODECODETYPE_10); }
"Decode16" { count (0); return (PARSEOP_IODECODETYPE_16); }
/* IoRestrictionKeyword: I/O Restriction - GPIO Resource Descriptors (ACPI 5.0) */
"IoRestrictionNone" { count (0); return (PARSEOP_IORESTRICT_NONE); }
"IoRestrictionInputOnly" { count (0); return (PARSEOP_IORESTRICT_IN); }
"IoRestrictionOutputOnly" { count (0); return (PARSEOP_IORESTRICT_OUT); }
"IoRestrictionNoneAndPreserve" { count (0); return (PARSEOP_IORESTRICT_PRESERVE); }
/* LockRuleKeyword: Global Lock use for Field Operator */
"Lock" { count (0); return (PARSEOP_LOCKRULE_LOCK); }
"NoLock" { count (0); return (PARSEOP_LOCKRULE_NOLOCK); }
/* MatchOpKeyword: Types for Match Operator */
"MTR" { count (0); return (PARSEOP_MATCHTYPE_MTR); }
"MEQ" { count (0); return (PARSEOP_MATCHTYPE_MEQ); }
"MLE" { count (0); return (PARSEOP_MATCHTYPE_MLE); }
"MLT" { count (0); return (PARSEOP_MATCHTYPE_MLT); }
"MGE" { count (0); return (PARSEOP_MATCHTYPE_MGE); }
"MGT" { count (0); return (PARSEOP_MATCHTYPE_MGT); }
/* MaxKeyword: Max Range Type - Resource Descriptors */
"MaxFixed" { count (0); return (PARSEOP_MAXTYPE_FIXED); }
"MaxNotFixed" { count (0); return (PARSEOP_MAXTYPE_NOTFIXED); }
/* MemTypeKeyword: Memory Types - Resource Descriptors */
"Cacheable" { count (0); return (PARSEOP_MEMTYPE_CACHEABLE); }
"WriteCombining" { count (0); return (PARSEOP_MEMTYPE_WRITECOMBINING); }
"Prefetchable" { count (0); return (PARSEOP_MEMTYPE_PREFETCHABLE); }
"NonCacheable" { count (0); return (PARSEOP_MEMTYPE_NONCACHEABLE); }
/* MinKeyword: Min Range Type - Resource Descriptors */
"MinFixed" { count (0); return (PARSEOP_MINTYPE_FIXED); }
"MinNotFixed" { count (0); return (PARSEOP_MINTYPE_NOTFIXED); }
/* ObjectTypeKeyword: ACPI Object Types */
"UnknownObj" { count (0); return (PARSEOP_OBJECTTYPE_UNK); }
"IntObj" { count (0); return (PARSEOP_OBJECTTYPE_INT); }
"StrObj" { count (0); return (PARSEOP_OBJECTTYPE_STR); }
@ -290,22 +468,38 @@ NamePathTail [.]{NameSeg}
"BuffFieldObj" { count (0); return (PARSEOP_OBJECTTYPE_BFF); }
"DDBHandleObj" { count (0); return (PARSEOP_OBJECTTYPE_DDB); }
"AnyAcc" { count (0); return (PARSEOP_ACCESSTYPE_ANY); }
"ByteAcc" { count (0); return (PARSEOP_ACCESSTYPE_BYTE); }
"WordAcc" { count (0); return (PARSEOP_ACCESSTYPE_WORD); }
"DWordAcc" { count (0); return (PARSEOP_ACCESSTYPE_DWORD); }
"QWordAcc" { count (0); return (PARSEOP_ACCESSTYPE_QWORD); }
"BufferAcc" { count (0); return (PARSEOP_ACCESSTYPE_BUF); }
/* ParityKeyword: Resource Descriptors (ACPI 5.0) */
"Lock" { count (0); return (PARSEOP_LOCKRULE_LOCK); }
"NoLock" { count (0); return (PARSEOP_LOCKRULE_NOLOCK); }
"ParityTypeSpace" { count (0); return (PARSEOP_PARITYTYPE_SPACE); }
"ParityTypeMark" { count (0); return (PARSEOP_PARITYTYPE_MARK); }
"ParityTypeOdd" { count (0); return (PARSEOP_PARITYTYPE_ODD); }
"ParityTypeEven" { count (0); return (PARSEOP_PARITYTYPE_EVEN); }
"ParityTypeNone" { count (0); return (PARSEOP_PARITYTYPE_NONE); }
"Preserve" { count (0); return (PARSEOP_UPDATERULE_PRESERVE); }
"WriteAsOnes" { count (0); return (PARSEOP_UPDATERULE_ONES); }
"WriteAsZeros" { count (0); return (PARSEOP_UPDATERULE_ZEROS); }
/* PinConfigKeyword: Pin Configuration - GPIO Resource Descriptors (ACPI 5.0) */
"Serialized" { count (0); return (PARSEOP_SERIALIZERULE_SERIAL); }
"NotSerialized" { count (0); return (PARSEOP_SERIALIZERULE_NOTSERIAL); }
"PullDefault" { count (0); return (PARSEOP_PIN_PULLDEFAULT); }
"PullUp" { count (0); return (PARSEOP_PIN_PULLUP); }
"PullDown" { count (0); return (PARSEOP_PIN_PULLDOWN); }
"PullNone" { count (0); return (PARSEOP_PIN_NOPULL); }
/* PolarityKeyword: Resource Descriptors (ACPI 5.0) */
"PolarityLow" { count (0); return (PARSEOP_DEVICEPOLARITY_LOW); }
"PolarityHigh" { count (0); return (PARSEOP_DEVICEPOLARITY_HIGH); }
/* RangeTypeKeyword: I/O Range Types - Resource Descriptors */
"ISAOnlyRanges" { count (0); return (PARSEOP_RANGETYPE_ISAONLY); }
"NonISAOnlyRanges" { count (0); return (PARSEOP_RANGETYPE_NONISAONLY); }
"EntireRange" { count (0); return (PARSEOP_RANGETYPE_ENTIRE); }
/* ReadWriteKeyword: Memory Access Types - Resource Descriptors */
"ReadWrite" { count (0); return (PARSEOP_READWRITETYPE_BOTH); }
"ReadOnly" { count (0); return (PARSEOP_READWRITETYPE_READONLY); }
/* RegionSpaceKeyword: Operation Region Address Space Types */
"SystemIO" { count (0); return (PARSEOP_REGIONSPACE_IO); }
"SystemMemory" { count (0); return (PARSEOP_REGIONSPACE_MEM); }
@ -315,86 +509,82 @@ NamePathTail [.]{NameSeg}
"SystemCMOS" { count (0); return (PARSEOP_REGIONSPACE_CMOS); }
"PciBarTarget" { count (0); return (PARSEOP_REGIONSPACE_PCIBAR); }
"IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
"GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */
"GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */
"FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
"FFixedHW" { count (0); return (PARSEOP_ADDRESSSPACE_FFIXEDHW); }
/* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
"SMBQuick" { count (0); return (PARSEOP_ACCESSATTRIB_QUICK); }
"SMBSendReceive" { count (0); return (PARSEOP_ACCESSATTRIB_SND_RCV); }
"SMBByte" { count (0); return (PARSEOP_ACCESSATTRIB_BYTE); }
"SMBWord" { count (0); return (PARSEOP_ACCESSATTRIB_WORD); }
"SMBBlock" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK); }
"SMBProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_WORD_CALL); }
"SMBBlockProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK_CALL); }
"ResourceConsumer" { count (0); return (PARSEOP_RESOURCETYPE_CONSUMER); }
"ResourceProducer" { count (0); return (PARSEOP_RESOURCETYPE_PRODUCER); }
"MTR" { count (0); return (PARSEOP_MATCHTYPE_MTR); }
"MEQ" { count (0); return (PARSEOP_MATCHTYPE_MEQ); }
"MLE" { count (0); return (PARSEOP_MATCHTYPE_MLE); }
"MLT" { count (0); return (PARSEOP_MATCHTYPE_MLT); }
"MGE" { count (0); return (PARSEOP_MATCHTYPE_MGE); }
"MGT" { count (0); return (PARSEOP_MATCHTYPE_MGT); }
/* SerializeRuleKeyword: Control Method Serialization */
"Compatibility" { count (0); return (PARSEOP_DMATYPE_COMPATIBILITY); }
"TypeA" { count (0); return (PARSEOP_DMATYPE_A); }
"TypeB" { count (0); return (PARSEOP_DMATYPE_B); }
"TypeF" { count (0); return (PARSEOP_DMATYPE_F); }
"Serialized" { count (0); return (PARSEOP_SERIALIZERULE_SERIAL); }
"NotSerialized" { count (0); return (PARSEOP_SERIALIZERULE_NOTSERIAL); }
"BusMaster" { count (0); return (PARSEOP_BUSMASTERTYPE_MASTER); }
"NotBusMaster" { count (0); return (PARSEOP_BUSMASTERTYPE_NOTMASTER); }
/* ShareTypeKeyword: Interrupt Sharing - Resource Descriptors */
"Shared" { count (0); return (PARSEOP_SHARETYPE_SHARED); }
"Exclusive" { count (0); return (PARSEOP_SHARETYPE_EXCLUSIVE); }
"SharedAndWake" { count (0); return (PARSEOP_SHARETYPE_SHAREDWAKE); } /* ACPI 5.0 */
"ExclusiveAndWake" { count (0); return (PARSEOP_SHARETYPE_EXCLUSIVEWAKE); } /* ACPI 5.0 */
/* SlaveModeKeyword: Resource Descriptors (ACPI 5.0) */
"ControllerInitiated" { count (0); return (PARSEOP_SLAVEMODE_CONTROLLERINIT); }
"DeviceInitiated" { count (0); return (PARSEOP_SLAVEMODE_DEVICEINIT); }
/* StopBitsKeyword: Resource Descriptors (ACPI 5.0) */
"StopBitsOne" { count (0); return (PARSEOP_STOPBITS_ONE); }
"StopBitsOnePlusHalf" { count (0); return (PARSEOP_STOPBITS_ONEPLUSHALF); }
"StopBitsTwo" { count (0); return (PARSEOP_STOPBITS_TWO); }
"StopBitsZero" { count (0); return (PARSEOP_STOPBITS_ZERO); }
/* TransferWidthKeyword: DMA Widths - Fixed DMA Resource Descriptor (ACPI 5.0) */
"Width8bit" { count (0); return (PARSEOP_XFERSIZE_8); }
"Width16bit" { count (0); return (PARSEOP_XFERSIZE_16); }
"Width32bit" { count (0); return (PARSEOP_XFERSIZE_32); }
"Width64bit" { count (0); return (PARSEOP_XFERSIZE_64); }
"Width128bit" { count (0); return (PARSEOP_XFERSIZE_128); }
"Width256bit" { count (0); return (PARSEOP_XFERSIZE_256); }
/* TranslationKeyword: Translation Density Types - Resource Descriptors */
"SparseTranslation" { count (0); return (PARSEOP_TRANSLATIONTYPE_SPARSE); }
"DenseTranslation" { count (0); return (PARSEOP_TRANSLATIONTYPE_DENSE); }
/* TypeKeyword: Translation Types - Resource Descriptors */
"TypeTranslation" { count (0); return (PARSEOP_TYPE_TRANSLATION); }
"TypeStatic" { count (0); return (PARSEOP_TYPE_STATIC); }
/* UpdateRuleKeyword: Field Update Rules */
"Preserve" { count (0); return (PARSEOP_UPDATERULE_PRESERVE); }
"WriteAsOnes" { count (0); return (PARSEOP_UPDATERULE_ONES); }
"WriteAsZeros" { count (0); return (PARSEOP_UPDATERULE_ZEROS); }
/* WireModeKeyword: SPI Wire Mode - Resource Descriptors (ACPI 5.0) */
"FourWireMode" { count (0); return (PARSEOP_WIREMODE_FOUR); }
"ThreeWireMode" { count (0); return (PARSEOP_WIREMODE_THREE); }
/* XferTypeKeyword: DMA Transfer Types */
"Transfer8" { count (0); return (PARSEOP_XFERTYPE_8); }
"Transfer8_16" { count (0); return (PARSEOP_XFERTYPE_8_16); }
"Transfer16" { count (0); return (PARSEOP_XFERTYPE_16); }
"ResourceConsumer" { count (0); return (PARSEOP_RESOURCETYPE_CONSUMER); }
"ResourceProducer" { count (0); return (PARSEOP_RESOURCETYPE_PRODUCER); }
"MinFixed" { count (0); return (PARSEOP_MINTYPE_FIXED); }
"MinNotFixed" { count (0); return (PARSEOP_MINTYPE_NOTFIXED); }
"MaxFixed" { count (0); return (PARSEOP_MAXTYPE_FIXED); }
"MaxNotFixed" { count (0); return (PARSEOP_MAXTYPE_NOTFIXED); }
"PosDecode" { count (0); return (PARSEOP_DECODETYPE_POS); }
"SubDecode" { count (0); return (PARSEOP_DECODETYPE_SUB); }
"ISAOnlyRanges" { count (0); return (PARSEOP_RANGETYPE_ISAONLY); }
"NonISAOnlyRanges" { count (0); return (PARSEOP_RANGETYPE_NONISAONLY); }
"EntireRange" { count (0); return (PARSEOP_RANGETYPE_ENTIRE); }
"Cacheable" { count (0); return (PARSEOP_MEMTYPE_CACHEABLE); }
"WriteCombining" { count (0); return (PARSEOP_MEMTYPE_WRITECOMBINING); }
"Prefetchable" { count (0); return (PARSEOP_MEMTYPE_PREFETCHABLE); }
"NonCacheable" { count (0); return (PARSEOP_MEMTYPE_NONCACHEABLE); }
"ReadWrite" { count (0); return (PARSEOP_READWRITETYPE_BOTH); }
"ReadOnly" { count (0); return (PARSEOP_READWRITETYPE_READONLY); }
"Edge" { count (0); return (PARSEOP_INTTYPE_EDGE); }
"Level" { count (0); return (PARSEOP_INTTYPE_LEVEL); }
"ActiveHigh" { count (0); return (PARSEOP_INTLEVEL_ACTIVEHIGH); }
"ActiveLow" { count (0); return (PARSEOP_INTLEVEL_ACTIVELOW); }
"Shared" { count (0); return (PARSEOP_SHARETYPE_SHARED); }
"Exclusive" { count (0); return (PARSEOP_SHARETYPE_EXCLUSIVE); }
"Decode10" { count (0); return (PARSEOP_IODECODETYPE_10); }
"Decode16" { count (0); return (PARSEOP_IODECODETYPE_16); }
"TypeTranslation" { count (0); return (PARSEOP_TYPE_TRANSLATION); }
"TypeStatic" { count (0); return (PARSEOP_TYPE_STATIC); }
"SparseTranslation" { count (0); return (PARSEOP_TRANSLATIONTYPE_SPARSE); }
"DenseTranslation" { count (0); return (PARSEOP_TRANSLATIONTYPE_DENSE); }
"AddressRangeMemory" { count (0); return (PARSEOP_ADDRESSTYPE_MEMORY); }
"AddressRangeReserved" { count (0); return (PARSEOP_ADDRESSTYPE_RESERVED); }
"AddressRangeNVS" { count (0); return (PARSEOP_ADDRESSTYPE_NVS); }
"AddressRangeACPI" { count (0); return (PARSEOP_ADDRESSTYPE_ACPI); }
/* Predefined compiler names */
"__DATE__" { count (0); return (PARSEOP___DATE__); }
"__FILE__" { count (0); return (PARSEOP___FILE__); }
"__LINE__" { count (0); return (PARSEOP___LINE__); }
"__PATH__" { count (0); return (PARSEOP___PATH__); }
"{" { count (0); return('{'); }
"}" { count (0); return('}'); }
@ -402,7 +592,6 @@ NamePathTail [.]{NameSeg}
"(" { count (0); return('('); }
")" { count (0); return(')'); }
{NameSeg} { char *s;
count (0);
s=malloc (ACPI_NAME_SIZE + 1);
@ -478,7 +667,6 @@ AslPopInputFileStack (
void)
{
ASL_FILE_NODE *Fnode;
FILE *InputFile = NULL;
Fnode = InputStack;
@ -497,7 +685,6 @@ AslPopInputFileStack (
/* Update the top-of-stack */
InputStack = Fnode->Next;
InputFile = Fnode->File;
/* Reset global line counter and filename */

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@
#define ASL_INVOCATION_NAME "iasl"
#define ASL_CREATOR_ID "INTL"
#define ASL_COMPLIANCE "Supports ACPI Specification Revision 4.0a"
#define ASL_COMPLIANCE "Supports ACPI Specification Revision 5.0"
/* Configuration constants */

View File

@ -319,10 +319,23 @@ AePrintException (
if (Enode->LineNumber)
{
/* Main message: try to use string from AslMessages first */
if (!MainMessage)
{
MainMessage = "";
}
MsgLength = strlen (MainMessage);
if (MsgLength == 0)
{
/* Use the secondary/extra message as main message */
MainMessage = Enode->Message;
if (!MainMessage)
{
MainMessage = "";
}
MsgLength = strlen (MainMessage);
ExtraMessage = NULL;

View File

@ -189,7 +189,7 @@ LdLoadFieldElements (
{
case AML_INT_RESERVEDFIELD_OP:
case AML_INT_ACCESSFIELD_OP:
case AML_INT_CONNECTION_OP:
break;
default:
@ -224,8 +224,10 @@ LdLoadFieldElements (
}
break;
}
Child = Child->Asl.Next;
}
return (AE_OK);
}

View File

@ -1288,6 +1288,7 @@ LkNamespaceLocateBegin (
{
case ACPI_ADR_SPACE_EC:
case ACPI_ADR_SPACE_CMOS:
case ACPI_ADR_SPACE_GPIO:
if ((UINT8) Op->Asl.Parent->Asl.Value.Integer != AML_FIELD_ACCESS_BYTE)
{
@ -1297,6 +1298,7 @@ LkNamespaceLocateBegin (
case ACPI_ADR_SPACE_SMBUS:
case ACPI_ADR_SPACE_IPMI:
case ACPI_ADR_SPACE_GSBUS:
if ((UINT8) Op->Asl.Parent->Asl.Value.Integer != AML_FIELD_ACCESS_BUFFER)
{

View File

@ -96,7 +96,7 @@ AslDoResponseFile (
#define ASL_TOKEN_SEPARATORS " \t\n"
#define ASL_SUPPORTED_OPTIONS "@:2b:c:d^e:fgh^i^I:l^no:p:r:s:t:T:G^v:w:x:z"
#define ASL_SUPPORTED_OPTIONS "@:2b:c:d^e:fgh^i^I:l^mno:p:r:s:t:T:G^v:w:x:z"
/*******************************************************************************
@ -158,6 +158,7 @@ Options (
ACPI_OPTION ("-dc [file]", "Disassemble AML and immediately compile it");
ACPI_OPTION ("", "(Obtain DSDT from current system if no input file)");
ACPI_OPTION ("-e [f1,f2]", "Include ACPI table(s) for external symbol resolution");
ACPI_OPTION ("-m", "Do not translate Buffers to Resource Templates");
ACPI_OPTION ("-2", "Emit ACPI 2.0 compatible ASL code");
ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)");
@ -601,6 +602,20 @@ AslDoOptions (
break;
case 'm':
AcpiGbl_NoResourceDisassembly = TRUE;
break;
case 'n':
/* Parse only */
Gbl_ParseOnlyFlag = TRUE;
break;
case 'o':
switch (AcpiGbl_Optarg[0])
@ -649,14 +664,6 @@ AslDoOptions (
break;
case 'n':
/* Parse only */
Gbl_ParseOnlyFlag = TRUE;
break;
case 'p':
/* Override default AML output filename */

View File

@ -126,13 +126,16 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* ACCESSAS */ OP_TABLE_ENTRY (AML_INT_ACCESSFIELD_OP, 0, 0, 0),
/* ACCESSATTRIB_BLOCK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_BLOCK, 0, 0),
/* ACCESSATTRIB_BLOCK_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_BLOCK_CALL,0, 0),
/* ACCESSATTRIB_BYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_BYTE, 0, 0),
/* ACCESSATTRIB_WORD_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_WORD_CALL, 0, 0),
/* ACCESSATTRIB_QUICK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_QUICK, 0, 0),
/* ACCESSATTRIB_SND_RCV */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_SEND_RCV, 0, 0),
/* ACCESSATTRIB_WORD */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SMB_WORD, 0, 0),
/* ACCESSATTRIB_BLOCK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BLOCK, 0, 0),
/* ACCESSATTRIB_BLOCK_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BLOCK_CALL, 0, 0),
/* ACCESSATTRIB_BYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BYTE, 0, 0),
/* ACCESSATTRIB_MULTIBYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_MULTIBYTE, 0, 0),
/* ACCESSATTRIB_QUICK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_QUICK, 0, 0),
/* ACCESSATTRIB_RAW_BYTES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_RAW_BYTES, 0, 0),
/* ACCESSATTRIB_RAW_PROCESS */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_RAW_PROCESS, 0, 0),
/* ACCESSATTRIB_SND_RCV */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SEND_RCV, 0, 0),
/* ACCESSATTRIB_WORD */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_WORD, 0, 0),
/* ACCESSATTRIB_WORD_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_WORD_CALL, 0, 0),
/* ACCESSTYPE_ANY */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_ANY, 0, 0),
/* ACCESSTYPE_BUF */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_BUFFER, 0, 0),
/* ACCESSTYPE_BYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_BYTE, 0, 0),
@ -141,7 +144,8 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* ACCESSTYPE_WORD */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_WORD, 0, 0),
/* ACQUIRE */ OP_TABLE_ENTRY (AML_ACQUIRE_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* ADD */ OP_TABLE_ENTRY (AML_ADD_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* ADDRESSSPACE_FFIXEDHW */ OP_TABLE_ENTRY (AML_BYTE_OP, ACPI_ADR_SPACE_FIXED_HARDWARE, 0, 0),
/* ADDRESSINGMODE_7BIT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* ADDRESSINGMODE_10BIT */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* ADDRESSTYPE_ACPI */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* ADDRESSTYPE_MEMORY */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* ADDRESSTYPE_NVS */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
@ -156,6 +160,11 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* ARG5 */ OP_TABLE_ENTRY (AML_ARG5, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* ARG6 */ OP_TABLE_ENTRY (AML_ARG6, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* BANKFIELD */ OP_TABLE_ENTRY (AML_BANK_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
/* BITSPERBYTE_EIGHT */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* BITSPERBYTE_FIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* BITSPERBYTE_NINE */ OP_TABLE_ENTRY (AML_BYTE_OP, 4, 0, 0),
/* BITSPERBYTE_SEVEN */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* BITSPERBYTE_SIX */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* BREAK */ OP_TABLE_ENTRY (AML_BREAK_OP, 0, 0, 0),
/* BREAKPOINT */ OP_TABLE_ENTRY (AML_BREAK_POINT_OP, 0, 0, 0),
/* BUFFER */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_BUFFER),
@ -163,9 +172,14 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* BUSMASTERTYPE_NOTMASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* BYTECONST */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, 0, 0, ACPI_BTYPE_INTEGER),
/* CASE */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* CLOCKPHASE_FIRST */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* CLOCKPHASE_SECOND */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* CLOCKPOLARITY_HIGH */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* CLOCKPOLARITY_LOW */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* CONCATENATE */ OP_TABLE_ENTRY (AML_CONCAT_OP, 0, 0, ACPI_BTYPE_COMPUTE_DATA),
/* CONCATENATERESTEMPLATE */ OP_TABLE_ENTRY (AML_CONCAT_RES_OP, 0, 0, ACPI_BTYPE_BUFFER),
/* CONDREFOF */ OP_TABLE_ENTRY (AML_COND_REF_OF_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* CONNECTION */ OP_TABLE_ENTRY (AML_INT_CONNECTION_OP, 0, 0, 0),
/* CONTINUE */ OP_TABLE_ENTRY (AML_CONTINUE_OP, 0, 0, 0),
/* COPY */ OP_TABLE_ENTRY (AML_COPY_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE),
/* CREATEBITFIELD */ OP_TABLE_ENTRY (AML_CREATE_BIT_FIELD_OP, 0, 0, 0),
@ -174,6 +188,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* CREATEFIELD */ OP_TABLE_ENTRY (AML_CREATE_FIELD_OP, 0, 0, 0),
/* CREATEQWORDFIELD */ OP_TABLE_ENTRY (AML_CREATE_QWORD_FIELD_OP, 0, 0, 0),
/* CREATEWORDFIELD */ OP_TABLE_ENTRY (AML_CREATE_WORD_FIELD_OP, 0, 0, 0),
/* DATABUFFER */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* DATATABLEREGION */ OP_TABLE_ENTRY (AML_DATA_REGION_OP, 0, 0, 0),
/* DEBUG */ OP_TABLE_ENTRY (AML_DEBUG_OP, 0, 0, ACPI_BTYPE_DEBUG_OBJECT),
/* DECODETYPE_POS */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@ -184,6 +199,8 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* DEFINITIONBLOCK */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* DEREFOF */ OP_TABLE_ENTRY (AML_DEREF_OF_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE | ACPI_BTYPE_STRING),
/* DEVICE */ OP_TABLE_ENTRY (AML_DEVICE_OP, 0, NODE_AML_PACKAGE, 0),
/* DEVICEPOLARITY_HIGH */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* DEVICEPOLARITY_LOW */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* DIVIDE */ OP_TABLE_ENTRY (AML_DIVIDE_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* DMA */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* DMATYPE_A */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
@ -198,6 +215,8 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* ELSE */ OP_TABLE_ENTRY (AML_ELSE_OP, 0, NODE_AML_PACKAGE, 0),
/* ELSEIF */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, NODE_AML_PACKAGE, 0),
/* ENDDEPENDENTFN */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* ENDIAN_BIG */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* ENDIAN_LITTLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* ENDTAG */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* ERRORNODE */ OP_TABLE_ENTRY (AML_NOOP_OP, 0, 0, 0),
/* EVENT */ OP_TABLE_ENTRY (AML_EVENT_OP, 0, 0, 0),
@ -209,9 +228,16 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* FIELD */ OP_TABLE_ENTRY (AML_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
/* FINDSETLEFTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_LEFT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* FINDSETRIGHTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_RIGHT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* FIXEDDMA */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* FIXEDIO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* FLOWCONTROL_HW */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* FLOWCONTROL_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* FLOWCONTROL_SW */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* FROMBCD */ OP_TABLE_ENTRY (AML_FROM_BCD_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* FUNCTION */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, NODE_AML_PACKAGE, 0),
/* GPIOINT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* GPIOIO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* I2CSERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, NODE_AML_PACKAGE, 0),
/* INCLUDE */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* INCLUDE_CSTYLE */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
@ -221,6 +247,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* INDEXFIELD */ OP_TABLE_ENTRY (AML_INDEX_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
/* INTEGER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* INTERRUPT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* INTLEVEL_ACTIVEBOTH */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* INTLEVEL_ACTIVEHIGH */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* INTLEVEL_ACTIVELOW */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* INTTYPE_EDGE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
@ -228,6 +255,10 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* IO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* IODECODETYPE_10 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* IODECODETYPE_16 */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* IORESTRICT_IN */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* IORESTRICT_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* IORESTRICT_OUT */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* IORESTRICT_PRESERVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* IRQ */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* IRQNOFLAGS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* LAND */ OP_TABLE_ENTRY (AML_LAND_OP, 0, 0, ACPI_BTYPE_INTEGER),
@ -308,6 +339,15 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* OR */ OP_TABLE_ENTRY (AML_BIT_OR_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* PACKAGE */ OP_TABLE_ENTRY (AML_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
/* PACKAGEP_LENGTH */ OP_TABLE_ENTRY (AML_PACKAGE_LENGTH, 0, NODE_AML_PACKAGE, 0),
/* PARITYTYPE_EVEN */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* PARITYTYPE_MARK */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* PARITYTYPE_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* PARITYTYPE_ODD */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* PARITYTYPE_SPACE */ OP_TABLE_ENTRY (AML_BYTE_OP, 4, 0, 0),
/* PIN_NOPULL */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* PIN_PULLDEFAULT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* PIN_PULLDOWN */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* PIN_PULLUP */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RES_OP, 0, NODE_AML_PACKAGE, 0),
/* PROCESSOR */ OP_TABLE_ENTRY (AML_PROCESSOR_OP, 0, NODE_AML_PACKAGE, 0),
/* QWORDCONST */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER),
@ -323,6 +363,9 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* REFOF */ OP_TABLE_ENTRY (AML_REF_OF_OP, 0, 0, ACPI_BTYPE_REFERENCE),
/* REGIONSPACE_CMOS */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_CMOS, 0, 0),
/* REGIONSPACE_EC */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_EC, 0, 0),
/* REGIONSPACE_FFIXEDHW */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_FIXED_HARDWARE, 0, 0),
/* REGIONSPACE_GPIO */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_GPIO, 0, 0),
/* REGIONSPACE_GSBUS */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_GSBUS, 0, 0),
/* REGIONSPACE_IO */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SYSTEM_IO, 0, 0),
/* REGIONSPACE_IPMI */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_IPMI, 0, 0),
/* REGIONSPACE_MEM */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SYSTEM_MEMORY, 0, 0),
@ -342,15 +385,24 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* SERIALIZERULE_NOTSERIAL */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* SERIALIZERULE_SERIAL */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* SHARETYPE_EXCLUSIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* SHARETYPE_EXCLUSIVEWAKE */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* SHARETYPE_SHARED */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* SHARETYPE_SHAREDWAKE */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* SHIFTLEFT */ OP_TABLE_ENTRY (AML_SHIFT_LEFT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* SHIFTRIGHT */ OP_TABLE_ENTRY (AML_SHIFT_RIGHT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* SIGNAL */ OP_TABLE_ENTRY (AML_SIGNAL_OP, 0, 0, 0),
/* SIZEOF */ OP_TABLE_ENTRY (AML_SIZE_OF_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* SLAVEMODE_CONTROLLERINIT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* SLAVEMODE_DEVICEINIT */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* SLEEP */ OP_TABLE_ENTRY (AML_SLEEP_OP, 0, 0, 0),
/* SPISERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* STALL */ OP_TABLE_ENTRY (AML_STALL_OP, 0, 0, 0),
/* STARTDEPENDENTFN */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* STARTDEPENDENTFN_NOPRI */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* STOPBITS_ONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* STOPBITS_ONEPLUSHALF */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* STOPBITS_TWO */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* STOPBITS_ZERO */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* STORE */ OP_TABLE_ENTRY (AML_STORE_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE),
/* STRING_LITERAL */ OP_TABLE_ENTRY (AML_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
/* SUBTRACT */ OP_TABLE_ENTRY (AML_SUBTRACT_OP, 0, 0, ACPI_BTYPE_INTEGER),
@ -368,6 +420,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* TRANSLATIONTYPE_SPARSE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* TYPE_STATIC */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* TYPE_TRANSLATION */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* UART_SERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, 0),
/* UNLOAD */ OP_TABLE_ENTRY (AML_UNLOAD_OP, 0, 0, 0),
/* UPDATERULE_ONES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ONES, 0, 0),
@ -378,10 +431,18 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* VENDORSHORT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* WAIT */ OP_TABLE_ENTRY (AML_WAIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* WHILE */ OP_TABLE_ENTRY (AML_WHILE_OP, 0, NODE_AML_PACKAGE, 0),
/* WIREMODE_FOUR */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* WIREMODE_THREE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* WORDBUSNUMBER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* WORDCONST */ OP_TABLE_ENTRY (AML_RAW_DATA_WORD, 0, 0, ACPI_BTYPE_INTEGER),
/* WORDIO */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* WORDSPACE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERSIZE_8 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERSIZE_16 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERSIZE_32 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERSIZE_64 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERSIZE_128 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERSIZE_256 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERTYPE_8 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* XFERTYPE_8_16 */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* XFERTYPE_16 */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),

View File

@ -73,6 +73,8 @@ typedef enum
ASL_MSG_CLOSE,
ASL_MSG_COMPILER_INTERNAL,
ASL_MSG_COMPILER_RESERVED,
ASL_MSG_CONNECTION_MISSING,
ASL_MSG_CONNECTION_INVALID,
ASL_MSG_CONSTANT_EVALUATION,
ASL_MSG_CONSTANT_FOLDED,
ASL_MSG_CORE_EXCEPTION,
@ -93,6 +95,8 @@ typedef enum
ASL_MSG_FIELD_UNIT_OFFSET,
ASL_MSG_GPE_NAME_CONFLICT,
ASL_MSG_HID_LENGTH,
ASL_MSG_HID_PREFIX,
ASL_MSG_HID_SUFFIX,
ASL_MSG_INCLUDE_FILE_OPEN,
ASL_MSG_INPUT_FILE_OPEN,
ASL_MSG_INTEGER_LENGTH,
@ -229,6 +233,8 @@ char *AslMessages [] = {
/* ASL_MSG_CLOSE */ "Could not close file",
/* ASL_MSG_COMPILER_INTERNAL */ "Internal compiler error",
/* ASL_MSG_COMPILER_RESERVED */ "Use of compiler reserved name",
/* ASL_MSG_CONNECTION_MISSING */ "A Connection operator is required for this field SpaceId",
/* ASL_MSG_CONNECTION_INVALID */ "Invalid OpRegion SpaceId for use of Connection operator",
/* ASL_MSG_CONSTANT_EVALUATION */ "Could not evaluate constant expression",
/* ASL_MSG_CONSTANT_FOLDED */ "Constant expression evaluated and reduced",
/* ASL_MSG_CORE_EXCEPTION */ "From ACPI CA Subsystem",
@ -249,6 +255,8 @@ char *AslMessages [] = {
/* ASL_MSG_FIELD_UNIT_OFFSET */ "Field Unit extends beyond region limit",
/* ASL_MSG_GPE_NAME_CONFLICT */ "Name conflicts with a previous GPE method",
/* ASL_MSG_HID_LENGTH */ "_HID string must be exactly 7 or 8 characters",
/* ASL_MSG_HID_PREFIX */ "_HID prefix must be all uppercase or decimal digits",
/* ASL_MSG_HID_SUFFIX */ "_HID suffix must be all hex digits",
/* ASL_MSG_INCLUDE_FILE_OPEN */ "Could not open include file",
/* ASL_MSG_INPUT_FILE_OPEN */ "Could not open input file",
/* ASL_MSG_INTEGER_LENGTH */ "64-bit integer in 32-bit table, truncating",

View File

@ -57,6 +57,10 @@ static void
OpcDoAccessAs (
ACPI_PARSE_OBJECT *Op);
static void
OpcDoConnection (
ACPI_PARSE_OBJECT *Op);
static void
OpcDoUnicode (
ACPI_PARSE_OBJECT *Op);
@ -321,26 +325,128 @@ static void
OpcDoAccessAs (
ACPI_PARSE_OBJECT *Op)
{
ACPI_PARSE_OBJECT *Next;
ACPI_PARSE_OBJECT *TypeOp;
ACPI_PARSE_OBJECT *AttribOp;
ACPI_PARSE_OBJECT *LengthOp;
UINT8 Attribute;
Op->Asl.AmlOpcodeLength = 1;
Next = Op->Asl.Child;
TypeOp = Op->Asl.Child;
/* First child is the access type */
Next->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
Next->Asl.ParseOpcode = PARSEOP_RAW_DATA;
TypeOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
TypeOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
/* Second child is the optional access attribute */
Next = Next->Asl.Next;
if (Next->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
AttribOp = TypeOp->Asl.Next;
if (AttribOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
{
Next->Asl.Value.Integer = 0;
AttribOp->Asl.Value.Integer = 0;
}
Next->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
Next->Asl.ParseOpcode = PARSEOP_RAW_DATA;
AttribOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
AttribOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
/* Only a few AccessAttributes support AccessLength */
Attribute = (UINT8) AttribOp->Asl.Value.Integer;
if ((Attribute != AML_FIELD_ATTRIB_MULTIBYTE) &&
(Attribute != AML_FIELD_ATTRIB_RAW_BYTES) &&
(Attribute != AML_FIELD_ATTRIB_RAW_PROCESS))
{
return;
}
Op->Asl.AmlOpcode = AML_FIELD_EXT_ACCESS_OP;
/*
* Child of Attributes is the AccessLength (required for Multibyte,
* RawBytes, RawProcess.)
*/
LengthOp = AttribOp->Asl.Child;
if (!LengthOp)
{
return;
}
/* TBD: probably can remove */
if (LengthOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
{
LengthOp->Asl.Value.Integer = 16;
}
LengthOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
LengthOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
}
/*******************************************************************************
*
* FUNCTION: OpcDoConnection
*
* PARAMETERS: Op - Parse node
*
* RETURN: None
*
* DESCRIPTION: Implement the Connection ASL keyword.
*
******************************************************************************/
static void
OpcDoConnection (
ACPI_PARSE_OBJECT *Op)
{
ASL_RESOURCE_NODE *Rnode;
ACPI_PARSE_OBJECT *BufferOp;
ACPI_PARSE_OBJECT *BufferLengthOp;
ACPI_PARSE_OBJECT *BufferDataOp;
UINT8 State;
Op->Asl.AmlOpcodeLength = 1;
if (Op->Asl.Child->Asl.AmlOpcode == AML_INT_NAMEPATH_OP)
{
return;
}
BufferOp = Op->Asl.Child;
BufferLengthOp = BufferOp->Asl.Child;
BufferDataOp = BufferLengthOp->Asl.Next;
State = ACPI_RSTATE_NORMAL;
Rnode = RsDoOneResourceDescriptor (BufferDataOp->Asl.Next, 0, &State);
if (!Rnode)
{
return; /* error */
}
/*
* Transform the nodes into the following
*
* Op -> AML_BUFFER_OP
* First Child -> BufferLength
* Second Child -> Descriptor Buffer (raw byte data)
*/
BufferOp->Asl.ParseOpcode = PARSEOP_BUFFER;
BufferOp->Asl.AmlOpcode = AML_BUFFER_OP;
BufferOp->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
UtSetParseOpName (BufferOp);
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.Value.Integer = Rnode->BufferLength;
(void) OpcSetOptimalIntegerSize (BufferLengthOp);
UtSetParseOpName (BufferLengthOp);
BufferDataOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
BufferDataOp->Asl.AmlOpcode = AML_RAW_DATA_CHAIN;
BufferDataOp->Asl.AmlOpcodeLength = 0;
BufferDataOp->Asl.AmlLength = Rnode->BufferLength;
BufferDataOp->Asl.Value.Buffer = (UINT8 *) Rnode;
UtSetParseOpName (BufferDataOp);
}
@ -545,7 +651,7 @@ OpcDoEisaId (
/*******************************************************************************
*
* FUNCTION: OpcDoUiId
* FUNCTION: OpcDoUuId
*
* PARAMETERS: Op - Parse node
*
@ -665,6 +771,11 @@ OpcGenerateAmlOpcode (
OpcDoAccessAs (Op);
break;
case PARSEOP_CONNECTION:
OpcDoConnection (Op);
break;
case PARSEOP_EISAID:
OpcDoEisaId (Op);

View File

@ -100,30 +100,49 @@ static const ACPI_PREDEFINED_INFO ResourceNames[] = {
{{"_ATT", 0, 0}},
{{"_BAS", 0, 0}},
{{"_BM_", 0, 0}},
{{"_DBT", 0, 0}}, /* Acpi 5.0 */
{{"_DEC", 0, 0}},
{{"_DPL", 0, 0}}, /* Acpi 5.0 */
{{"_DRS", 0, 0}}, /* Acpi 5.0 */
{{"_END", 0, 0}}, /* Acpi 5.0 */
{{"_FLC", 0, 0}}, /* Acpi 5.0 */
{{"_GRA", 0, 0}},
{{"_HE_", 0, 0}},
{{"_INT", 0, 0}},
{{"_IOR", 0, 0}}, /* Acpi 5.0 */
{{"_LEN", 0, 0}},
{{"_LIN", 0, 0}}, /* Acpi 5.0 */
{{"_LL_", 0, 0}},
{{"_MAF", 0, 0}},
{{"_MAX", 0, 0}},
{{"_MEM", 0, 0}},
{{"_MIF", 0, 0}},
{{"_MIN", 0, 0}},
{{"_MOD", 0, 0}}, /* Acpi 5.0 */
{{"_MTP", 0, 0}},
{{"_PAR", 0, 0}}, /* Acpi 5.0 */
{{"_PHA", 0, 0}}, /* Acpi 5.0 */
{{"_PIN", 0, 0}}, /* Acpi 5.0 */
{{"_PPI", 0, 0}}, /* Acpi 5.0 */
{{"_POL", 0, 0}}, /* Acpi 5.0 */
{{"_RBO", 0, 0}},
{{"_RBW", 0, 0}},
{{"_RNG", 0, 0}},
{{"_RT_", 0, 0}}, /* Acpi 3.0 */
{{"_RW_", 0, 0}},
{{"_RXL", 0, 0}}, /* Acpi 5.0 */
{{"_SHR", 0, 0}},
{{"_SIZ", 0, 0}},
{{"_SLV", 0, 0}}, /* Acpi 5.0 */
{{"_SPE", 0, 0}}, /* Acpi 5.0 */
{{"_STB", 0, 0}}, /* Acpi 5.0 */
{{"_TRA", 0, 0}},
{{"_TRS", 0, 0}},
{{"_TSF", 0, 0}}, /* Acpi 3.0 */
{{"_TTP", 0, 0}},
{{"_TXL", 0, 0}}, /* Acpi 5.0 */
{{"_TYP", 0, 0}},
{{"_VEN", 0, 0}}, /* Acpi 5.0 */
{{{0,0,0,0}, 0, 0}} /* Table terminator */
};
@ -818,4 +837,3 @@ ApGetExpectedTypes (
ThisRtype <<= 1; /* Next Rtype */
}
}

View File

@ -513,6 +513,29 @@ RsSetFlagBits (
}
void
RsSetFlagBits16 (
UINT16 *Flags,
ACPI_PARSE_OBJECT *Op,
UINT8 Position,
UINT8 DefaultBit)
{
if (Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
{
/* Use the default bit */
*Flags |= (DefaultBit << Position);
}
else
{
/* Use the bit specified in the initialization node */
*Flags |= (((UINT16) Op->Asl.Value.Integer) << Position);
}
}
/*******************************************************************************
*
* FUNCTION: RsCompleteNodeAndGetNext
@ -637,6 +660,11 @@ RsDoOneResourceDescriptor (
CurrentByteOffset);
break;
case PARSEOP_FIXEDDMA:
Rnode = RsDoFixedDmaDescriptor (DescriptorTypeOp,
CurrentByteOffset);
break;
case PARSEOP_DWORDIO:
Rnode = RsDoDwordIoDescriptor (DescriptorTypeOp,
CurrentByteOffset);
@ -820,6 +848,31 @@ RsDoOneResourceDescriptor (
CurrentByteOffset);
break;
case PARSEOP_GPIO_INT:
Rnode = RsDoGpioIntDescriptor (DescriptorTypeOp,
CurrentByteOffset);
break;
case PARSEOP_GPIO_IO:
Rnode = RsDoGpioIoDescriptor (DescriptorTypeOp,
CurrentByteOffset);
break;
case PARSEOP_I2C_SERIALBUS:
Rnode = RsDoI2cSerialBusDescriptor (DescriptorTypeOp,
CurrentByteOffset);
break;
case PARSEOP_SPI_SERIALBUS:
Rnode = RsDoSpiSerialBusDescriptor (DescriptorTypeOp,
CurrentByteOffset);
break;
case PARSEOP_UART_SERIALBUS:
Rnode = RsDoUartSerialBusDescriptor (DescriptorTypeOp,
CurrentByteOffset);
break;
case PARSEOP_DEFAULT_ARG:
/* Just ignore any of these, they are used as fillers/placeholders */
break;
@ -994,10 +1047,12 @@ RsDoResourceTemplate (
Op->Asl.ParseOpcode = PARSEOP_BUFFER;
Op->Asl.AmlOpcode = AML_BUFFER_OP;
Op->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
UtSetParseOpName (Op);
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.Value.Integer = CurrentByteOffset;
(void) OpcSetOptimalIntegerSize (BufferLengthOp);
UtSetParseOpName (BufferLengthOp);
BufferOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
BufferOp->Asl.AmlOpcode = AML_RAW_DATA_CHAIN;
@ -1005,8 +1060,7 @@ RsDoResourceTemplate (
BufferOp->Asl.AmlLength = CurrentByteOffset;
BufferOp->Asl.Value.Buffer = (UINT8 *) HeadRnode.Next;
BufferOp->Asl.CompileFlags |= NODE_IS_RESOURCE_DATA;
UtSetParseOpName (BufferOp);
return;
}

View File

@ -53,6 +53,7 @@
* This module contains the I/O-related small resource descriptors:
*
* DMA
* FixedDMA
* FixedIO
* IO
* IRQ
@ -180,6 +181,81 @@ RsDoDmaDescriptor (
}
/*******************************************************************************
*
* FUNCTION: RsDoFixedDmaDescriptor
*
* PARAMETERS: Op - Parent resource descriptor parse node
* CurrentByteOffset - Offset into the resource template AML
* buffer (to track references to the desc)
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "FixedDMA" descriptor
*
******************************************************************************/
ASL_RESOURCE_NODE *
RsDoFixedDmaDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset)
{
AML_RESOURCE *Descriptor;
ACPI_PARSE_OBJECT *InitializerOp;
ASL_RESOURCE_NODE *Rnode;
UINT32 i;
InitializerOp = Op->Asl.Child;
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_DMA));
Descriptor = Rnode->Buffer;
Descriptor->FixedDma.DescriptorType =
ACPI_RESOURCE_NAME_FIXED_DMA | ASL_RDESC_FIXED_DMA_SIZE;
/* Process all child initialization nodes */
for (i = 0; InitializerOp; i++)
{
switch (i)
{
case 0: /* DMA Request Lines [WORD] (_DMA) */
Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
break;
case 1: /* DMA Channel [WORD] (_TYP) */
Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
break;
case 2: /* Transfer Width [BYTE] (_SIZ) */
Descriptor->FixedDma.Width = (UINT8) InitializerOp->Asl.Value.Integer;
RsCreateByteField (InitializerOp, ACPI_RESTAG_XFERTYPE,
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Width));
break;
case 3: /* Descriptor Name (optional) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
default: /* Ignore any extra nodes */
break;
}
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
}
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoFixedIoDescriptor

View File

@ -1,4 +1,3 @@
/******************************************************************************
*
* Module Name: aslrestype2 - Miscellaneous Large resource descriptors

1187
compiler/aslrestype2s.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -398,6 +398,7 @@ TrDoSwitch (
ACPI_PARSE_OBJECT *MethodOp;
ACPI_PARSE_OBJECT *StoreOp;
ACPI_PARSE_OBJECT *BreakOp;
ACPI_PARSE_OBJECT *BufferOp;
char *PredicateValueName;
UINT16 Index;
UINT32 Btype;
@ -647,6 +648,7 @@ TrDoSwitch (
Predicate = StartNode->Asl.Child;
NewOp = TrCreateLeafNode (PARSEOP_NAME);
TrAmlInitLineNumbers (NewOp, StartNode);
/* Find the parent method */
@ -690,6 +692,7 @@ TrDoSwitch (
NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
TrAmlInitLineNumbers (NewOp2, NewOp);
NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION;
NewOp->Asl.Child = NewOp2;
@ -700,21 +703,27 @@ TrDoSwitch (
case ACPI_BTYPE_INTEGER:
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
(UINT64) 0);
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
break;
case ACPI_BTYPE_STRING:
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
(UINT64) ACPI_TO_INTEGER (""));
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
break;
case ACPI_BTYPE_BUFFER:
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
(UINT64) 0));
Next = NewOp2->Asl.Next;
TrAmlInitLineNumbers (Next, NewOp2);
(void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
(UINT64) 1));
(void) TrLinkPeerNode (Next->Asl.Child,
TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0));
TrAmlInitLineNumbers (Next->Asl.Child, Next);
BufferOp = TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0);
TrAmlInitLineNumbers (BufferOp, Next->Asl.Child);
(void) TrLinkPeerNode (Next->Asl.Child, BufferOp);
TrAmlSetSubtreeParent (Next->Asl.Child, Next);
break;
@ -733,6 +742,7 @@ TrDoSwitch (
*/
TrAmlInitNode (StartNode, PARSEOP_WHILE);
NewOp = TrCreateLeafNode (PARSEOP_ONE);
TrAmlInitLineNumbers (NewOp, StartNode);
NewOp->Asl.Next = Predicate->Asl.Next;
NewOp->Asl.Parent = StartNode;
StartNode->Asl.Child = NewOp;
@ -740,6 +750,7 @@ TrDoSwitch (
/* Create a Store() node */
StoreOp = TrCreateLeafNode (PARSEOP_STORE);
TrAmlInitLineNumbers (StoreOp, NewOp);
StoreOp->Asl.Parent = StartNode;
TrAmlInsertPeer (NewOp, StoreOp);
@ -750,6 +761,7 @@ TrDoSwitch (
NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
TrAmlInitLineNumbers (NewOp, StoreOp);
NewOp->Asl.Parent = StoreOp;
Predicate->Asl.Next = NewOp;
@ -762,6 +774,7 @@ TrDoSwitch (
}
BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
TrAmlInitLineNumbers (BreakOp, NewOp);
BreakOp->Asl.Parent = StartNode;
TrAmlInsertPeer (Conditional, BreakOp);
}

View File

@ -45,6 +45,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
#include "acapps.h"
#include <time.h>
#define _COMPONENT ACPI_COMPILER
@ -425,6 +426,8 @@ TrCreateConstantLeafNode (
time_t CurrentTime;
char *StaticTimeString;
char *TimeString;
char *Path;
char *Filename;
switch (ParseOpcode)
@ -434,7 +437,7 @@ TrCreateConstantLeafNode (
Op->Asl.Value.Integer = Op->Asl.LineNumber;
break;
case PARSEOP___FILE__:
case PARSEOP___PATH__:
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
/* Op.Asl.Filename contains the full pathname to the file */
@ -442,7 +445,17 @@ TrCreateConstantLeafNode (
Op->Asl.Value.String = Op->Asl.Filename;
break;
case PARSEOP___DATE__:
case PARSEOP___FILE__:
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
/* Get the simple filename from the full path */
FlSplitInputPathname (Op->Asl.Filename, &Path, &Filename);
ACPI_FREE (Path);
Op->Asl.Value.String = Filename;
break;
case PARSEOP___DATE__:
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
/* Get a copy of the current time */

View File

@ -1032,6 +1032,7 @@ AnOtherSemanticAnalysisWalkBegin (
ACPI_PARSE_OBJECT *ArgNode;
ACPI_PARSE_OBJECT *PrevArgNode = NULL;
const ACPI_OPCODE_INFO *OpInfo;
ACPI_NAMESPACE_NODE *Node;
OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode);
@ -1156,6 +1157,78 @@ AnOtherSemanticAnalysisWalkBegin (
}
break;
case PARSEOP_CONNECTION:
/*
* Ensure that the referenced operation region has the correct SPACE_ID.
* From the grammar/parser, we know the parent is a FIELD definition.
*/
ArgNode = Op->Asl.Parent; /* Field definition */
ArgNode = ArgNode->Asl.Child; /* First child is the OpRegion Name */
Node = ArgNode->Asl.Node; /* OpRegion namespace node */
ArgNode = Node->Op; /* OpRegion definition */
ArgNode = ArgNode->Asl.Child; /* First child is the OpRegion Name */
ArgNode = ArgNode->Asl.Next; /* Next peer is the SPACE_ID (what we want) */
/*
* The Connection() operator is only valid for the following operation
* region SpaceIds: GeneralPurposeIo and GenericSerialBus.
*/
if ((ArgNode->Asl.Value.Integer != ACPI_ADR_SPACE_GPIO) &&
(ArgNode->Asl.Value.Integer != ACPI_ADR_SPACE_GSBUS))
{
AslError (ASL_ERROR, ASL_MSG_CONNECTION_INVALID, Op, NULL);
}
break;
case PARSEOP_FIELD:
/*
* Ensure that fields for GeneralPurposeIo and GenericSerialBus
* contain at least one Connection() operator
*/
ArgNode = Op->Asl.Child; /* 1st child is the OpRegion Name */
Node = ArgNode->Asl.Node; /* OpRegion namespace node */
if (!Node)
{
break;
}
ArgNode = Node->Op; /* OpRegion definition */
ArgNode = ArgNode->Asl.Child; /* First child is the OpRegion Name */
ArgNode = ArgNode->Asl.Next; /* Next peer is the SPACE_ID (what we want) */
/* We are only interested in GeneralPurposeIo and GenericSerialBus */
if ((ArgNode->Asl.Value.Integer != ACPI_ADR_SPACE_GPIO) &&
(ArgNode->Asl.Value.Integer != ACPI_ADR_SPACE_GSBUS))
{
break;
}
ArgNode = Op->Asl.Child; /* 1st child is the OpRegion Name */
ArgNode = ArgNode->Asl.Next; /* AccessType */
ArgNode = ArgNode->Asl.Next; /* LockRule */
ArgNode = ArgNode->Asl.Next; /* UpdateRule */
ArgNode = ArgNode->Asl.Next; /* Start of FieldUnitList */
/* Walk the FieldUnitList */
while (ArgNode)
{
if (ArgNode->Asl.ParseOpcode == PARSEOP_CONNECTION)
{
break;
}
else if (ArgNode->Asl.ParseOpcode == PARSEOP_NAMESEG)
{
AslError (ASL_ERROR, ASL_MSG_CONNECTION_MISSING, ArgNode, NULL);
break;
}
ArgNode = ArgNode->Asl.Next;
}
break;
default:
break;
}

View File

@ -310,6 +310,17 @@ DtCompileDataTable (
Status = DtCompileRsdp (FieldList);
return (Status);
}
else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_S3PT))
{
Status = DtCompileS3pt (FieldList);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtSetTableLength ();
return (Status);
}
/*
* All other tables must use the common ACPI table header. Insert the
@ -411,6 +422,7 @@ DtCompileTable (
UINT8 FieldType;
UINT8 *Buffer;
UINT8 *FlagBuffer = NULL;
UINT32 CurrentFlagByteOffset = 0;
ACPI_STATUS Status;
@ -442,6 +454,11 @@ DtCompileTable (
*/
for (; Info->Name; Info++)
{
if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
{
continue;
}
if (!LocalField)
{
sprintf (MsgBuffer, "Found NULL field - Field name \"%s\" needed",
@ -472,6 +489,7 @@ DtCompileTable (
*Field = LocalField;
FlagBuffer = Buffer;
CurrentFlagByteOffset = Info->Offset;
break;
case DT_FIELD_TYPE_FLAG:
@ -480,6 +498,14 @@ DtCompileTable (
if (FlagBuffer)
{
/*
* We must increment the FlagBuffer when we have crossed
* into the next flags byte within the flags field
* of type DT_FIELD_TYPE_FLAGS_INTEGER.
*/
FlagBuffer += (Info->Offset - CurrentFlagByteOffset);
CurrentFlagByteOffset = Info->Offset;
DtCompileFlag (FlagBuffer, LocalField, Info);
}
else

View File

@ -398,6 +398,10 @@ ACPI_STATUS
DtCompileFadt (
void **PFieldList);
ACPI_STATUS
DtCompileFpdt (
void **PFieldList);
ACPI_STATUS
DtCompileHest (
void **PFieldList);
@ -414,14 +418,26 @@ ACPI_STATUS
DtCompileMcfg (
void **PFieldList);
ACPI_STATUS
DtCompileMpst (
void **PFieldList);
ACPI_STATUS
DtCompileMsct (
void **PFieldList);
ACPI_STATUS
DtCompilePmtt (
void **PFieldList);
ACPI_STATUS
DtCompileRsdt (
void **PFieldList);
ACPI_STATUS
DtCompileS3pt (
DT_FIELD **PFieldList);
ACPI_STATUS
DtCompileSlic (
void **PFieldList);
@ -459,6 +475,7 @@ DtGetGenericTableInfo (
extern const unsigned char TemplateAsf[];
extern const unsigned char TemplateBoot[];
extern const unsigned char TemplateBert[];
extern const unsigned char TemplateBgrt[];
extern const unsigned char TemplateCpep[];
extern const unsigned char TemplateDbgp[];
extern const unsigned char TemplateDmar[];
@ -466,14 +483,19 @@ extern const unsigned char TemplateEcdt[];
extern const unsigned char TemplateEinj[];
extern const unsigned char TemplateErst[];
extern const unsigned char TemplateFadt[];
extern const unsigned char TemplateFpdt[];
extern const unsigned char TemplateGtdt[];
extern const unsigned char TemplateHest[];
extern const unsigned char TemplateHpet[];
extern const unsigned char TemplateIvrs[];
extern const unsigned char TemplateMadt[];
extern const unsigned char TemplateMcfg[];
extern const unsigned char TemplateMchi[];
extern const unsigned char TemplateMpst[];
extern const unsigned char TemplateMsct[];
extern const unsigned char TemplatePmtt[];
extern const unsigned char TemplateRsdt[];
extern const unsigned char TemplateS3pt[];
extern const unsigned char TemplateSbst[];
extern const unsigned char TemplateSlic[];
extern const unsigned char TemplateSlit[];

View File

@ -523,12 +523,25 @@ DtCompileFlag (
break;
case ACPI_DMT_FLAGS1:
BitPosition = 1;
BitLength = 2;
break;
case ACPI_DMT_FLAGS2:
BitPosition = 2;
BitLength = 2;
break;
case ACPI_DMT_FLAGS4:
BitPosition = 4;
BitLength = 2;
break;
default:
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid flag opcode");

View File

@ -296,6 +296,11 @@ DtGetSubtableLength (
for (; Info->Name; Info++)
{
if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
{
continue;
}
if (!Field)
{
goto Error;

View File

@ -660,6 +660,90 @@ DtCompileFadt (
}
DtInsertSubtable (ParentTable, Subtable);
if (Revision >= 5)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt5,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
}
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileFpdt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile FPDT.
*
*****************************************************************************/
ACPI_STATUS
DtCompileFpdt (
void **List)
{
ACPI_STATUS Status;
ACPI_FPDT_HEADER *FpdtHeader;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
ACPI_DMTABLE_INFO *InfoTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
while (*PFieldList)
{
SubtableStart = *PFieldList;
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFpdtHdr,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
FpdtHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer);
switch (FpdtHeader->Type)
{
case ACPI_FPDT_TYPE_BOOT:
InfoTable = AcpiDmTableInfoFpdt0;
break;
case ACPI_FPDT_TYPE_S3PERF:
InfoTable = AcpiDmTableInfoFpdt1;
break;
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "FPDT");
return (AE_ERROR);
break;
}
Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPopSubtable ();
}
return (AE_OK);
@ -1025,6 +1109,12 @@ DtCompileMadt (
case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
InfoTable = AcpiDmTableInfoMadt10;
break;
case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
InfoTable = AcpiDmTableInfoMadt11;
break;
case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
InfoTable = AcpiDmTableInfoMadt12;
break;
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "MADT");
return (AE_ERROR);
@ -1070,6 +1160,143 @@ DtCompileMcfg (
}
/******************************************************************************
*
* FUNCTION: DtCompileMpst
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile MPST.
*
*****************************************************************************/
ACPI_STATUS
DtCompileMpst (
void **List)
{
ACPI_STATUS Status;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
ACPI_MPST_CHANNEL *MpstChannelInfo;
ACPI_MPST_POWER_NODE *MpstPowerNode;
ACPI_MPST_DATA_HDR *MpstDataHeader;
UINT16 SubtableCount;
UINT8 PowerStateCount;
UINT8 ComponentCount;
/* Main table */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpst, &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
MpstChannelInfo = ACPI_CAST_PTR (ACPI_MPST_CHANNEL, Subtable->Buffer);
SubtableCount = MpstChannelInfo->PowerNodeCount;
while (*PFieldList && SubtableCount)
{
/* Subtable: Memory Power Node(s) */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpst0,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
MpstPowerNode = ACPI_CAST_PTR (ACPI_MPST_POWER_NODE, Subtable->Buffer);
PowerStateCount = MpstPowerNode->NumPowerStates;
ComponentCount = MpstPowerNode->NumPhysicalComponents;
ParentTable = DtPeekSubtable ();
/* Sub-subtables - Memory Power State Structure(s) */
while (*PFieldList && PowerStateCount)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpst0A,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
PowerStateCount--;
}
/* Sub-subtables - Physical Component ID Structure(s) */
while (*PFieldList && ComponentCount)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpst0B,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
ComponentCount--;
}
SubtableCount--;
DtPopSubtable ();
}
/* Subtable: Count of Memory Power State Characteristic structures */
DtPopSubtable ();
Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpst1, &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
MpstDataHeader = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, Subtable->Buffer);
SubtableCount = MpstDataHeader->CharacteristicsCount;
ParentTable = DtPeekSubtable ();
/* Subtable: Memory Power State Characteristics structure(s) */
while (*PFieldList && SubtableCount)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpst2,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
SubtableCount--;
}
DtPopSubtable ();
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileMsct
@ -1095,6 +1322,147 @@ DtCompileMsct (
}
/******************************************************************************
*
* FUNCTION: DtCompilePmtt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile PMTT.
*
*****************************************************************************/
ACPI_STATUS
DtCompilePmtt (
void **List)
{
ACPI_STATUS Status;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
ACPI_PMTT_HEADER *PmttHeader;
ACPI_PMTT_CONTROLLER *PmttController;
UINT16 DomainCount;
UINT8 PrevType = ACPI_PMTT_TYPE_SOCKET;
/* Main table */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt, &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
while (*PFieldList)
{
SubtableStart = *PFieldList;
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmttHdr,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
PmttHeader = ACPI_CAST_PTR (ACPI_PMTT_HEADER, Subtable->Buffer);
while (PrevType >= PmttHeader->Type)
{
DtPopSubtable ();
if (PrevType == ACPI_PMTT_TYPE_SOCKET)
{
break;
}
PrevType--;
}
PrevType = PmttHeader->Type;
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
switch (PmttHeader->Type)
{
case ACPI_PMTT_TYPE_SOCKET:
/* Subtable: Socket Structure */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt0,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
break;
case ACPI_PMTT_TYPE_CONTROLLER:
/* Subtable: Memory Controller Structure */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt1,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
PmttController = ACPI_CAST_PTR (ACPI_PMTT_CONTROLLER,
(Subtable->Buffer - sizeof (ACPI_PMTT_HEADER)));
DomainCount = PmttController->DomainCount;
while (DomainCount)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt1a,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
DomainCount--;
}
break;
case ACPI_PMTT_TYPE_DIMM:
/* Subtable: Physical Component Structure */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPmtt2,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
break;
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "PMTT");
return (AE_ERROR);
}
}
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileRsdt
@ -1132,6 +1500,85 @@ DtCompileRsdt (
}
/******************************************************************************
*
* FUNCTION: DtCompileS3pt
*
* PARAMETERS: PFieldList - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile S3PT (Pointed to by FPDT)
*
*****************************************************************************/
ACPI_STATUS
DtCompileS3pt (
DT_FIELD **PFieldList)
{
ACPI_STATUS Status;
ACPI_S3PT_HEADER *S3ptHeader;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
ACPI_DMTABLE_INFO *InfoTable;
DT_FIELD *SubtableStart;
Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3pt,
&Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtPushSubtable (Gbl_RootTable);
while (*PFieldList)
{
SubtableStart = *PFieldList;
Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3ptHdr,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPushSubtable (Subtable);
S3ptHeader = ACPI_CAST_PTR (ACPI_S3PT_HEADER, Subtable->Buffer);
switch (S3ptHeader->Type)
{
case ACPI_S3PT_TYPE_RESUME:
InfoTable = AcpiDmTableInfoS3pt0;
break;
case ACPI_S3PT_TYPE_SUSPEND:
InfoTable = AcpiDmTableInfoS3pt1;
break;
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "S3PT");
return (AE_ERROR);
}
Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileSlic

View File

@ -87,6 +87,17 @@ const unsigned char TemplateAsf[] =
0x01,0x00 /* 00000070 ".." */
};
const unsigned char TemplateBgrt[] =
{
0x42,0x47,0x52,0x54,0x38,0x00,0x00,0x00, /* 00000000 "BGRT8..." */
0x01,0x0D,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x23,0x06,0x11,0x20,0x01,0x00,0x00,0x00, /* 00000020 "#.. ...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000030 "........" */
};
const unsigned char TemplateBert[] =
{
0x42,0x45,0x52,0x54,0x30,0x00,0x00,0x00, /* 00000000 "BERT0..." */
@ -326,6 +337,37 @@ const unsigned char TemplateFadt[] =
0x00,0x00,0x00,0x00 /* 000000F0 "...." */
};
const unsigned char TemplateFpdt[] =
{
0x46,0x50,0x44,0x54,0x64,0x00,0x00,0x00, /* 00000000 "FPDTd..." */
0x01,0xBD,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x04,0x08,0x11,0x20,0x00,0x00,0x30,0x01, /* 00000020 "... ..0." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x10,0x01, /* 00000050 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
0x00,0x00,0x00,0x00 /* 00000060 "...." */
};
const unsigned char TemplateGtdt[] =
{
0x47,0x54,0x44,0x54,0x50,0x00,0x00,0x00, /* 00000000 "GTDTP..." */
0x01,0xF1,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x23,0x06,0x11,0x20,0x00,0x00,0x00,0x00, /* 00000020 "#.. ...." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000048 "........" */
};
const unsigned char TemplateHest[] =
{
0x48,0x45,0x53,0x54,0xD4,0x01,0x00,0x00, /* 00000000 "HEST...." */
@ -428,13 +470,15 @@ const unsigned char TemplateIvrs[] =
0x00,0x00,0x00,0x00 /* 000000B8 "...." */
};
/* MADT with ACPI 5.0 subtables */
const unsigned char TemplateMadt[] =
{
0x41,0x50,0x49,0x43,0xB6,0x00,0x00,0x00, /* 00000000 "APIC...." */
0x01,0x45,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".EINTEL " */
0x41,0x50,0x49,0x43,0xF6,0x00,0x00,0x00, /* 00000000 "APIC...." */
0x01,0xB0,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */
0x23,0x06,0x11,0x20,0x00,0x00,0x00,0x00, /* 00000020 "#.. ...." */
0x01,0x00,0x00,0x00,0x00,0x08,0x00,0x00, /* 00000028 "........" */
0x01,0x00,0x00,0x00,0x01,0x0C,0x01,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@ -452,7 +496,15 @@ const unsigned char TemplateMadt[] =
0x00,0x00,0x09,0x10,0x00,0x00,0x00,0x00, /* 00000098 "........" */
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
0x00,0x00,0x0A,0x0C,0x05,0x00,0x00,0x00, /* 000000A8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00 /* 000000B0 "......" */
0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x28, /* 000000B0 ".......(" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x18, /* 000000D8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00 /* 000000F0 "......" */
};
const unsigned char TemplateMcfg[] =
@ -480,6 +532,24 @@ const unsigned char TemplateMchi[] =
0x00,0x00,0x00,0x00,0x00 /* 00000040 "....." */
};
const unsigned char TemplateMpst[] =
{
0x4D,0x50,0x53,0x54,0x6E,0x00,0x00,0x00, /* 00000000 "MPSTn..." */
0x01,0x98,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x04,0x08,0x11,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
0x00,0x00,0x02,0x03,0x00,0x00,0x00,0x00, /* 00000040 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
0x01,0x00,0x41,0x00,0x00,0x00,0x00,0x00, /* 00000050 "..A....." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
0x00,0x00,0x00,0x00,0x00,0x00 /* 00000068 "......" */
};
const unsigned char TemplateMsct[] =
{
0x4D,0x53,0x43,0x54,0x90,0x00,0x00,0x00, /* 00000000 "MSCT...." */
@ -502,6 +572,33 @@ const unsigned char TemplateMsct[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000088 "........" */
};
const unsigned char TemplatePmtt[] =
{
0x50,0x4D,0x54,0x54,0xB4,0x00,0x00,0x00, /* 00000000 "PMTT...." */
0x01,0x3A,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".:INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x26,0x08,0x11,0x20,0x00,0x00,0x00,0x00, /* 00000020 "&.. ...." */
0x00,0x00,0x80,0x00,0x01,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x54,0x00, /* 00000030 "......T." */
0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "........" */
0x02,0x00,0x14,0x00,0x02,0x00,0x00,0x00, /* 00000060 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 "........" */
0x00,0x00,0x00,0x00,0x02,0x00,0x14,0x00, /* 00000070 "........" */
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
0x01,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000088 ".. ....." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
0x00,0x00,0x0C,0x00,0x01,0x00,0x00,0x00, /* 000000A8 "........" */
0x00,0x00,0x00,0x00 /* 000000B0 "...." */
};
const unsigned char TemplateRsdp[] =
{
0x52,0x53,0x44,0x20,0x50,0x54,0x52,0x20, /* 00000000 "RSD PTR " */
@ -524,6 +621,17 @@ const unsigned char TemplateRsdt[] =
0x80,0x00,0x00,0x00 /* 00000040 "...." */
};
const unsigned char TemplateS3pt[] =
{
0x53,0x33,0x50,0x54,0x34,0x00,0x00,0x00, /* 00000000 "S3PT4..." */
0x00,0x00,0x18,0x01,0x00,0x00,0x00,0x00, /* 00000008 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000010 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000018 "........" */
0x01,0x00,0x14,0x01,0x00,0x00,0x00,0x00, /* 00000020 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00 /* 00000030 "...." */
};
const unsigned char TemplateSbst[] =
{
0x53,0x42,0x53,0x54,0x30,0x00,0x00,0x00, /* 00000000 "SBST0..." */

View File

@ -384,7 +384,9 @@ DtGetFieldType (
case ACPI_DMT_FLAG6:
case ACPI_DMT_FLAG7:
case ACPI_DMT_FLAGS0:
case ACPI_DMT_FLAGS1:
case ACPI_DMT_FLAGS2:
case ACPI_DMT_FLAGS4:
Type = DT_FIELD_TYPE_FLAG;
break;
@ -510,8 +512,11 @@ DtGetFieldLength (
case ACPI_DMT_FLAG6:
case ACPI_DMT_FLAG7:
case ACPI_DMT_FLAGS0:
case ACPI_DMT_FLAGS1:
case ACPI_DMT_FLAGS2:
case ACPI_DMT_FLAGS4:
case ACPI_DMT_LABEL:
case ACPI_DMT_EXTRA_TEXT:
ByteLength = 0;
break;
@ -521,6 +526,7 @@ DtGetFieldLength (
case ACPI_DMT_ACCWIDTH:
case ACPI_DMT_IVRS:
case ACPI_DMT_MADT:
case ACPI_DMT_PMTT:
case ACPI_DMT_SRAT:
case ACPI_DMT_ASF:
case ACPI_DMT_HESTNTYP:
@ -550,6 +556,11 @@ DtGetFieldLength (
ByteLength = 4;
break;
case ACPI_DMT_UINT40:
ByteLength = 5;
break;
case ACPI_DMT_UINT48:
case ACPI_DMT_NAME6:
ByteLength = 6;
break;

View File

@ -46,6 +46,7 @@
#include "accommon.h"
#include "acevents.h"
#include "acdebug.h"
#include "acnamesp.h"
#include "acresrc.h"
#include "actables.h"
@ -69,6 +70,18 @@ AcpiDmTestResourceConversion (
ACPI_NAMESPACE_NODE *Node,
char *Name);
static ACPI_STATUS
AcpiDbResourceCallback (
ACPI_RESOURCE *Resource,
void *Context);
static ACPI_STATUS
AcpiDbDeviceResources (
ACPI_HANDLE ObjHandle,
UINT32 NestingLevel,
void *Context,
void **ReturnValue);
/*******************************************************************************
*
@ -454,6 +467,78 @@ AcpiDbDisplayInterfaces (
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayTemplate
*
* PARAMETERS: BufferArg - Buffer name or addrss
*
* RETURN: None
*
* DESCRIPTION: Dump a buffer that contains a resource template
*
******************************************************************************/
void
AcpiDbDisplayTemplate (
char *BufferArg)
{
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_BUFFER ReturnObj;
/* Translate BufferArg to an Named object */
Node = AcpiDbConvertToNode (BufferArg);
if (!Node || (Node == AcpiGbl_RootNode))
{
AcpiOsPrintf ("Invalid argument: %s\n", BufferArg);
return;
}
/* We must have a buffer object */
if (Node->Type != ACPI_TYPE_BUFFER)
{
AcpiOsPrintf ("Not a Buffer object, cannot be a template: %s\n",
BufferArg);
return;
}
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
ReturnObj.Pointer = AcpiGbl_DbBuffer;
/* Attempt to convert the raw buffer to a resource list */
Status = AcpiRsCreateResourceList (Node->Object, &ReturnObj);
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
AcpiDbgLevel |= ACPI_LV_RESOURCES;
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not convert Buffer to a resource list: %s, %s\n",
BufferArg, AcpiFormatException (Status));
goto DumpBuffer;
}
/* Now we can dump the resource list */
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE,
ReturnObj.Pointer));
DumpBuffer:
AcpiOsPrintf ("\nRaw data buffer:\n");
AcpiUtDumpBuffer ((UINT8 *) Node->Object->Buffer.Pointer,
Node->Object->Buffer.Length,
DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
return;
}
/*******************************************************************************
*
* FUNCTION: AcpiDmCompareAmlResources
@ -479,11 +564,14 @@ AcpiDmCompareAmlResources (
{
UINT8 *Aml1;
UINT8 *Aml2;
UINT8 *Aml1End;
UINT8 *Aml2End;
ACPI_RSDESC_SIZE Aml1Length;
ACPI_RSDESC_SIZE Aml2Length;
ACPI_RSDESC_SIZE Offset = 0;
UINT8 ResourceType;
UINT32 Count = 0;
UINT32 i;
/* Compare overall buffer sizes (may be different due to size rounding) */
@ -491,16 +579,18 @@ AcpiDmCompareAmlResources (
if (Aml1BufferLength != Aml2BufferLength)
{
AcpiOsPrintf (
"**** Buffer length mismatch in converted AML: original %X new %X ****\n",
"**** Buffer length mismatch in converted AML: Original %X, New %X ****\n",
Aml1BufferLength, Aml2BufferLength);
}
Aml1 = Aml1Buffer;
Aml2 = Aml2Buffer;
Aml1End = Aml1Buffer + Aml1BufferLength;
Aml2End = Aml2Buffer + Aml2BufferLength;
/* Walk the descriptor lists, comparing each descriptor */
while (Aml1 < (Aml1Buffer + Aml1BufferLength))
while ((Aml1 < Aml1End) && (Aml2 < Aml2End))
{
/* Get the lengths of each descriptor */
@ -513,7 +603,7 @@ AcpiDmCompareAmlResources (
if (Aml1Length != Aml2Length)
{
AcpiOsPrintf (
"**** Length mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X L1 %X L2 %X ****\n",
"**** Length mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X Len1 %X, Len2 %X ****\n",
Count, ResourceType, Offset, Aml1Length, Aml2Length);
}
@ -524,6 +614,15 @@ AcpiDmCompareAmlResources (
AcpiOsPrintf (
"**** Data mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X ****\n",
Count, ResourceType, Offset);
for (i = 0; i < Aml1Length; i++)
{
if (Aml1[i] != Aml2[i])
{
AcpiOsPrintf ("Mismatch at byte offset %.2X: is %2.2X, should be %2.2X\n",
i, Aml2[i], Aml1[i]);
}
}
}
/* Exit on EndTag descriptor */
@ -624,11 +723,255 @@ AcpiDmTestResourceConversion (
}
/*******************************************************************************
*
* FUNCTION: AcpiDbResourceCallback
*
* PARAMETERS: ACPI_WALK_RESOURCE_CALLBACK
*
* RETURN: Status
*
* DESCRIPTION: Simple callback to exercise AcpiWalkResources
*
******************************************************************************/
static ACPI_STATUS
AcpiDbResourceCallback (
ACPI_RESOURCE *Resource,
void *Context)
{
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDeviceResources
*
* PARAMETERS: ACPI_WALK_CALLBACK
*
* RETURN: Status
*
* DESCRIPTION: Display the _PRT/_CRS/_PRS resources for a device object.
*
******************************************************************************/
static ACPI_STATUS
AcpiDbDeviceResources (
ACPI_HANDLE ObjHandle,
UINT32 NestingLevel,
void *Context,
void **ReturnValue)
{
ACPI_NAMESPACE_NODE *Node;
ACPI_NAMESPACE_NODE *PrtNode = NULL;
ACPI_NAMESPACE_NODE *CrsNode = NULL;
ACPI_NAMESPACE_NODE *PrsNode = NULL;
ACPI_NAMESPACE_NODE *AeiNode = NULL;
char *ParentPath;
ACPI_BUFFER ReturnObj;
ACPI_STATUS Status;
Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
ParentPath = AcpiNsGetExternalPathname (Node);
if (!ParentPath)
{
return (AE_NO_MEMORY);
}
/* Get handles to the resource methods for this device */
(void) AcpiGetHandle (Node, METHOD_NAME__PRT, ACPI_CAST_PTR (ACPI_HANDLE, &PrtNode));
(void) AcpiGetHandle (Node, METHOD_NAME__CRS, ACPI_CAST_PTR (ACPI_HANDLE, &CrsNode));
(void) AcpiGetHandle (Node, METHOD_NAME__PRS, ACPI_CAST_PTR (ACPI_HANDLE, &PrsNode));
(void) AcpiGetHandle (Node, METHOD_NAME__AEI, ACPI_CAST_PTR (ACPI_HANDLE, &AeiNode));
if (!PrtNode && !CrsNode && !PrsNode && !AeiNode)
{
goto Cleanup; /* Nothing to do */
}
AcpiOsPrintf ("\nDevice: %s\n", ParentPath);
/* Prepare for a return object of arbitrary size */
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
/* _PRT */
if (PrtNode)
{
AcpiOsPrintf ("Evaluating _PRT\n");
Status = AcpiEvaluateObject (PrtNode, NULL, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not evaluate _PRT: %s\n",
AcpiFormatException (Status));
goto GetCrs;
}
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetIrqRoutingTable (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n",
AcpiFormatException (Status));
goto GetCrs;
}
AcpiRsDumpIrqList (ACPI_CAST_PTR (UINT8, AcpiGbl_DbBuffer));
}
/* _CRS */
GetCrs:
if (CrsNode)
{
AcpiOsPrintf ("Evaluating _CRS\n");
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (CrsNode, NULL, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not evaluate _CRS: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* This code is here to exercise the AcpiWalkResources interface */
Status = AcpiWalkResources (Node, METHOD_NAME__CRS,
AcpiDbResourceCallback, NULL);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiWalkResources failed: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* Get the _CRS resource list */
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetCurrentResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* Dump the _CRS resource list */
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE,
ReturnObj.Pointer));
/*
* Perform comparison of original AML to newly created AML. This tests both
* the AML->Resource conversion and the Resource->Aml conversion.
*/
Status = AcpiDmTestResourceConversion (Node, METHOD_NAME__CRS);
/* Execute _SRS with the resource list */
Status = AcpiSetCurrentResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiSetCurrentResources failed: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
}
/* _PRS */
GetPrs:
if (PrsNode)
{
AcpiOsPrintf ("Evaluating _PRS\n");
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (PrsNode, NULL, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not evaluate _PRS: %s\n",
AcpiFormatException (Status));
goto GetAei;
}
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetPossibleResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetPossibleResources failed: %s\n",
AcpiFormatException (Status));
goto GetAei;
}
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
}
/* _AEI */
GetAei:
if (AeiNode)
{
AcpiOsPrintf ("Evaluating _AEI\n");
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (AeiNode, NULL, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not evaluate _AEI: %s\n",
AcpiFormatException (Status));
goto Cleanup;
}
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetEventResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetEventResources failed: %s\n",
AcpiFormatException (Status));
goto Cleanup;
}
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
}
Cleanup:
ACPI_FREE (ParentPath);
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayResources
*
* PARAMETERS: ObjectArg - String with hex value of the object
* PARAMETERS: ObjectArg - String object name or object pointer.
* "*" means "display resources for all devices"
*
* RETURN: None
*
@ -641,142 +984,38 @@ AcpiDbDisplayResources (
char *ObjectArg)
{
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_BUFFER ReturnObj;
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
AcpiDbgLevel |= ACPI_LV_RESOURCES;
/* Convert string to object pointer */
/* Asterisk means "display resources for all devices" */
Node = AcpiDbConvertToNode (ObjectArg);
if (!Node)
if (!ACPI_STRCMP (ObjectArg, "*"))
{
return;
(void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, AcpiDbDeviceResources, NULL, NULL, NULL);
}
/* Prepare for a return object of arbitrary size */
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
/* _PRT */
AcpiOsPrintf ("Evaluating _PRT\n");
/* Check if _PRT exists */
Status = AcpiEvaluateObject (Node, METHOD_NAME__PRT, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
else
{
AcpiOsPrintf ("Could not obtain _PRT: %s\n",
AcpiFormatException (Status));
goto GetCrs;
/* Convert string to object pointer */
Node = AcpiDbConvertToNode (ObjectArg);
if (Node)
{
if (Node->Type != ACPI_TYPE_DEVICE)
{
AcpiOsPrintf ("%4.4s: Name is not a device object (%s)\n",
Node->Name.Ascii, AcpiUtGetTypeName (Node->Type));
}
else
{
(void) AcpiDbDeviceResources (Node, 0, NULL, NULL);
}
}
}
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetIrqRoutingTable (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n",
AcpiFormatException (Status));
goto GetCrs;
}
AcpiRsDumpIrqList (ACPI_CAST_PTR (UINT8, AcpiGbl_DbBuffer));
/* _CRS */
GetCrs:
AcpiOsPrintf ("Evaluating _CRS\n");
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
/* Check if _CRS exists */
Status = AcpiEvaluateObject (Node, METHOD_NAME__CRS, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not obtain _CRS: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* Get the _CRS resource list */
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetCurrentResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* Dump the _CRS resource list */
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE,
ReturnObj.Pointer));
/*
* Perform comparison of original AML to newly created AML. This tests both
* the AML->Resource conversion and the Resource->Aml conversion.
*/
Status = AcpiDmTestResourceConversion (Node, METHOD_NAME__CRS);
/* Execute _SRS with the resource list */
Status = AcpiSetCurrentResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiSetCurrentResources failed: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* _PRS */
GetPrs:
AcpiOsPrintf ("Evaluating _PRS\n");
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
/* Check if _PRS exists */
Status = AcpiEvaluateObject (Node, METHOD_NAME__PRS, NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not obtain _PRS: %s\n",
AcpiFormatException (Status));
goto Cleanup;
}
ReturnObj.Pointer = AcpiGbl_DbBuffer;
ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetPossibleResources (Node, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetPossibleResources failed: %s\n",
AcpiFormatException (Status));
goto Cleanup;
}
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
Cleanup:
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
return;
}

View File

@ -90,6 +90,8 @@ static ACPI_ADR_SPACE_TYPE AcpiGbl_SpaceIdList[] =
ACPI_ADR_SPACE_CMOS,
ACPI_ADR_SPACE_PCI_BAR_TARGET,
ACPI_ADR_SPACE_IPMI,
ACPI_ADR_SPACE_GPIO,
ACPI_ADR_SPACE_GSBUS,
ACPI_ADR_SPACE_DATA_TABLE,
ACPI_ADR_SPACE_FIXED_HARDWARE
};
@ -971,7 +973,7 @@ AcpiDbDisplayHandlers (
while (HandlerObj)
{
if (i == HandlerObj->AddressSpace.SpaceId)
if (AcpiGbl_SpaceIdList[i] == HandlerObj->AddressSpace.SpaceId)
{
AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
(HandlerObj->AddressSpace.HandlerFlags &
@ -989,6 +991,24 @@ AcpiDbDisplayHandlers (
FoundHandler:;
}
/* Find all handlers for user-defined SpaceIDs */
HandlerObj = ObjDesc->Device.Handler;
while (HandlerObj)
{
if (HandlerObj->AddressSpace.SpaceId >= ACPI_USER_REGION_BEGIN)
{
AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
"User-defined ID", HandlerObj->AddressSpace.SpaceId);
AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
(HandlerObj->AddressSpace.HandlerFlags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
HandlerObj->AddressSpace.Handler);
}
HandlerObj = HandlerObj->AddressSpace.Next;
}
}
/* Fixed event handlers */

View File

@ -271,10 +271,11 @@ AcpiDbReadTable (
fseek (fp, 0, SEEK_SET);
/* The RSDT and FACS tables do not have standard ACPI headers */
/* The RSDT, FACS and S3PT tables do not have standard ACPI headers */
if (ACPI_COMPARE_NAME (TableHeader.Signature, "RSD ") ||
ACPI_COMPARE_NAME (TableHeader.Signature, "FACS"))
ACPI_COMPARE_NAME (TableHeader.Signature, "FACS") ||
ACPI_COMPARE_NAME (TableHeader.Signature, "S3PT"))
{
*TableLength = FileSize;
StandardHeader = FALSE;

View File

@ -131,6 +131,7 @@ enum AcpiExDebuggerCommands
CMD_STATS,
CMD_STOP,
CMD_TABLES,
CMD_TEMPLATE,
CMD_TERMINATE,
CMD_THREADS,
CMD_TRACE,
@ -199,6 +200,7 @@ static const COMMAND_INFO AcpiGbl_DbCommands[] =
{"STATS", 0},
{"STOP", 0},
{"TABLES", 0},
{"TEMPLATE", 1},
{"TERMINATE", 0},
{"THREADS", 3},
{"TRACE", 1},
@ -268,9 +270,10 @@ AcpiDbDisplayHelp (
AcpiOsPrintf (" Predefined Check all predefined names\n");
AcpiOsPrintf (" Prefix [<NamePath>] Set or Get current execution prefix\n");
AcpiOsPrintf (" References <Addr> Find all references to object at addr\n");
AcpiOsPrintf (" Resources <Device> Get and display Device resources\n");
AcpiOsPrintf (" Resources <DeviceName | *> Display Device resources (* = all devices)\n");
AcpiOsPrintf (" Set N <NamedObject> <Value> Set value for named integer\n");
AcpiOsPrintf (" Sleep <SleepState> Simulate sleep/wake sequence\n");
AcpiOsPrintf (" Template <Object> Format/dump a Buffer/ResourceTemplate\n");
AcpiOsPrintf (" Terminate Delete namespace and all internal objects\n");
AcpiOsPrintf (" Type <Object> Display object type\n");
@ -854,6 +857,10 @@ AcpiDbCommandDispatch (
AcpiDbDisplayTableInfo (AcpiGbl_DbArgs[1]);
break;
case CMD_TEMPLATE:
AcpiDbDisplayTemplate (AcpiGbl_DbArgs[1]);
break;
case CMD_TERMINATE:
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
AcpiUtSubsystemShutdown ();

View File

@ -208,7 +208,7 @@ AcpiDbDumpExternalObject (
AcpiOsPrintf ("\n");
}
AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
}
else
{

View File

@ -108,19 +108,19 @@ AcpiDmDisasmByteList (
}
AcpiDmIndent (Level);
if (ByteCount > 7)
if (ByteCount > 8)
{
AcpiOsPrintf ("/* %04X */ ", i);
AcpiOsPrintf ("/* %04X */ ", i);
}
}
AcpiOsPrintf ("0x%2.2X", (UINT32) ByteData[i]);
AcpiOsPrintf (" 0x%2.2X", (UINT32) ByteData[i]);
/* Add comma if there are more bytes to display */
if (i < (ByteCount -1))
{
AcpiOsPrintf (", ");
AcpiOsPrintf (",");
}
}

View File

@ -303,6 +303,7 @@ AcpiDmDisassembleOneOp (
UINT32 Length;
ACPI_PARSE_OBJECT *Child;
ACPI_STATUS Status;
UINT8 *Aml;
if (!Op)
@ -426,16 +427,19 @@ AcpiDmDisassembleOneOp (
* types of buffers, we have to closely look at the data in the
* buffer to determine the type.
*/
Status = AcpiDmIsResourceTemplate (Op);
if (ACPI_SUCCESS (Status))
if (!AcpiGbl_NoResourceDisassembly)
{
Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
AcpiOsPrintf ("ResourceTemplate");
break;
}
else if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ ");
Status = AcpiDmIsResourceTemplate (Op);
if (ACPI_SUCCESS (Status))
{
Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
AcpiOsPrintf ("ResourceTemplate");
break;
}
else if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ ");
}
}
if (AcpiDmIsUnicodeBuffer (Op))
@ -495,7 +499,7 @@ AcpiDmDisassembleOneOp (
if (Info->BitOffset % 8 == 0)
{
AcpiOsPrintf (" Offset (0x%.2X)", ACPI_DIV_8 (Info->BitOffset));
AcpiOsPrintf ("Offset (0x%.2X)", ACPI_DIV_8 (Info->BitOffset));
}
else
{
@ -507,16 +511,59 @@ AcpiDmDisassembleOneOp (
case AML_INT_ACCESSFIELD_OP:
case AML_INT_EXTACCESSFIELD_OP:
AcpiOsPrintf (" AccessAs (%s, ",
AcpiGbl_AccessTypes [(UINT32) (Op->Common.Value.Integer >> 8) & 0x7]);
AcpiOsPrintf ("AccessAs (%s, ",
AcpiGbl_AccessTypes [(UINT32) (Op->Common.Value.Integer & 0x7)]);
AcpiDmDecodeAttribute ((UINT8) (Op->Common.Value.Integer >> 8));
if (Op->Common.AmlOpcode == AML_INT_EXTACCESSFIELD_OP)
{
AcpiOsPrintf (" (0x%2.2X)", (unsigned) ((Op->Common.Value.Integer >> 16) & 0xFF));
}
AcpiDmDecodeAttribute ((UINT8) Op->Common.Value.Integer);
AcpiOsPrintf (")");
AcpiDmCommaIfFieldMember (Op);
break;
case AML_INT_CONNECTION_OP:
/*
* Two types of Connection() - one with a buffer object, the
* other with a namestring that points to a buffer object.
*/
AcpiOsPrintf ("Connection (");
Child = Op->Common.Value.Arg;
if (Child->Common.AmlOpcode == AML_INT_BYTELIST_OP)
{
AcpiOsPrintf ("\n");
Aml = Child->Named.Data;
Length = (UINT32) Child->Common.Value.Integer;
Info->Level += 1;
Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
AcpiDmResourceTemplate (Info, Op->Common.Parent, Aml, Length);
Info->Level -= 1;
AcpiDmIndent (Info->Level);
}
else
{
AcpiDmNamestring (Child->Common.Value.Name);
}
AcpiOsPrintf (")");
AcpiDmCommaIfFieldMember (Op);
AcpiOsPrintf ("\n");
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; /* for now, ignore in AcpiDmAscendingOp */
Child->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
break;
case AML_INT_BYTELIST_OP:
AcpiDmByteList (Info, Op);

View File

@ -55,12 +55,6 @@
/* Dispatch tables for Resource disassembly functions */
typedef
void (*ACPI_RESOURCE_HANDLER) (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] =
{
/* Small descriptors */
@ -75,7 +69,7 @@ static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] =
AcpiDmEndDependentDescriptor, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
AcpiDmIoDescriptor, /* 0x08, ACPI_RESOURCE_NAME_IO_PORT */
AcpiDmFixedIoDescriptor, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO_PORT */
NULL, /* 0x0A, Reserved */
AcpiDmFixedDmaDescriptor, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */
NULL, /* 0x0B, Reserved */
NULL, /* 0x0C, Reserved */
NULL, /* 0x0D, Reserved */
@ -95,7 +89,10 @@ static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] =
AcpiDmWordDescriptor, /* 0x08, ACPI_RESOURCE_NAME_WORD_ADDRESS_SPACE */
AcpiDmInterruptDescriptor, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_XRUPT */
AcpiDmQwordDescriptor, /* 0x0A, ACPI_RESOURCE_NAME_QWORD_ADDRESS_SPACE */
AcpiDmExtendedDescriptor /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
AcpiDmExtendedDescriptor, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
AcpiDmGpioDescriptor, /* 0x0C, ACPI_RESOURCE_NAME_GPIO */
NULL, /* 0x0D, Reserved */
AcpiDmSerialBusDescriptor /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS */
};

View File

@ -1050,4 +1050,3 @@ AcpiDmVendorLargeDescriptor (
}
#endif

700
disassembler/dmresrcl2.c Normal file
View File

@ -0,0 +1,700 @@
/*******************************************************************************
*
* Module Name: dmresrcl2.c - "Large" Resource Descriptor disassembly (#2)
*
******************************************************************************/
/*
* Copyright (C) 2000 - 2011, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#include "acpi.h"
#include "accommon.h"
#include "acdisasm.h"
#ifdef ACPI_DISASSEMBLER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbresrcl2")
/* Local prototypes */
static void
AcpiDmI2cSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmSpiSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmUartSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmGpioCommon (
AML_RESOURCE *Resource,
UINT32 Level);
static void
AcpiDmDumpRawDataBuffer (
UINT8 *Buffer,
UINT32 Length,
UINT32 Level);
/* Dispatch table for the serial bus descriptors */
static ACPI_RESOURCE_HANDLER SerialBusResourceDispatch [] =
{
NULL,
AcpiDmI2cSerialBusDescriptor,
AcpiDmSpiSerialBusDescriptor,
AcpiDmUartSerialBusDescriptor
};
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpRawDataBuffer
*
* PARAMETERS: Buffer - Pointer to the data bytes
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Dump a data buffer as a RawDataBuffer() object. Used for
* vendor data bytes.
*
******************************************************************************/
static void
AcpiDmDumpRawDataBuffer (
UINT8 *Buffer,
UINT32 Length,
UINT32 Level)
{
UINT32 Index;
UINT32 i;
UINT32 j;
if (!Length)
{
return;
}
AcpiOsPrintf ("RawDataBuffer (0x%.2X) // Vendor Data", Length);
AcpiOsPrintf ("\n");
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("{\n");
AcpiDmIndent (Level + 2);
for (i = 0; i < Length;)
{
for (j = 0; j < 8; j++)
{
Index = i + j;
if (Index >= Length)
{
goto Finish;
}
AcpiOsPrintf ("0x%2.2X", Buffer[Index]);
if ((Index + 1) >= Length)
{
goto Finish;
}
AcpiOsPrintf (", ");
}
AcpiOsPrintf ("\n");
AcpiDmIndent (Level + 2);
i += 8;
}
Finish:
AcpiOsPrintf ("\n");
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("}");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioCommon
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode common parts of a GPIO Interrupt descriptor
*
******************************************************************************/
static void
AcpiDmGpioCommon (
AML_RESOURCE *Resource,
UINT32 Level)
{
UINT32 PinCount;
UINT16 *PinList;
UINT8 *VendorData;
UINT32 i;
/* ResourceSource, ResourceSourceIndex, ResourceType */
AcpiDmIndent (Level + 1);
if (Resource->Gpio.ResSourceOffset)
{
AcpiUtPrintString (
ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
ACPI_UINT8_MAX);
}
AcpiOsPrintf (", ");
AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.ResSourceIndex);
AcpiOsPrintf ("%s, ",
AcpiGbl_ConsumeDecode [(Resource->Gpio.Flags & 1)]);
/* Insert a descriptor name */
AcpiDmDescriptorName ();
AcpiOsPrintf (",");
/* Dump the vendor data */
if (Resource->Gpio.VendorOffset)
{
AcpiOsPrintf ("\n");
AcpiDmIndent (Level + 1);
VendorData = ACPI_ADD_PTR (UINT8, Resource,
Resource->Gpio.VendorOffset);
AcpiDmDumpRawDataBuffer (VendorData,
Resource->Gpio.VendorLength, Level);
}
AcpiOsPrintf (")\n");
/* Dump the interrupt list */
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("{ // Pin list\n");
PinCount = ((UINT32) (Resource->Gpio.ResSourceOffset -
Resource->Gpio.PinTableOffset)) /
sizeof (UINT16);
PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
Resource->Gpio.PinTableOffset);
for (i = 0; i < PinCount; i++)
{
AcpiDmIndent (Level + 2);
AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], ((i + 1) < PinCount) ? "," : "");
}
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("}\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioIntDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a GPIO Interrupt descriptor
*
******************************************************************************/
static void
AcpiDmGpioIntDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
/* Dump the GpioInt-specific portion of the descriptor */
/* EdgeLevel, ActiveLevel, Shared */
AcpiDmIndent (Level);
AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
AcpiGbl_HeDecode [(Resource->Gpio.IntFlags & 1)],
AcpiGbl_LlDecode [(Resource->Gpio.IntFlags >> 1) & 1],
AcpiGbl_ShrDecode [(Resource->Gpio.IntFlags >> 3) & 1]);
/* PinConfig, DebounceTimeout */
if (Resource->Gpio.PinConfig <= 3)
{
AcpiOsPrintf ("%s, ",
AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
}
else
{
AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
}
AcpiOsPrintf ("0x%4.4X,\n", Resource->Gpio.DebounceTimeout);
/* Dump the GpioInt/GpioIo common portion of the descriptor */
AcpiDmGpioCommon (Resource, Level);
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioIoDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a GPIO Interrupt descriptor
*
******************************************************************************/
static void
AcpiDmGpioIoDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
/* Dump the GpioIo-specific portion of the descriptor */
/* Shared, PinConfig */
AcpiDmIndent (Level);
AcpiOsPrintf ("GpioIo (%s, ",
AcpiGbl_ShrDecode [(Resource->Gpio.IntFlags >> 3) & 1]);
if (Resource->Gpio.PinConfig <= 3)
{
AcpiOsPrintf ("%s, ",
AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
}
else
{
AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
}
/* DebounceTimeout, DriveStrength, IoRestriction */
AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DebounceTimeout);
AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DriveStrength);
AcpiOsPrintf ("%s,\n",
AcpiGbl_IorDecode [Resource->Gpio.IntFlags & 3]);
/* Dump the GpioInt/GpioIo common portion of the descriptor */
AcpiDmGpioCommon (Resource, Level);
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a GpioInt/GpioIo GPIO Interrupt/IO descriptor
*
******************************************************************************/
void
AcpiDmGpioDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT8 ConnectionType;
ConnectionType = Resource->Gpio.ConnectionType;
switch (ConnectionType)
{
case AML_RESOURCE_GPIO_TYPE_INT:
AcpiDmGpioIntDescriptor (Resource, Length, Level);
break;
case AML_RESOURCE_GPIO_TYPE_IO:
AcpiDmGpioIoDescriptor (Resource, Length, Level);
break;
default:
AcpiOsPrintf ("Unknown GPIO type\n");
break;
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpSerialBusVendorData
*
* PARAMETERS: Resource - Pointer to the resource descriptor
*
* RETURN: None
*
* DESCRIPTION: Dump optional serial bus vendor data
*
******************************************************************************/
static void
AcpiDmDumpSerialBusVendorData (
AML_RESOURCE *Resource,
UINT32 Level)
{
UINT8 *VendorData;
UINT32 VendorLength;
/* Get the (optional) vendor data and length */
switch (Resource->CommonSerialBus.Type)
{
case AML_RESOURCE_I2C_SERIALBUSTYPE:
VendorLength = Resource->CommonSerialBus.TypeDataLength -
AML_RESOURCE_I2C_MIN_DATA_LEN;
VendorData = ACPI_ADD_PTR (UINT8, Resource,
sizeof (AML_RESOURCE_I2C_SERIALBUS));
break;
case AML_RESOURCE_SPI_SERIALBUSTYPE:
VendorLength = Resource->CommonSerialBus.TypeDataLength -
AML_RESOURCE_SPI_MIN_DATA_LEN;
VendorData = ACPI_ADD_PTR (UINT8, Resource,
sizeof (AML_RESOURCE_SPI_SERIALBUS));
break;
case AML_RESOURCE_UART_SERIALBUSTYPE:
VendorLength = Resource->CommonSerialBus.TypeDataLength -
AML_RESOURCE_UART_MIN_DATA_LEN;
VendorData = ACPI_ADD_PTR (UINT8, Resource,
sizeof (AML_RESOURCE_UART_SERIALBUS));
break;
default:
return;
}
/* Dump the vendor bytes as a RawDataBuffer object */
AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level);
}
/*******************************************************************************
*
* FUNCTION: AcpiDmI2cSerialBusDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a I2C serial bus descriptor
*
******************************************************************************/
static void
AcpiDmI2cSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
/* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
AcpiDmIndent (Level);
AcpiOsPrintf ("I2cSerialBus (0x%4.4X, %s, 0x%8.8X,\n",
Resource->I2cSerialBus.SlaveAddress,
AcpiGbl_SmDecode [(Resource->I2cSerialBus.Flags & 1)],
Resource->I2cSerialBus.ConnectionSpeed);
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("%s, ",
AcpiGbl_AmDecode [(Resource->I2cSerialBus.TypeSpecificFlags & 1)]);
/* ResourceSource is a required field */
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
AcpiUtPrintString (
ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
ACPI_UINT8_MAX);
/* ResourceSourceIndex, ResourceUsage */
AcpiOsPrintf (",\n");
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags & 1)]);
/* Insert a descriptor name */
AcpiDmDescriptorName ();
AcpiOsPrintf (",\n");
/* Dump the vendor data */
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmSpiSerialBusDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a SPI serial bus descriptor
*
******************************************************************************/
static void
AcpiDmSpiSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
/* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
AcpiDmIndent (Level);
AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n",
Resource->SpiSerialBus.DeviceSelection,
AcpiGbl_DpDecode [(Resource->SpiSerialBus.TypeSpecificFlags >> 1) & 1],
AcpiGbl_WmDecode [(Resource->SpiSerialBus.TypeSpecificFlags & 1)],
Resource->SpiSerialBus.DataBitLength);
/* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
AcpiGbl_SmDecode [(Resource->SpiSerialBus.Flags & 1)],
Resource->SpiSerialBus.ConnectionSpeed,
AcpiGbl_CpoDecode [(Resource->SpiSerialBus.ClockPolarity & 1)]);
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("%s, ",
AcpiGbl_CphDecode [(Resource->SpiSerialBus.ClockPhase & 1)]);
/* ResourceSource is a required field */
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
AcpiUtPrintString (
ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
ACPI_UINT8_MAX);
/* ResourceSourceIndex, ResourceUsage */
AcpiOsPrintf (",\n");
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags & 1)]);
/* Insert a descriptor name */
AcpiDmDescriptorName ();
AcpiOsPrintf (",\n");
/* Dump the vendor data */
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmUartSerialBusDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a UART serial bus descriptor
*
******************************************************************************/
static void
AcpiDmUartSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
/* ConnectionSpeed, BitsPerByte, StopBits */
AcpiDmIndent (Level);
AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n",
Resource->UartSerialBus.DefaultBaudRate,
AcpiGbl_BpbDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 4) & 3],
AcpiGbl_SbDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 2) & 3]);
/* LinesInUse, IsBigEndian, Parity, FlowControl */
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n",
Resource->UartSerialBus.LinesEnabled,
AcpiGbl_EdDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 7) & 1],
AcpiGbl_PtDecode [Resource->UartSerialBus.Parity & 7],
AcpiGbl_FcDecode [Resource->UartSerialBus.TypeSpecificFlags & 3]);
/* ReceiveBufferSize, TransmitBufferSize */
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ",
Resource->UartSerialBus.RxFifoSize,
Resource->UartSerialBus.TxFifoSize);
/* ResourceSource is a required field */
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
AcpiUtPrintString (
ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
ACPI_UINT8_MAX);
/* ResourceSourceIndex, ResourceUsage */
AcpiOsPrintf (",\n");
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags & 1)]);
/* Insert a descriptor name */
AcpiDmDescriptorName ();
AcpiOsPrintf (",\n");
/* Dump the vendor data */
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmSerialBusDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a I2C/SPI/UART serial bus descriptor
*
******************************************************************************/
void
AcpiDmSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
Resource, Length, Level);
}
#endif

View File

@ -121,9 +121,9 @@ AcpiDmDmaDescriptor (
AcpiDmIndent (Level);
AcpiOsPrintf ("DMA (%s, %s, %s, ",
AcpiGbl_TypDecode [(Resource->Dma.Flags >> 5) & 3],
AcpiGbl_BmDecode [(Resource->Dma.Flags >> 2) & 1],
AcpiGbl_SizDecode [(Resource->Dma.Flags >> 0) & 3]);
AcpiGbl_TypDecode [(Resource->Dma.Flags >> 5) & 3],
AcpiGbl_BmDecode [(Resource->Dma.Flags >> 2) & 1],
AcpiGbl_SizDecode [(Resource->Dma.Flags >> 0) & 3]);
/* Insert a descriptor name */
@ -135,6 +135,49 @@ AcpiDmDmaDescriptor (
}
/*******************************************************************************
*
* FUNCTION: AcpiDmFixedDmaDescriptor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a FixedDMA descriptor
*
******************************************************************************/
void
AcpiDmFixedDmaDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
AcpiDmIndent (Level);
AcpiOsPrintf ("FixedDMA (0x%4.4X, 0x%4.4X, ",
Resource->FixedDma.RequestLines,
Resource->FixedDma.Channels);
if (Resource->FixedDma.Width <= 5)
{
AcpiOsPrintf ("%s, ",
AcpiGbl_DtsDecode [Resource->FixedDma.Width]);
}
else
{
AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ", Resource->FixedDma.Width);
}
/* Insert a descriptor name */
AcpiDmDescriptorName ();
AcpiOsPrintf (")\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmIoDescriptor

View File

@ -135,7 +135,8 @@ const char *AcpiGbl_IrqDecode[] =
*
* RETURN: None
*
* DESCRIPTION: Decode the AccessAs attribute byte. (Mostly SMBus stuff)
* DESCRIPTION: Decode the AccessAs attribute byte. (Mostly SMBus and
* GenericSerialBus stuff.)
*
******************************************************************************/
@ -146,44 +147,61 @@ AcpiDmDecodeAttribute (
switch (Attribute)
{
case AML_FIELD_ATTRIB_SMB_QUICK:
case AML_FIELD_ATTRIB_QUICK:
AcpiOsPrintf ("SMBQuick");
AcpiOsPrintf ("AttribQuick");
break;
case AML_FIELD_ATTRIB_SMB_SEND_RCV:
case AML_FIELD_ATTRIB_SEND_RCV:
AcpiOsPrintf ("SMBSendReceive");
AcpiOsPrintf ("AttribSendReceive");
break;
case AML_FIELD_ATTRIB_SMB_BYTE:
case AML_FIELD_ATTRIB_BYTE:
AcpiOsPrintf ("SMBByte");
AcpiOsPrintf ("AttribByte");
break;
case AML_FIELD_ATTRIB_SMB_WORD:
case AML_FIELD_ATTRIB_WORD:
AcpiOsPrintf ("SMBWord");
AcpiOsPrintf ("AttribWord");
break;
case AML_FIELD_ATTRIB_SMB_WORD_CALL:
case AML_FIELD_ATTRIB_BLOCK:
AcpiOsPrintf ("SMBProcessCall");
AcpiOsPrintf ("AttribBlock");
break;
case AML_FIELD_ATTRIB_SMB_BLOCK:
case AML_FIELD_ATTRIB_MULTIBYTE:
AcpiOsPrintf ("SMBBlock");
AcpiOsPrintf ("AttribBytes");
break;
case AML_FIELD_ATTRIB_SMB_BLOCK_CALL:
case AML_FIELD_ATTRIB_WORD_CALL:
AcpiOsPrintf ("SMBBlockProcessCall");
AcpiOsPrintf ("AttribProcessCall");
break;
case AML_FIELD_ATTRIB_BLOCK_CALL:
AcpiOsPrintf ("AttribBlockProcessCall");
break;
case AML_FIELD_ATTRIB_RAW_BYTES:
AcpiOsPrintf ("AttribRawBytes");
break;
case AML_FIELD_ATTRIB_RAW_PROCESS:
AcpiOsPrintf ("AttribRawProcessBytes");
break;
default:
AcpiOsPrintf ("0x%.2X", Attribute);
/* A ByteConst is allowed by the grammar */
AcpiOsPrintf ("0x%2.2X", Attribute);
break;
}
}

View File

@ -464,7 +464,8 @@ AcpiDmDescendingOp (
AcpiDmDisassembleOneOp (NULL, Info, Op);
if (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_PREFIX)
if ((Op->Common.DisasmOpcode == ACPI_DASM_LNOT_PREFIX) ||
(Op->Common.AmlOpcode == AML_INT_CONNECTION_OP))
{
return (AE_OK);
}

View File

@ -424,7 +424,7 @@ AcpiDsGetRegionArguments (
/* Execute the argument AML */
Status = AcpiDsExecuteArguments (Node, Node->Parent,
Status = AcpiDsExecuteArguments (Node, ExtraDesc->Extra.ScopeNode,
ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
return_ACPI_STATUS (Status);
}

View File

@ -243,6 +243,7 @@ AcpiDsGetFieldNames (
{
ACPI_STATUS Status;
UINT64 Position;
ACPI_PARSE_OBJECT *Child;
ACPI_FUNCTION_TRACE_PTR (DsGetFieldNames, Info);
@ -257,10 +258,11 @@ AcpiDsGetFieldNames (
while (Arg)
{
/*
* Three types of field elements are handled:
* 1) Offset - specifies a bit offset
* 2) AccessAs - changes the access mode
* 3) Name - Enters a new named field into the namespace
* Four types of field elements are handled:
* 1) Name - Enters a new named field into the namespace
* 2) Offset - specifies a bit offset
* 3) AccessAs - changes the access mode/attributes
* 4) Connection - Associate a resource template with the field
*/
switch (Arg->Common.AmlOpcode)
{
@ -279,24 +281,67 @@ AcpiDsGetFieldNames (
Info->FieldBitPosition = (UINT32) Position;
break;
case AML_INT_ACCESSFIELD_OP:
case AML_INT_EXTACCESSFIELD_OP:
/*
* Get a new AccessType and AccessAttribute -- to be used for all
* field units that follow, until field end or another AccessAs
* keyword.
* Get new AccessType, AccessAttribute, and AccessLength fields
* -- to be used for all field units that follow, until the
* end-of-field or another AccessAs keyword is encountered.
* NOTE. These three bytes are encoded in the integer value
* of the parseop for convenience.
*
* In FieldFlags, preserve the flag bits other than the
* ACCESS_TYPE bits
* ACCESS_TYPE bits.
*/
/* AccessType (ByteAcc, WordAcc, etc.) */
Info->FieldFlags = (UINT8)
((Info->FieldFlags & ~(AML_FIELD_ACCESS_TYPE_MASK)) |
((UINT8) ((UINT32) Arg->Common.Value.Integer >> 8)));
((UINT8) ((UINT32) (Arg->Common.Value.Integer & 0x07))));
Info->Attribute = (UINT8) (Arg->Common.Value.Integer);
/* AccessAttribute (AttribQuick, AttribByte, etc.) */
Info->Attribute = (UINT8) ((Arg->Common.Value.Integer >> 8) & 0xFF);
/* AccessLength (for serial/buffer protocols) */
Info->AccessLength = (UINT8) ((Arg->Common.Value.Integer >> 16) & 0xFF);
break;
case AML_INT_CONNECTION_OP:
/*
* Clear any previous connection. New connection is used for all
* fields that follow, similar to AccessAs
*/
Info->ResourceBuffer = NULL;
Info->ConnectionNode = NULL;
/*
* A Connection() is either an actual resource descriptor (buffer)
* or a named reference to a resource template
*/
Child = Arg->Common.Value.Arg;
if (Child->Common.AmlOpcode == AML_INT_BYTELIST_OP)
{
Info->ResourceBuffer = Child->Named.Data;
Info->ResourceLength = (UINT16) Child->Named.Value.Integer;
}
else
{
/* Lookup the Connection() namepath, it should already exist */
Status = AcpiNsLookup (WalkState->ScopeInfo,
Child->Common.Value.Name, ACPI_TYPE_ANY,
ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Info->ConnectionNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Child->Common.Value.Name, Status);
return_ACPI_STATUS (Status);
}
}
break;
case AML_INT_NAMEDFIELD_OP:
@ -348,7 +393,6 @@ AcpiDsGetFieldNames (
Info->FieldBitPosition += Info->FieldBitLength;
break;
default:
ACPI_ERROR ((AE_INFO,
@ -406,6 +450,8 @@ AcpiDsCreateField (
}
}
ACPI_MEMSET (&Info, 0, sizeof (ACPI_CREATE_FIELD_INFO));
/* Second arg is the field flags */
Arg = Arg->Common.Next;
@ -418,7 +464,6 @@ AcpiDsCreateField (
Info.RegionNode = RegionNode;
Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
return_ACPI_STATUS (Status);
}
@ -514,8 +559,8 @@ AcpiDsInitFieldObjects (
while (Arg)
{
/*
* Ignore OFFSET and ACCESSAS terms here; we are only interested in the
* field names in order to enter them into the namespace.
* Ignore OFFSET/ACCESSAS/CONNECTION terms here; we are only interested
* in the field names in order to enter them into the namespace.
*/
if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
{
@ -697,7 +742,6 @@ AcpiDsCreateIndexField (
Info.RegionNode = RegionNode;
Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
return_ACPI_STATUS (Status);
}

View File

@ -81,6 +81,13 @@ AcpiEvInitializeEvents (
ACPI_FUNCTION_TRACE (EvInitializeEvents);
/* If Hardware Reduced flag is set, there are no fixed events */
if (AcpiGbl_ReducedHardware)
{
return_ACPI_STATUS (AE_OK);
}
/*
* Initialize the Fixed and General Purpose Events. This is done prior to
* enabling SCIs to prevent interrupts from occurring before the handlers
@ -128,6 +135,13 @@ AcpiEvInstallXruptHandlers (
ACPI_FUNCTION_TRACE (EvInstallXruptHandlers);
/* If Hardware Reduced flag is set, there is no ACPI h/w */
if (AcpiGbl_ReducedHardware)
{
return_ACPI_STATUS (AE_OK);
}
/* Install the SCI handler */
Status = AcpiEvInstallSciHandler ();

View File

@ -79,6 +79,13 @@ AcpiEvInitGlobalLockHandler (
ACPI_FUNCTION_TRACE (EvInitGlobalLockHandler);
/* If Hardware Reduced flag is set, there is no global lock */
if (AcpiGbl_ReducedHardware)
{
return_ACPI_STATUS (AE_OK);
}
/* Attempt installation of the global lock handler */
Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL,

View File

@ -372,6 +372,7 @@ AcpiEvExecuteRegMethod (
* FUNCTION: AcpiEvAddressSpaceDispatch
*
* PARAMETERS: RegionObj - Internal region object
* FieldObj - Corresponding field. Can be NULL.
* Function - Read or Write operation
* RegionOffset - Where in the region to read or write
* BitWidth - Field width in bits (8, 16, 32, or 64)
@ -388,6 +389,7 @@ AcpiEvExecuteRegMethod (
ACPI_STATUS
AcpiEvAddressSpaceDispatch (
ACPI_OPERAND_OBJECT *RegionObj,
ACPI_OPERAND_OBJECT *FieldObj,
UINT32 Function,
UINT32 RegionOffset,
UINT32 BitWidth,
@ -399,6 +401,7 @@ AcpiEvAddressSpaceDispatch (
ACPI_OPERAND_OBJECT *HandlerDesc;
ACPI_OPERAND_OBJECT *RegionObj2;
void *RegionContext = NULL;
ACPI_CONNECTION_INFO *Context;
ACPI_FUNCTION_TRACE (EvAddressSpaceDispatch);
@ -423,6 +426,8 @@ AcpiEvAddressSpaceDispatch (
return_ACPI_STATUS (AE_NOT_EXIST);
}
Context = HandlerDesc->AddressSpace.Context;
/*
* It may be the case that the region has never been initialized.
* Some types of regions require special init code
@ -450,7 +455,7 @@ AcpiEvAddressSpaceDispatch (
AcpiExExitInterpreter ();
Status = RegionSetup (RegionObj, ACPI_REGION_ACTIVATE,
HandlerDesc->AddressSpace.Context, &RegionContext);
Context, &RegionContext);
/* Re-enter the interpreter */
@ -499,6 +504,27 @@ AcpiEvAddressSpaceDispatch (
ACPI_FORMAT_NATIVE_UINT (RegionObj->Region.Address + RegionOffset),
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
/*
* Special handling for GenericSerialBus and GeneralPurposeIo:
* There are three extra parameters that must be passed to the
* handler via the context:
* 1) Connection buffer, a resource template from Connection() op.
* 2) Length of the above buffer.
* 3) Actual access length from the AccessAs() op.
*/
if (((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS) ||
(RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO)) &&
Context &&
FieldObj)
{
/* Get the Connection (ResourceTemplate) buffer */
Context->Connection = FieldObj->Field.ResourceBuffer;
Context->Length = FieldObj->Field.ResourceLength;
Context->AccessLength = FieldObj->Field.AccessLength;
}
if (!(HandlerDesc->AddressSpace.HandlerFlags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
{
@ -514,7 +540,7 @@ AcpiEvAddressSpaceDispatch (
Status = Handler (Function,
(RegionObj->Region.Address + RegionOffset), BitWidth, Value,
HandlerDesc->AddressSpace.Context, RegionObj2->Extra.RegionContext);
Context, RegionObj2->Extra.RegionContext);
if (ACPI_FAILURE (Status))
{

View File

@ -334,7 +334,7 @@ AcpiExRegionRead (
for (i = 0; i < Length; i++)
{
Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
Status = AcpiEvAddressSpaceDispatch (ObjDesc, NULL, ACPI_READ,
RegionOffset, 8, &Value);
if (ACPI_FAILURE (Status))
{

View File

@ -284,7 +284,7 @@ AcpiExCreateMutex (
*
* PARAMETERS: AmlStart - Pointer to the region declaration AML
* AmlLength - Max length of the declaration AML
* RegionSpace - SpaceID for the region
* SpaceId - Address space ID for the region
* WalkState - Current state
*
* RETURN: Status
@ -297,7 +297,7 @@ ACPI_STATUS
AcpiExCreateRegion (
UINT8 *AmlStart,
UINT32 AmlLength,
UINT8 RegionSpace,
UINT8 SpaceId,
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status;
@ -326,16 +326,18 @@ AcpiExCreateRegion (
* Space ID must be one of the predefined IDs, or in the user-defined
* range
*/
if ((RegionSpace >= ACPI_NUM_PREDEFINED_REGIONS) &&
(RegionSpace < ACPI_USER_REGION_BEGIN) &&
(RegionSpace != ACPI_ADR_SPACE_DATA_TABLE))
if (!AcpiIsValidSpaceId (SpaceId))
{
ACPI_ERROR ((AE_INFO, "Invalid AddressSpace type 0x%X", RegionSpace));
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
/*
* Print an error message, but continue. We don't want to abort
* a table load for this exception. Instead, if the region is
* actually used at runtime, abort the executing method.
*/
ACPI_ERROR ((AE_INFO, "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
}
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
AcpiUtGetRegionName (RegionSpace), RegionSpace));
AcpiUtGetRegionName (SpaceId), SpaceId));
/* Create the region descriptor */
@ -353,10 +355,18 @@ AcpiExCreateRegion (
RegionObj2 = ObjDesc->Common.NextObject;
RegionObj2->Extra.AmlStart = AmlStart;
RegionObj2->Extra.AmlLength = AmlLength;
if (WalkState->ScopeInfo)
{
RegionObj2->Extra.ScopeNode = WalkState->ScopeInfo->Scope.Node;
}
else
{
RegionObj2->Extra.ScopeNode = Node;
}
/* Init the region from the operands */
ObjDesc->Region.SpaceId = RegionSpace;
ObjDesc->Region.SpaceId = SpaceId;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
ObjDesc->Region.Node = Node;

View File

@ -209,11 +209,13 @@ static ACPI_EXDUMP_INFO AcpiExDumpBufferField[3] =
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (BufferField.BufferObj), "Buffer Object"}
};
static ACPI_EXDUMP_INFO AcpiExDumpRegionField[3] =
static ACPI_EXDUMP_INFO AcpiExDumpRegionField[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField), NULL},
{ACPI_EXD_FIELD, 0, NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.RegionObj), "Region Object"}
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Field.AccessLength), "AccessLength"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.RegionObj), "Region Object"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.ResourceBuffer), "ResourceBuffer"}
};
static ACPI_EXDUMP_INFO AcpiExDumpBankField[5] =

View File

@ -113,19 +113,25 @@ AcpiExReadDataFromField (
}
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
{
/*
* This is an SMBus or IPMI read. We must create a buffer to hold
* This is an SMBus, GSBus or IPMI read. We must create a buffer to hold
* the data and then directly access the region handler.
*
* Note: Smbus protocol value is passed in upper 16-bits of Function
* Note: SMBus and GSBus protocol value is passed in upper 16-bits of Function
*/
if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS)
{
Length = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_READ | (ObjDesc->Field.Attribute << 16);
}
else if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS)
{
Length = ACPI_GSBUS_BUFFER_SIZE;
Function = ACPI_READ | (ObjDesc->Field.Attribute << 16);
}
else /* IPMI */
{
Length = ACPI_IPMI_BUFFER_SIZE;
@ -274,23 +280,24 @@ AcpiExWriteDataToField (
}
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
{
/*
* This is an SMBus or IPMI write. We will bypass the entire field
* This is an SMBus, GSBus or IPMI write. We will bypass the entire field
* mechanism and handoff the buffer directly to the handler. For
* these address spaces, the buffer is bi-directional; on a write,
* return data is returned in the same buffer.
*
* Source must be a buffer of sufficient size:
* ACPI_SMBUS_BUFFER_SIZE or ACPI_IPMI_BUFFER_SIZE.
* ACPI_SMBUS_BUFFER_SIZE, ACPI_GSBUS_BUFFER_SIZE, or ACPI_IPMI_BUFFER_SIZE.
*
* Note: SMBus protocol type is passed in upper 16-bits of Function
* Note: SMBus and GSBus protocol type is passed in upper 16-bits of Function
*/
if (SourceDesc->Common.Type != ACPI_TYPE_BUFFER)
{
ACPI_ERROR ((AE_INFO,
"SMBus or IPMI write requires Buffer, found type %s",
"SMBus/IPMI/GenericSerialBus write requires Buffer, found type %s",
AcpiUtGetObjectTypeName (SourceDesc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@ -301,6 +308,11 @@ AcpiExWriteDataToField (
Length = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16);
}
else if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS)
{
Length = ACPI_GSBUS_BUFFER_SIZE;
Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16);
}
else /* IPMI */
{
Length = ACPI_IPMI_BUFFER_SIZE;
@ -310,7 +322,7 @@ AcpiExWriteDataToField (
if (SourceDesc->Buffer.Length < Length)
{
ACPI_ERROR ((AE_INFO,
"SMBus or IPMI write requires Buffer of length %u, found length %u",
"SMBus/IPMI/GenericSerialBus write requires Buffer of length %u, found length %u",
Length, SourceDesc->Buffer.Length));
return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);

View File

@ -98,6 +98,7 @@ AcpiExSetupRegion (
{
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *RgnDesc;
UINT8 SpaceId;
ACPI_FUNCTION_TRACE_U32 (ExSetupRegion, FieldDatumByteOffset);
@ -116,6 +117,16 @@ AcpiExSetupRegion (
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
SpaceId = RgnDesc->Region.SpaceId;
/* Validate the Space ID */
if (!AcpiIsValidSpaceId (SpaceId))
{
ACPI_ERROR ((AE_INFO, "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
/*
* If the Region Address and Length have not been previously evaluated,
* evaluate them now and save the results.
@ -130,11 +141,12 @@ AcpiExSetupRegion (
}
/*
* Exit now for SMBus or IPMI address space, it has a non-linear
* Exit now for SMBus, GSBus or IPMI address space, it has a non-linear
* address space and the request cannot be directly validated
*/
if (RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_IPMI)
if (SpaceId == ACPI_ADR_SPACE_SMBUS ||
SpaceId == ACPI_ADR_SPACE_GSBUS ||
SpaceId == ACPI_ADR_SPACE_IPMI)
{
/* SMBus or IPMI has a non-linear address space */
@ -290,7 +302,8 @@ AcpiExAccessRegion (
/* Invoke the appropriate AddressSpace/OpRegion handler */
Status = AcpiEvAddressSpaceDispatch (RgnDesc, Function, RegionOffset,
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ObjDesc,
Function, RegionOffset,
ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth), Value);
if (ACPI_FAILURE (Status))
@ -337,6 +350,8 @@ AcpiExRegisterOverflow (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT64 Value)
{
ACPI_FUNCTION_NAME (ExRegisterOverflow);
if (ObjDesc->CommonField.BitLength >= ACPI_INTEGER_BIT_SIZE)
{
@ -353,6 +368,11 @@ AcpiExRegisterOverflow (
* The Value is larger than the maximum value that can fit into
* the register.
*/
ACPI_ERROR ((AE_INFO,
"Index value 0x%8.8X%8.8X overflows field width 0x%X",
ACPI_FORMAT_UINT64 (Value),
ObjDesc->CommonField.BitLength));
return (TRUE);
}

View File

@ -49,6 +49,7 @@
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
#include "acdispat.h"
#define _COMPONENT ACPI_EXECUTER
@ -484,6 +485,32 @@ AcpiExPrepFieldValue (
ObjDesc->Field.RegionObj = AcpiNsGetAttachedObject (Info->RegionNode);
/* Fields specific to GenericSerialBus fields */
ObjDesc->Field.AccessLength = Info->AccessLength;
if (Info->ConnectionNode)
{
SecondDesc = Info->ConnectionNode->Object;
if (!(SecondDesc->Common.Flags & AOPOBJ_DATA_VALID))
{
Status = AcpiDsGetBufferArguments (SecondDesc);
if (ACPI_FAILURE (Status))
{
AcpiUtDeleteObjectDesc (ObjDesc);
return_ACPI_STATUS (Status);
}
}
ObjDesc->Field.ResourceBuffer = SecondDesc->Buffer.Pointer;
ObjDesc->Field.ResourceLength = (UINT16) SecondDesc->Buffer.Length;
}
else if (Info->ResourceBuffer)
{
ObjDesc->Field.ResourceBuffer = Info->ResourceBuffer;
ObjDesc->Field.ResourceLength = Info->ResourceLength;
}
/* Allow full data read from EC address space */
if ((ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&

View File

@ -499,4 +499,34 @@ AcpiExIntegerToString (
}
}
/*******************************************************************************
*
* FUNCTION: AcpiIsValidSpaceId
*
* PARAMETERS: SpaceId - ID to be validated
*
* RETURN: TRUE if valid/supported ID.
*
* DESCRIPTION: Validate an operation region SpaceID.
*
******************************************************************************/
BOOLEAN
AcpiIsValidSpaceId (
UINT8 SpaceId)
{
if ((SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) &&
(SpaceId < ACPI_USER_REGION_BEGIN) &&
(SpaceId != ACPI_ADR_SPACE_DATA_TABLE) &&
(SpaceId != ACPI_ADR_SPACE_FIXED_HARDWARE))
{
return (FALSE);
}
return (TRUE);
}
#endif

View File

@ -12,29 +12,95 @@
#
include Makefile.config
#
# Get the OS machine architecture. Anything with a "64" in the returned
# string will be treated as a 64-bit OS. Otherwise, the default is 32-bit.
#
HARDWARE_NAME := $(shell uname -m)
#
# Main rule will only generate versions that are appropriate for the running
# OS, either 64-bit or 32-bit.
#
all: ${PROGS}
${PROGS}: FORCE
@cd $@; make; ls -al $@
@cd $@; \
if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
mkdir -p obj64; \
make BITS=64; \
echo "64-bit version of $@:"; \
ls -al obj64/$@; \
else \
mkdir -p obj32; \
make BITS=32; \
echo "32-bit version of $@:"; \
ls -al obj32/$@; \
fi;
#
# Make 32-bit and 64-bit versions of all the tools
#
both: 32 64
#
# Make only 32-bit versions of all the tools
#
32: FORCE
@for toolname in ${PROGS}; do \
(cd $$toolname; \
pwd; \
mkdir -p obj32; \
make BITS=32; \
echo "32-bit version of $$toolname:"; \
ls -al obj32/$$toolname \
); \
done;
#
# Make only 64-bit versions of all the tools
#
64: FORCE
@for toolname in ${PROGS}; do \
(cd $$toolname; \
pwd; \
mkdir -p obj64; \
make BITS=64; \
echo "64-bit version of $$toolname:"; \
ls -al obj64/$$toolname \
); \
done;
clean: FORCE
@for d in ${PROGS}; do \
(cd $$d; \
if [ $$? -ne 0 ]; then \
echo "Bad element of PROGS: <$$d>"; \
else \
pwd; make clean; \
fi); \
done
@for toolname in ${PROGS}; do \
(cd $$toolname; \
pwd; \
make BITS=32 clean; \
make BITS=64 clean; \
rmdir obj32; \
rmdir obj64; \
); \
done;
#
# Install all tools, either 32-bit or 64-bit as appropriate for the host OS
#
install: FORCE
@for d in ${PROGS}; do \
(cd $$d; \
if [ $$? -ne 0 ]; then \
echo "Bad element of PROGS: <$$d>"; \
@for toolname in ${PROGS}; do \
(cd $$toolname; \
pwd; \
if [ $(findstring 64,$(HARDWARE_NAME)) ]; then \
make BITS=64 install; \
echo "Installed 64-bit version of $$toolname"; \
else \
pwd; make install; \
fi); \
done
make BITS=32 install; \
echo "Installed 32-bit version of $$toolname"; \
fi; \
); \
done;
machine: FORCE
@echo "Machine architecture: $(HARDWARE_NAME), $(XBITS)";
@echo "Findstring: $(findstring 64, $(HARDWARE_NAME))";
FORCE:

View File

@ -20,22 +20,28 @@
#
# Configuration
# Notes:
# $(BITS) must be set to either 32 or 64
# gcc should be version 4 or greater, otherwise some of the options
# used will not be recognized.
# Global optimization flags (such as -O2, -Os) are not used, since
# they cause issues on some compilers.
# The _GNU_SOURCE symbol is required for many hosts.
#
.SUFFIXES :
PROGS = acpibin acpiexec acpihelp acpinames acpisrc acpixtract iasl
HOST = _CYGWIN
CC = gcc
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
#
# Common defines
#
COPYPROG = @mkdir -p ../bin; rm -f ../bin/$(PROG); cp --remove-destination $(PROG) ../bin
OBJDIR = obj$(BITS)
BINDIR = bin$(BITS)
BITSFLAG = -m$(BITS)
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
COPYPROG = @mkdir -p ../$(BINDIR); \
rm -f ../$(BINDIR)/$(PROG); \
cp --remove-destination $(PROG) ../$(BINDIR);
INSTALLDIR = /usr/bin
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
@ -83,10 +89,13 @@ ACPICA_HEADERS = \
# automatically included in -Wall.
#
CFLAGS += \
$(BITSFLAG) \
-D$(HOST) \
-D_GNU_SOURCE \
-I$(ACPICA_INCLUDE)
LDFLAGS += $(BITSFLAG)
CWARNINGFLAGS = \
-ansi \
-Wall \
@ -148,3 +157,4 @@ YFLAGS += -v -d -y
LEX= flex
LFLAGS += -i -s

View File

@ -11,7 +11,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = acpibin
PROG = $(OBJDIR)/acpibin
#
# Search paths for source files
@ -26,21 +26,21 @@ HEADERS = \
$(wildcard $(ACPIBIN)/*.h)
OBJECTS = \
abcompare.o \
abmain.o \
utalloc.o \
utcache.o \
utdebug.o \
utdecode.o \
utglobal.o \
utlock.o \
utmath.o \
utmisc.o \
utmutex.o \
utstate.o \
utxferror.o \
osunixxf.o \
getopt.o
$(OBJDIR)/abcompare.o \
$(OBJDIR)/abmain.o \
$(OBJDIR)/utalloc.o \
$(OBJDIR)/utcache.o \
$(OBJDIR)/utdebug.o \
$(OBJDIR)/utdecode.o \
$(OBJDIR)/utglobal.o \
$(OBJDIR)/utlock.o \
$(OBJDIR)/utmath.o \
$(OBJDIR)/utmisc.o \
$(OBJDIR)/utmutex.o \
$(OBJDIR)/utstate.o \
$(OBJDIR)/utxferror.o \
$(OBJDIR)/osunixxf.o \
$(OBJDIR)/getopt.o
#
# Flags specific to acpibin
@ -56,7 +56,7 @@ $(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -13,7 +13,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = acpiexec
PROG = $(OBJDIR)/acpiexec
#
# Search paths for source files
@ -38,158 +38,161 @@ HEADERS = \
$(wildcard $(ACPIEXEC)/*.h)
OBJECTS = \
aeexec.o \
aehandlers.o \
aemain.o \
aetables.o \
dbcmds.o \
dbdisply.o \
dbexec.o \
dbfileio.o \
dbhistry.o \
dbinput.o \
dbmethod.o \
dbnames.o \
dbstats.o \
dbutils.o \
dbxface.o \
dmbuffer.o \
dmnames.o \
dmobject.o \
dmopcode.o \
dmresrc.o \
dmresrcl.o \
dmresrcs.o \
dmutils.o \
dmwalk.o \
dsargs.o \
dscontrol.o \
dsfield.o \
dsinit.o \
dsmethod.o \
dsmthdat.o \
dsobject.o \
dsopcode.o \
dsutils.o \
dswexec.o \
dswload.o \
dswload2.o \
dswscope.o \
dswstate.o \
evevent.o \
evglock.o \
evgpe.o \
evgpeblk.o \
evgpeinit.o \
evgpeutil.o \
evmisc.o \
evregion.o \
evrgnini.o \
evsci.o \
evxface.o \
evxfevnt.o \
evxfgpe.o \
evxfregn.o \
exconfig.o \
exconvrt.o \
excreate.o \
exdebug.o \
exdump.o \
exfield.o \
exfldio.o \
exmisc.o \
exmutex.o \
exnames.o \
exoparg1.o \
exoparg2.o \
exoparg3.o \
exoparg6.o \
exprep.o \
exregion.o \
exresnte.o \
exresolv.o \
exresop.o \
exstore.o \
exstoren.o \
exstorob.o \
exsystem.o \
exutils.o \
getopt.o \
hwacpi.o \
hwgpe.o \
hwpci.o \
hwregs.o \
hwsleep.o \
hwvalid.o \
hwxface.o \
nsaccess.o \
nsalloc.o \
nsdump.o \
nsdumpdv.o \
nseval.o \
nsinit.o \
nsload.o \
nsnames.o \
nsobject.o \
nsparse.o \
nspredef.o \
nsrepair.o \
nsrepair2.o \
nssearch.o \
nsutils.o \
nswalk.o \
nsxfeval.o \
nsxfname.o \
nsxfobj.o \
osunixxf.o \
psargs.o \
psloop.o \
psopcode.o \
psparse.o \
psscope.o \
pstree.o \
psutils.o \
pswalk.o \
psxface.o \
rsaddr.o \
rscalc.o \
rscreate.o \
rsdump.o \
rsinfo.o \
rsio.o \
rsirq.o \
rslist.o \
rsmemory.o \
rsmisc.o \
rsutils.o \
rsxface.o \
tbfadt.o \
tbfind.o \
tbinstal.o \
tbutils.o \
tbxface.o \
tbxfroot.o \
utalloc.o \
utcache.o \
utcopy.o \
utdebug.o \
utdecode.o \
utdelete.o \
uteval.o \
utglobal.o \
utids.o \
utinit.o \
utlock.o \
utmath.o \
utmisc.o \
utmutex.o \
utobject.o \
utresrc.o \
utstate.o \
uttrack.o \
utosi.o \
utxferror.o \
utxface.o
$(OBJDIR)/aeexec.o \
$(OBJDIR)/aehandlers.o \
$(OBJDIR)/aemain.o \
$(OBJDIR)/aetables.o \
$(OBJDIR)/dbcmds.o \
$(OBJDIR)/dbdisply.o \
$(OBJDIR)/dbexec.o \
$(OBJDIR)/dbfileio.o \
$(OBJDIR)/dbhistry.o \
$(OBJDIR)/dbinput.o \
$(OBJDIR)/dbmethod.o \
$(OBJDIR)/dbnames.o \
$(OBJDIR)/dbstats.o \
$(OBJDIR)/dbutils.o \
$(OBJDIR)/dbxface.o \
$(OBJDIR)/dmbuffer.o \
$(OBJDIR)/dmnames.o \
$(OBJDIR)/dmobject.o \
$(OBJDIR)/dmopcode.o \
$(OBJDIR)/dmresrc.o \
$(OBJDIR)/dmresrcl.o \
$(OBJDIR)/dmresrcl2.o \
$(OBJDIR)/dmresrcs.o \
$(OBJDIR)/dmutils.o \
$(OBJDIR)/dmwalk.o \
$(OBJDIR)/dsargs.o \
$(OBJDIR)/dscontrol.o \
$(OBJDIR)/dsfield.o \
$(OBJDIR)/dsinit.o \
$(OBJDIR)/dsmethod.o \
$(OBJDIR)/dsmthdat.o \
$(OBJDIR)/dsobject.o \
$(OBJDIR)/dsopcode.o \
$(OBJDIR)/dsutils.o \
$(OBJDIR)/dswexec.o \
$(OBJDIR)/dswload.o \
$(OBJDIR)/dswload2.o \
$(OBJDIR)/dswscope.o \
$(OBJDIR)/dswstate.o \
$(OBJDIR)/evevent.o \
$(OBJDIR)/evglock.o \
$(OBJDIR)/evgpe.o \
$(OBJDIR)/evgpeblk.o \
$(OBJDIR)/evgpeinit.o \
$(OBJDIR)/evgpeutil.o \
$(OBJDIR)/evmisc.o \
$(OBJDIR)/evregion.o \
$(OBJDIR)/evrgnini.o \
$(OBJDIR)/evsci.o \
$(OBJDIR)/evxface.o \
$(OBJDIR)/evxfevnt.o \
$(OBJDIR)/evxfgpe.o \
$(OBJDIR)/evxfregn.o \
$(OBJDIR)/exconfig.o \
$(OBJDIR)/exconvrt.o \
$(OBJDIR)/excreate.o \
$(OBJDIR)/exdebug.o \
$(OBJDIR)/exdump.o \
$(OBJDIR)/exfield.o \
$(OBJDIR)/exfldio.o \
$(OBJDIR)/exmisc.o \
$(OBJDIR)/exmutex.o \
$(OBJDIR)/exnames.o \
$(OBJDIR)/exoparg1.o \
$(OBJDIR)/exoparg2.o \
$(OBJDIR)/exoparg3.o \
$(OBJDIR)/exoparg6.o \
$(OBJDIR)/exprep.o \
$(OBJDIR)/exregion.o \
$(OBJDIR)/exresnte.o \
$(OBJDIR)/exresolv.o \
$(OBJDIR)/exresop.o \
$(OBJDIR)/exstore.o \
$(OBJDIR)/exstoren.o \
$(OBJDIR)/exstorob.o \
$(OBJDIR)/exsystem.o \
$(OBJDIR)/exutils.o \
$(OBJDIR)/getopt.o \
$(OBJDIR)/hwacpi.o \
$(OBJDIR)/hwgpe.o \
$(OBJDIR)/hwpci.o \
$(OBJDIR)/hwregs.o \
$(OBJDIR)/hwsleep.o \
$(OBJDIR)/hwvalid.o \
$(OBJDIR)/hwxface.o \
$(OBJDIR)/nsaccess.o \
$(OBJDIR)/nsalloc.o \
$(OBJDIR)/nsdump.o \
$(OBJDIR)/nsdumpdv.o \
$(OBJDIR)/nseval.o \
$(OBJDIR)/nsinit.o \
$(OBJDIR)/nsload.o \
$(OBJDIR)/nsnames.o \
$(OBJDIR)/nsobject.o \
$(OBJDIR)/nsparse.o \
$(OBJDIR)/nspredef.o \
$(OBJDIR)/nsrepair.o \
$(OBJDIR)/nsrepair2.o \
$(OBJDIR)/nssearch.o \
$(OBJDIR)/nsutils.o \
$(OBJDIR)/nswalk.o \
$(OBJDIR)/nsxfeval.o \
$(OBJDIR)/nsxfname.o \
$(OBJDIR)/nsxfobj.o \
$(OBJDIR)/osunixxf.o \
$(OBJDIR)/psargs.o \
$(OBJDIR)/psloop.o \
$(OBJDIR)/psopcode.o \
$(OBJDIR)/psparse.o \
$(OBJDIR)/psscope.o \
$(OBJDIR)/pstree.o \
$(OBJDIR)/psutils.o \
$(OBJDIR)/pswalk.o \
$(OBJDIR)/psxface.o \
$(OBJDIR)/rsaddr.o \
$(OBJDIR)/rscalc.o \
$(OBJDIR)/rscreate.o \
$(OBJDIR)/rsdump.o \
$(OBJDIR)/rsinfo.o \
$(OBJDIR)/rsio.o \
$(OBJDIR)/rsirq.o \
$(OBJDIR)/rslist.o \
$(OBJDIR)/rsmemory.o \
$(OBJDIR)/rsmisc.o \
$(OBJDIR)/rsserial.o \
$(OBJDIR)/rsutils.o \
$(OBJDIR)/rsxface.o \
$(OBJDIR)/tbfadt.o \
$(OBJDIR)/tbfind.o \
$(OBJDIR)/tbinstal.o \
$(OBJDIR)/tbutils.o \
$(OBJDIR)/tbxface.o \
$(OBJDIR)/tbxfroot.o \
$(OBJDIR)/utalloc.o \
$(OBJDIR)/utcache.o \
$(OBJDIR)/utcopy.o \
$(OBJDIR)/utdebug.o \
$(OBJDIR)/utdecode.o \
$(OBJDIR)/utdelete.o \
$(OBJDIR)/uteval.o \
$(OBJDIR)/utglobal.o \
$(OBJDIR)/utids.o \
$(OBJDIR)/utinit.o \
$(OBJDIR)/utlock.o \
$(OBJDIR)/utmath.o \
$(OBJDIR)/utmisc.o \
$(OBJDIR)/utmutex.o \
$(OBJDIR)/utobject.o \
$(OBJDIR)/utresrc.o \
$(OBJDIR)/utstate.o \
$(OBJDIR)/uttrack.o \
$(OBJDIR)/utosi.o \
$(OBJDIR)/utxface.o \
$(OBJDIR)/utxferror.o \
$(OBJDIR)/utxfmutex.o
#
# Flags specific to acpiexec utility
@ -206,7 +209,7 @@ $(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -12,7 +12,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = acpihelp
PROG = $(OBJDIR)/acpihelp
#
# Search paths for source files
@ -25,13 +25,13 @@ HEADERS = \
$(wildcard $(ACPIHELP)/*.h)
OBJECTS = \
ahamlops.o \
ahaslkey.o \
ahaslops.o \
ahdecode.o \
ahpredef.o \
ahmain.o \
getopt.o
$(OBJDIR)/ahamlops.o \
$(OBJDIR)/ahaslkey.o \
$(OBJDIR)/ahaslops.o \
$(OBJDIR)/ahdecode.o \
$(OBJDIR)/ahpredef.o \
$(OBJDIR)/ahmain.o \
$(OBJDIR)/getopt.o
#
# Flags specific to acpihelp
@ -47,7 +47,7 @@ $(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -13,7 +13,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = acpinames
PROG = $(OBJDIR)/acpinames
#
# Search paths for source files
@ -34,69 +34,69 @@ HEADERS = \
$(wildcard $(ACPINAMES)/*.h)
OBJECTS = \
anmain.o \
anstubs.o \
antables.o \
dbfileio.o \
dsfield.o \
dsmthdat.o \
dsobject.o \
dsutils.o \
dswload.o \
dswload2.o \
dswscope.o \
dswstate.o \
excreate.o \
exnames.o \
exresnte.o \
exresolv.o \
exutils.o \
getopt.o \
nsaccess.o \
nsalloc.o \
nsdump.o \
nsinit.o \
nsload.o \
nsnames.o \
nsobject.o \
nsparse.o \
nssearch.o \
nsutils.o \
nswalk.o \
nsxfeval.o \
nsxfname.o \
nsxfobj.o \
osunixxf.o \
psargs.o \
psloop.o \
psopcode.o \
psparse.o \
psscope.o \
pstree.o \
psutils.o \
pswalk.o \
psxface.o \
tbfadt.o \
tbfind.o \
tbinstal.o \
tbutils.o \
tbxface.o \
tbxfroot.o \
utalloc.o \
utcache.o \
utdebug.o \
utdecode.o \
utdelete.o \
utglobal.o \
utlock.o \
utmath.o \
utmisc.o \
utmutex.o \
utobject.o \
utstate.o \
utosi.o \
utxferror.o \
utxface.o
$(OBJDIR)/anmain.o \
$(OBJDIR)/anstubs.o \
$(OBJDIR)/antables.o \
$(OBJDIR)/dbfileio.o \
$(OBJDIR)/dsfield.o \
$(OBJDIR)/dsmthdat.o \
$(OBJDIR)/dsobject.o \
$(OBJDIR)/dsutils.o \
$(OBJDIR)/dswload.o \
$(OBJDIR)/dswload2.o \
$(OBJDIR)/dswscope.o \
$(OBJDIR)/dswstate.o \
$(OBJDIR)/excreate.o \
$(OBJDIR)/exnames.o \
$(OBJDIR)/exresnte.o \
$(OBJDIR)/exresolv.o \
$(OBJDIR)/exutils.o \
$(OBJDIR)/getopt.o \
$(OBJDIR)/nsaccess.o \
$(OBJDIR)/nsalloc.o \
$(OBJDIR)/nsdump.o \
$(OBJDIR)/nsinit.o \
$(OBJDIR)/nsload.o \
$(OBJDIR)/nsnames.o \
$(OBJDIR)/nsobject.o \
$(OBJDIR)/nsparse.o \
$(OBJDIR)/nssearch.o \
$(OBJDIR)/nsutils.o \
$(OBJDIR)/nswalk.o \
$(OBJDIR)/nsxfeval.o \
$(OBJDIR)/nsxfname.o \
$(OBJDIR)/nsxfobj.o \
$(OBJDIR)/osunixxf.o \
$(OBJDIR)/psargs.o \
$(OBJDIR)/psloop.o \
$(OBJDIR)/psopcode.o \
$(OBJDIR)/psparse.o \
$(OBJDIR)/psscope.o \
$(OBJDIR)/pstree.o \
$(OBJDIR)/psutils.o \
$(OBJDIR)/pswalk.o \
$(OBJDIR)/psxface.o \
$(OBJDIR)/tbfadt.o \
$(OBJDIR)/tbfind.o \
$(OBJDIR)/tbinstal.o \
$(OBJDIR)/tbutils.o \
$(OBJDIR)/tbxface.o \
$(OBJDIR)/tbxfroot.o \
$(OBJDIR)/utalloc.o \
$(OBJDIR)/utcache.o \
$(OBJDIR)/utdebug.o \
$(OBJDIR)/utdecode.o \
$(OBJDIR)/utdelete.o \
$(OBJDIR)/utglobal.o \
$(OBJDIR)/utlock.o \
$(OBJDIR)/utmath.o \
$(OBJDIR)/utmisc.o \
$(OBJDIR)/utmutex.o \
$(OBJDIR)/utobject.o \
$(OBJDIR)/utstate.o \
$(OBJDIR)/utosi.o \
$(OBJDIR)/utxferror.o \
$(OBJDIR)/utxface.o
#
# Flags specific to acpinames utility
@ -112,7 +112,7 @@ $(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -11,7 +11,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = acpisrc
PROG = $(OBJDIR)/acpisrc
#
# Search path for source files and individual source files
@ -25,15 +25,15 @@ HEADERS = \
$(wildcard $(ACPISRC)/*.h)
OBJECTS = \
ascase.o \
asconvrt.o \
asfile.o \
asmain.o \
asremove.o \
astable.o \
asutils.o \
osunixdir.o \
getopt.o
$(OBJDIR)/ascase.o \
$(OBJDIR)/asconvrt.o \
$(OBJDIR)/asfile.o \
$(OBJDIR)/asmain.o \
$(OBJDIR)/asremove.o \
$(OBJDIR)/astable.o \
$(OBJDIR)/asutils.o \
$(OBJDIR)/osunixdir.o \
$(OBJDIR)/getopt.o
#
# Compile flags specific to acpisrc
@ -49,7 +49,7 @@ $(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -11,7 +11,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = acpixtract
PROG = $(OBJDIR)/acpixtract
#
# Search paths for source files
@ -24,9 +24,9 @@ HEADERS = \
$(wildcard $(ACPIXTRACT)/*.h)
OBJECTS = \
acpixtract.o \
axmain.o \
getopt.o
$(OBJDIR)/acpixtract.o \
$(OBJDIR)/axmain.o \
$(OBJDIR)/getopt.o
#
# Flags specific to acpixtract
@ -41,7 +41,7 @@ $(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -11,7 +11,7 @@
# compile options, and prevents pollution of the source code.
#
include ../Makefile.config
PROG = iasl
PROG = $(OBJDIR)/iasl
#
# Search paths for source files
@ -31,158 +31,160 @@ vpath %.c \
HEADERS = \
$(wildcard $(ASL_COMPILER)/*.h) \
aslcompiler.y.h \
dtparser.y.h
$(OBJDIR)/aslcompiler.y.h \
$(OBJDIR)/dtparser.y.h
OBJECTS = \
aslcompilerlex.o \
aslcompilerparse.o \
dtparserlex.o \
dtparserparse.o \
adfile.o \
adisasm.o \
adwalk.o \
aslanalyze.o \
aslbtypes.o \
aslcodegen.o \
aslcompile.o \
aslerror.o \
aslfiles.o \
aslfold.o \
asllength.o \
asllisting.o \
aslload.o \
asllookup.o \
aslmain.o \
aslmap.o \
aslopcodes.o \
asloperands.o \
aslopt.o \
aslpredef.o \
aslresource.o \
aslrestype1.o \
aslrestype1i.o \
aslrestype2.o \
aslrestype2d.o \
aslrestype2e.o \
aslrestype2q.o \
aslrestype2w.o \
aslstartup.o \
aslstubs.o \
asltransform.o \
asltree.o \
aslutils.o \
asluuid.o \
aslwalks.o \
dtcompile.o \
dtexpress.o \
dtfield.o \
dtio.o \
dtsubtable.o \
dttable.o \
dttemplate.o \
dtutils.o \
dbfileio.o \
dmbuffer.o \
dmextern.o \
dmnames.o \
dmobject.o \
dmopcode.o \
dmresrc.o \
dmresrcl.o \
dmresrcs.o \
dmrestag.o \
dmtable.o \
dmtbdump.o \
dmtbinfo.o \
dmutils.o \
dmwalk.o \
dsargs.o \
dscontrol.o \
dsfield.o \
dsobject.o \
dsopcode.o \
dsutils.o \
dswexec.o \
dswload.o \
dswload2.o \
dswscope.o \
dswstate.o \
exconvrt.o \
excreate.o \
exdump.o \
exmisc.o \
exmutex.o \
exnames.o \
exoparg1.o \
exoparg2.o \
exoparg3.o \
exoparg6.o \
exprep.o \
exregion.o \
exresnte.o \
exresolv.o \
exresop.o \
exstore.o \
exstoren.o \
exstorob.o \
exsystem.o \
exutils.o \
getopt.o \
nsaccess.o \
nsalloc.o \
nsdump.o \
nsnames.o \
nsobject.o \
nsparse.o \
nssearch.o \
nsutils.o \
nswalk.o \
nsxfobj.o \
osunixxf.o \
psargs.o \
psloop.o \
psopcode.o \
psparse.o \
psscope.o \
pstree.o \
psutils.o \
pswalk.o \
tbfadt.o \
tbinstal.o \
tbutils.o \
tbxface.o \
utalloc.o \
utcache.o \
utcopy.o \
utdebug.o \
utdecode.o \
utdelete.o \
utglobal.o \
utinit.o \
utlock.o \
utmath.o \
utmisc.o \
utmutex.o \
utobject.o \
utresrc.o \
utstate.o \
utxferror.o \
utxface.o
$(OBJDIR)/aslcompilerlex.o \
$(OBJDIR)/aslcompilerparse.o \
$(OBJDIR)/dtparserlex.o \
$(OBJDIR)/dtparserparse.o \
$(OBJDIR)/adfile.o \
$(OBJDIR)/adisasm.o \
$(OBJDIR)/adwalk.o \
$(OBJDIR)/aslanalyze.o \
$(OBJDIR)/aslbtypes.o \
$(OBJDIR)/aslcodegen.o \
$(OBJDIR)/aslcompile.o \
$(OBJDIR)/aslerror.o \
$(OBJDIR)/aslfiles.o \
$(OBJDIR)/aslfold.o \
$(OBJDIR)/asllength.o \
$(OBJDIR)/asllisting.o \
$(OBJDIR)/aslload.o \
$(OBJDIR)/asllookup.o \
$(OBJDIR)/aslmain.o \
$(OBJDIR)/aslmap.o \
$(OBJDIR)/aslopcodes.o \
$(OBJDIR)/asloperands.o \
$(OBJDIR)/aslopt.o \
$(OBJDIR)/aslpredef.o \
$(OBJDIR)/aslresource.o \
$(OBJDIR)/aslrestype1.o \
$(OBJDIR)/aslrestype1i.o \
$(OBJDIR)/aslrestype2.o \
$(OBJDIR)/aslrestype2d.o \
$(OBJDIR)/aslrestype2e.o \
$(OBJDIR)/aslrestype2q.o \
$(OBJDIR)/aslrestype2s.o \
$(OBJDIR)/aslrestype2w.o \
$(OBJDIR)/aslstartup.o \
$(OBJDIR)/aslstubs.o \
$(OBJDIR)/asltransform.o \
$(OBJDIR)/asltree.o \
$(OBJDIR)/aslutils.o \
$(OBJDIR)/asluuid.o \
$(OBJDIR)/aslwalks.o \
$(OBJDIR)/dtcompile.o \
$(OBJDIR)/dtexpress.o \
$(OBJDIR)/dtfield.o \
$(OBJDIR)/dtio.o \
$(OBJDIR)/dtsubtable.o \
$(OBJDIR)/dttable.o \
$(OBJDIR)/dttemplate.o \
$(OBJDIR)/dtutils.o \
$(OBJDIR)/dbfileio.o \
$(OBJDIR)/dmbuffer.o \
$(OBJDIR)/dmextern.o \
$(OBJDIR)/dmnames.o \
$(OBJDIR)/dmobject.o \
$(OBJDIR)/dmopcode.o \
$(OBJDIR)/dmresrc.o \
$(OBJDIR)/dmresrcl.o \
$(OBJDIR)/dmresrcl2.o \
$(OBJDIR)/dmresrcs.o \
$(OBJDIR)/dmrestag.o \
$(OBJDIR)/dmtable.o \
$(OBJDIR)/dmtbdump.o \
$(OBJDIR)/dmtbinfo.o \
$(OBJDIR)/dmutils.o \
$(OBJDIR)/dmwalk.o \
$(OBJDIR)/dsargs.o \
$(OBJDIR)/dscontrol.o \
$(OBJDIR)/dsfield.o \
$(OBJDIR)/dsobject.o \
$(OBJDIR)/dsopcode.o \
$(OBJDIR)/dsutils.o \
$(OBJDIR)/dswexec.o \
$(OBJDIR)/dswload.o \
$(OBJDIR)/dswload2.o \
$(OBJDIR)/dswscope.o \
$(OBJDIR)/dswstate.o \
$(OBJDIR)/exconvrt.o \
$(OBJDIR)/excreate.o \
$(OBJDIR)/exdump.o \
$(OBJDIR)/exmisc.o \
$(OBJDIR)/exmutex.o \
$(OBJDIR)/exnames.o \
$(OBJDIR)/exoparg1.o \
$(OBJDIR)/exoparg2.o \
$(OBJDIR)/exoparg3.o \
$(OBJDIR)/exoparg6.o \
$(OBJDIR)/exprep.o \
$(OBJDIR)/exregion.o \
$(OBJDIR)/exresnte.o \
$(OBJDIR)/exresolv.o \
$(OBJDIR)/exresop.o \
$(OBJDIR)/exstore.o \
$(OBJDIR)/exstoren.o \
$(OBJDIR)/exstorob.o \
$(OBJDIR)/exsystem.o \
$(OBJDIR)/exutils.o \
$(OBJDIR)/getopt.o \
$(OBJDIR)/nsaccess.o \
$(OBJDIR)/nsalloc.o \
$(OBJDIR)/nsdump.o \
$(OBJDIR)/nsnames.o \
$(OBJDIR)/nsobject.o \
$(OBJDIR)/nsparse.o \
$(OBJDIR)/nssearch.o \
$(OBJDIR)/nsutils.o \
$(OBJDIR)/nswalk.o \
$(OBJDIR)/nsxfobj.o \
$(OBJDIR)/osunixxf.o \
$(OBJDIR)/psargs.o \
$(OBJDIR)/psloop.o \
$(OBJDIR)/psopcode.o \
$(OBJDIR)/psparse.o \
$(OBJDIR)/psscope.o \
$(OBJDIR)/pstree.o \
$(OBJDIR)/psutils.o \
$(OBJDIR)/pswalk.o \
$(OBJDIR)/tbfadt.o \
$(OBJDIR)/tbinstal.o \
$(OBJDIR)/tbutils.o \
$(OBJDIR)/tbxface.o \
$(OBJDIR)/utalloc.o \
$(OBJDIR)/utcache.o \
$(OBJDIR)/utcopy.o \
$(OBJDIR)/utdebug.o \
$(OBJDIR)/utdecode.o \
$(OBJDIR)/utdelete.o \
$(OBJDIR)/utglobal.o \
$(OBJDIR)/utinit.o \
$(OBJDIR)/utlock.o \
$(OBJDIR)/utmath.o \
$(OBJDIR)/utmisc.o \
$(OBJDIR)/utmutex.o \
$(OBJDIR)/utobject.o \
$(OBJDIR)/utresrc.o \
$(OBJDIR)/utstate.o \
$(OBJDIR)/utxferror.o \
$(OBJDIR)/utxface.o
INTERMEDIATES = \
aslcompilerlex.c \
aslcompilerparse.c \
dtparserlex.c \
dtparserparse.c
$(OBJDIR)/aslcompilerlex.c \
$(OBJDIR)/aslcompilerparse.c \
$(OBJDIR)/dtparserlex.c \
$(OBJDIR)/dtparserparse.c
MISC = \
aslcompilerparse.h \
aslcompiler.y.h \
aslcompilerparse.output \
dtparserparse.h \
dtparser.y.h \
dtparserparse.output
$(OBJDIR)/aslcompilerparse.h \
$(OBJDIR)/aslcompiler.y.h \
$(OBJDIR)/aslcompilerparse.output \
$(OBJDIR)/dtparserparse.h \
$(OBJDIR)/dtparser.y.h \
$(OBJDIR)/dtparserparse.output
#
# Flags specific to iASL compiler
@ -190,7 +192,7 @@ MISC = \
CFLAGS+= \
-DACPI_ASL_COMPILER \
-I$(ASL_COMPILER) \
-I.
-I$(OBJDIR)
#
# Root rule
@ -202,27 +204,27 @@ $(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS)
#
# Parser and Lexer - intermediate C files
#
aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l
$(OBJDIR)/aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l
${LEX} ${LFLAGS} -PAslCompiler -o$@ $?
aslcompilerparse.c aslcompilerparse.h : $(ASL_COMPILER)/aslcompiler.y
$(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompilerparse.h : $(ASL_COMPILER)/aslcompiler.y
${YACC} ${YFLAGS} -pAslCompiler -o$@ $?
dtparserlex.c : $(ASL_COMPILER)/dtparser.l
$(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l
${LEX} ${LFLAGS} -PDtParser -o$@ $?
dtparserparse.c dtparserparse.h : $(ASL_COMPILER)/dtparser.y
$(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparserparse.h : $(ASL_COMPILER)/dtparser.y
${YACC} ${YFLAGS} -pDtParser -o$@ $?
# Rename headers produced by bison/yacc
dtparser.y.h: dtparserparse.h
$(OBJDIR)/dtparser.y.h: $(OBJDIR)/dtparserparse.h
@echo Copy intermediate file:
@cp -f -v dtparserparse.h dtparser.y.h
@cp -f -v $(OBJDIR)/dtparserparse.h $(OBJDIR)/dtparser.y.h
aslcompiler.y.h : aslcompilerparse.h
$(OBJDIR)/aslcompiler.y.h : $(OBJDIR)/aslcompilerparse.h
@echo Copy intermediate file:
@cp -f -v aslcompilerparse.h aslcompiler.y.h
@cp -f -v $(OBJDIR)/aslcompilerparse.h $(OBJDIR)/aslcompiler.y.h
#
@ -231,20 +233,20 @@ aslcompiler.y.h : aslcompilerparse.h
# Cannot use the common compile warning flags since the C files are created
# by the utilities above and they are not necessarily ANSI C, etc.
#
aslcompilerlex.o : aslcompilerlex.c
$(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c
$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $?
aslcompilerparse.o : aslcompilerparse.c
$(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $?
dtparserlex.o : dtparserlex.c
$(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $?
dtparserparse.o : dtparserparse.c
$(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $?
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :

View File

@ -149,6 +149,8 @@ AcpiHwValidateIoRequest (
(BitWidth != 16) &&
(BitWidth != 32))
{
ACPI_ERROR ((AE_INFO,
"Bad BitWidth parameter: %8.8X", BitWidth));
return (AE_BAD_PARAMETER);
}

View File

@ -183,9 +183,10 @@
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
/* SMBus and IPMI bidirectional buffer size */
/* SMBus, GSBus and IPMI bidirectional buffer size */
#define ACPI_SMBUS_BUFFER_SIZE 34
#define ACPI_GSBUS_BUFFER_SIZE 34
#define ACPI_IPMI_BUFFER_SIZE 66
/* _SxD and _SxW control methods */

View File

@ -106,6 +106,10 @@ void
AcpiDbDisplayTableInfo (
char *TableArg);
void
AcpiDbDisplayTemplate (
char *BufferArg);
void
AcpiDbUnloadAcpiTable (
char *TableArg,

View File

@ -80,57 +80,82 @@ typedef const struct acpi_dmtable_info
/*
* Values for Opcode above.
* Note: 0-7 must not change, used as a flag shift value
* Note: 0-7 must not change, they are used as a flag shift value. Other
* than those, new values can be added wherever appropriate.
*/
#define ACPI_DMT_FLAG0 0
#define ACPI_DMT_FLAG1 1
#define ACPI_DMT_FLAG2 2
#define ACPI_DMT_FLAG3 3
#define ACPI_DMT_FLAG4 4
#define ACPI_DMT_FLAG5 5
#define ACPI_DMT_FLAG6 6
#define ACPI_DMT_FLAG7 7
#define ACPI_DMT_FLAGS0 8
#define ACPI_DMT_FLAGS2 9
#define ACPI_DMT_UINT8 10
#define ACPI_DMT_UINT16 11
#define ACPI_DMT_UINT24 12
#define ACPI_DMT_UINT32 13
#define ACPI_DMT_UINT56 14
#define ACPI_DMT_UINT64 15
#define ACPI_DMT_STRING 16
#define ACPI_DMT_NAME4 17
#define ACPI_DMT_NAME6 18
#define ACPI_DMT_NAME8 19
#define ACPI_DMT_CHKSUM 20
#define ACPI_DMT_SPACEID 21
#define ACPI_DMT_GAS 22
#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
#define ACPI_DMT_FADTPM 32
#define ACPI_DMT_BUF16 33
#define ACPI_DMT_IVRS 34
#define ACPI_DMT_BUFFER 35
#define ACPI_DMT_PCI_PATH 36
#define ACPI_DMT_EINJACT 37
#define ACPI_DMT_EINJINST 38
#define ACPI_DMT_ERSTACT 39
#define ACPI_DMT_ERSTINST 40
#define ACPI_DMT_ACCWIDTH 41
#define ACPI_DMT_UNICODE 42
#define ACPI_DMT_UUID 43
#define ACPI_DMT_DEVICE_PATH 44
#define ACPI_DMT_LABEL 45
#define ACPI_DMT_BUF7 46
#define ACPI_DMT_BUF128 47
#define ACPI_DMT_SLIC 48
typedef enum
{
/* Simple Data Types */
ACPI_DMT_FLAG0 = 0,
ACPI_DMT_FLAG1 = 1,
ACPI_DMT_FLAG2 = 2,
ACPI_DMT_FLAG3 = 3,
ACPI_DMT_FLAG4 = 4,
ACPI_DMT_FLAG5 = 5,
ACPI_DMT_FLAG6 = 6,
ACPI_DMT_FLAG7 = 7,
ACPI_DMT_FLAGS0,
ACPI_DMT_FLAGS1,
ACPI_DMT_FLAGS2,
ACPI_DMT_FLAGS4,
ACPI_DMT_UINT8,
ACPI_DMT_UINT16,
ACPI_DMT_UINT24,
ACPI_DMT_UINT32,
ACPI_DMT_UINT40,
ACPI_DMT_UINT48,
ACPI_DMT_UINT56,
ACPI_DMT_UINT64,
ACPI_DMT_BUF7,
ACPI_DMT_BUF16,
ACPI_DMT_BUF128,
ACPI_DMT_SIG,
ACPI_DMT_STRING,
ACPI_DMT_NAME4,
ACPI_DMT_NAME6,
ACPI_DMT_NAME8,
/* Types that are decoded to strings and miscellaneous */
ACPI_DMT_ACCWIDTH,
ACPI_DMT_CHKSUM,
ACPI_DMT_GAS,
ACPI_DMT_SPACEID,
ACPI_DMT_UNICODE,
ACPI_DMT_UUID,
/* Types used only for the Data Table Compiler */
ACPI_DMT_BUFFER,
ACPI_DMT_DEVICE_PATH,
ACPI_DMT_LABEL,
ACPI_DMT_PCI_PATH,
/* Types that are specific to particular ACPI tables */
ACPI_DMT_ASF,
ACPI_DMT_DMAR,
ACPI_DMT_EINJACT,
ACPI_DMT_EINJINST,
ACPI_DMT_ERSTACT,
ACPI_DMT_ERSTINST,
ACPI_DMT_FADTPM,
ACPI_DMT_HEST,
ACPI_DMT_HESTNTFY,
ACPI_DMT_HESTNTYP,
ACPI_DMT_IVRS,
ACPI_DMT_MADT,
ACPI_DMT_PMTT,
ACPI_DMT_SLIC,
ACPI_DMT_SRAT,
/* Special opcodes */
ACPI_DMT_EXTRA_TEXT,
ACPI_DMT_EXIT
} ACPI_ENTRY_TYPES;
typedef
void (*ACPI_DMTABLE_HANDLER) (
@ -175,6 +200,11 @@ ACPI_STATUS (*ASL_WALK_CALLBACK) (
#define ASL_WALK_CALLBACK_DEFINED
#endif
typedef
void (*ACPI_RESOURCE_HANDLER) (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
typedef struct acpi_resource_tag
{
@ -202,6 +232,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbgp[];
@ -212,6 +243,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
@ -221,7 +253,13 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHeader[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest0[];
@ -254,14 +292,34 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt7[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt8[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt9[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt10[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt11[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt12[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0A[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0B[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[];
@ -353,6 +411,10 @@ void
AcpiDmDumpFadt (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpFpdt (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpHest (
ACPI_TABLE_HEADER *Table);
@ -361,18 +423,30 @@ void
AcpiDmDumpIvrs (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpMcfg (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpMadt (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpMcfg (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpMpst (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpMsct (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpPcct (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpPmtt (
ACPI_TABLE_HEADER *Table);
UINT32
AcpiDmDumpRsdp (
ACPI_TABLE_HEADER *Table);
@ -381,6 +455,10 @@ void
AcpiDmDumpRsdt (
ACPI_TABLE_HEADER *Table);
UINT32
AcpiDmDumpS3pt (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpSlic (
ACPI_TABLE_HEADER *Table);
@ -670,6 +748,18 @@ AcpiDmVendorLargeDescriptor (
UINT32 Length,
UINT32 Level);
void
AcpiDmGpioDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
void
AcpiDmSerialBusDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
void
AcpiDmVendorCommon (
char *Name,
@ -693,6 +783,12 @@ AcpiDmDmaDescriptor (
UINT32 Length,
UINT32 Level);
void
AcpiDmFixedDmaDescriptor (
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
void
AcpiDmIoDescriptor (
AML_RESOURCE *Resource,

View File

@ -228,7 +228,8 @@ AcpiEvInitializeOpRegions (
ACPI_STATUS
AcpiEvAddressSpaceDispatch (
ACPI_OPERAND_OBJECT *RegionObj,
ACPI_OPERAND_OBJECT *RegionObj,
ACPI_OPERAND_OBJECT *FieldObj,
UINT32 Function,
UINT32 RegionOffset,
UINT32 BitWidth,

View File

@ -143,8 +143,20 @@ UINT32 AcpiGbl_TraceFlags;
ACPI_NAME AcpiGbl_TraceMethodName;
BOOLEAN AcpiGbl_SystemAwakeAndRunning;
/*
* ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
* that the ACPI hardware is no longer required. A flag in the FADT indicates
* a reduced HW machine, and that flag is duplicated here for convenience.
*/
BOOLEAN AcpiGbl_ReducedHardware;
#endif
/* Do not disassemble buffers to resource descriptors */
ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_NoResourceDisassembly, FALSE);
/*****************************************************************************
*
* ACPI Table globals
@ -183,7 +195,7 @@ ACPI_EXTERN UINT8 AcpiGbl_IntegerNybbleWidth;
/*****************************************************************************
*
* Mutual exlusion within ACPICA subsystem
* Mutual exclusion within ACPICA subsystem
*
****************************************************************************/

View File

@ -642,6 +642,10 @@ AcpiExIntegerToString (
char *Dest,
UINT64 Value);
BOOLEAN
AcpiIsValidSpaceId (
UINT8 SpaceId);
/*
* exregion - default OpRegion handlers

View File

@ -54,7 +54,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
/* Total number of aml opcodes defined */
#define AML_NUM_OPCODES 0x7F
#define AML_NUM_OPCODES 0x81
/* Forward declarations */
@ -285,12 +285,16 @@ typedef struct acpi_create_field_info
ACPI_NAMESPACE_NODE *FieldNode;
ACPI_NAMESPACE_NODE *RegisterNode;
ACPI_NAMESPACE_NODE *DataRegisterNode;
ACPI_NAMESPACE_NODE *ConnectionNode;
UINT8 *ResourceBuffer;
UINT32 BankValue;
UINT32 FieldBitPosition;
UINT32 FieldBitLength;
UINT16 ResourceLength;
UINT8 FieldFlags;
UINT8 Attribute;
UINT8 FieldType;
UINT8 AccessLength;
} ACPI_CREATE_FIELD_INFO;
@ -358,7 +362,8 @@ typedef struct acpi_name_info
/*
* Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
* ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT
* ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT,
* ACPI_PTYPE2_FIX_VAR
*/
typedef struct acpi_package_info
{
@ -1124,7 +1129,7 @@ typedef struct acpi_port_info
#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38
#define ACPI_RESOURCE_NAME_IO 0x40
#define ACPI_RESOURCE_NAME_FIXED_IO 0x48
#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50
#define ACPI_RESOURCE_NAME_FIXED_DMA 0x50
#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58
#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60
#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68
@ -1146,7 +1151,9 @@ typedef struct acpi_port_info
#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89
#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A
#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B
#define ACPI_RESOURCE_NAME_GPIO 0x8C
#define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8E
/*****************************************************************************

View File

@ -58,6 +58,7 @@
#define METHOD_NAME__PRT "_PRT"
#define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__PRS "_PRS"
#define METHOD_NAME__AEI "_AEI"
#define METHOD_NAME__PRW "_PRW"
#define METHOD_NAME__SRS "_SRS"

View File

@ -320,6 +320,7 @@ typedef struct acpi_object_thermal_zone
UINT32 BaseByteOffset; /* Byte offset within containing object */\
UINT32 Value; /* Value to store into the Bank or Index register */\
UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
UINT8 AccessLength; /* For serial regions/fields */
typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
@ -335,7 +336,9 @@ typedef struct acpi_object_region_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
UINT16 ResourceLength;
union acpi_operand_object *RegionObj; /* Containing OpRegion object */
UINT8 *ResourceBuffer; /* ResourceTemplate for serial regions/fields */
} ACPI_OBJECT_REGION_FIELD;
@ -463,6 +466,7 @@ typedef struct acpi_object_extra
{
ACPI_OBJECT_COMMON_HEADER
ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
ACPI_NAMESPACE_NODE *ScopeNode;
void *RegionContext; /* Region-specific data */
UINT8 *AmlStart;
UINT32 AmlLength;

View File

@ -94,6 +94,7 @@
#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
#define ARGP_CONNECTFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
#define ARGP_CONTINUE_OP ARG_NONE
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME)
#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
@ -165,6 +166,7 @@
#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG)
#define ARGP_REVISION_OP ARG_NONE
#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
#define ARGP_SERIALFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME)
@ -225,6 +227,7 @@
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
#define ARGI_CONNECTFIELD_OP ARGI_INVALID_OPCODE
#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
@ -296,6 +299,7 @@
#define ARGI_RETURN_OP ARGI_INVALID_OPCODE
#define ARGI_REVISION_OP ARG_NONE
#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
#define ARGI_SERIALFIELD_OP ARGI_INVALID_OPCODE
#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)

View File

@ -48,7 +48,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20110922
#define ACPI_CA_VERSION 0x20111123
#include "actypes.h"
#include "actbl.h"
@ -59,6 +59,7 @@
extern UINT32 AcpiCurrentGpeCount;
extern ACPI_TABLE_FADT AcpiGbl_FADT;
extern BOOLEAN AcpiGbl_SystemAwakeAndRunning;
extern BOOLEAN AcpiGbl_ReducedHardware; /* ACPI 5.0 */
/* Runtime configuration of debug print levels */
@ -392,6 +393,21 @@ AcpiReleaseGlobalLock (
UINT32 Handle);
/*
* Interfaces to AML mutex objects
*/
ACPI_STATUS
AcpiAcquireMutex (
ACPI_HANDLE Handle,
ACPI_STRING Pathname,
UINT16 Timeout);
ACPI_STATUS
AcpiReleaseMutex (
ACPI_HANDLE Handle,
ACPI_STRING Pathname);
/*
* Fixed Event interfaces
*/
@ -516,6 +532,11 @@ AcpiGetPossibleResources (
ACPI_HANDLE Device,
ACPI_BUFFER *RetBuffer);
ACPI_STATUS
AcpiGetEventResources (
ACPI_HANDLE DeviceHandle,
ACPI_BUFFER *RetBuffer);
ACPI_STATUS
AcpiWalkResources (
ACPI_HANDLE Device,
@ -538,6 +559,12 @@ AcpiResourceToAddress64 (
ACPI_RESOURCE *Resource,
ACPI_RESOURCE_ADDRESS64 *Out);
ACPI_STATUS
AcpiBufferToResource (
UINT8 *AmlBuffer,
UINT16 AmlBufferLength,
ACPI_RESOURCE **ResourcePtr);
/*
* Hardware (ACPI device) interfaces

View File

@ -94,6 +94,14 @@
* ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length
* (Used for _ART, _FPS)
*
* ACPI_PTYPE2_FIX_VAR: Each subpackage consists of some fixed-length elements
* followed by an optional element
* object type
* count
* object type
* count = 0 (optional)
* (Used for _DLM)
*
*****************************************************************************/
enum AcpiReturnPackageTypes
@ -106,7 +114,8 @@ enum AcpiReturnPackageTypes
ACPI_PTYPE2_PKG_COUNT = 6,
ACPI_PTYPE2_FIXED = 7,
ACPI_PTYPE2_MIN = 8,
ACPI_PTYPE2_REV_FIXED = 9
ACPI_PTYPE2_REV_FIXED = 9,
ACPI_PTYPE2_FIX_VAR = 10
};
@ -159,6 +168,7 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_AC8", 0, ACPI_RTYPE_INTEGER}},
{{"_AC9", 0, ACPI_RTYPE_INTEGER}},
{{"_ADR", 0, ACPI_RTYPE_INTEGER}},
{{"_AEI", 0, ACPI_RTYPE_BUFFER}},
{{"_AL0", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
@ -231,6 +241,12 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_CID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints/Strs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0,0}, 0,0}},
{{"_CLS", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (3 Int) */
{{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3,0}, 0,0}},
{{"_CPC", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints/Bufs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER, 0,0}, 0,0}},
{{"_CRS", 0, ACPI_RTYPE_BUFFER}},
{{"_CRT", 0, ACPI_RTYPE_INTEGER}},
{{"_CSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (1 Int(n), n-1 Int) */
@ -239,12 +255,20 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_CST", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (1 Int(n), n Pkg (1 Buf/3 Int) */
{{{ACPI_PTYPE2_PKG_COUNT,ACPI_RTYPE_BUFFER, 1, ACPI_RTYPE_INTEGER}, 3,0}},
{{"_CWS", 1, ACPI_RTYPE_INTEGER}},
{{"_DCK", 1, ACPI_RTYPE_INTEGER}},
{{"_DCS", 0, ACPI_RTYPE_INTEGER}},
{{"_DDC", 1, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER}},
{{"_DDN", 0, ACPI_RTYPE_STRING}},
{{"_DEP", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
{{"_DGS", 0, ACPI_RTYPE_INTEGER}},
{{"_DIS", 0, 0}},
{{"_DLM", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (1 Ref, 0/1 Optional Buf/Ref) */
{{{ACPI_PTYPE2_FIX_VAR, ACPI_RTYPE_REFERENCE, 1, ACPI_RTYPE_REFERENCE | ACPI_RTYPE_BUFFER}, 0,0}},
{{"_DMA", 0, ACPI_RTYPE_BUFFER}},
{{"_DOD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0,0}, 0,0}},
@ -264,6 +288,8 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_EJ3", 1, 0}},
{{"_EJ4", 1, 0}},
{{"_EJD", 0, ACPI_RTYPE_STRING}},
{{"_ERR", 3, ACPI_RTYPE_INTEGER}}, /* Internal use only, used by ACPICA test suites */
{{"_EVT", 1, 0}},
{{"_FDE", 0, ACPI_RTYPE_BUFFER}},
{{"_FDI", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (16 Int) */
{{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16,0}, 0,0}},
@ -284,14 +310,17 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_GAI", 0, ACPI_RTYPE_INTEGER}},
{{"_GCP", 0, ACPI_RTYPE_INTEGER}},
{{"_GHL", 0, ACPI_RTYPE_INTEGER}},
{{"_GLK", 0, ACPI_RTYPE_INTEGER}},
{{"_GPD", 0, ACPI_RTYPE_INTEGER}},
{{"_GPE", 0, ACPI_RTYPE_INTEGER}}, /* _GPE method, not _GPE scope */
{{"_GRT", 0, ACPI_RTYPE_BUFFER}},
{{"_GSB", 0, ACPI_RTYPE_INTEGER}},
{{"_GTF", 0, ACPI_RTYPE_BUFFER}},
{{"_GTM", 0, ACPI_RTYPE_BUFFER}},
{{"_GTS", 1, 0}},
{{"_GWS", 1, ACPI_RTYPE_INTEGER}},
{{"_HID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
{{"_HOT", 0, ACPI_RTYPE_INTEGER}},
{{"_HPP", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (4 Int) */
@ -306,6 +335,7 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_HPX", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (var Ints) */
{{{ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
{{"_HRV", 0, ACPI_RTYPE_INTEGER}},
{{"_IFT", 0, ACPI_RTYPE_INTEGER}}, /* See IPMI spec */
{{"_INI", 0, 0}},
{{"_IRC", 0, 0}},
@ -363,6 +393,9 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_PR3", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
{{"_PRE", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
{{"_PRL", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
@ -393,6 +426,7 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_PSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (5 Int) with count */
{{{ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER,0,0}, 0,0}},
{{"_PSE", 1, 0}},
{{"_PSL", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
@ -459,6 +493,7 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_SLI", 0, ACPI_RTYPE_BUFFER}},
{{"_SPD", 1, ACPI_RTYPE_INTEGER}},
{{"_SRS", 1, 0}},
{{"_SRT", 1, ACPI_RTYPE_INTEGER}},
{{"_SRV", 0, ACPI_RTYPE_INTEGER}}, /* See IPMI spec */
{{"_SST", 1, 0}},
{{"_STA", 0, ACPI_RTYPE_INTEGER}},
@ -466,6 +501,7 @@ static const ACPI_PREDEFINED_INFO PredefinedNames[] =
{{"_STP", 2, ACPI_RTYPE_INTEGER}},
{{"_STR", 0, ACPI_RTYPE_BUFFER}},
{{"_STV", 2, ACPI_RTYPE_INTEGER}},
{{"_SUB", 0, ACPI_RTYPE_STRING}},
{{"_SUN", 0, ACPI_RTYPE_INTEGER}},
{{"_SWS", 0, ACPI_RTYPE_INTEGER}},
{{"_TC1", 0, ACPI_RTYPE_INTEGER}},

View File

@ -75,28 +75,42 @@ typedef const struct acpi_rsconvert_info
/* Resource conversion opcodes */
#define ACPI_RSC_INITGET 0
#define ACPI_RSC_INITSET 1
#define ACPI_RSC_FLAGINIT 2
#define ACPI_RSC_1BITFLAG 3
#define ACPI_RSC_2BITFLAG 4
#define ACPI_RSC_COUNT 5
#define ACPI_RSC_COUNT16 6
#define ACPI_RSC_LENGTH 7
#define ACPI_RSC_MOVE8 8
#define ACPI_RSC_MOVE16 9
#define ACPI_RSC_MOVE32 10
#define ACPI_RSC_MOVE64 11
#define ACPI_RSC_SET8 12
#define ACPI_RSC_DATA8 13
#define ACPI_RSC_ADDRESS 14
#define ACPI_RSC_SOURCE 15
#define ACPI_RSC_SOURCEX 16
#define ACPI_RSC_BITMASK 17
#define ACPI_RSC_BITMASK16 18
#define ACPI_RSC_EXIT_NE 19
#define ACPI_RSC_EXIT_LE 20
#define ACPI_RSC_EXIT_EQ 21
typedef enum
{
ACPI_RSC_INITGET = 0,
ACPI_RSC_INITSET,
ACPI_RSC_FLAGINIT,
ACPI_RSC_1BITFLAG,
ACPI_RSC_2BITFLAG,
ACPI_RSC_3BITFLAG,
ACPI_RSC_ADDRESS,
ACPI_RSC_BITMASK,
ACPI_RSC_BITMASK16,
ACPI_RSC_COUNT,
ACPI_RSC_COUNT16,
ACPI_RSC_COUNT_GPIO_PIN,
ACPI_RSC_COUNT_GPIO_RES,
ACPI_RSC_COUNT_GPIO_VEN,
ACPI_RSC_COUNT_SERIAL_RES,
ACPI_RSC_COUNT_SERIAL_VEN,
ACPI_RSC_DATA8,
ACPI_RSC_EXIT_EQ,
ACPI_RSC_EXIT_LE,
ACPI_RSC_EXIT_NE,
ACPI_RSC_LENGTH,
ACPI_RSC_MOVE_GPIO_PIN,
ACPI_RSC_MOVE_GPIO_RES,
ACPI_RSC_MOVE_SERIAL_RES,
ACPI_RSC_MOVE_SERIAL_VEN,
ACPI_RSC_MOVE8,
ACPI_RSC_MOVE16,
ACPI_RSC_MOVE32,
ACPI_RSC_MOVE64,
ACPI_RSC_SET8,
ACPI_RSC_SOURCE,
ACPI_RSC_SOURCEX
} ACPI_RSCONVERT_OPCODES;
/* Resource Conversion sub-opcodes */
@ -109,6 +123,9 @@ typedef const struct acpi_rsconvert_info
#define AML_OFFSET(f) (UINT8) ACPI_OFFSET (AML_RESOURCE,f)
/*
* Individual entry for the resource dump tables
*/
typedef const struct acpi_rsdump_info
{
UINT8 Opcode;
@ -120,20 +137,27 @@ typedef const struct acpi_rsdump_info
/* Values for the Opcode field above */
#define ACPI_RSD_TITLE 0
#define ACPI_RSD_LITERAL 1
#define ACPI_RSD_STRING 2
#define ACPI_RSD_UINT8 3
#define ACPI_RSD_UINT16 4
#define ACPI_RSD_UINT32 5
#define ACPI_RSD_UINT64 6
#define ACPI_RSD_1BITFLAG 7
#define ACPI_RSD_2BITFLAG 8
#define ACPI_RSD_SHORTLIST 9
#define ACPI_RSD_LONGLIST 10
#define ACPI_RSD_DWORDLIST 11
#define ACPI_RSD_ADDRESS 12
#define ACPI_RSD_SOURCE 13
typedef enum
{
ACPI_RSD_TITLE = 0,
ACPI_RSD_1BITFLAG,
ACPI_RSD_2BITFLAG,
ACPI_RSD_3BITFLAG,
ACPI_RSD_ADDRESS,
ACPI_RSD_DWORDLIST,
ACPI_RSD_LITERAL,
ACPI_RSD_LONGLIST,
ACPI_RSD_SHORTLIST,
ACPI_RSD_SHORTLISTX,
ACPI_RSD_SOURCE,
ACPI_RSD_STRING,
ACPI_RSD_UINT8,
ACPI_RSD_UINT16,
ACPI_RSD_UINT32,
ACPI_RSD_UINT64,
ACPI_RSD_WORDLIST
} ACPI_RSDUMP_OPCODES;
/* restore default alignment */
@ -143,13 +167,16 @@ typedef const struct acpi_rsdump_info
/* Resource tables indexed by internal resource type */
extern const UINT8 AcpiGbl_AmlResourceSizes[];
extern const UINT8 AcpiGbl_AmlResourceSerialBusSizes[];
extern ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[];
/* Resource tables indexed by raw AML resource descriptor type */
extern const UINT8 AcpiGbl_ResourceStructSizes[];
extern const UINT8 AcpiGbl_ResourceStructSerialBusSizes[];
extern ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[];
extern ACPI_RSCONVERT_INFO *AcpiGbl_ConvertResourceSerialBusDispatch[];
typedef struct acpi_vendor_walk_info
{
@ -208,6 +235,10 @@ AcpiRsSetSrsMethodData (
ACPI_NAMESPACE_NODE *Node,
ACPI_BUFFER *RetBuffer);
ACPI_STATUS
AcpiRsGetAeiMethodData (
ACPI_NAMESPACE_NODE *Node,
ACPI_BUFFER *RetBuffer);
/*
* rscalc
@ -348,6 +379,11 @@ extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress16[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertExtIrq[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertGpio[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedDma[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[];
extern ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[];
/* These resources require separate get/set tables */
@ -366,6 +402,7 @@ extern ACPI_RSCONVERT_INFO AcpiRsSetVendor[];
* rsinfo
*/
extern ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[];
extern ACPI_RSDUMP_INFO *AcpiGbl_DumpSerialBusDispatch[];
/*
* rsdump
@ -387,6 +424,12 @@ extern ACPI_RSDUMP_INFO AcpiRsDumpAddress64[];
extern ACPI_RSDUMP_INFO AcpiRsDumpExtAddress64[];
extern ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[];
extern ACPI_RSDUMP_INFO AcpiRsDumpGenericReg[];
extern ACPI_RSDUMP_INFO AcpiRsDumpGpio[];
extern ACPI_RSDUMP_INFO AcpiRsDumpFixedDma[];
extern ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[];
extern ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[];
extern ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[];
extern ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[];
#endif
#endif /* __ACRESRC_H__ */

View File

@ -62,11 +62,14 @@ typedef UINT32 ACPI_RSDESC_SIZE; /* Max Resource Descr
#define ACPI_WRITE_COMBINING_MEMORY (UINT8) 0x02
#define ACPI_PREFETCHABLE_MEMORY (UINT8) 0x03
/*! [Begin] no source code translation */
/*
* IO Attributes
* The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh.
* The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
*/
/*! [End] no source code translation !*/
#define ACPI_NON_ISA_ONLY_RANGES (UINT8) 0x01
#define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
#define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
@ -82,16 +85,26 @@ typedef UINT32 ACPI_RSDESC_SIZE; /* Max Resource Descr
#define ACPI_DECODE_16 (UINT8) 0x01 /* 16-bit IO address decode */
/*
* IRQ Attributes
* Interrupt attributes - used in multiple descriptors
*/
/* Triggering */
#define ACPI_LEVEL_SENSITIVE (UINT8) 0x00
#define ACPI_EDGE_SENSITIVE (UINT8) 0x01
/* Polarity */
#define ACPI_ACTIVE_HIGH (UINT8) 0x00
#define ACPI_ACTIVE_LOW (UINT8) 0x01
#define ACPI_ACTIVE_BOTH (UINT8) 0x02
/* Sharing */
#define ACPI_EXCLUSIVE (UINT8) 0x00
#define ACPI_SHARED (UINT8) 0x01
#define ACPI_EXCLUSIVE_AND_WAKE (UINT8) 0x02
#define ACPI_SHARED_AND_WAKE (UINT8) 0x03
/*
* DMA Attributes
@ -128,6 +141,8 @@ typedef UINT32 ACPI_RSDESC_SIZE; /* Max Resource Descr
#define ACPI_POS_DECODE (UINT8) 0x00
#define ACPI_SUB_DECODE (UINT8) 0x01
/* Producer/Consumer */
#define ACPI_PRODUCER (UINT8) 0x00
#define ACPI_CONSUMER (UINT8) 0x01
@ -167,7 +182,7 @@ typedef struct acpi_resource_irq
} ACPI_RESOURCE_IRQ;
typedef struct ACPI_RESOURCE_DMA
typedef struct acpi_resource_dma
{
UINT8 Type;
UINT8 BusMaster;
@ -209,6 +224,24 @@ typedef struct acpi_resource_fixed_io
} ACPI_RESOURCE_FIXED_IO;
typedef struct acpi_resource_fixed_dma
{
UINT16 RequestLines;
UINT16 Channels;
UINT8 Width;
} ACPI_RESOURCE_FIXED_DMA;
/* Values for Width field above */
#define ACPI_DMA_WIDTH8 0
#define ACPI_DMA_WIDTH16 1
#define ACPI_DMA_WIDTH32 2
#define ACPI_DMA_WIDTH64 3
#define ACPI_DMA_WIDTH128 4
#define ACPI_DMA_WIDTH256 5
typedef struct acpi_resource_vendor
{
UINT16 ByteLength;
@ -385,6 +418,184 @@ typedef struct acpi_resource_generic_register
} ACPI_RESOURCE_GENERIC_REGISTER;
typedef struct acpi_resource_gpio
{
UINT8 RevisionId;
UINT8 ConnectionType;
UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */
UINT8 PinConfig;
UINT8 Sharable; /* For values, see Interrupt Attributes above */
UINT8 IoRestriction;
UINT8 Triggering; /* For values, see Interrupt Attributes above */
UINT8 Polarity; /* For values, see Interrupt Attributes above */
UINT16 DriveStrength;
UINT16 DebounceTimeout;
UINT16 PinTableLength;
UINT16 VendorLength;
ACPI_RESOURCE_SOURCE ResourceSource;
UINT16 *PinTable;
UINT8 *VendorData;
} ACPI_RESOURCE_GPIO;
/* Values for GPIO ConnectionType field above */
#define ACPI_RESOURCE_GPIO_TYPE_INT 0
#define ACPI_RESOURCE_GPIO_TYPE_IO 1
/* Values for PinConfig field above */
#define ACPI_PIN_CONFIG_DEFAULT 0
#define ACPI_PIN_CONFIG_PULLUP 1
#define ACPI_PIN_CONFIG_PULLDOWN 2
#define ACPI_PIN_CONFIG_NOPULL 3
/* Values for IoRestriction field above */
#define ACPI_IO_RESTRICT_NONE 0
#define ACPI_IO_RESTRICT_INPUT 1
#define ACPI_IO_RESTRICT_OUTPUT 2
#define ACPI_IO_RESTRICT_NONE_PRESERVE 3
/* Common structure for I2C, SPI, and UART serial descriptors */
#define ACPI_RESOURCE_SERIAL_COMMON \
UINT8 RevisionId; \
UINT8 Type; \
UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */\
UINT8 SlaveMode; \
UINT8 TypeRevisionId; \
UINT16 TypeDataLength; \
UINT16 VendorLength; \
ACPI_RESOURCE_SOURCE ResourceSource; \
UINT8 *VendorData;
typedef struct acpi_resource_common_serialbus
{
ACPI_RESOURCE_SERIAL_COMMON
} ACPI_RESOURCE_COMMON_SERIALBUS;
/* Values for the Type field above */
#define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
#define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
#define ACPI_RESOURCE_SERIAL_TYPE_UART 3
/* Values for SlaveMode field above */
#define ACPI_CONTROLLER_INITIATED 0
#define ACPI_DEVICE_INITIATED 1
typedef struct acpi_resource_i2c_serialbus
{
ACPI_RESOURCE_SERIAL_COMMON
UINT8 AccessMode;
UINT16 SlaveAddress;
UINT32 ConnectionSpeed;
} ACPI_RESOURCE_I2C_SERIALBUS;
/* Values for AccessMode field above */
#define ACPI_I2C_7BIT_MODE 0
#define ACPI_I2C_10BIT_MODE 1
typedef struct acpi_resource_spi_serialbus
{
ACPI_RESOURCE_SERIAL_COMMON
UINT8 WireMode;
UINT8 DevicePolarity;
UINT8 DataBitLength;
UINT8 ClockPhase;
UINT8 ClockPolarity;
UINT16 DeviceSelection;
UINT32 ConnectionSpeed;
} ACPI_RESOURCE_SPI_SERIALBUS;
/* Values for WireMode field above */
#define ACPI_SPI_4WIRE_MODE 0
#define ACPI_SPI_3WIRE_MODE 1
/* Values for DevicePolarity field above */
#define ACPI_SPI_ACTIVE_LOW 0
#define ACPI_SPI_ACTIVE_HIGH 1
/* Values for ClockPhase field above */
#define ACPI_SPI_FIRST_PHASE 0
#define ACPI_SPI_SECOND_PHASE 1
/* Values for ClockPolarity field above */
#define ACPI_SPI_START_LOW 0
#define ACPI_SPI_START_HIGH 1
typedef struct acpi_resource_uart_serialbus
{
ACPI_RESOURCE_SERIAL_COMMON
UINT8 Endian;
UINT8 DataBits;
UINT8 StopBits;
UINT8 FlowControl;
UINT8 Parity;
UINT8 LinesEnabled;
UINT16 RxFifoSize;
UINT16 TxFifoSize;
UINT32 DefaultBaudRate;
} ACPI_RESOURCE_UART_SERIALBUS;
/* Values for Endian field above */
#define ACPI_UART_LITTLE_ENDIAN 0
#define ACPI_UART_BIG_ENDIAN 1
/* Values for DataBits field above */
#define ACPI_UART_5_DATA_BITS 0
#define ACPI_UART_6_DATA_BITS 1
#define ACPI_UART_7_DATA_BITS 2
#define ACPI_UART_8_DATA_BITS 3
#define ACPI_UART_9_DATA_BITS 4
/* Values for StopBits field above */
#define ACPI_UART_NO_STOP_BITS 0
#define ACPI_UART_1_STOP_BIT 1
#define ACPI_UART_1P5_STOP_BITS 2
#define ACPI_UART_2_STOP_BITS 3
/* Values for FlowControl field above */
#define ACPI_UART_FLOW_CONTROL_NONE 0
#define ACPI_UART_FLOW_CONTROL_HW 1
#define ACPI_UART_FLOW_CONTROL_XON_XOFF 2
/* Values for Parity field above */
#define ACPI_UART_PARITY_NONE 0
#define ACPI_UART_PARITY_EVEN 1
#define ACPI_UART_PARITY_ODD 2
#define ACPI_UART_PARITY_MARK 3
#define ACPI_UART_PARITY_SPACE 4
/* Values for LinesEnabled bitfield above */
#define ACPI_UART_CARRIER_DETECT (1<<2)
#define ACPI_UART_RING_INDICATOR (1<<3)
#define ACPI_UART_DATA_SET_READY (1<<4)
#define ACPI_UART_DATA_TERMINAL_READY (1<<5)
#define ACPI_UART_CLEAR_TO_SEND (1<<6)
#define ACPI_UART_REQUEST_TO_SEND (1<<7)
/* ACPI_RESOURCE_TYPEs */
@ -405,7 +616,10 @@ typedef struct acpi_resource_generic_register
#define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */
#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
#define ACPI_RESOURCE_TYPE_MAX 16
#define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */
#define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */
#define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */
#define ACPI_RESOURCE_TYPE_MAX 19
/* Master union for resource descriptors */
@ -416,6 +630,7 @@ typedef union acpi_resource_data
ACPI_RESOURCE_START_DEPENDENT StartDpf;
ACPI_RESOURCE_IO Io;
ACPI_RESOURCE_FIXED_IO FixedIo;
ACPI_RESOURCE_FIXED_DMA FixedDma;
ACPI_RESOURCE_VENDOR Vendor;
ACPI_RESOURCE_VENDOR_TYPED VendorTyped;
ACPI_RESOURCE_END_TAG EndTag;
@ -428,6 +643,11 @@ typedef union acpi_resource_data
ACPI_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
ACPI_RESOURCE_EXTENDED_IRQ ExtendedIrq;
ACPI_RESOURCE_GENERIC_REGISTER GenericReg;
ACPI_RESOURCE_GPIO Gpio;
ACPI_RESOURCE_I2C_SERIALBUS I2cSerialBus;
ACPI_RESOURCE_SPI_SERIALBUS SpiSerialBus;
ACPI_RESOURCE_UART_SERIALBUS UartSerialBus;
ACPI_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
/* Common fields */

View File

@ -298,6 +298,7 @@ typedef struct acpi_table_fadt
ACPI_GENERIC_ADDRESS XPmTimerBlock; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
ACPI_GENERIC_ADDRESS XGpe0Block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */
ACPI_GENERIC_ADDRESS XGpe1Block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
ACPI_GENERIC_ADDRESS SleepRegister; /* 64-bit address of the Sleep register */
} ACPI_TABLE_FADT;
@ -309,6 +310,7 @@ typedef struct acpi_table_fadt
#define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */
#define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */
#define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */
#define ACPI_FADT_NO_CMOS_RTC (1<<5) /* 05: [V5] No CMOS real-time clock present */
/* Masks for FADT flags */
@ -332,6 +334,9 @@ typedef struct acpi_table_fadt
#define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */
#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */
#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local xAPICs must use physical dest mode (ACPI 3.0) */
#define ACPI_FADT_HW_REDUCED (1<<20) /* 20: [V5] ACPI hardware is not implemented (ACPI 5.0) */
#define ACPI_FADT_PREFER_S0_IDLE (1<<21) /* 21: [V5] Use advanced idle capabilities (ACPI 5.0) */
#define ACPI_FADT_USE_SLEEP_REG (1<<22) /* 22: [V5] Use the sleep register for sleep (ACPI 5.0) */
/* Values for PreferredProfile (Prefered Power Management Profiles) */
@ -344,7 +349,9 @@ enum AcpiPreferedPmProfiles
PM_WORKSTATION = 3,
PM_ENTERPRISE_SERVER = 4,
PM_SOHO_SERVER = 5,
PM_APPLIANCE_PC = 6
PM_APPLIANCE_PC = 6,
PM_PERFORMANCE_SERVER = 7,
PM_SLATE = 8
};
@ -392,6 +399,7 @@ typedef struct acpi_table_desc
*/
#include "actbl1.h"
#include "actbl2.h"
#include "actbl3.h"
/* Macros used to generate offsets to specific table fields */
@ -405,12 +413,15 @@ typedef struct acpi_table_desc
* FADT is the bottom line as to what the version really is.
*
* For reference, the values below are as follows:
* FADT V1 size: 0x74
* FADT V2 size: 0x84
* FADT V3+ size: 0xF4
* FADT V1 size: 0x074
* FADT V2 size: 0x084
* FADT V3 size: 0x0F4
* FADT V4 size: 0x0F4
* FADT V5 size: 0x100
*/
#define ACPI_FADT_V1_SIZE (UINT32) (ACPI_FADT_OFFSET (Flags) + 4)
#define ACPI_FADT_V2_SIZE (UINT32) (ACPI_FADT_OFFSET (Reserved4[0]) + 3)
#define ACPI_FADT_V3_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT))
#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepRegister))
#define ACPI_FADT_V5_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT))
#endif /* __ACTBL_H__ */

View File

@ -252,16 +252,17 @@ typedef struct acpi_einj_entry
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 */
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_SET_ERROR_TYPE_WITH_ADDRESS = 8,
ACPI_EINJ_ACTION_RESERVED = 9, /* 9 and greater are reserved */
ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
};
/* Values for Instruction field above */
@ -273,9 +274,33 @@ enum AcpiEinjInstructions
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 */
ACPI_EINJ_FLUSH_CACHELINE = 5,
ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
};
typedef struct acpi_einj_error_type_with_addr
{
UINT32 ErrorType;
UINT32 VendorStructOffset;
UINT32 Flags;
UINT32 ApicId;
UINT64 Address;
UINT64 Range;
UINT32 PcieId;
} ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
typedef struct acpi_einj_vendor
{
UINT32 Length;
UINT32 PcieId;
UINT16 VendorId;
UINT16 DeviceId;
UINT8 RevisionId;
UINT8 Reserved[3];
} ACPI_EINJ_VENDOR;
/* EINJ Trigger Error Action Table */
@ -313,6 +338,7 @@ enum AcpiEinjCommandStatus
#define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
#define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
#define ACPI_EINJ_PLATFORM_FATAL (1<<11)
#define ACPI_EINJ_VENDOR_DEFINED (1<<31)
/*******************************************************************************
@ -731,7 +757,9 @@ enum AcpiMadtType
ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
ACPI_MADT_TYPE_RESERVED = 13 /* 13 and greater are reserved */
};
@ -886,11 +914,42 @@ typedef struct acpi_madt_local_x2apic_nmi
} ACPI_MADT_LOCAL_X2APIC_NMI;
/* 11: Generic Interrupt (ACPI 5.0) */
typedef struct acpi_madt_generic_interrupt
{
ACPI_SUBTABLE_HEADER Header;
UINT16 Reserved; /* Reserved - must be zero */
UINT32 GicId;
UINT32 Uid;
UINT32 Flags;
UINT32 ParkingVersion;
UINT32 PerformanceInterrupt;
UINT64 ParkedAddress;
UINT64 BaseAddress;
} ACPI_MADT_GENERIC_INTERRUPT;
/* 12: Generic Distributor (ACPI 5.0) */
typedef struct acpi_madt_generic_distributor
{
ACPI_SUBTABLE_HEADER Header;
UINT16 Reserved; /* Reserved - must be zero */
UINT32 GicId;
UINT64 BaseAddress;
UINT32 GlobalIrqBase;
UINT32 Reserved2; /* Reserved - must be zero */
} ACPI_MADT_GENERIC_DISTRIBUTOR;
/*
* Common flags fields for MADT subtables
*/
/* MADT Local APIC flags (LapicFlags) */
/* MADT Local APIC flags (LapicFlags) and GIC flags */
#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */

650
include/actbl3.h Normal file
View File

@ -0,0 +1,650 @@
/******************************************************************************
*
* Name: actbl3.h - ACPI Table Definitions
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2011, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACTBL3_H__
#define __ACTBL3_H__
/*******************************************************************************
*
* Additional ACPI Tables (3)
*
* These tables are not consumed directly by the ACPICA subsystem, but are
* included here to support device drivers and the AML disassembler.
*
* The tables in this file are fully defined within the ACPI specification.
*
******************************************************************************/
/*
* Values for description table header signatures for tables defined in this
* file. Useful because they make it more difficult to inadvertently type in
* the wrong signature.
*/
#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
#define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
#define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
#define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
#define ACPI_SIG_RASF "RASF" /* RAS Feature table */
#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
/* Reserved table signatures */
#define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */
#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table 2 */
#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
/*
* All tables must be byte-packed to match the ACPI specification, since
* the tables are provided by the system BIOS.
*/
#pragma pack(1)
/*
* Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
* This is the only type that is even remotely portable. Anything else is not
* portable, so do not use any other bitfield types.
*/
/*******************************************************************************
*
* BGRT - Boot Graphics Resource Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_bgrt
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT16 Version;
UINT8 Status;
UINT8 ImageType;
UINT64 ImageAddress;
UINT32 ImageOffsetX;
UINT32 ImageOffsetY;
} ACPI_TABLE_BGRT;
/*******************************************************************************
*
* DRTM - Dynamic Root of Trust for Measurement table
*
******************************************************************************/
typedef struct acpi_table_drtm
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT64 EntryBaseAddress;
UINT64 EntryLength;
UINT32 EntryAddress32;
UINT64 EntryAddress64;
UINT64 ExitAddress;
UINT64 LogAreaAddress;
UINT32 LogAreaLength;
UINT64 ArchDependentAddress;
UINT32 Flags;
} ACPI_TABLE_DRTM;
/* 1) Validated Tables List */
typedef struct acpi_drtm_vtl_list
{
UINT32 ValidatedTableListCount;
} ACPI_DRTM_VTL_LIST;
/* 2) Resources List */
typedef struct acpi_drtm_resource_list
{
UINT32 ResourceListCount;
} ACPI_DRTM_RESOURCE_LIST;
/* 3) Platform-specific Identifiers List */
typedef struct acpi_drtm_id_list
{
UINT32 IdListCount;
} ACPI_DRTM_ID_LIST;
/*******************************************************************************
*
* FPDT - Firmware Performance Data Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_fpdt
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
} ACPI_TABLE_FPDT;
/* FPDT subtable header */
typedef struct acpi_fpdt_header
{
UINT16 Type;
UINT8 Length;
UINT8 Revision;
} ACPI_FPDT_HEADER;
/* Values for Type field above */
enum AcpiFpdtType
{
ACPI_FPDT_TYPE_BOOT = 0,
ACPI_FPDT_TYPE_S3PERF = 1,
};
/*
* FPDT subtables
*/
/* 0: Firmware Basic Boot Performance Record */
typedef struct acpi_fpdt_boot
{
ACPI_FPDT_HEADER Header;
UINT8 Reserved[4];
UINT64 ResetEnd;
UINT64 LoadStart;
UINT64 StartupStart;
UINT64 ExitServicesEntry;
UINT64 ExitServicesExit;
} ACPI_FPDT_BOOT;
/* 1: S3 Performance Table Pointer Record */
typedef struct acpi_fpdt_s3pt_ptr
{
ACPI_FPDT_HEADER Header;
UINT8 Reserved[4];
UINT64 Address;
} ACPI_FPDT_S3PT_PTR;
/*
* S3PT - S3 Performance Table. This table is pointed to by the
* FPDT S3 Pointer Record above.
*/
typedef struct acpi_table_s3pt
{
UINT8 Signature[4]; /* "S3PT" */
UINT32 Length;
} ACPI_TABLE_S3PT;
/*
* S3PT Subtables
*/
typedef struct acpi_s3pt_header
{
UINT16 Type;
UINT8 Length;
UINT8 Revision;
} ACPI_S3PT_HEADER;
/* Values for Type field above */
enum AcpiS3ptType
{
ACPI_S3PT_TYPE_RESUME = 0,
ACPI_S3PT_TYPE_SUSPEND = 1,
};
typedef struct acpi_s3pt_resume
{
ACPI_S3PT_HEADER Header;
UINT32 ResumeCount;
UINT64 FullResume;
UINT64 AverageResume;
} ACPI_S3PT_RESUME;
typedef struct acpi_s3pt_suspend
{
ACPI_S3PT_HEADER Header;
UINT64 SuspendStart;
UINT64 SuspendEnd;
} ACPI_S3PT_SUSPEND;
/*******************************************************************************
*
* GTDT - Generic Timer Description Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_gtdt
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT64 Address;
UINT32 Flags;
UINT32 SecurePl1Interrupt;
UINT32 SecurePl1Flags;
UINT32 NonSecurePl1Interrupt;
UINT32 NonSecurePl1Flags;
UINT32 VirtualTimerInterrupt;
UINT32 VirtualTimerFlags;
UINT32 NonSecurePl2Interrupt;
UINT32 NonSecurePl2Flags;
} ACPI_TABLE_GTDT;
/* Values for Flags field above */
#define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1
/* Values for all "TimerFlags" fields above */
#define ACPI_GTDT_INTERRUPT_MODE 1
#define ACPI_GTDT_INTERRUPT_POLARITY 2
/*******************************************************************************
*
* MPST - Memory Power State Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
#define ACPI_MPST_CHANNEL_INFO \
UINT16 Reserved1; \
UINT8 ChannelId; \
UINT8 Reserved2; \
UINT16 PowerNodeCount;
/* Main table */
typedef struct acpi_table_mpst
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
} ACPI_TABLE_MPST;
/* Memory Platform Communication Channel Info */
typedef struct acpi_mpst_channel
{
ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
} ACPI_MPST_CHANNEL;
/* Memory Power Node Structure */
typedef struct acpi_mpst_power_node
{
UINT8 Flags;
UINT8 Reserved1;
UINT16 NodeId;
UINT32 Length;
UINT64 RangeAddress;
UINT64 RangeLength;
UINT8 NumPowerStates;
UINT8 NumPhysicalComponents;
UINT16 Reserved2;
} ACPI_MPST_POWER_NODE;
/* Values for Flags field above */
#define ACPI_MPST_ENABLED 1
#define ACPI_MPST_POWER_MANAGED 2
#define ACPI_MPST_HOT_PLUG_CAPABLE 4
/* Memory Power State Structure (follows POWER_NODE above) */
typedef struct acpi_mpst_power_state
{
UINT8 PowerState;
UINT8 InfoIndex;
} ACPI_MPST_POWER_STATE;
/* Physical Component ID Structure (follows POWER_STATE above) */
typedef struct acpi_mpst_component
{
UINT16 ComponentId;
} ACPI_MPST_COMPONENT;
/* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
typedef struct acpi_mpst_data_hdr
{
UINT16 CharacteristicsCount;
} ACPI_MPST_DATA_HDR;
typedef struct acpi_mpst_power_data
{
UINT8 Revision;
UINT8 Flags;
UINT16 Reserved1;
UINT32 AveragePower;
UINT32 PowerSaving;
UINT64 ExitLatency;
UINT64 Reserved2;
} ACPI_MPST_POWER_DATA;
/* Values for Flags field above */
#define ACPI_MPST_PRESERVE 1
#define ACPI_MPST_AUTOENTRY 2
#define ACPI_MPST_AUTOEXIT 4
/* Shared Memory Region (not part of an ACPI table) */
typedef struct acpi_mpst_shared
{
UINT32 Signature;
UINT16 PccCommand;
UINT16 PccStatus;
UINT16 CommandRegister;
UINT16 StatusRegister;
UINT16 PowerStateId;
UINT16 PowerNodeId;
UINT64 EnergyConsumed;
UINT64 AveragePower;
} ACPI_MPST_SHARED;
/*******************************************************************************
*
* PCCT - Platform Communications Channel Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_pcct
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 Flags;
UINT32 Latency;
UINT32 Reserved;
} ACPI_TABLE_PCCT;
/* Values for Flags field above */
#define ACPI_PCCT_DOORBELL 1
/*
* PCCT subtables
*/
/* 0: Generic Communications Subspace */
typedef struct acpi_pcct_subspace
{
ACPI_SUBTABLE_HEADER Header;
UINT8 Reserved[6];
UINT64 BaseAddress;
UINT64 Length;
ACPI_GENERIC_ADDRESS DoorbellRegister;
UINT64 PreserveMask;
UINT64 WriteMask;
} ACPI_PCCT_SUBSPACE;
/*
* PCC memory structures (not part of the ACPI table)
*/
/* Shared Memory Region */
typedef struct acpi_pcct_shared_memory
{
UINT32 Signature;
UINT16 Command;
UINT16 Status;
} ACPI_PCCT_SHARED_MEMORY;
/*******************************************************************************
*
* PMTT - Platform Memory Topology Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_pmtt
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 Reserved;
} ACPI_TABLE_PMTT;
/* Common header for PMTT subtables that follow main table */
typedef struct acpi_pmtt_header
{
UINT8 Type;
UINT8 Reserved1;
UINT16 Length;
UINT16 Flags;
UINT16 Reserved2;
} ACPI_PMTT_HEADER;
/* Values for Type field above */
#define ACPI_PMTT_TYPE_SOCKET 0
#define ACPI_PMTT_TYPE_CONTROLLER 1
#define ACPI_PMTT_TYPE_DIMM 2
#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
/* Values for Flags field above */
#define ACPI_PMTT_TOP_LEVEL 0x0001
#define ACPI_PMTT_PHYSICAL 0x0002
#define ACPI_PMTT_MEMORY_TYPE 0x000C
/*
* PMTT subtables, correspond to Type in acpi_pmtt_header
*/
/* 0: Socket Structure */
typedef struct acpi_pmtt_socket
{
ACPI_PMTT_HEADER Header;
UINT16 SocketId;
UINT16 Reserved;
} ACPI_PMTT_SOCKET;
/* 1: Memory Controller subtable */
typedef struct acpi_pmtt_controller
{
ACPI_PMTT_HEADER Header;
UINT32 ReadLatency;
UINT32 WriteLatency;
UINT32 ReadBandwidth;
UINT32 WriteBandwidth;
UINT16 AccessWidth;
UINT16 Alignment;
UINT16 Reserved;
UINT16 DomainCount;
} ACPI_PMTT_CONTROLLER;
/* 1a: Proximity Domain substructure */
typedef struct acpi_pmtt_domain
{
UINT32 ProximityDomain;
} ACPI_PMTT_DOMAIN;
/* 2: Physical Component Identifier (DIMM) */
typedef struct acpi_pmtt_physical_component
{
ACPI_PMTT_HEADER Header;
UINT16 ComponentId;
UINT16 Reserved;
UINT32 MemorySize;
UINT32 BiosHandle;
} ACPI_PMTT_PHYSICAL_COMPONENT;
/*******************************************************************************
*
* RASF - RAS Feature Table (ACPI 5.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_rasf
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 ChannelId[12];
} ACPI_TABLE_RASF;
/* RASF Platform Communication Channel Shared Memory Region */
typedef struct acpi_rasf_shared_memory
{
UINT32 Signature;
UINT16 Command;
UINT16 Status;
UINT64 RequestedAddress;
UINT64 RequestedLength;
UINT64 ActualAddress;
UINT64 ActualLength;
UINT16 Flags;
UINT8 Speed;
} ACPI_RASF_SHARED_MEMORY;
/* Masks for Flags and Speed fields above */
#define ACPI_RASF_SCRUBBER_RUNNING 1
#define ACPI_RASF_SPEED (7<<1)
/* Channel Commands */
enum AcpiRasfCommands
{
ACPI_RASF_GET_RAS_CAPABILITIES = 1,
ACPI_RASF_GET_PATROL_PARAMETERS = 2,
ACPI_RASF_START_PATROL_SCRUBBER = 3,
ACPI_RASF_STOP_PATROL_SCRUBBER = 4
};
/* Channel Command flags */
#define ACPI_RASF_GENERATE_SCI (1<<15)
/* Status values */
enum AcpiRasfStatus
{
ACPI_RASF_SUCCESS = 0,
ACPI_RASF_NOT_VALID = 1,
ACPI_RASF_NOT_SUPPORTED = 2,
ACPI_RASF_BUSY = 3,
ACPI_RASF_FAILED = 4,
ACPI_RASF_ABORTED = 5,
ACPI_RASF_INVALID_DATA = 6
};
/* Status flags */
#define ACPI_RASF_COMMAND_COMPLETE (1)
#define ACPI_RASF_SCI_DOORBELL (1<<1)
#define ACPI_RASF_ERROR (1<<2)
#define ACPI_RASF_STATUS (0x1F<<3)
/* Reset to default packing */
#pragma pack()
#endif /* __ACTBL3_H__ */

View File

@ -716,8 +716,10 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
#define ACPI_ADR_SPACE_CMOS (ACPI_ADR_SPACE_TYPE) 5
#define ACPI_ADR_SPACE_PCI_BAR_TARGET (ACPI_ADR_SPACE_TYPE) 6
#define ACPI_ADR_SPACE_IPMI (ACPI_ADR_SPACE_TYPE) 7
#define ACPI_ADR_SPACE_GPIO (ACPI_ADR_SPACE_TYPE) 8
#define ACPI_ADR_SPACE_GSBUS (ACPI_ADR_SPACE_TYPE) 9
#define ACPI_NUM_PREDEFINED_REGIONS 8
#define ACPI_NUM_PREDEFINED_REGIONS 10
/*
* Special Address Spaces
@ -1030,6 +1032,17 @@ ACPI_STATUS (*ACPI_ADR_SPACE_HANDLER) (
#define ACPI_DEFAULT_HANDLER NULL
/* Special Context data for GenericSerialBus/GeneralPurposeIo (ACPI 5.0) */
typedef struct acpi_connection_info
{
UINT8 *Connection;
UINT16 Length;
UINT8 AccessLength;
} ACPI_CONNECTION_INFO;
typedef
ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (
ACPI_HANDLE RegionHandle,

View File

@ -46,6 +46,7 @@
extern const UINT8 AcpiGbl_ResourceAmlSizes[];
extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[];
/* Strings used by the disassembler and debugger resource dump routines */
@ -69,6 +70,22 @@ extern const char *AcpiGbl_SizDecode[];
extern const char *AcpiGbl_TrsDecode[];
extern const char *AcpiGbl_TtpDecode[];
extern const char *AcpiGbl_TypDecode[];
extern const char *AcpiGbl_PpcDecode[];
extern const char *AcpiGbl_IorDecode[];
extern const char *AcpiGbl_DtsDecode[];
extern const char *AcpiGbl_CtDecode[];
extern const char *AcpiGbl_SbtDecode[];
extern const char *AcpiGbl_AmDecode[];
extern const char *AcpiGbl_SmDecode[];
extern const char *AcpiGbl_WmDecode[];
extern const char *AcpiGbl_CphDecode[];
extern const char *AcpiGbl_CpoDecode[];
extern const char *AcpiGbl_DpDecode[];
extern const char *AcpiGbl_EdDecode[];
extern const char *AcpiGbl_BpbDecode[];
extern const char *AcpiGbl_SbDecode[];
extern const char *AcpiGbl_FcDecode[];
extern const char *AcpiGbl_PtDecode[];
#endif
/* Types for Resource descriptor entries */

View File

@ -190,6 +190,15 @@
#define AML_LNOTEQUAL_OP (UINT16) 0x9293
/*
* Opcodes for "Field" operators
*/
#define AML_FIELD_OFFSET_OP (UINT8) 0x00
#define AML_FIELD_ACCESS_OP (UINT8) 0x01
#define AML_FIELD_CONNECTION_OP (UINT8) 0x02 /* ACPI 5.0 */
#define AML_FIELD_EXT_ACCESS_OP (UINT8) 0x03 /* ACPI 5.0 */
/*
* Internal opcodes
* Use only "Unknown" AML opcodes, don't attempt to use
@ -204,7 +213,8 @@
#define AML_INT_METHODCALL_OP (UINT16) 0x0035
#define AML_INT_RETURN_VALUE_OP (UINT16) 0x0036
#define AML_INT_EVAL_SUBTREE_OP (UINT16) 0x0037
#define AML_INT_CONNECTION_OP (UINT16) 0x0038
#define AML_INT_EXTACCESSFIELD_OP (UINT16) 0x0039
#define ARG_NONE 0x0
@ -478,13 +488,16 @@ typedef enum
*/
typedef enum
{
AML_FIELD_ATTRIB_SMB_QUICK = 0x02,
AML_FIELD_ATTRIB_SMB_SEND_RCV = 0x04,
AML_FIELD_ATTRIB_SMB_BYTE = 0x06,
AML_FIELD_ATTRIB_SMB_WORD = 0x08,
AML_FIELD_ATTRIB_SMB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_SMB_WORD_CALL = 0x0C,
AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D
AML_FIELD_ATTRIB_QUICK = 0x02,
AML_FIELD_ATTRIB_SEND_RCV = 0x04,
AML_FIELD_ATTRIB_BYTE = 0x06,
AML_FIELD_ATTRIB_WORD = 0x08,
AML_FIELD_ATTRIB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_MULTIBYTE = 0x0B,
AML_FIELD_ATTRIB_WORD_CALL = 0x0C,
AML_FIELD_ATTRIB_BLOCK_CALL = 0x0D,
AML_FIELD_ATTRIB_RAW_BYTES = 0x0E,
AML_FIELD_ATTRIB_RAW_PROCESS = 0x0F
} AML_ACCESS_ATTRIBUTE;

View File

@ -59,29 +59,48 @@
#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT"
#define ACPI_RESTAG_BASEADDRESS "_BAS"
#define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */
#define ACPI_RESTAG_DEBOUNCETIME "_DBT"
#define ACPI_RESTAG_DECODE "_DEC"
#define ACPI_RESTAG_DEVICEPOLARITY "_DPL"
#define ACPI_RESTAG_DMA "_DMA"
#define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
#define ACPI_RESTAG_DRIVESTRENGTH "_DRS"
#define ACPI_RESTAG_ENDIANNESS "_END"
#define ACPI_RESTAG_FLOWCONTROL "_FLC"
#define ACPI_RESTAG_GRANULARITY "_GRA"
#define ACPI_RESTAG_INTERRUPT "_INT"
#define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* ActiveLo(1), ActiveHi(0) */
#define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), NoShare(0) */
#define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
#define ACPI_RESTAG_IORESTRICTION "_IOR"
#define ACPI_RESTAG_LENGTH "_LEN"
#define ACPI_RESTAG_LINE "_LIN"
#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
#define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
#define ACPI_RESTAG_MAXADDR "_MAX"
#define ACPI_RESTAG_MINADDR "_MIN"
#define ACPI_RESTAG_MAXTYPE "_MAF"
#define ACPI_RESTAG_MINTYPE "_MIF"
#define ACPI_RESTAG_MODE "_MOD"
#define ACPI_RESTAG_PARITY "_PAR"
#define ACPI_RESTAG_PHASE "_PHA"
#define ACPI_RESTAG_PIN "_PIN"
#define ACPI_RESTAG_PINCONFIG "_PPI"
#define ACPI_RESTAG_POLARITY "_POL"
#define ACPI_RESTAG_REGISTERBITOFFSET "_RBO"
#define ACPI_RESTAG_REGISTERBITWIDTH "_RBW"
#define ACPI_RESTAG_RANGETYPE "_RNG"
#define ACPI_RESTAG_READWRITETYPE "_RW_" /* ReadOnly(0), Writeable (1) */
#define ACPI_RESTAG_LENGTH_RX "_RXL"
#define ACPI_RESTAG_LENGTH_TX "_TXL"
#define ACPI_RESTAG_SLAVEMODE "_SLV"
#define ACPI_RESTAG_SPEED "_SPE"
#define ACPI_RESTAG_STOPBITS "_STB"
#define ACPI_RESTAG_TRANSLATION "_TRA"
#define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
#define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */
#define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */
#define ACPI_RESTAG_VENDORDATA "_VEN"
/* Default sizes for "small" resource descriptors */
@ -92,6 +111,7 @@
#define ASL_RDESC_END_DEPEND_SIZE 0x00
#define ASL_RDESC_IO_SIZE 0x07
#define ASL_RDESC_FIXED_IO_SIZE 0x03
#define ASL_RDESC_FIXED_DMA_SIZE 0x05
#define ASL_RDESC_END_TAG_SIZE 0x01
@ -214,6 +234,16 @@ typedef struct aml_resource_end_tag
} AML_RESOURCE_END_TAG;
typedef struct aml_resource_fixed_dma
{
AML_RESOURCE_SMALL_HEADER_COMMON
UINT16 RequestLines;
UINT16 Channels;
UINT8 Width;
} AML_RESOURCE_FIXED_DMA;
/*
* LARGE descriptors
*/
@ -368,6 +398,130 @@ typedef struct aml_resource_generic_register
} AML_RESOURCE_GENERIC_REGISTER;
/* Common descriptor for GpioInt and GpioIo (ACPI 5.0) */
typedef struct aml_resource_gpio
{
AML_RESOURCE_LARGE_HEADER_COMMON
UINT8 RevisionId;
UINT8 ConnectionType;
UINT16 Flags;
UINT16 IntFlags;
UINT8 PinConfig;
UINT16 DriveStrength;
UINT16 DebounceTimeout;
UINT16 PinTableOffset;
UINT8 ResSourceIndex;
UINT16 ResSourceOffset;
UINT16 VendorOffset;
UINT16 VendorLength;
/*
* Optional fields follow immediately:
* 1) PIN list (Words)
* 2) Resource Source String
* 3) Vendor Data bytes
*/
} AML_RESOURCE_GPIO;
#define AML_RESOURCE_GPIO_REVISION 1 /* ACPI 5.0 */
/* Values for ConnectionType above */
#define AML_RESOURCE_GPIO_TYPE_INT 0
#define AML_RESOURCE_GPIO_TYPE_IO 1
#define AML_RESOURCE_MAX_GPIOTYPE 1
/* Common preamble for all serial descriptors (ACPI 5.0) */
#define AML_RESOURCE_SERIAL_COMMON \
UINT8 RevisionId; \
UINT8 ResSourceIndex; \
UINT8 Type; \
UINT8 Flags; \
UINT16 TypeSpecificFlags; \
UINT8 TypeRevisionId; \
UINT16 TypeDataLength; \
/* Values for the type field above */
#define AML_RESOURCE_I2C_SERIALBUSTYPE 1
#define AML_RESOURCE_SPI_SERIALBUSTYPE 2
#define AML_RESOURCE_UART_SERIALBUSTYPE 3
#define AML_RESOURCE_MAX_SERIALBUSTYPE 3
#define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */
typedef struct aml_resource_common_serialbus
{
AML_RESOURCE_LARGE_HEADER_COMMON
AML_RESOURCE_SERIAL_COMMON
} AML_RESOURCE_COMMON_SERIALBUS;
typedef struct aml_resource_i2c_serialbus
{
AML_RESOURCE_LARGE_HEADER_COMMON
AML_RESOURCE_SERIAL_COMMON
UINT32 ConnectionSpeed;
UINT16 SlaveAddress;
/*
* Optional fields follow immediately:
* 1) Vendor Data bytes
* 2) Resource Source String
*/
} AML_RESOURCE_I2C_SERIALBUS;
#define AML_RESOURCE_I2C_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_I2C_TYPE_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_I2C_MIN_DATA_LEN 6
typedef struct aml_resource_spi_serialbus
{
AML_RESOURCE_LARGE_HEADER_COMMON
AML_RESOURCE_SERIAL_COMMON
UINT32 ConnectionSpeed;
UINT8 DataBitLength;
UINT8 ClockPhase;
UINT8 ClockPolarity;
UINT16 DeviceSelection;
/*
* Optional fields follow immediately:
* 1) Vendor Data bytes
* 2) Resource Source String
*/
} AML_RESOURCE_SPI_SERIALBUS;
#define AML_RESOURCE_SPI_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_SPI_MIN_DATA_LEN 9
typedef struct aml_resource_uart_serialbus
{
AML_RESOURCE_LARGE_HEADER_COMMON
AML_RESOURCE_SERIAL_COMMON
UINT32 DefaultBaudRate;
UINT16 RxFifoSize;
UINT16 TxFifoSize;
UINT8 Parity;
UINT8 LinesEnabled;
/*
* Optional fields follow immediately:
* 1) Vendor Data bytes
* 2) Resource Source String
*/
} AML_RESOURCE_UART_SERIALBUS;
#define AML_RESOURCE_UART_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_UART_MIN_DATA_LEN 10
/* restore default alignment */
#pragma pack()
@ -390,6 +544,7 @@ typedef union aml_resource
AML_RESOURCE_END_DEPENDENT EndDpf;
AML_RESOURCE_IO Io;
AML_RESOURCE_FIXED_IO FixedIo;
AML_RESOURCE_FIXED_DMA FixedDma;
AML_RESOURCE_VENDOR_SMALL VendorSmall;
AML_RESOURCE_END_TAG EndTag;
@ -405,6 +560,11 @@ typedef union aml_resource
AML_RESOURCE_ADDRESS64 Address64;
AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
AML_RESOURCE_EXTENDED_IRQ ExtendedIrq;
AML_RESOURCE_GPIO Gpio;
AML_RESOURCE_I2C_SERIALBUS I2cSerialBus;
AML_RESOURCE_SPI_SERIALBUS SpiSerialBus;
AML_RESOURCE_UART_SERIALBUS UartSerialBus;
AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
/* Utility overlays */

View File

@ -665,6 +665,7 @@ AcpiNsCheckPackage (
case ACPI_PTYPE2_FIXED:
case ACPI_PTYPE2_MIN:
case ACPI_PTYPE2_COUNT:
case ACPI_PTYPE2_FIX_VAR:
/*
* These types all return a single Package that consists of a
@ -807,6 +808,29 @@ AcpiNsCheckPackageList (
break;
case ACPI_PTYPE2_FIX_VAR:
/*
* Each subpackage has a fixed number of elements and an
* optional element
*/
ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2;
if (SubPackage->Package.Count < ExpectedCount)
{
goto PackageTooSmall;
}
Status = AcpiNsCheckPackageElements (Data, SubElements,
Package->RetInfo.ObjectType1,
Package->RetInfo.Count1,
Package->RetInfo.ObjectType2,
SubPackage->Package.Count - Package->RetInfo.Count1, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
}
break;
case ACPI_PTYPE2_FIXED:
/* Each sub-package has a fixed length */

View File

@ -696,6 +696,7 @@ AcpiNsRemoveNullElements (
case ACPI_PTYPE2_FIXED:
case ACPI_PTYPE2_MIN:
case ACPI_PTYPE2_REV_FIXED:
case ACPI_PTYPE2_FIX_VAR:
break;
default:

View File

@ -516,11 +516,12 @@ AcpiNsRepair_HID (
}
/*
* Copy and uppercase the string. From the ACPI specification:
* Copy and uppercase the string. From the ACPI 5.0 specification:
*
* A valid PNP ID must be of the form "AAA####" where A is an uppercase
* letter and # is a hex digit. A valid ACPI ID must be of the form
* "ACPI####" where # is a hex digit.
* "NNNN####" where N is an uppercase letter or decimal digit, and
* # is a hex digit.
*/
for (Dest = NewString->String.Pointer; *Source; Dest++, Source++)
{

View File

@ -277,7 +277,6 @@ AcpiOsVprintf (
const char *Fmt,
va_list Args)
{
INT32 Count = 0;
UINT8 Flags;
@ -290,7 +289,7 @@ AcpiOsVprintf (
{
/* Output file is open, send the output there */
Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args);
vfprintf (AcpiGbl_DebugFile, Fmt, Args);
}
else
{
@ -302,7 +301,7 @@ AcpiOsVprintf (
if (Flags & ACPI_DB_CONSOLE_OUTPUT)
{
Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args);
vfprintf (AcpiGbl_OutputFile, Fmt, Args);
}
}
@ -1172,8 +1171,11 @@ ACPI_THREAD_ID
AcpiOsGetThreadId (
void)
{
pthread_t thread;
return (ACPI_CAST_PTHREAD_T (pthread_self()));
thread = pthread_self();
return (ACPI_CAST_PTHREAD_T (thread));
}

View File

@ -1162,6 +1162,8 @@ AcpiOsReadPort (
UINT32 *Value,
UINT32 Width)
{
ACPI_FUNCTION_NAME (OsReadPort);
switch (Width)
{
@ -1178,6 +1180,7 @@ AcpiOsReadPort (
break;
default:
ACPI_ERROR ((AE_INFO, "Bad width parameter: %X", Width));
return (AE_BAD_PARAMETER);
}
@ -1205,8 +1208,16 @@ AcpiOsWritePort (
UINT32 Value,
UINT32 Width)
{
ACPI_FUNCTION_NAME (OsWritePort);
return (AE_OK);
if ((Width == 8) || (Width == 16) || (Width == 32))
{
return (AE_OK);
}
ACPI_ERROR ((AE_INFO, "Bad width parameter: %X", Width));
return (AE_BAD_PARAMETER);
}

View File

@ -531,37 +531,57 @@ static ACPI_PARSE_OBJECT *
AcpiPsGetNextField (
ACPI_PARSE_STATE *ParserState)
{
UINT32 AmlOffset = (UINT32)
ACPI_PTR_DIFF (ParserState->Aml,
ParserState->AmlStart);
UINT32 AmlOffset;
ACPI_PARSE_OBJECT *Field;
ACPI_PARSE_OBJECT *Arg = NULL;
UINT16 Opcode;
UINT32 Name;
UINT8 AccessType;
UINT8 AccessAttribute;
UINT8 AccessLength;
UINT32 PkgLength;
UINT8 *PkgEnd;
UINT32 BufferLength;
ACPI_FUNCTION_TRACE (PsGetNextField);
AmlOffset = (UINT32) ACPI_PTR_DIFF (
ParserState->Aml, ParserState->AmlStart);
/* Determine field type */
switch (ACPI_GET8 (ParserState->Aml))
{
default:
Opcode = AML_INT_NAMEDFIELD_OP;
break;
case 0x00:
case AML_FIELD_OFFSET_OP:
Opcode = AML_INT_RESERVEDFIELD_OP;
ParserState->Aml++;
break;
case 0x01:
case AML_FIELD_ACCESS_OP:
Opcode = AML_INT_ACCESSFIELD_OP;
ParserState->Aml++;
break;
case AML_FIELD_CONNECTION_OP:
Opcode = AML_INT_CONNECTION_OP;
ParserState->Aml++;
break;
case AML_FIELD_EXT_ACCESS_OP:
Opcode = AML_INT_EXTACCESSFIELD_OP;
ParserState->Aml++;
break;
default:
Opcode = AML_INT_NAMEDFIELD_OP;
break;
}
/* Allocate a new field op */
@ -601,17 +621,116 @@ AcpiPsGetNextField (
case AML_INT_ACCESSFIELD_OP:
case AML_INT_EXTACCESSFIELD_OP:
/*
* Get AccessType and AccessAttrib and merge into the field Op
* AccessType is first operand, AccessAttribute is second
* AccessType is first operand, AccessAttribute is second. stuff
* these bytes into the node integer value for convenience.
*/
Field->Common.Value.Integer = (((UINT32) ACPI_GET8 (ParserState->Aml) << 8));
/* Get the two bytes (Type/Attribute) */
AccessType = ACPI_GET8 (ParserState->Aml);
ParserState->Aml++;
Field->Common.Value.Integer |= ACPI_GET8 (ParserState->Aml);
AccessAttribute = ACPI_GET8 (ParserState->Aml);
ParserState->Aml++;
Field->Common.Value.Integer = (UINT8) AccessType;
Field->Common.Value.Integer |= (UINT16) (AccessAttribute << 8);
/* This opcode has a third byte, AccessLength */
if (Opcode == AML_INT_EXTACCESSFIELD_OP)
{
AccessLength = ACPI_GET8 (ParserState->Aml);
ParserState->Aml++;
Field->Common.Value.Integer |= (UINT32) (AccessLength << 16);
}
break;
case AML_INT_CONNECTION_OP:
/*
* Argument for Connection operator can be either a Buffer
* (resource descriptor), or a NameString.
*/
if (ACPI_GET8 (ParserState->Aml) == AML_BUFFER_OP)
{
ParserState->Aml++;
PkgEnd = ParserState->Aml;
PkgLength = AcpiPsGetNextPackageLength (ParserState);
PkgEnd += PkgLength;
if (ParserState->Aml < PkgEnd)
{
/* Non-empty list */
Arg = AcpiPsAllocOp (AML_INT_BYTELIST_OP);
if (!Arg)
{
return_PTR (NULL);
}
/* Get the actual buffer length argument */
Opcode = ACPI_GET8 (ParserState->Aml);
ParserState->Aml++;
switch (Opcode)
{
case AML_BYTE_OP: /* AML_BYTEDATA_ARG */
BufferLength = ACPI_GET8 (ParserState->Aml);
ParserState->Aml += 1;
break;
case AML_WORD_OP: /* AML_WORDDATA_ARG */
BufferLength = ACPI_GET16 (ParserState->Aml);
ParserState->Aml += 2;
break;
case AML_DWORD_OP: /* AML_DWORDATA_ARG */
BufferLength = ACPI_GET32 (ParserState->Aml);
ParserState->Aml += 4;
break;
default:
BufferLength = 0;
break;
}
/* Fill in bytelist data */
Arg->Named.Value.Size = BufferLength;
Arg->Named.Data = ParserState->Aml;
}
/* Skip to End of byte data */
ParserState->Aml = PkgEnd;
}
else
{
Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP);
if (!Arg)
{
return_PTR (NULL);
}
/* Get the Namestring argument */
Arg->Common.Value.Name = AcpiPsGetNextNamestring (ParserState);
}
/* Link the buffer/namestring to parent (CONNECTION_OP) */
AcpiPsAppendArg (Field, Arg);
break;
default:
/* Opcode was set in previous switch */

View File

@ -328,12 +328,17 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
/* 79 */ ACPI_OP ("Mid", ARGP_MID_OP, ARGI_MID_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_3A_1T_1R, AML_FLAGS_EXEC_3A_1T_1R | AML_CONSTANT),
/* 7A */ ACPI_OP ("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0),
/* 7B */ ACPI_OP ("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R),
/* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
/* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
/* 7D */ ACPI_OP ("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE),
/* ACPI 3.0 opcodes */
/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R)
/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R),
/* ACPI 5.0 opcodes */
/* 7F */ ACPI_OP ("-ConnectField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS),
/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0)
/*! [End] no source code translation !*/
};
@ -353,7 +358,7 @@ static const UINT8 AcpiGbl_ShortOpIndex[256] =
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
/* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, 0x7D,
/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x38 */ 0x7F, 0x80, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC,
/* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC,
/* 0x50 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC,

View File

@ -85,7 +85,12 @@ AcpiPsGetArg (
ACPI_FUNCTION_ENTRY ();
/*
if (Op->Common.AmlOpcode == AML_INT_CONNECTION_OP)
{
return (Op->Common.Value.Arg);
}
*/
/* Get the info structure for this opcode */
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);

Some files were not shown because too many files have changed in this diff Show More