summaryrefslogtreecommitdiff
path: root/source/components
diff options
context:
space:
mode:
Diffstat (limited to 'source/components')
-rw-r--r--source/components/disassembler/dmbuffer.c4
-rw-r--r--source/components/disassembler/dmopcode.c2
-rw-r--r--source/components/disassembler/dmresrc.c9
-rw-r--r--source/components/disassembler/dmresrcl.c40
-rw-r--r--source/components/disassembler/dmresrcl2.c80
-rw-r--r--source/components/disassembler/dmresrcs.c32
-rw-r--r--source/components/dispatcher/dsfield.c2
-rw-r--r--source/components/events/evgpeinit.c4
-rw-r--r--source/components/events/evregion.c46
-rw-r--r--source/components/events/evxface.c3
-rw-r--r--source/components/events/evxfevnt.c41
-rw-r--r--source/components/executer/exfield.c68
-rw-r--r--source/components/executer/exprep.c2
-rw-r--r--source/components/hardware/hwgpe.c8
-rw-r--r--source/components/tables/tbxfroot.c37
15 files changed, 313 insertions, 65 deletions
diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c
index 2231ce1efdd17..973e269e09448 100644
--- a/source/components/disassembler/dmbuffer.c
+++ b/source/components/disassembler/dmbuffer.c
@@ -840,6 +840,10 @@ AcpiDmCheckForHardwareId (
/* _CID with Package: get the package length, check all elements */
NextOp = AcpiPsGetDepthNext (NULL, NextOp);
+ if (!NextOp)
+ {
+ return;
+ }
/* Don't need to use the length, just walk the peer list */
diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c
index 52e01a9cb074d..e3d9e6918e4c3 100644
--- a/source/components/disassembler/dmopcode.c
+++ b/source/components/disassembler/dmopcode.c
@@ -933,7 +933,9 @@ AcpiDmDisassembleOneOp (
Length = (UINT32) Child->Common.Value.Integer;
Info->Level += 1;
+ Info->MappingOp = Op;
Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
+
AcpiDmResourceTemplate (Info, Op->Common.Parent, Aml, Length);
Info->Level -= 1;
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index ff6278b2e77e7..3fcfa416c10c7 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -259,6 +259,11 @@ AcpiDmResourceTemplate (
ACPI_NAMESPACE_NODE *Node;
+ if (Op->Asl.AmlOpcode != AML_FIELD_OP)
+ {
+ Info->MappingOp = Op;
+ }
+
Level = Info->Level;
ResourceName = ACPI_DEFAULT_RESNAME;
Node = Op->Common.Node;
@@ -327,7 +332,7 @@ AcpiDmResourceTemplate (
/* Go ahead and insert EndDependentFn() */
- AcpiDmEndDependentDescriptor (Aml, ResourceLength, Level);
+ AcpiDmEndDependentDescriptor (Info, Aml, ResourceLength, Level);
AcpiDmIndent (Level);
AcpiOsPrintf (
@@ -349,7 +354,7 @@ AcpiDmResourceTemplate (
}
AcpiGbl_DmResourceDispatch [ResourceIndex] (
- Aml, ResourceLength, Level);
+ Info, Aml, ResourceLength, Level);
/* Descriptor post-processing */
diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c
index d6707d39b8137..a7db21f025615 100644
--- a/source/components/disassembler/dmresrcl.c
+++ b/source/components/disassembler/dmresrcl.c
@@ -575,7 +575,8 @@ AcpiDmResourceSource (
*
* FUNCTION: AcpiDmWordDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -587,6 +588,7 @@ AcpiDmResourceSource (
void
AcpiDmWordDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -620,7 +622,8 @@ AcpiDmWordDescriptor (
*
* FUNCTION: AcpiDmDwordDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -632,6 +635,7 @@ AcpiDmWordDescriptor (
void
AcpiDmDwordDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -665,7 +669,8 @@ AcpiDmDwordDescriptor (
*
* FUNCTION: AcpiDmQwordDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -677,6 +682,7 @@ AcpiDmDwordDescriptor (
void
AcpiDmQwordDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -710,7 +716,8 @@ AcpiDmQwordDescriptor (
*
* FUNCTION: AcpiDmExtendedDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -722,6 +729,7 @@ AcpiDmQwordDescriptor (
void
AcpiDmExtendedDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -757,7 +765,8 @@ AcpiDmExtendedDescriptor (
*
* FUNCTION: AcpiDmMemory24Descriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -769,6 +778,7 @@ AcpiDmExtendedDescriptor (
void
AcpiDmMemory24Descriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -796,7 +806,8 @@ AcpiDmMemory24Descriptor (
*
* FUNCTION: AcpiDmMemory32Descriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -808,6 +819,7 @@ AcpiDmMemory24Descriptor (
void
AcpiDmMemory32Descriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -835,7 +847,8 @@ AcpiDmMemory32Descriptor (
*
* FUNCTION: AcpiDmFixedMemory32Descriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -847,6 +860,7 @@ AcpiDmMemory32Descriptor (
void
AcpiDmFixedMemory32Descriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -876,7 +890,8 @@ AcpiDmFixedMemory32Descriptor (
*
* FUNCTION: AcpiDmGenericRegisterDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -888,6 +903,7 @@ AcpiDmFixedMemory32Descriptor (
void
AcpiDmGenericRegisterDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -932,7 +948,8 @@ AcpiDmGenericRegisterDescriptor (
*
* FUNCTION: AcpiDmInterruptDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -944,6 +961,7 @@ AcpiDmGenericRegisterDescriptor (
void
AcpiDmInterruptDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -1038,7 +1056,8 @@ AcpiDmVendorCommon (
*
* FUNCTION: AcpiDmVendorLargeDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -1050,6 +1069,7 @@ AcpiDmVendorCommon (
void
AcpiDmVendorLargeDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c
index dd9039ea095f7..cb6dd6818b346 100644
--- a/source/components/disassembler/dmresrcl2.c
+++ b/source/components/disassembler/dmresrcl2.c
@@ -55,24 +55,28 @@
static void
AcpiDmI2cSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmSpiSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmUartSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmGpioCommon (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Level);
@@ -167,7 +171,8 @@ Finish:
*
* FUNCTION: AcpiDmGpioCommon
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Level - Current source code indentation level
*
* RETURN: None
@@ -178,12 +183,14 @@ Finish:
static void
AcpiDmGpioCommon (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Level)
{
- UINT32 PinCount;
UINT16 *PinList;
UINT8 *VendorData;
+ char *DeviceName = NULL;
+ UINT32 PinCount;
UINT32 i;
@@ -192,9 +199,8 @@ AcpiDmGpioCommon (
AcpiDmIndent (Level + 1);
if (Resource->Gpio.ResSourceOffset)
{
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
}
AcpiOsPrintf (", ");
@@ -242,6 +248,8 @@ AcpiDmGpioCommon (
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("}\n");
+
+ MpSaveGpioInfo (Info->MappingOp, Resource, PinCount, PinList, DeviceName);
}
@@ -249,7 +257,8 @@ AcpiDmGpioCommon (
*
* FUNCTION: AcpiDmGpioIntDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -261,6 +270,7 @@ AcpiDmGpioCommon (
static void
AcpiDmGpioIntDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -291,7 +301,7 @@ AcpiDmGpioIntDescriptor (
/* Dump the GpioInt/GpioIo common portion of the descriptor */
- AcpiDmGpioCommon (Resource, Level);
+ AcpiDmGpioCommon (Info, Resource, Level);
}
@@ -299,7 +309,8 @@ AcpiDmGpioIntDescriptor (
*
* FUNCTION: AcpiDmGpioIoDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -311,6 +322,7 @@ AcpiDmGpioIntDescriptor (
static void
AcpiDmGpioIoDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -343,7 +355,7 @@ AcpiDmGpioIoDescriptor (
/* Dump the GpioInt/GpioIo common portion of the descriptor */
- AcpiDmGpioCommon (Resource, Level);
+ AcpiDmGpioCommon (Info, Resource, Level);
}
@@ -351,7 +363,8 @@ AcpiDmGpioIoDescriptor (
*
* FUNCTION: AcpiDmGpioDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -363,6 +376,7 @@ AcpiDmGpioIoDescriptor (
void
AcpiDmGpioDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -376,12 +390,12 @@ AcpiDmGpioDescriptor (
{
case AML_RESOURCE_GPIO_TYPE_INT:
- AcpiDmGpioIntDescriptor (Resource, Length, Level);
+ AcpiDmGpioIntDescriptor (Info, Resource, Length, Level);
break;
case AML_RESOURCE_GPIO_TYPE_IO:
- AcpiDmGpioIoDescriptor (Resource, Length, Level);
+ AcpiDmGpioIoDescriptor (Info, Resource, Length, Level);
break;
default:
@@ -459,7 +473,8 @@ AcpiDmDumpSerialBusVendorData (
*
* FUNCTION: AcpiDmI2cSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -471,11 +486,13 @@ AcpiDmDumpSerialBusVendorData (
static void
AcpiDmI2cSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
+ char *DeviceName;
/* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
@@ -495,9 +512,8 @@ AcpiDmI2cSerialBusDescriptor (
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
/* ResourceSourceIndex, ResourceUsage */
@@ -518,6 +534,8 @@ AcpiDmI2cSerialBusDescriptor (
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
+
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
}
@@ -525,7 +543,8 @@ AcpiDmI2cSerialBusDescriptor (
*
* FUNCTION: AcpiDmSpiSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -537,11 +556,13 @@ AcpiDmI2cSerialBusDescriptor (
static void
AcpiDmSpiSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
+ char *DeviceName;
/* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
@@ -570,9 +591,8 @@ AcpiDmSpiSerialBusDescriptor (
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
/* ResourceSourceIndex, ResourceUsage */
@@ -593,6 +613,8 @@ AcpiDmSpiSerialBusDescriptor (
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
+
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
}
@@ -600,7 +622,8 @@ AcpiDmSpiSerialBusDescriptor (
*
* FUNCTION: AcpiDmUartSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -612,11 +635,13 @@ AcpiDmSpiSerialBusDescriptor (
static void
AcpiDmUartSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
+ char *DeviceName;
/* ConnectionSpeed, BitsPerByte, StopBits */
@@ -648,9 +673,8 @@ AcpiDmUartSerialBusDescriptor (
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
/* ResourceSourceIndex, ResourceUsage */
@@ -671,6 +695,8 @@ AcpiDmUartSerialBusDescriptor (
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
+
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
}
@@ -678,7 +704,8 @@ AcpiDmUartSerialBusDescriptor (
*
* FUNCTION: AcpiDmSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -690,13 +717,14 @@ AcpiDmUartSerialBusDescriptor (
void
AcpiDmSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
- Resource, Length, Level);
+ Info, Resource, Length, Level);
}
#endif
diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c
index cbbdc7114d729..3710166464ad5 100644
--- a/source/components/disassembler/dmresrcs.c
+++ b/source/components/disassembler/dmresrcs.c
@@ -56,7 +56,8 @@
*
* FUNCTION: AcpiDmIrqDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -68,6 +69,7 @@
void
AcpiDmIrqDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -101,7 +103,8 @@ AcpiDmIrqDescriptor (
*
* FUNCTION: AcpiDmDmaDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -113,6 +116,7 @@ AcpiDmIrqDescriptor (
void
AcpiDmDmaDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -138,7 +142,8 @@ AcpiDmDmaDescriptor (
*
* FUNCTION: AcpiDmFixedDmaDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -150,6 +155,7 @@ AcpiDmDmaDescriptor (
void
AcpiDmFixedDmaDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -181,7 +187,8 @@ AcpiDmFixedDmaDescriptor (
*
* FUNCTION: AcpiDmIoDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -193,6 +200,7 @@ AcpiDmFixedDmaDescriptor (
void
AcpiDmIoDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -226,7 +234,8 @@ AcpiDmIoDescriptor (
*
* FUNCTION: AcpiDmFixedIoDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -238,6 +247,7 @@ AcpiDmIoDescriptor (
void
AcpiDmFixedIoDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -264,7 +274,8 @@ AcpiDmFixedIoDescriptor (
*
* FUNCTION: AcpiDmStartDependentDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -276,6 +287,7 @@ AcpiDmFixedIoDescriptor (
void
AcpiDmStartDependentDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -303,7 +315,8 @@ AcpiDmStartDependentDescriptor (
*
* FUNCTION: AcpiDmEndDependentDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -315,6 +328,7 @@ AcpiDmStartDependentDescriptor (
void
AcpiDmEndDependentDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -331,7 +345,8 @@ AcpiDmEndDependentDescriptor (
*
* FUNCTION: AcpiDmVendorSmallDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -343,6 +358,7 @@ AcpiDmEndDependentDescriptor (
void
AcpiDmVendorSmallDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index f3d5cfa687576..a0671166e5c5f 100644
--- a/source/components/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
@@ -391,6 +391,7 @@ AcpiDsGetFieldNames (
*/
Info->ResourceBuffer = NULL;
Info->ConnectionNode = NULL;
+ Info->PinNumberIndex = 0;
/*
* A Connection() is either an actual resource descriptor (buffer)
@@ -466,6 +467,7 @@ AcpiDsGetFieldNames (
}
Info->FieldBitPosition += Info->FieldBitLength;
+ Info->PinNumberIndex++; /* Index relative to previous Connection() */
break;
default:
diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c
index a8aea022f858f..ac54f000f5072 100644
--- a/source/components/events/evgpeinit.c
+++ b/source/components/events/evgpeinit.c
@@ -443,6 +443,10 @@ AcpiEvMatchGpeMethod (
return_ACPI_STATUS (AE_OK);
}
+ /* Disable the GPE in case it's been enabled already. */
+
+ (void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
+
/*
* Add the GPE information from above to the GpeEventInfo block for
* use during dispatch of this GPE.
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 8531b5ae2a6e7..2acafab9aba0f 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -158,6 +158,7 @@ AcpiEvAddressSpaceDispatch (
ACPI_OPERAND_OBJECT *RegionObj2;
void *RegionContext = NULL;
ACPI_CONNECTION_INFO *Context;
+ ACPI_PHYSICAL_ADDRESS Address;
ACPI_FUNCTION_TRACE (EvAddressSpaceDispatch);
@@ -247,23 +248,33 @@ AcpiEvAddressSpaceDispatch (
/* We have everything we need, we can invoke the address space handler */
Handler = HandlerDesc->AddressSpace.Handler;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
- "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
- &RegionObj->Region.Handler->AddressSpace, Handler,
- ACPI_FORMAT_NATIVE_UINT (RegionObj->Region.Address + RegionOffset),
- AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
+ Address = (RegionObj->Region.Address + RegionOffset);
/*
* Special handling for GenericSerialBus and GeneralPurposeIo:
* There are three extra parameters that must be passed to the
* handler via the context:
- * 1) Connection buffer, a resource template from Connection() op.
- * 2) Length of the above buffer.
- * 3) Actual access length from the AccessAs() op.
+ * 1) Connection buffer, a resource template from Connection() op
+ * 2) Length of the above buffer
+ * 3) Actual access length from the AccessAs() op
+ *
+ * In addition, for GeneralPurposeIo, the Address and BitWidth fields
+ * are defined as follows:
+ * 1) Address is the pin number index of the field (bit offset from
+ * the previous Connection)
+ * 2) BitWidth is the actual bit length of the field (number of pins)
*/
- if (((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS) ||
- (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO)) &&
+ if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS) &&
+ Context &&
+ FieldObj)
+ {
+ /* Get the Connection (ResourceTemplate) buffer */
+
+ Context->Connection = FieldObj->Field.ResourceBuffer;
+ Context->Length = FieldObj->Field.ResourceLength;
+ Context->AccessLength = FieldObj->Field.AccessLength;
+ }
+ if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO) &&
Context &&
FieldObj)
{
@@ -272,8 +283,16 @@ AcpiEvAddressSpaceDispatch (
Context->Connection = FieldObj->Field.ResourceBuffer;
Context->Length = FieldObj->Field.ResourceLength;
Context->AccessLength = FieldObj->Field.AccessLength;
+ Address = FieldObj->Field.PinNumberIndex;
+ BitWidth = FieldObj->Field.BitLength;
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
+ "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
+ &RegionObj->Region.Handler->AddressSpace, Handler,
+ ACPI_FORMAT_NATIVE_UINT (Address),
+ AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
+
if (!(HandlerDesc->AddressSpace.HandlerFlags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
{
@@ -287,9 +306,8 @@ AcpiEvAddressSpaceDispatch (
/* Call the handler */
- Status = Handler (Function,
- (RegionObj->Region.Address + RegionOffset), BitWidth, Value,
- Context, RegionObj2->Extra.RegionContext);
+ Status = Handler (Function, Address, BitWidth, Value, Context,
+ RegionObj2->Extra.RegionContext);
if (ACPI_FAILURE (Status))
{
diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c
index bbd88dc370ffa..327fd9b605f6f 100644
--- a/source/components/events/evxface.c
+++ b/source/components/events/evxface.c
@@ -1036,7 +1036,8 @@ AcpiRemoveGpeHandler (
* enabled, it should be enabled at this point to restore the
* post-initialization configuration.
*/
- if ((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) &&
+ if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
+ (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
Handler->OriginallyEnabled)
{
(void) AcpiEvAddGpeReference (GpeEventInfo);
diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c
index 683c73b568761..3a3cf842077ff 100644
--- a/source/components/events/evxfevnt.c
+++ b/source/components/events/evxfevnt.c
@@ -364,7 +364,9 @@ AcpiGetEventStatus (
UINT32 Event,
ACPI_EVENT_STATUS *EventStatus)
{
- ACPI_STATUS Status = AE_OK;
+ ACPI_STATUS Status;
+ ACPI_EVENT_STATUS LocalEventStatus = 0;
+ UINT32 InByte;
ACPI_FUNCTION_TRACE (AcpiGetEventStatus);
@@ -382,12 +384,43 @@ AcpiGetEventStatus (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Get the status of the requested fixed event */
+ /* Fixed event currently can be dispatched? */
+
+ if (AcpiGbl_FixedEventHandlers[Event].Handler)
+ {
+ LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;
+ }
+
+ /* Fixed event currently enabled? */
Status = AcpiReadBitRegister (
- AcpiGbl_FixedEventInfo[Event].StatusRegisterId, EventStatus);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &InByte);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
- return_ACPI_STATUS (Status);
+ if (InByte)
+ {
+ LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
+ }
+
+ /* Fixed event currently active? */
+
+ Status = AcpiReadBitRegister (
+ AcpiGbl_FixedEventInfo[Event].StatusRegisterId, &InByte);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ if (InByte)
+ {
+ LocalEventStatus |= ACPI_EVENT_FLAG_SET;
+ }
+
+ (*EventStatus) = LocalEventStatus;
+ return_ACPI_STATUS (AE_OK);
}
ACPI_EXPORT_SYMBOL (AcpiGetEventStatus)
diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c
index 49d3b667b78e8..65520b651ca43 100644
--- a/source/components/executer/exfield.c
+++ b/source/components/executer/exfield.c
@@ -273,6 +273,39 @@ AcpiExReadDataFromField (
Buffer = &BufferDesc->Integer.Value;
}
+ if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
+ (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO))
+ {
+ /*
+ * For GPIO (GeneralPurposeIo), the Address will be the bit offset
+ * from the previous Connection() operator, making it effectively a
+ * pin number index. The BitLength is the length of the field, which
+ * is thus the number of pins.
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+ "GPIO FieldRead [FROM]: Pin %u Bits %u\n",
+ ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
+
+ /* Lock entire transaction if requested */
+
+ AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
+
+ /* Perform the write */
+
+ Status = AcpiExAccessRegion (ObjDesc, 0,
+ (UINT64 *) Buffer, ACPI_READ);
+ AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiUtRemoveReference (BufferDesc);
+ }
+ else
+ {
+ *RetBufferDesc = BufferDesc;
+ }
+ return_ACPI_STATUS (Status);
+ }
+
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldRead [TO]: Obj %p, Type %X, Buf %p, ByteLen %X\n",
ObjDesc, ObjDesc->Common.Type, Buffer, (UINT32) Length));
@@ -446,6 +479,41 @@ AcpiExWriteDataToField (
*ResultDesc = BufferDesc;
return_ACPI_STATUS (Status);
}
+ else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
+ (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO))
+ {
+ /*
+ * For GPIO (GeneralPurposeIo), we will bypass the entire field
+ * mechanism and handoff the bit address and bit width directly to
+ * the handler. The Address will be the bit offset
+ * from the previous Connection() operator, making it effectively a
+ * pin number index. The BitLength is the length of the field, which
+ * is thus the number of pins.
+ */
+ if (SourceDesc->Common.Type != ACPI_TYPE_INTEGER)
+ {
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+ "GPIO FieldWrite [FROM]: (%s:%X), Val %.8X [TO]: Pin %u Bits %u\n",
+ AcpiUtGetTypeName (SourceDesc->Common.Type),
+ SourceDesc->Common.Type, (UINT32) SourceDesc->Integer.Value,
+ ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
+
+ Buffer = &SourceDesc->Integer.Value;
+
+ /* Lock entire transaction if requested */
+
+ AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
+
+ /* Perform the write */
+
+ Status = AcpiExAccessRegion (ObjDesc, 0,
+ (UINT64 *) Buffer, ACPI_WRITE);
+ AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
+ return_ACPI_STATUS (Status);
+ }
/* Get a pointer to the data to be written */
diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c
index 77ccb87ce1170..89dcd041cf9c5 100644
--- a/source/components/executer/exprep.c
+++ b/source/components/executer/exprep.c
@@ -515,6 +515,8 @@ AcpiExPrepFieldValue (
ObjDesc->Field.ResourceLength = Info->ResourceLength;
}
+ ObjDesc->Field.PinNumberIndex = Info->PinNumberIndex;
+
/* Allow full data read from EC address space */
if ((ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&
diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c
index b786ca308b57b..701fa78c1fe50 100644
--- a/source/components/hardware/hwgpe.c
+++ b/source/components/hardware/hwgpe.c
@@ -241,6 +241,14 @@ AcpiHwGetGpeStatus (
return (AE_BAD_PARAMETER);
}
+ /* GPE currently handled? */
+
+ if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
+ ACPI_GPE_DISPATCH_NONE)
+ {
+ LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;
+ }
+
/* Get the info block for the entire GPE register */
GpeRegisterInfo = GpeEventInfo->RegisterInfo;
diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c
index b3b3ed632cbd2..04500aae02fa5 100644
--- a/source/components/tables/tbxfroot.c
+++ b/source/components/tables/tbxfroot.c
@@ -54,6 +54,43 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiTbGetRsdpLength
+ *
+ * PARAMETERS: Rsdp - Pointer to RSDP
+ *
+ * RETURN: Table length
+ *
+ * DESCRIPTION: Get the length of the RSDP
+ *
+ ******************************************************************************/
+
+UINT32
+AcpiTbGetRsdpLength (
+ ACPI_TABLE_RSDP *Rsdp)
+{
+
+ if (!ACPI_VALIDATE_RSDP_SIG (Rsdp->Signature))
+ {
+ /* BAD Signature */
+
+ return (0);
+ }
+
+ /* "Length" field is available if table version >= 2 */
+
+ if (Rsdp->Revision >= 2)
+ {
+ return (Rsdp->Length);
+ }
+ else
+ {
+ return (ACPI_RSDP_CHECKSUM_LENGTH);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiTbValidateRsdp
*
* PARAMETERS: Rsdp - Pointer to unvalidated RSDP