summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2014-01-10 14:37:05 -0800
committerRobert Moore <Robert.Moore@intel.com>2014-01-10 14:37:05 -0800
commit08396198aec235dc5dcf07101cfe4bdc31f2ea5a (patch)
treee307c8481f479ae3a23ec755d6a3ca28f0d8dc26
parent6f91b81de00d07a783a304be5322d96b8952b908 (diff)
AcpiExec: Add region handler for PCI_Config and EC spaces.
This allows AcpiExec to simulate these address spaces, similar to the current support for SystemMemory and SystemIO.
-rwxr-xr-xsource/components/debugger/dbtest.c29
-rw-r--r--source/tools/acpiexec/aehandlers.c14
2 files changed, 34 insertions, 9 deletions
diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c
index c0f157164..d100d7abe 100755
--- a/source/components/debugger/dbtest.c
+++ b/source/components/debugger/dbtest.c
@@ -466,7 +466,9 @@ AcpiDbTestOneObject (
RegionObj = ObjDesc->Field.RegionObj;
if ((RegionObj->Region.SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
- (RegionObj->Region.SpaceId != ACPI_ADR_SPACE_SYSTEM_IO))
+ (RegionObj->Region.SpaceId != ACPI_ADR_SPACE_SYSTEM_IO) &&
+ (RegionObj->Region.SpaceId != ACPI_ADR_SPACE_PCI_CONFIG) &&
+ (RegionObj->Region.SpaceId != ACPI_ADR_SPACE_EC))
{
AcpiOsPrintf (" %s space is not supported [%4.4s]\n",
AcpiUtGetRegionName (RegionObj->Region.SpaceId),
@@ -505,6 +507,20 @@ AcpiDbTestOneObject (
break;
}
+ switch (Node->Type)
+ {
+ case ACPI_TYPE_LOCAL_REGION_FIELD:
+
+ RegionObj = ObjDesc->Field.RegionObj;
+ AcpiOsPrintf (" (%s)",
+ AcpiUtGetRegionName (RegionObj->Region.SpaceId));
+ break;
+
+ default:
+ break;
+ }
+
+
AcpiOsPrintf ("\n");
return (Status);
}
@@ -646,6 +662,7 @@ AcpiDbTestBufferType (
UINT8 *Buffer;
ACPI_OBJECT WriteValue;
ACPI_STATUS Status;
+ UINT32 i;
/* Allocate a local buffer */
@@ -664,8 +681,12 @@ AcpiDbTestBufferType (
goto Exit;
}
- AcpiOsPrintf (" (%2.2X) %2.2X %2.2X...", Temp1->Buffer.Length,
- Temp1->Buffer.Pointer[0], Temp1->Buffer.Pointer[1]);
+ AcpiOsPrintf (" (%2.2X)", Temp1->Buffer.Length);
+ for (i = 0; ((i < 4) && (i < ByteLength)); i++)
+ {
+ AcpiOsPrintf (" %2.2X", Temp1->Buffer.Pointer[i]);
+ }
+ AcpiOsPrintf ("... ");
/* Write a new value */
@@ -762,7 +783,7 @@ AcpiDbTestStringType (
return (Status);
}
- AcpiOsPrintf (" (%2.2X) %s",
+ AcpiOsPrintf (" (%2.2X) \"%s\"",
Temp1->String.Length, Temp1->String.Pointer);
/* Write a new value */
diff --git a/source/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c
index ecf1857ed..5a29a58e6 100644
--- a/source/tools/acpiexec/aehandlers.c
+++ b/source/tools/acpiexec/aehandlers.c
@@ -221,18 +221,22 @@ static AE_DEBUG_REGIONS AeRegions;
BOOLEAN AcpiGbl_DisplayRegionAccess = FALSE;
/*
- * We will override some of the default region handlers, especially the
- * SystemMemory handler, which must be implemented locally. Do not override
- * the PCI_Config handler since we would like to exercise the default handler
- * code. These handlers are installed "early" - before any _REG methods
+ * We will override some of the default region handlers, especially
+ * the SystemMemory handler, which must be implemented locally.
+ * These handlers are installed "early" - before any _REG methods
* are executed - since they are special in the sense that the ACPI spec
* declares that they must "always be available". Cannot override the
* DataTable region handler either -- needed for test execution.
+ *
+ * NOTE: The local region handler will simulate access to these address
+ * spaces by creating a memory buffer behind each operation region.
*/
static ACPI_ADR_SPACE_TYPE DefaultSpaceIdList[] =
{
ACPI_ADR_SPACE_SYSTEM_MEMORY,
- ACPI_ADR_SPACE_SYSTEM_IO
+ ACPI_ADR_SPACE_SYSTEM_IO,
+ ACPI_ADR_SPACE_PCI_CONFIG,
+ ACPI_ADR_SPACE_EC
};
/*