aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>2001-06-29 20:11:04 +0000
committerMike Smith <msmith@FreeBSD.org>2001-06-29 20:11:04 +0000
commitae027f12376b398a33a332b50efacb04eacb0573 (patch)
treeeb0951587d9fcfbf93840f893231df2c430d62c1 /sys/contrib/dev/acpica
parent0065eb1222e3ccb5cbb7c512ccb611a0e3ed7b54 (diff)
downloadsrc-ae027f12376b398a33a332b50efacb04eacb0573.tar.gz
src-ae027f12376b398a33a332b50efacb04eacb0573.zip
Vendor import of the Intel ACPI CA 20010615 snapshot.
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=78986
Diffstat (limited to 'sys/contrib/dev/acpica')
-rw-r--r--sys/contrib/dev/acpica/acconfig.h4
-rw-r--r--sys/contrib/dev/acpica/aclocal.h29
-rw-r--r--sys/contrib/dev/acpica/acoutput.h23
-rw-r--r--sys/contrib/dev/acpica/acpiosxf.h5
-rw-r--r--sys/contrib/dev/acpica/acpixf.h7
-rw-r--r--sys/contrib/dev/acpica/actables.h25
-rw-r--r--sys/contrib/dev/acpica/actypes.h49
-rw-r--r--sys/contrib/dev/acpica/dbexec.c14
-rw-r--r--sys/contrib/dev/acpica/evevent.c10
-rw-r--r--sys/contrib/dev/acpica/exprep.c7
-rw-r--r--sys/contrib/dev/acpica/hwsleep.c26
-rw-r--r--sys/contrib/dev/acpica/hwtimer.c9
-rw-r--r--sys/contrib/dev/acpica/rsdump.c292
-rw-r--r--sys/contrib/dev/acpica/tbconvrt.c49
-rw-r--r--sys/contrib/dev/acpica/tbget.c218
-rw-r--r--sys/contrib/dev/acpica/tbutils.c4
-rw-r--r--sys/contrib/dev/acpica/tbxface.c14
-rw-r--r--sys/contrib/dev/acpica/tbxfroot.c260
-rw-r--r--sys/contrib/dev/acpica/utglobal.c48
19 files changed, 729 insertions, 364 deletions
diff --git a/sys/contrib/dev/acpica/acconfig.h b/sys/contrib/dev/acpica/acconfig.h
index 8683e86e56ba..3b79b6a8d613 100644
--- a/sys/contrib/dev/acpica/acconfig.h
+++ b/sys/contrib/dev/acpica/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 64 $
+ * $Revision: 65 $
*
*****************************************************************************/
@@ -144,7 +144,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20010518
+#define ACPI_CA_VERSION 0x20010615
/* Maximum objects in the various object caches */
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h
index 86e28bca0aef..558ffa6f682b 100644
--- a/sys/contrib/dev/acpica/aclocal.h
+++ b/sys/contrib/dev/acpica/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 121 $
+ * $Revision: 123 $
*
*****************************************************************************/
@@ -124,6 +124,11 @@ typedef void* ACPI_MUTEX;
typedef UINT32 ACPI_MUTEX_HANDLE;
+
+#define ACPI_MEMORY_MODE 0x01
+#define ACPI_LOGICAL_ADDRESSING 0x00
+#define ACPI_PHYSICAL_ADDRESSING 0x01
+
/* Object descriptor types */
#define ACPI_CACHED_OBJECT 0x11 /* ORed in when object is cached */
@@ -290,6 +295,8 @@ typedef struct acpi_node
#define ANOBJ_METHOD_NO_RETVAL 0x20
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x40
+#define ANOBJ_IS_BIT_OFFSET 0x80
+
/*
* ACPI Table Descriptor. One per ACPI table
@@ -921,6 +928,26 @@ typedef struct
} ACPI_DEVICE_ID;
+
+/*****************************************************************************
+ *
+ * Debugger
+ *
+ ****************************************************************************/
+
+typedef struct dbmethodinfo
+{
+ ACPI_HANDLE ThreadGate;
+ NATIVE_CHAR *Name;
+ NATIVE_CHAR **Args;
+ UINT32 Flags;
+ UINT32 NumLoops;
+ NATIVE_CHAR Pathname[128];
+
+} DB_METHOD_INFO;
+
+
+
/*****************************************************************************
*
* Debug
diff --git a/sys/contrib/dev/acpica/acoutput.h b/sys/contrib/dev/acpica/acoutput.h
index f2746a83da66..4c647341d789 100644
--- a/sys/contrib/dev/acpica/acoutput.h
+++ b/sys/contrib/dev/acpica/acoutput.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acoutput.h -- debug output
- * $Revision: 77 $
+ * $Revision: 78 $
*
*****************************************************************************/
@@ -134,23 +134,20 @@
#define ACPI_DISPATCHER 0x00000040
#define ACPI_EXECUTER 0x00000080
#define ACPI_RESOURCES 0x00000100
-#define ACPI_DEVICES 0x00000200
-#define ACPI_POWER 0x00000400
+#define ACPI_DEBUGGER 0x00000200
+#define ACPI_OS_SERVICES 0x00000400
-
-#define ACPI_BUS_MANAGER 0x00001000
-#define ACPI_POWER_CONTROL 0x00002000
-#define ACPI_EMBEDDED_CONTROLLER 0x00004000
-#define ACPI_PROCESSOR_CONTROL 0x00008000
+#define ACPI_BUS 0x00001000
+#define ACPI_SYSTEM 0x00002000
+#define ACPI_POWER 0x00004000
+#define ACPI_EC 0x00008000
#define ACPI_AC_ADAPTER 0x00010000
#define ACPI_BATTERY 0x00020000
#define ACPI_BUTTON 0x00040000
-#define ACPI_SYSTEM 0x00080000
-#define ACPI_THERMAL_ZONE 0x00100000
+#define ACPI_PROCESSOR 0x00080000
+#define ACPI_THERMAL 0x00100000
-#define ACPI_DEBUGGER 0x01000000
-#define ACPI_OS_SERVICES 0x02000000
-#define ACPI_ALL_COMPONENTS 0x01FFFFFF
+#define ACPI_ALL_COMPONENTS 0x00FFFFFF
#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
diff --git a/sys/contrib/dev/acpica/acpiosxf.h b/sys/contrib/dev/acpica/acpiosxf.h
index a8939705de34..4d798d5f3547 100644
--- a/sys/contrib/dev/acpica/acpiosxf.h
+++ b/sys/contrib/dev/acpica/acpiosxf.h
@@ -392,6 +392,11 @@ AcpiOsWritable (
void *Pointer,
UINT32 Length);
+UINT32
+AcpiOsGetTimer (
+ void);
+
+
/*
* Debug print routines
diff --git a/sys/contrib/dev/acpica/acpixf.h b/sys/contrib/dev/acpica/acpixf.h
index 84ec9a208c58..28a17619c361 100644
--- a/sys/contrib/dev/acpica/acpixf.h
+++ b/sys/contrib/dev/acpica/acpixf.h
@@ -205,6 +205,13 @@ AcpiGetTable (
UINT32 Instance,
ACPI_BUFFER *RetBuffer);
+ACPI_STATUS
+AcpiGetFirmwareTable (
+ ACPI_STRING Signature,
+ UINT32 Instance,
+ UINT32 Flags,
+ ACPI_TABLE_HEADER **TablePointer);
+
/*
* Namespace and name interfaces
diff --git a/sys/contrib/dev/acpica/actables.h b/sys/contrib/dev/acpica/actables.h
index a2d43dadf943..01b8380b8fde 100644
--- a/sys/contrib/dev/acpica/actables.h
+++ b/sys/contrib/dev/acpica/actables.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actables.h - ACPI table management
- * $Revision: 29 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -145,6 +145,10 @@ ACPI_STATUS
AcpiTbBuildCommonFacs (
ACPI_TABLE_DESC *TableInfo);
+UINT32
+AcpiTbGetTableCount (
+ RSDP_DESCRIPTOR *RSDP,
+ ACPI_TABLE_HEADER *RSDT);
/*
* tbget - Table "get" routines
@@ -171,6 +175,20 @@ AcpiTbGetTableFacs (
ACPI_TABLE_HEADER *BufferPtr,
ACPI_TABLE_DESC *TableInfo);
+ACPI_PHYSICAL_ADDRESS
+AcpiTbGetRsdtAddress (
+ void);
+
+ACPI_STATUS
+AcpiTbValidateRsdt (
+ ACPI_TABLE_HEADER *TablePtr);
+
+ACPI_STATUS
+AcpiTbGetTablePointer (
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress,
+ UINT32 Flags,
+ UINT32 *Size,
+ ACPI_TABLE_HEADER **TablePtr);
/*
* tbgetall - Get all firmware ACPI tables
@@ -242,7 +260,8 @@ AcpiTbScanMemoryForRsdp (
ACPI_STATUS
AcpiTbFindRsdp (
- ACPI_TABLE_DESC *TableInfo);
+ ACPI_TABLE_DESC *TableInfo,
+ UINT32 Flags);
/*
@@ -257,7 +276,7 @@ ACPI_STATUS
AcpiTbMapAcpiTable (
ACPI_PHYSICAL_ADDRESS PhysicalAddress,
UINT32 *Size,
- void **LogicalAddress);
+ ACPI_TABLE_HEADER **LogicalAddress);
ACPI_STATUS
AcpiTbVerifyTableChecksum (
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h
index 3d375aaa6d52..a0039444416e 100644
--- a/sys/contrib/dev/acpica/actypes.h
+++ b/sys/contrib/dev/acpica/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 178 $
+ * $Revision: 180 $
*
*****************************************************************************/
@@ -336,8 +336,11 @@ typedef UINT64 ACPI_INTEGER;
/*
- * System states
+ * Power state values
*/
+
+#define ACPI_STATE_UNKNOWN (UINT8) 0xFF
+
#define ACPI_STATE_S0 (UINT8) 0
#define ACPI_STATE_S1 (UINT8) 1
#define ACPI_STATE_S2 (UINT8) 2
@@ -349,9 +352,6 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_S_STATES_MAX ACPI_STATE_S5
#define ACPI_S_STATE_COUNT 6
-/*
- * Device power states
- */
#define ACPI_STATE_D0 (UINT8) 0
#define ACPI_STATE_D1 (UINT8) 1
#define ACPI_STATE_D2 (UINT8) 2
@@ -359,7 +359,17 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_D_STATES_MAX ACPI_STATE_D3
#define ACPI_D_STATE_COUNT 4
-#define ACPI_STATE_UNKNOWN (UINT8) 0xFF
+/*
+ * Standard notify values
+ */
+#define ACPI_NOTIFY_BUS_CHECK (UINT8) 0
+#define ACPI_NOTIFY_DEVICE_CHECK (UINT8) 1
+#define ACPI_NOTIFY_DEVICE_WAKE (UINT8) 2
+#define ACPI_NOTIFY_EJECT_REQUEST (UINT8) 3
+#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT (UINT8) 4
+#define ACPI_NOTIFY_FREQUENCY_MISMATCH (UINT8) 5
+#define ACPI_NOTIFY_BUS_MODE_MISMATCH (UINT8) 6
+#define ACPI_NOTIFY_POWER_FAULT (UINT8) 7
/*
@@ -430,25 +440,26 @@ typedef UINT8 ACPI_OBJECT_TYPE8;
#define INTERNAL_TYPE_NOTIFY 22 /* 0x16 */
#define INTERNAL_TYPE_ADDRESS_HANDLER 23 /* 0x17 */
#define INTERNAL_TYPE_RESOURCE 24 /* 0x18 */
+#define INTERNAL_TYPE_RESOURCE_FIELD 25 /* 0x19 */
-#define INTERNAL_TYPE_NODE_MAX 24
+#define INTERNAL_TYPE_NODE_MAX 25
/* These are pseudo-types because there are never any namespace nodes with these types */
-#define INTERNAL_TYPE_FIELD_DEFN 25 /* 0x19 Name, ByteConst, multiple FieldElement */
-#define INTERNAL_TYPE_BANK_FIELD_DEFN 26 /* 0x1A 2 Name,DWordConst,ByteConst,multi FieldElement */
-#define INTERNAL_TYPE_INDEX_FIELD_DEFN 27 /* 0x1B 2 Name, ByteConst, multiple FieldElement */
-#define INTERNAL_TYPE_IF 28 /* 0x1C */
-#define INTERNAL_TYPE_ELSE 29 /* 0x1D */
-#define INTERNAL_TYPE_WHILE 30 /* 0x1E */
-#define INTERNAL_TYPE_SCOPE 31 /* 0x1F Name, multiple Node */
-#define INTERNAL_TYPE_DEF_ANY 32 /* 0x20 type is Any, suppress search of enclosing scopes */
-#define INTERNAL_TYPE_EXTRA 33 /* 0x21 */
+#define INTERNAL_TYPE_FIELD_DEFN 26 /* 0x1A Name, ByteConst, multiple FieldElement */
+#define INTERNAL_TYPE_BANK_FIELD_DEFN 27 /* 0x1B 2 Name,DWordConst,ByteConst,multi FieldElement */
+#define INTERNAL_TYPE_INDEX_FIELD_DEFN 28 /* 0x1C 2 Name, ByteConst, multiple FieldElement */
+#define INTERNAL_TYPE_IF 29 /* 0x1D */
+#define INTERNAL_TYPE_ELSE 30 /* 0x1E */
+#define INTERNAL_TYPE_WHILE 31 /* 0x1F */
+#define INTERNAL_TYPE_SCOPE 32 /* 0x20 Name, multiple Node */
+#define INTERNAL_TYPE_DEF_ANY 33 /* 0x21 type is Any, suppress search of enclosing scopes */
+#define INTERNAL_TYPE_EXTRA 34 /* 0x22 */
-#define INTERNAL_TYPE_MAX 33
+#define INTERNAL_TYPE_MAX 34
-#define INTERNAL_TYPE_INVALID 34
+#define INTERNAL_TYPE_INVALID 35
#define ACPI_TYPE_NOT_FOUND 0xFF
@@ -815,7 +826,7 @@ typedef struct
ACPI_COMMON_OBJ_INFO;
UINT32 Valid; /* Are the next bits legit? */
- NATIVE_CHAR HardwareId [9]; /* _HID value if any */
+ NATIVE_CHAR HardwareId[9]; /* _HID value if any */
NATIVE_CHAR UniqueId[9]; /* _UID value if any */
ACPI_INTEGER Address; /* _ADR value if any */
UINT32 CurrentStatus; /* _STA value */
diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c
index 3f6ee91da8d4..4bf2f15f2846 100644
--- a/sys/contrib/dev/acpica/dbexec.c
+++ b/sys/contrib/dev/acpica/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 25 $
+ * $Revision: 26 $
*
******************************************************************************/
@@ -132,18 +132,6 @@
MODULE_NAME ("dbexec")
-typedef struct dbmethodinfo
-{
- ACPI_HANDLE ThreadGate;
- NATIVE_CHAR *Name;
- NATIVE_CHAR **Args;
- UINT32 Flags;
- UINT32 NumLoops;
- NATIVE_CHAR Pathname[128];
-
-} DB_METHOD_INFO;
-
-
DB_METHOD_INFO Info;
diff --git a/sys/contrib/dev/acpica/evevent.c b/sys/contrib/dev/acpica/evevent.c
index 898ecbf08b81..7428e8772cb3 100644
--- a/sys/contrib/dev/acpica/evevent.c
+++ b/sys/contrib/dev/acpica/evevent.c
@@ -2,7 +2,7 @@
*
* Module Name: evevent - Fixed and General Purpose AcpiEvent
* handling and dispatch
- * $Revision: 42 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -284,7 +284,7 @@ AcpiEvFixedEventDetect(void)
EnableRegister = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM1_EN);
DEBUG_PRINT (TRACE_INTERRUPTS,
- ("Fixed AcpiEvent Block: Enable = %08x\tStatus = %08x\n",
+ ("Fixed AcpiEvent Block: Enable %08X Status %08X\n",
EnableRegister, StatusRegister));
@@ -743,8 +743,10 @@ AcpiEvGpeDetect (void)
AcpiOsIn8 (AcpiGbl_GpeRegisters[i].EnableAddr);
DEBUG_PRINT (TRACE_INTERRUPTS,
- ("GPE block at %x - Enable: %08x\tStatus: %08x\n",
- AcpiGbl_GpeRegisters[i].EnableAddr, AcpiGbl_GpeRegisters[i].Status, AcpiGbl_GpeRegisters[i].Enable));
+ ("GPE block at %X - Enable %08X Status %08X\n",
+ AcpiGbl_GpeRegisters[i].EnableAddr,
+ AcpiGbl_GpeRegisters[i].Status,
+ AcpiGbl_GpeRegisters[i].Enable));
/* First check if there is anything active at all in this register */
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c
index 951901c330ca..76fe51e16dbb 100644
--- a/sys/contrib/dev/acpica/exprep.c
+++ b/sys/contrib/dev/acpica/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 89 $
+ * $Revision: 90 $
*
*****************************************************************************/
@@ -260,7 +260,7 @@ AcpiExPrepCommonFieldObject (
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
- /* Setup granularity-based fields */
+ /* Setup width (access granularity) fields */
ObjDesc->CommonField.AccessBitWidth = (UINT8) AccessBitWidth; /* 8, 16, 32, 64 */
ObjDesc->CommonField.AccessByteWidth = (UINT8) DIV_8 (AccessBitWidth); /* 1, 2, 4, 8 */
@@ -274,6 +274,7 @@ AcpiExPrepCommonFieldObject (
AccessBitWidth = 8;
}
+
/*
* BaseByteOffset is the address of the start of the field within the region. It is
* the byte address of the first *datum* (field-width data unit) of the field.
@@ -281,7 +282,7 @@ AcpiExPrepCommonFieldObject (
*/
NearestByteAddress = ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
ObjDesc->CommonField.BaseByteOffset = ROUND_DOWN (NearestByteAddress,
- ObjDesc->CommonField.AccessByteWidth);
+ DIV_8 (AccessBitWidth));
/*
* StartFieldBitOffset is the offset of the first bit of the field within a field datum.
diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c
index 0b29ce033d2e..d58e3a538cf5 100644
--- a/sys/contrib/dev/acpica/hwsleep.c
+++ b/sys/contrib/dev/acpica/hwsleep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
- * $Revision: 11 $
+ * $Revision: 12 $
*
*****************************************************************************/
@@ -269,34 +269,32 @@ AcpiEnterSleepState (
AcpiHwRegisterBitAccess(ACPI_WRITE, ACPI_MTX_LOCK, WAK_STS, 1);
+ disable();
+
PM1AControl = (UINT16) AcpiHwRegisterRead(ACPI_MTX_LOCK, PM1_CONTROL);
- /* mask off SLP_EN and SLP_TYP fields */
+ DEBUG_PRINT(ACPI_OK, ("Entering S%d\n", SleepState));
+ /* mask off SLP_EN and SLP_TYP fields */
PM1AControl &= 0xC3FF;
-
- /* mask in SLP_EN */
-
- PM1AControl |= (1 << AcpiHwGetBitShift (SLP_EN_MASK));
-
PM1BControl = PM1AControl;
/* mask in SLP_TYP */
-
PM1AControl |= (TypeA << AcpiHwGetBitShift (SLP_TYPE_X_MASK));
PM1BControl |= (TypeB << AcpiHwGetBitShift (SLP_TYPE_X_MASK));
- DEBUG_PRINT(ACPI_OK, ("Entering S%d\n", SleepState));
+ /* write #1: fill in SLP_TYPE data */
+ AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1A_CONTROL, PM1AControl);
+ AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1B_CONTROL, PM1BControl);
- disable();
+ /* mask in SLP_EN */
+ PM1AControl |= (1 << AcpiHwGetBitShift (SLP_EN_MASK));
+ PM1BControl |= (1 << AcpiHwGetBitShift (SLP_EN_MASK));
+ /* write #2: the whole tamale */
AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1A_CONTROL, PM1AControl);
AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1B_CONTROL, PM1BControl);
- /* one system won't work with this, one won't work without */
- /*AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1_CONTROL,
- (1 << AcpiHwGetBitShift (SLP_EN_MASK)));*/
-
enable();
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/hwtimer.c b/sys/contrib/dev/acpica/hwtimer.c
index fbe61d4edf83..a333e433e6d3 100644
--- a/sys/contrib/dev/acpica/hwtimer.c
+++ b/sys/contrib/dev/acpica/hwtimer.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwtimer.c - ACPI Power Management Timer Interface
- * $Revision: 9 $
+ * $Revision: 10 $
*
*****************************************************************************/
@@ -138,7 +138,8 @@ ACPI_STATUS
AcpiGetTimerResolution (
UINT32 *Resolution)
{
- ACPI_STATUS Status;
+ ACPI_STATUS Status;
+
FUNCTION_TRACE ("AcpiGetTimerResolution");
@@ -185,7 +186,8 @@ ACPI_STATUS
AcpiGetTimer (
UINT32 *Ticks)
{
- ACPI_STATUS Status;
+ ACPI_STATUS Status;
+
FUNCTION_TRACE ("AcpiGetTimer");
@@ -247,6 +249,7 @@ AcpiGetTimerDuration (
UINT32 Microseconds = 0;
UINT32 Remainder = 0;
+
FUNCTION_TRACE ("AcpiGetTimerDuration");
if (!TimeElapsed)
diff --git a/sys/contrib/dev/acpica/rsdump.c b/sys/contrib/dev/acpica/rsdump.c
index abaf8ec57701..d820758134d5 100644
--- a/sys/contrib/dev/acpica/rsdump.c
+++ b/sys/contrib/dev/acpica/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions to display the resource structures.
- * $Revision: 19 $
+ * $Revision: 20 $
*
******************************************************************************/
@@ -144,18 +144,18 @@ AcpiRsDumpIrq (
UINT8 Index = 0;
- AcpiOsPrintf ("\tIRQ Resource\n");
+ AcpiOsPrintf ("IRQ Resource\n");
- AcpiOsPrintf ("\t\t%s Triggered\n",
+ AcpiOsPrintf (" %s Triggered\n",
LEVEL_SENSITIVE == IrqData->EdgeLevel ? "Level" : "Edge");
- AcpiOsPrintf ("\t\tActive %s\n",
+ AcpiOsPrintf (" Active %s\n",
ACTIVE_LOW == IrqData->ActiveHighLow ? "Low" : "High");
- AcpiOsPrintf ("\t\t%s\n",
+ AcpiOsPrintf (" %s\n",
SHARED == IrqData->SharedExclusive ? "Shared" : "Exclusive");
- AcpiOsPrintf ("\t\t%X Interrupts ( ", IrqData->NumberOfInterrupts);
+ AcpiOsPrintf (" %X Interrupts ( ", IrqData->NumberOfInterrupts);
for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++)
{
@@ -187,55 +187,55 @@ AcpiRsDumpDma (
UINT8 Index = 0;
- AcpiOsPrintf ("\tDMA Resource\n");
+ AcpiOsPrintf ("DMA Resource\n");
switch (DmaData->Type)
{
case COMPATIBILITY:
- AcpiOsPrintf ("\t\tCompatibility mode\n");
+ AcpiOsPrintf (" Compatibility mode\n");
break;
case TYPE_A:
- AcpiOsPrintf ("\t\tType A\n");
+ AcpiOsPrintf (" Type A\n");
break;
case TYPE_B:
- AcpiOsPrintf ("\t\tType B\n");
+ AcpiOsPrintf (" Type B\n");
break;
case TYPE_F:
- AcpiOsPrintf ("\t\tType F\n");
+ AcpiOsPrintf (" Type F\n");
break;
default:
- AcpiOsPrintf ("\t\tInvalid DMA type\n");
+ AcpiOsPrintf (" Invalid DMA type\n");
break;
}
- AcpiOsPrintf ("\t\t%sBus Master\n",
+ AcpiOsPrintf (" %sBus Master\n",
BUS_MASTER == DmaData->BusMaster ? "" : "Not a ");
switch (DmaData->Transfer)
{
case TRANSFER_8:
- AcpiOsPrintf ("\t\t8-bit only transfer\n");
+ AcpiOsPrintf (" 8-bit only transfer\n");
break;
case TRANSFER_8_16:
- AcpiOsPrintf ("\t\t8 and 16-bit transfer\n");
+ AcpiOsPrintf (" 8 and 16-bit transfer\n");
break;
case TRANSFER_16:
- AcpiOsPrintf ("\t\t16 bit only transfer\n");
+ AcpiOsPrintf (" 16 bit only transfer\n");
break;
default:
- AcpiOsPrintf ("\t\tInvalid transfer preference\n");
+ AcpiOsPrintf (" Invalid transfer preference\n");
break;
}
- AcpiOsPrintf ("\t\tNumber of Channels: %X ( ", DmaData->NumberOfChannels);
+ AcpiOsPrintf (" Number of Channels: %X ( ", DmaData->NumberOfChannels);
for (Index = 0; Index < DmaData->NumberOfChannels; Index++)
{
@@ -266,44 +266,44 @@ AcpiRsDumpStartDependentFunctions (
ACPI_RESOURCE_START_DPF *SdfData = (ACPI_RESOURCE_START_DPF *) Data;
- AcpiOsPrintf ("\tStart Dependent Functions Resource\n");
+ AcpiOsPrintf ("Start Dependent Functions Resource\n");
switch (SdfData->CompatibilityPriority)
{
case GOOD_CONFIGURATION:
- AcpiOsPrintf ("\t\tGood configuration\n");
+ AcpiOsPrintf (" Good configuration\n");
break;
case ACCEPTABLE_CONFIGURATION:
- AcpiOsPrintf ("\t\tAcceptable configuration\n");
+ AcpiOsPrintf (" Acceptable configuration\n");
break;
case SUB_OPTIMAL_CONFIGURATION:
- AcpiOsPrintf ("\t\tSub-optimal configuration\n");
+ AcpiOsPrintf (" Sub-optimal configuration\n");
break;
default:
- AcpiOsPrintf ("\t\tInvalid compatibility priority\n");
+ AcpiOsPrintf (" Invalid compatibility priority\n");
break;
}
switch(SdfData->PerformanceRobustness)
{
case GOOD_CONFIGURATION:
- AcpiOsPrintf ("\t\tGood configuration\n");
+ AcpiOsPrintf (" Good configuration\n");
break;
case ACCEPTABLE_CONFIGURATION:
- AcpiOsPrintf ("\t\tAcceptable configuration\n");
+ AcpiOsPrintf (" Acceptable configuration\n");
break;
case SUB_OPTIMAL_CONFIGURATION:
- AcpiOsPrintf ("\t\tSub-optimal configuration\n");
+ AcpiOsPrintf (" Sub-optimal configuration\n");
break;
default:
- AcpiOsPrintf ("\t\tInvalid performance "
+ AcpiOsPrintf (" Invalid performance "
"robustness preference\n");
break;
}
@@ -331,21 +331,21 @@ AcpiRsDumpIo (
ACPI_RESOURCE_IO *IoData = (ACPI_RESOURCE_IO *) Data;
- AcpiOsPrintf ("\tIo Resource\n");
+ AcpiOsPrintf ("Io Resource\n");
- AcpiOsPrintf ("\t\t%d bit decode\n",
+ AcpiOsPrintf (" %d bit decode\n",
DECODE_16 == IoData->IoDecode ? 16 : 10);
- AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
+ AcpiOsPrintf (" Range minimum base: %08X\n",
IoData->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
+ AcpiOsPrintf (" Range maximum base: %08X\n",
IoData->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: %08X\n",
+ AcpiOsPrintf (" Alignment: %08X\n",
IoData->Alignment);
- AcpiOsPrintf ("\t\tRange Length: %08X\n",
+ AcpiOsPrintf (" Range Length: %08X\n",
IoData->RangeLength);
return;
@@ -371,11 +371,11 @@ AcpiRsDumpFixedIo (
ACPI_RESOURCE_FIXED_IO *FixedIoData = (ACPI_RESOURCE_FIXED_IO *) Data;
- AcpiOsPrintf ("\tFixed Io Resource\n");
- AcpiOsPrintf ("\t\tRange base address: %08X",
+ AcpiOsPrintf ("Fixed Io Resource\n");
+ AcpiOsPrintf (" Range base address: %08X",
FixedIoData->BaseAddress);
- AcpiOsPrintf ("\t\tRange length: %08X",
+ AcpiOsPrintf (" Range length: %08X",
FixedIoData->RangeLength);
return;
@@ -402,13 +402,13 @@ AcpiRsDumpVendorSpecific (
UINT16 Index = 0;
- AcpiOsPrintf ("\tVendor Specific Resource\n");
+ AcpiOsPrintf ("Vendor Specific Resource\n");
- AcpiOsPrintf ("\t\tLength: %08X\n", VendorData->Length);
+ AcpiOsPrintf (" Length: %08X\n", VendorData->Length);
for (Index = 0; Index < VendorData->Length; Index++)
{
- AcpiOsPrintf ("\t\tByte %X: %08X\n",
+ AcpiOsPrintf (" Byte %X: %08X\n",
Index, VendorData->Reserved[Index]);
}
@@ -435,23 +435,23 @@ AcpiRsDumpMemory24 (
ACPI_RESOURCE_MEM24 *Memory24Data = (ACPI_RESOURCE_MEM24 *) Data;
- AcpiOsPrintf ("\t24-Bit Memory Range Resource\n");
+ AcpiOsPrintf ("24-Bit Memory Range Resource\n");
- AcpiOsPrintf ("\t\tRead%s\n",
+ AcpiOsPrintf (" Read%s\n",
READ_WRITE_MEMORY ==
Memory24Data->ReadWriteAttribute ?
"/Write" : " only");
- AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
+ AcpiOsPrintf (" Range minimum base: %08X\n",
Memory24Data->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
+ AcpiOsPrintf (" Range maximum base: %08X\n",
Memory24Data->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: %08X\n",
+ AcpiOsPrintf (" Alignment: %08X\n",
Memory24Data->Alignment);
- AcpiOsPrintf ("\t\tRange length: %08X\n",
+ AcpiOsPrintf (" Range length: %08X\n",
Memory24Data->RangeLength);
return;
@@ -477,23 +477,23 @@ AcpiRsDumpMemory32 (
ACPI_RESOURCE_MEM32 *Memory32Data = (ACPI_RESOURCE_MEM32 *) Data;
- AcpiOsPrintf ("\t32-Bit Memory Range Resource\n");
+ AcpiOsPrintf ("32-Bit Memory Range Resource\n");
- AcpiOsPrintf ("\t\tRead%s\n",
+ AcpiOsPrintf (" Read%s\n",
READ_WRITE_MEMORY ==
Memory32Data->ReadWriteAttribute ?
"/Write" : " only");
- AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
+ AcpiOsPrintf (" Range minimum base: %08X\n",
Memory32Data->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
+ AcpiOsPrintf (" Range maximum base: %08X\n",
Memory32Data->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: %08X\n",
+ AcpiOsPrintf (" Alignment: %08X\n",
Memory32Data->Alignment);
- AcpiOsPrintf ("\t\tRange length: %08X\n",
+ AcpiOsPrintf (" Range length: %08X\n",
Memory32Data->RangeLength);
return;
@@ -519,17 +519,17 @@ AcpiRsDumpFixedMemory32 (
ACPI_RESOURCE_FIXED_MEM32 *FixedMemory32Data = (ACPI_RESOURCE_FIXED_MEM32 *) Data;
- AcpiOsPrintf ("\t32-Bit Fixed Location Memory Range Resource\n");
+ AcpiOsPrintf ("32-Bit Fixed Location Memory Range Resource\n");
- AcpiOsPrintf ("\t\tRead%s\n",
+ AcpiOsPrintf (" Read%s\n",
READ_WRITE_MEMORY ==
FixedMemory32Data->ReadWriteAttribute ?
"/Write" : " Only");
- AcpiOsPrintf ("\t\tRange base address: %08X\n",
+ AcpiOsPrintf (" Range base address: %08X\n",
FixedMemory32Data->RangeBaseAddress);
- AcpiOsPrintf ("\t\tRange length: %08X\n",
+ AcpiOsPrintf (" Range length: %08X\n",
FixedMemory32Data->RangeLength);
return;
@@ -555,8 +555,8 @@ AcpiRsDumpAddress16 (
ACPI_RESOURCE_ADDRESS16 *Address16Data = (ACPI_RESOURCE_ADDRESS16 *) Data;
- AcpiOsPrintf ("\t16-Bit Address Space Resource\n");
- AcpiOsPrintf ("\t\tResource Type: ");
+ AcpiOsPrintf ("16-Bit Address Space Resource\n");
+ AcpiOsPrintf (" Resource Type: ");
switch (Address16Data->ResourceType)
{
@@ -567,32 +567,32 @@ AcpiRsDumpAddress16 (
switch (Address16Data->Attribute.Memory.CacheAttribute)
{
case NON_CACHEABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Noncacheable memory\n");
break;
case CACHABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Cacheable memory\n");
break;
case WRITE_COMBINING_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Write-combining memory\n");
break;
case PREFETCHABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Prefetchable memory\n");
break;
default:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Invalid cache attribute\n");
break;
}
- AcpiOsPrintf ("\t\tType Specific: Read%s\n",
+ AcpiOsPrintf (" Type Specific: Read%s\n",
READ_WRITE_MEMORY ==
Address16Data->Attribute.Memory.ReadWriteAttribute ?
"/Write" : " Only");
@@ -605,22 +605,22 @@ AcpiRsDumpAddress16 (
switch (Address16Data->Attribute.Io.RangeAttribute)
{
case NON_ISA_ONLY_RANGES:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ISA_ONLY_RANGES:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ENTIRE_RANGE:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
default:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Invalid range attribute\n");
break;
}
@@ -637,42 +637,42 @@ AcpiRsDumpAddress16 (
return;
}
- AcpiOsPrintf ("\t\tResource %s\n",
+ AcpiOsPrintf (" Resource %s\n",
CONSUMER == Address16Data->ProducerConsumer ?
"Consumer" : "Producer");
- AcpiOsPrintf ("\t\t%s decode\n",
+ AcpiOsPrintf (" %s decode\n",
SUB_DECODE == Address16Data->Decode ?
"Subtractive" : "Positive");
- AcpiOsPrintf ("\t\tMin address is %s fixed\n",
+ AcpiOsPrintf (" Min address is %s fixed\n",
ADDRESS_FIXED == Address16Data->MinAddressFixed ?
"" : "not");
- AcpiOsPrintf ("\t\tMax address is %s fixed\n",
+ AcpiOsPrintf (" Max address is %s fixed\n",
ADDRESS_FIXED == Address16Data->MaxAddressFixed ?
"" : "not");
- AcpiOsPrintf ("\t\tGranularity: %08X\n",
+ AcpiOsPrintf (" Granularity: %08X\n",
Address16Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: %08X\n",
+ AcpiOsPrintf (" Address range min: %08X\n",
Address16Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: %08X\n",
+ AcpiOsPrintf (" Address range max: %08X\n",
Address16Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: %08X\n",
+ AcpiOsPrintf (" Address translation offset: %08X\n",
Address16Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: %08X\n",
+ AcpiOsPrintf (" Address Length: %08X\n",
Address16Data->AddressLength);
if (0xFF != Address16Data->ResourceSource.Index)
{
- AcpiOsPrintf ("\t\tResource Source Index: %X\n",
+ AcpiOsPrintf (" Resource Source Index: %X\n",
Address16Data->ResourceSource.Index);
- AcpiOsPrintf ("\t\tResource Source: %s\n",
+ AcpiOsPrintf (" Resource Source: %s\n",
Address16Data->ResourceSource.StringPtr);
}
@@ -699,43 +699,43 @@ AcpiRsDumpAddress32 (
ACPI_RESOURCE_ADDRESS32 *Address32Data = (ACPI_RESOURCE_ADDRESS32 *) Data;
- AcpiOsPrintf ("\t32-Bit Address Space Resource\n");
+ AcpiOsPrintf ("32-Bit Address Space Resource\n");
switch (Address32Data->ResourceType)
{
case MEMORY_RANGE:
- AcpiOsPrintf ("\t\tResource Type: Memory Range\n");
+ AcpiOsPrintf (" Resource Type: Memory Range\n");
switch (Address32Data->Attribute.Memory.CacheAttribute)
{
case NON_CACHEABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Noncacheable memory\n");
break;
case CACHABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Cacheable memory\n");
break;
case WRITE_COMBINING_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Write-combining memory\n");
break;
case PREFETCHABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Prefetchable memory\n");
break;
default:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Invalid cache attribute\n");
break;
}
- AcpiOsPrintf ("\t\tType Specific: Read%s\n",
+ AcpiOsPrintf (" Type Specific: Read%s\n",
READ_WRITE_MEMORY ==
Address32Data->Attribute.Memory.ReadWriteAttribute ?
"/Write" : " Only");
@@ -743,27 +743,27 @@ AcpiRsDumpAddress32 (
case IO_RANGE:
- AcpiOsPrintf ("\t\tResource Type: Io Range\n");
+ AcpiOsPrintf (" Resource Type: Io Range\n");
switch (Address32Data->Attribute.Io.RangeAttribute)
{
case NON_ISA_ONLY_RANGES:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ISA_ONLY_RANGES:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ENTIRE_RANGE:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
default:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Invalid Range attribute");
break;
}
@@ -771,51 +771,51 @@ AcpiRsDumpAddress32 (
case BUS_NUMBER_RANGE:
- AcpiOsPrintf ("\t\tResource Type: Bus Number Range\n");
+ AcpiOsPrintf (" Resource Type: Bus Number Range\n");
break;
default:
- AcpiOsPrintf ("\t\tInvalid Resource Type..exiting.\n");
+ AcpiOsPrintf (" Invalid Resource Type..exiting.\n");
return;
}
- AcpiOsPrintf ("\t\tResource %s\n",
+ AcpiOsPrintf (" Resource %s\n",
CONSUMER == Address32Data->ProducerConsumer ?
"Consumer" : "Producer");
- AcpiOsPrintf ("\t\t%s decode\n",
+ AcpiOsPrintf (" %s decode\n",
SUB_DECODE == Address32Data->Decode ?
"Subtractive" : "Positive");
- AcpiOsPrintf ("\t\tMin address is %s fixed\n",
+ AcpiOsPrintf (" Min address is %s fixed\n",
ADDRESS_FIXED == Address32Data->MinAddressFixed ?
"" : "not ");
- AcpiOsPrintf ("\t\tMax address is %s fixed\n",
+ AcpiOsPrintf (" Max address is %s fixed\n",
ADDRESS_FIXED == Address32Data->MaxAddressFixed ?
"" : "not ");
- AcpiOsPrintf ("\t\tGranularity: %08X\n",
+ AcpiOsPrintf (" Granularity: %08X\n",
Address32Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: %08X\n",
+ AcpiOsPrintf (" Address range min: %08X\n",
Address32Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: %08X\n",
+ AcpiOsPrintf (" Address range max: %08X\n",
Address32Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: %08X\n",
+ AcpiOsPrintf (" Address translation offset: %08X\n",
Address32Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: %08X\n",
+ AcpiOsPrintf (" Address Length: %08X\n",
Address32Data->AddressLength);
if(0xFF != Address32Data->ResourceSource.Index)
{
- AcpiOsPrintf ("\t\tResource Source Index: %X\n",
+ AcpiOsPrintf (" Resource Source Index: %X\n",
Address32Data->ResourceSource.Index);
- AcpiOsPrintf ("\t\tResource Source: %s\n",
+ AcpiOsPrintf (" Resource Source: %s\n",
Address32Data->ResourceSource.StringPtr);
}
@@ -842,43 +842,43 @@ AcpiRsDumpAddress64 (
ACPI_RESOURCE_ADDRESS64 *Address64Data = (ACPI_RESOURCE_ADDRESS64 *) Data;
- AcpiOsPrintf ("\t64-Bit Address Space Resource\n");
+ AcpiOsPrintf ("64-Bit Address Space Resource\n");
switch (Address64Data->ResourceType)
{
case MEMORY_RANGE:
- AcpiOsPrintf ("\t\tResource Type: Memory Range\n");
+ AcpiOsPrintf (" Resource Type: Memory Range\n");
switch (Address64Data->Attribute.Memory.CacheAttribute)
{
case NON_CACHEABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Noncacheable memory\n");
break;
case CACHABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Cacheable memory\n");
break;
case WRITE_COMBINING_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Write-combining memory\n");
break;
case PREFETCHABLE_MEMORY:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Prefetchable memory\n");
break;
default:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Invalid cache attribute\n");
break;
}
- AcpiOsPrintf ("\t\tType Specific: Read%s\n",
+ AcpiOsPrintf (" Type Specific: Read%s\n",
READ_WRITE_MEMORY ==
Address64Data->Attribute.Memory.ReadWriteAttribute ?
"/Write" : " Only");
@@ -886,27 +886,27 @@ AcpiRsDumpAddress64 (
case IO_RANGE:
- AcpiOsPrintf ("\t\tResource Type: Io Range\n");
+ AcpiOsPrintf (" Resource Type: Io Range\n");
switch (Address64Data->Attribute.Io.RangeAttribute)
{
case NON_ISA_ONLY_RANGES:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ISA_ONLY_RANGES:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ENTIRE_RANGE:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
default:
- AcpiOsPrintf ("\t\tType Specific: "
+ AcpiOsPrintf (" Type Specific: "
"Invalid Range attribute");
break;
}
@@ -914,51 +914,51 @@ AcpiRsDumpAddress64 (
case BUS_NUMBER_RANGE:
- AcpiOsPrintf ("\t\tResource Type: Bus Number Range\n");
+ AcpiOsPrintf (" Resource Type: Bus Number Range\n");
break;
default:
- AcpiOsPrintf ("\t\tInvalid Resource Type..exiting.\n");
+ AcpiOsPrintf (" Invalid Resource Type..exiting.\n");
return;
}
- AcpiOsPrintf ("\t\tResource %s\n",
+ AcpiOsPrintf (" Resource %s\n",
CONSUMER == Address64Data->ProducerConsumer ?
"Consumer" : "Producer");
- AcpiOsPrintf ("\t\t%s decode\n",
+ AcpiOsPrintf (" %s decode\n",
SUB_DECODE == Address64Data->Decode ?
"Subtractive" : "Positive");
- AcpiOsPrintf ("\t\tMin address is %s fixed\n",
+ AcpiOsPrintf (" Min address is %s fixed\n",
ADDRESS_FIXED == Address64Data->MinAddressFixed ?
"" : "not ");
- AcpiOsPrintf ("\t\tMax address is %s fixed\n",
+ AcpiOsPrintf (" Max address is %s fixed\n",
ADDRESS_FIXED == Address64Data->MaxAddressFixed ?
"" : "not ");
- AcpiOsPrintf ("\t\tGranularity: %16X\n",
+ AcpiOsPrintf (" Granularity: %16X\n",
Address64Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: %16X\n",
+ AcpiOsPrintf (" Address range min: %16X\n",
Address64Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: %16X\n",
+ AcpiOsPrintf (" Address range max: %16X\n",
Address64Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: %16X\n",
+ AcpiOsPrintf (" Address translation offset: %16X\n",
Address64Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: %16X\n",
+ AcpiOsPrintf (" Address Length: %16X\n",
Address64Data->AddressLength);
if(0xFF != Address64Data->ResourceSource.Index)
{
- AcpiOsPrintf ("\t\tResource Source Index: %X\n",
+ AcpiOsPrintf (" Resource Source Index: %X\n",
Address64Data->ResourceSource.Index);
- AcpiOsPrintf ("\t\tResource Source: %s\n",
+ AcpiOsPrintf (" Resource Source: %s\n",
Address64Data->ResourceSource.StringPtr);
}
@@ -986,25 +986,25 @@ AcpiRsDumpExtendedIrq (
UINT8 Index = 0;
- AcpiOsPrintf ("\tExtended IRQ Resource\n");
+ AcpiOsPrintf ("Extended IRQ Resource\n");
- AcpiOsPrintf ("\t\tResource %s\n",
+ AcpiOsPrintf (" Resource %s\n",
CONSUMER == ExtIrqData->ProducerConsumer ?
"Consumer" : "Producer");
- AcpiOsPrintf ("\t\t%s\n",
+ AcpiOsPrintf (" %s\n",
LEVEL_SENSITIVE == ExtIrqData->EdgeLevel ?
"Level" : "Edge");
- AcpiOsPrintf ("\t\tActive %s\n",
+ AcpiOsPrintf (" Active %s\n",
ACTIVE_LOW == ExtIrqData->ActiveHighLow ?
"low" : "high");
- AcpiOsPrintf ("\t\t%s\n",
+ AcpiOsPrintf (" %s\n",
SHARED == ExtIrqData->SharedExclusive ?
"Shared" : "Exclusive");
- AcpiOsPrintf ("\t\tInterrupts : %X ( ",
+ AcpiOsPrintf (" Interrupts : %X ( ",
ExtIrqData->NumberOfInterrupts);
for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++)
@@ -1016,9 +1016,9 @@ AcpiRsDumpExtendedIrq (
if(0xFF != ExtIrqData->ResourceSource.Index)
{
- AcpiOsPrintf ("\t\tResource Source Index: %X",
+ AcpiOsPrintf (" Resource Source Index: %X",
ExtIrqData->ResourceSource.Index);
- AcpiOsPrintf ("\t\tResource Source: %s",
+ AcpiOsPrintf (" Resource Source: %s",
ExtIrqData->ResourceSource.StringPtr);
}
@@ -1050,7 +1050,7 @@ AcpiRsDumpResourceList (
{
while (!Done)
{
- AcpiOsPrintf ("\tResource structure %x.\n", Count++);
+ AcpiOsPrintf ("Resource structure %x.\n", Count++);
switch (Resource->Id)
{
@@ -1067,7 +1067,7 @@ AcpiRsDumpResourceList (
break;
case ACPI_RSTYPE_END_DPF:
- AcpiOsPrintf ("\tEndDependentFunctions Resource\n");
+ AcpiOsPrintf ("EndDependentFunctions Resource\n");
/* AcpiRsDumpEndDependentFunctions (Resource->Data);*/
break;
@@ -1085,7 +1085,7 @@ AcpiRsDumpResourceList (
case ACPI_RSTYPE_END_TAG:
/*RsDumpEndTag (Resource->Data);*/
- AcpiOsPrintf ("\tEndTag Resource\n");
+ AcpiOsPrintf ("EndTag Resource\n");
Done = TRUE;
break;
@@ -1158,16 +1158,16 @@ AcpiRsDumpIrqList (
while (!Done)
{
- AcpiOsPrintf ("\tPCI IRQ Routing Table structure %X.\n", Count++);
+ AcpiOsPrintf ("PCI IRQ Routing Table structure %X.\n", Count++);
- AcpiOsPrintf ("\t\tAddress: %X\n",
+ AcpiOsPrintf (" Address: %X\n",
PrtElement->Address);
- AcpiOsPrintf ("\t\tPin: %X\n", PrtElement->Pin);
+ AcpiOsPrintf (" Pin: %X\n", PrtElement->Pin);
- AcpiOsPrintf ("\t\tSource: %s\n", PrtElement->Source);
+ AcpiOsPrintf (" Source: %s\n", PrtElement->Source);
- AcpiOsPrintf ("\t\tSourceIndex: %X\n",
+ AcpiOsPrintf (" SourceIndex: %X\n",
PrtElement->SourceIndex);
Buffer += PrtElement->Length;
diff --git a/sys/contrib/dev/acpica/tbconvrt.c b/sys/contrib/dev/acpica/tbconvrt.c
index 11960143f19a..517f8a02090e 100644
--- a/sys/contrib/dev/acpica/tbconvrt.c
+++ b/sys/contrib/dev/acpica/tbconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
- * $Revision: 22 $
+ * $Revision: 23 $
*
*****************************************************************************/
@@ -128,7 +128,7 @@
/*******************************************************************************
*
- * FUNCTION: AcpiTbConvertToXsdt
+ * FUNCTION: AcpiTbGetTableCount
*
* PARAMETERS:
*
@@ -138,20 +138,18 @@
*
******************************************************************************/
-ACPI_STATUS
-AcpiTbConvertToXsdt (
- ACPI_TABLE_DESC *TableInfo,
- UINT32 *NumberOfTables)
+UINT32
+AcpiTbGetTableCount (
+ RSDP_DESCRIPTOR *RSDP,
+ ACPI_TABLE_HEADER *RSDT)
{
- UINT32 TableSize;
UINT32 PointerSize;
- UINT32 i;
- XSDT_DESCRIPTOR *NewTable;
+
#ifndef _IA64
- if (AcpiGbl_RSDP->Revision < 2)
+ if (RSDP->Revision < 2)
{
PointerSize = sizeof (UINT32);
}
@@ -169,9 +167,34 @@ AcpiTbConvertToXsdt (
* is architecture-dependent.
*/
- TableSize = TableInfo->Pointer->Length;
- *NumberOfTables = (TableSize -
- sizeof (ACPI_TABLE_HEADER)) / PointerSize;
+ return ((RSDT->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbConvertToXsdt
+ *
+ * PARAMETERS:
+ *
+ * RETURN:
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiTbConvertToXsdt (
+ ACPI_TABLE_DESC *TableInfo,
+ UINT32 *NumberOfTables)
+{
+ UINT32 TableSize;
+ UINT32 i;
+ XSDT_DESCRIPTOR *NewTable;
+
+
+ *NumberOfTables = AcpiTbGetTableCount (AcpiGbl_RSDP, TableInfo->Pointer);
+
/* Compute size of the converted XSDT */
diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c
index f79f40644080..fce2f9722f06 100644
--- a/sys/contrib/dev/acpica/tbget.c
+++ b/sys/contrib/dev/acpica/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 46 $
+ * $Revision: 48 $
*
*****************************************************************************/
@@ -126,6 +126,7 @@
#define RSDP_CHECKSUM_LENGTH 20
+
/*******************************************************************************
*
* FUNCTION: AcpiTbGetTablePtr
@@ -169,14 +170,12 @@ AcpiTbGetTablePtr (
* For all table types (Single/Multiple), the first
* instance is always in the list head.
*/
-
if (Instance == 1)
{
/*
* Just pluck the pointer out of the global table!
* Will be null if no table is present
*/
-
*TablePtrLoc = AcpiGbl_AcpiTables[TableType].Pointer;
return_ACPI_STATUS (AE_OK);
}
@@ -191,11 +190,11 @@ AcpiTbGetTablePtr (
}
/* Walk the list to get the desired table
- * Since the if (Instance == 1) check above checked for the
- * first table, setting TableDesc equal to the .Next member
- * is actually pointing to the second table. Therefore, we
- * need to walk from the 2nd table until we reach the Instance
- * that the user is looking for and return its table pointer.
+ * Since the if (Instance == 1) check above checked for the
+ * first table, setting TableDesc equal to the .Next member
+ * is actually pointing to the second table. Therefore, we
+ * need to walk from the 2nd table until we reach the Instance
+ * that the user is looking for and return its table pointer.
*/
TableDesc = AcpiGbl_AcpiTables[TableType].Next;
for (i = 2; i < Instance; i++)
@@ -289,8 +288,7 @@ AcpiTbGetTable (
{
Size = SIZE_IN_HEADER;
- Status = AcpiTbMapAcpiTable (PhysicalAddress, &Size,
- (void **) &FullTable);
+ Status = AcpiTbMapAcpiTable (PhysicalAddress, &Size, &FullTable);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -516,8 +514,7 @@ AcpiTbVerifyRsdp (
/*
* Obtain access to the RSDP structure
*/
- Status = AcpiOsMapMemory (RsdpPhysicalAddress,
- sizeof (RSDP_DESCRIPTOR),
+ Status = AcpiOsMapMemory (RsdpPhysicalAddress, sizeof (RSDP_DESCRIPTOR),
(void **) &TablePtr);
if (ACPI_FAILURE (Status))
{
@@ -577,6 +574,148 @@ Cleanup:
/*******************************************************************************
*
+ * FUNCTION: AcpiTbGetRsdtAddress
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: RSDT physical address
+ *
+ * DESCRIPTION: Extract the address of the RSDT or XSDT, depending on the
+ * version of the RSDP
+ *
+ ******************************************************************************/
+
+ACPI_PHYSICAL_ADDRESS
+AcpiTbGetRsdtAddress (void)
+{
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress;
+
+
+ /*
+ * For RSDP revision 0 or 1, we use the RSDT.
+ * For RSDP revision 2 (and above), we use the XSDT
+ */
+ if (AcpiGbl_RSDP->Revision < 2)
+ {
+#ifdef _IA64
+ /* 0.71 RSDP has 64bit Rsdt address field */
+ PhysicalAddress = ((RSDP_DESCRIPTOR_REV071 *)AcpiGbl_RSDP)->RsdtPhysicalAddress;
+#else
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) AcpiGbl_RSDP->RsdtPhysicalAddress;
+#endif
+ }
+
+ else
+ {
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
+ ACPI_GET_ADDRESS (AcpiGbl_RSDP->XsdtPhysicalAddress);
+ }
+
+
+ return (PhysicalAddress);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbValidateRsdt
+ *
+ * PARAMETERS: TablePtr - Addressable pointer to the RSDT.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Validate signature for the RSDT or XSDT
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiTbValidateRsdt (
+ ACPI_TABLE_HEADER *TablePtr)
+{
+ UINT32 NoMatch;
+
+
+ /*
+ * For RSDP revision 0 or 1, we use the RSDT.
+ * For RSDP revision 2 (and above), we use the XSDT
+ */
+ if (AcpiGbl_RSDP->Revision < 2)
+ {
+ NoMatch = STRNCMP ((char *) TablePtr, RSDT_SIG,
+ sizeof (RSDT_SIG) -1);
+ }
+ else
+ {
+ NoMatch = STRNCMP ((char *) TablePtr, XSDT_SIG,
+ sizeof (XSDT_SIG) -1);
+ }
+
+
+ if (NoMatch)
+ {
+ /* Invalid RSDT or XSDT signature */
+
+ REPORT_ERROR (("Invalid signature where RSDP indicates RSDT/XSDT should be located\n"));
+
+ DUMP_BUFFER (AcpiGbl_RSDP, 20);
+
+ DEBUG_PRINT_RAW (ACPI_ERROR,
+ ("RSDT/XSDT signature at %X is invalid\n",
+ AcpiGbl_RSDP->RsdtPhysicalAddress));
+
+ return (AE_BAD_SIGNATURE);
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbGetTablePointer
+ *
+ * PARAMETERS: PhysicalAddress - Address from RSDT
+ * Flags - virtual or physical addressing
+ * TablePtr - Addressable address (output)
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Create an addressable pointer to an ACPI table
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiTbGetTablePointer (
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress,
+ UINT32 Flags,
+ UINT32 *Size,
+ ACPI_TABLE_HEADER **TablePtr)
+{
+ ACPI_STATUS Status;
+
+
+
+ if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
+ {
+ *Size = SIZE_IN_HEADER;
+ Status = AcpiTbMapAcpiTable (PhysicalAddress, Size, TablePtr);
+ }
+
+ else
+ {
+ *Size = 0;
+ *TablePtr = (ACPI_TABLE_HEADER *) (ACPI_TBLPTR) PhysicalAddress;
+
+ Status = AE_OK;
+ }
+
+ return (Status);
+}
+
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiTbGetTableRsdt
*
* PARAMETERS: NumberOfTables - Where the table count is placed
@@ -592,10 +731,8 @@ AcpiTbGetTableRsdt (
UINT32 *NumberOfTables)
{
ACPI_TABLE_DESC TableInfo;
- ACPI_STATUS Status = AE_OK;
+ ACPI_STATUS Status;
ACPI_PHYSICAL_ADDRESS PhysicalAddress;
- UINT32 SignatureLength;
- char *TableSignature;
FUNCTION_TRACE ("TbGetTableRsdt");
@@ -609,28 +746,8 @@ AcpiTbGetTableRsdt (
("RSDP located at %p, RSDT physical=%p \n",
AcpiGbl_RSDP, AcpiGbl_RSDP->RsdtPhysicalAddress));
- /*
- * For RSDP revision 0 or 1, we use the RSDT.
- * For RSDP revision 2 (and above), we use the XSDT
- */
- if (AcpiGbl_RSDP->Revision < 2)
- {
-#ifdef _IA64
- /* 0.71 RSDP has 64bit Rsdt address field */
- PhysicalAddress = ((RSDP_DESCRIPTOR_REV071 *)AcpiGbl_RSDP)->RsdtPhysicalAddress;
-#else
- PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) AcpiGbl_RSDP->RsdtPhysicalAddress;
-#endif
- TableSignature = RSDT_SIG;
- SignatureLength = sizeof (RSDT_SIG) -1;
- }
- else
- {
- PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
- ACPI_GET_ADDRESS (AcpiGbl_RSDP->XsdtPhysicalAddress);
- TableSignature = XSDT_SIG;
- SignatureLength = sizeof (XSDT_SIG) -1;
- }
+
+ PhysicalAddress = AcpiTbGetRsdtAddress ();
/* Get the RSDT/XSDT */
@@ -646,26 +763,17 @@ AcpiTbGetTableRsdt (
/* Check the RSDT or XSDT signature */
- if (STRNCMP ((char *) TableInfo.Pointer, TableSignature,
- SignatureLength))
+ Status = AcpiTbValidateRsdt (TableInfo.Pointer);
+ if (ACPI_FAILURE (Status))
{
- /* Invalid RSDT or XSDT signature */
-
- REPORT_ERROR (("Invalid signature where RSDP indicates %s should be located\n",
- TableSignature));
-
- DUMP_BUFFER (AcpiGbl_RSDP, 20);
-
- DEBUG_PRINT_RAW (ACPI_ERROR,
- ("RSDP points to %X at %lXh, but signature is invalid\n",
- TableSignature, (void *) AcpiGbl_RSDP->RsdtPhysicalAddress));
-
return_ACPI_STATUS (Status);
}
- /* Valid RSDT signature, verify the checksum */
-
+ /*
+ * Valid RSDT signature, verify the checksum. If it fails, just
+ * print a warning and ignore it.
+ */
Status = AcpiTbVerifyTableChecksum (TableInfo.Pointer);
@@ -698,7 +806,7 @@ AcpiTbGetTableRsdt (
* FUNCTION: AcpiTbGetTableFacs
*
* PARAMETERS: *BufferPtr - If BufferPtr is valid, read data from
- * buffer rather than searching memory
+ * buffer rather than searching memory
* *TableInfo - Where the table info is returned
*
* RETURN: Status
@@ -715,7 +823,7 @@ AcpiTbGetTableFacs (
ACPI_TABLE_HEADER *BufferPtr,
ACPI_TABLE_DESC *TableInfo)
{
- void *TablePtr = NULL;
+ ACPI_TABLE_HEADER *TablePtr = NULL;
UINT32 Size;
UINT8 Allocation;
ACPI_STATUS Status = AE_OK;
@@ -757,7 +865,7 @@ AcpiTbGetTableFacs (
Status = AcpiTbMapAcpiTable ((ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XFirmwareCtrl),
&Size, &TablePtr);
- if (ACPI_FAILURE(Status))
+ if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/tbutils.c b/sys/contrib/dev/acpica/tbutils.c
index 0a4309e84197..dcad455afcb9 100644
--- a/sys/contrib/dev/acpica/tbutils.c
+++ b/sys/contrib/dev/acpica/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 37 $
+ * $Revision: 38 $
*
*****************************************************************************/
@@ -342,7 +342,7 @@ ACPI_STATUS
AcpiTbMapAcpiTable (
ACPI_PHYSICAL_ADDRESS PhysicalAddress,
UINT32 *Size,
- void **LogicalAddress)
+ ACPI_TABLE_HEADER **LogicalAddress)
{
ACPI_TABLE_HEADER *Table;
UINT32 TableSize = *Size;
diff --git a/sys/contrib/dev/acpica/tbxface.c b/sys/contrib/dev/acpica/tbxface.c
index 4accd25bfff7..86185b0267e6 100644
--- a/sys/contrib/dev/acpica/tbxface.c
+++ b/sys/contrib/dev/acpica/tbxface.c
@@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
- * $Revision: 38 $
+ * $Revision: 39 $
*
*****************************************************************************/
@@ -227,8 +227,6 @@ ErrorExit:
* a valid header. The header fields will be verified, and if it
* is determined that the table is invalid, the call will fail.
*
- * If the call fails an appropriate status will be returned.
- *
******************************************************************************/
ACPI_STATUS
@@ -339,7 +337,6 @@ AcpiUnloadTable (
* "Scope" operator. Thus, we need to track ownership by an ID, not
* simply a position within the hierarchy
*/
-
AcpiNsDeleteNamespaceByOwner (ListHead->TableId);
/* Delete (or unmap) the actual table */
@@ -371,9 +368,6 @@ AcpiUnloadTable (
* function is not valid for the RSD PTR table since it does not
* have a standard header and is fixed length.
*
- * If the operation fails for any reason an appropriate status will
- * be returned and the contents of OutTableHeader are undefined.
- *
******************************************************************************/
ACPI_STATUS
@@ -461,9 +455,6 @@ AcpiGetTableHeader (
* copied into the OutBuffer->BufPtr buffer. This table will be
* a complete table including the header.
*
- * If the operation fails an appropriate status will be returned
- * and the contents of OutBuffer are undefined.
- *
******************************************************************************/
ACPI_STATUS
@@ -518,7 +509,7 @@ AcpiGetTable (
/*
* AcpiTbGetTablePtr will return a NULL pointer if the
- * table is not loaded.
+ * table is not loaded.
*/
if (TblPtr == NULL)
{
@@ -556,3 +547,4 @@ AcpiGetTable (
return_ACPI_STATUS (AE_OK);
}
+
diff --git a/sys/contrib/dev/acpica/tbxfroot.c b/sys/contrib/dev/acpica/tbxfroot.c
index 14b09b11e4a4..0d1663d77cf9 100644
--- a/sys/contrib/dev/acpica/tbxfroot.c
+++ b/sys/contrib/dev/acpica/tbxfroot.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
- * $Revision: 37 $
+ * $Revision: 39 $
*
*****************************************************************************/
@@ -152,7 +152,7 @@ AcpiFindRootPointer (
/* Get the RSDP */
- Status = AcpiTbFindRsdp (&TableInfo);
+ Status = AcpiTbFindRsdp (&TableInfo, ACPI_LOGICAL_ADDRESSING);
if (ACPI_FAILURE (Status))
{
DEBUG_PRINTP (ACPI_ERROR, ("RSDP structure not found\n"));
@@ -218,9 +218,9 @@ AcpiTbScanMemoryForRsdp (
*
* FUNCTION: AcpiTbFindRsdp
*
- * PARAMETERS: *BufferPtr - If == NULL, read data from buffer
- * rather than searching memory
- * *TableInfo - Where the table info is returned
+ * PARAMETERS: *TableInfo - Where the table info is returned
+ * Flags - Current memory mode (logical vs.
+ * physical addressing)
*
* RETURN: Status
*
@@ -235,7 +235,8 @@ AcpiTbScanMemoryForRsdp (
ACPI_STATUS
AcpiTbFindRsdp (
- ACPI_TABLE_DESC *TableInfo)
+ ACPI_TABLE_DESC *TableInfo,
+ UINT32 Flags)
{
UINT8 *TablePtr;
UINT8 *MemRover;
@@ -246,75 +247,256 @@ AcpiTbFindRsdp (
FUNCTION_TRACE ("TbFindRsdp");
- /*
- * Search memory for RSDP. First map low physical memory.
+ /*
+ * Scan supports either 1) Logical addressing or 2) Physical addressing
*/
+ if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
+ {
+ /*
+ * 1) Search EBDA (low memory) paragraphs
+ */
+ Status = AcpiOsMapMemory (LO_RSDP_WINDOW_BASE, LO_RSDP_WINDOW_SIZE,
+ (void **) &TablePtr);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
- Status = AcpiOsMapMemory (LO_RSDP_WINDOW_BASE, LO_RSDP_WINDOW_SIZE,
- (void **)&TablePtr);
+ MemRover = AcpiTbScanMemoryForRsdp (TablePtr, LO_RSDP_WINDOW_SIZE);
+ AcpiOsUnmapMemory (TablePtr, LO_RSDP_WINDOW_SIZE);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
+ if (MemRover)
+ {
+ /* Found it, return the physical address */
+
+ PhysAddr = LO_RSDP_WINDOW_BASE;
+ PhysAddr += (MemRover - TablePtr);
+
+ TableInfo->PhysicalAddress = PhysAddr;
+
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /*
+ * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
+ */
+ Status = AcpiOsMapMemory (HI_RSDP_WINDOW_BASE, HI_RSDP_WINDOW_SIZE,
+ (void **) &TablePtr);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ MemRover = AcpiTbScanMemoryForRsdp (TablePtr, HI_RSDP_WINDOW_SIZE);
+ AcpiOsUnmapMemory (TablePtr, HI_RSDP_WINDOW_SIZE);
+
+ if (MemRover)
+ {
+ /* Found it, return the physical address */
+
+ PhysAddr = HI_RSDP_WINDOW_BASE;
+ PhysAddr += (MemRover - TablePtr);
+
+ TableInfo->PhysicalAddress = PhysAddr;
+
+ return_ACPI_STATUS (AE_OK);
+ }
}
+
/*
- * 1) Search EBDA (low memory) paragraphs
+ * Physical addressing
*/
+ else
+ {
+ /*
+ * 1) Search EBDA (low memory) paragraphs
+ */
+ MemRover = AcpiTbScanMemoryForRsdp ((UINT8 *) LO_RSDP_WINDOW_BASE,
+ LO_RSDP_WINDOW_SIZE);
+ if (MemRover)
+ {
+ /* Found it, return the physical address */
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, LO_RSDP_WINDOW_SIZE);
+ TableInfo->PhysicalAddress = (ACPI_TBLPTR) MemRover;
+ return_ACPI_STATUS (AE_OK);
+ }
- /* This mapping is no longer needed */
+ /*
+ * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
+ */
+ MemRover = AcpiTbScanMemoryForRsdp ((UINT8 *) HI_RSDP_WINDOW_BASE,
+ HI_RSDP_WINDOW_SIZE);
+ if (MemRover)
+ {
+ /* Found it, return the physical address */
- AcpiOsUnmapMemory (TablePtr, LO_RSDP_WINDOW_SIZE);
+ TableInfo->PhysicalAddress = (ACPI_TBLPTR) MemRover;
+ return_ACPI_STATUS (AE_OK);
+ }
+ }
- if (MemRover)
- {
- /* Found it, return the physical address */
- PhysAddr = LO_RSDP_WINDOW_BASE;
- PhysAddr += (MemRover - TablePtr);
+ /* RSDP signature was not found */
- TableInfo->PhysicalAddress = PhysAddr;
+ return_ACPI_STATUS (AE_NOT_FOUND);
+}
- return_ACPI_STATUS (AE_OK);
- }
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiGetFirmwareTable
+ *
+ * PARAMETERS: Signature - Any ACPI table signature
+ * Instance - the non zero instance of the table, allows
+ * support for multiple tables of the same type
+ * Flags - 0: Physical/Virtual support
+ * RetBuffer - pointer to a structure containing a buffer to
+ * receive the table
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: This function is called to get an ACPI table. The caller
+ * supplies an OutBuffer large enough to contain the entire ACPI
+ * table. Upon completion
+ * the OutBuffer->Length field will indicate the number of bytes
+ * copied into the OutBuffer->BufPtr buffer. This table will be
+ * a complete table including the header.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetFirmwareTable (
+ ACPI_STRING Signature,
+ UINT32 Instance,
+ UINT32 Flags,
+ ACPI_TABLE_HEADER **TablePointer)
+{
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress;
+ ACPI_TABLE_DESC TableInfo;
+ ACPI_TABLE_HEADER *RsdtPtr;
+ ACPI_TABLE_HEADER *TablePtr;
+ ACPI_STATUS Status;
+ UINT32 RsdtSize;
+ UINT32 TableSize;
+ UINT32 TableCount;
+ UINT32 i;
+ UINT32 j;
+
+
+ FUNCTION_TRACE ("AcpiGetFirmwareTable");
+
+
+ /*
+ * Ensure that at least the table manager is initialized. We don't
+ * require that the entire ACPI subsystem is up for this interface
+ */
/*
- * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
+ * If we have a buffer, we must have a length too
*/
+ if ((Instance == 0) ||
+ (!Signature) ||
+ (!TablePointer))
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
- Status = AcpiOsMapMemory (HI_RSDP_WINDOW_BASE, HI_RSDP_WINDOW_SIZE,
- (void **)&TablePtr);
+ /* Get the RSDP by scanning low memory */
+ Status = AcpiTbFindRsdp (&TableInfo, Flags);
+ if (ACPI_FAILURE (Status))
+ {
+ DEBUG_PRINTP (ACPI_ERROR, ("RSDP structure not found\n"));
+ return_ACPI_STATUS (AE_NO_ACPI_TABLES);
+ }
+
+ AcpiGbl_RSDP = (RSDP_DESCRIPTOR *) TableInfo.Pointer;
+
+
+ /* Get the RSDT and validate it */
+
+ PhysicalAddress = AcpiTbGetRsdtAddress ();
+ Status = AcpiTbGetTablePointer (PhysicalAddress, Flags, &RsdtSize, &RsdtPtr);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, HI_RSDP_WINDOW_SIZE);
+ Status = AcpiTbValidateRsdt (RsdtPtr);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
- /* This mapping is no longer needed */
+ /* Get the number of table pointers within the RSDT */
- AcpiOsUnmapMemory (TablePtr, HI_RSDP_WINDOW_SIZE);
+ TableCount = AcpiTbGetTableCount (AcpiGbl_RSDP, RsdtPtr);
- if (MemRover)
+
+ /*
+ * Search the RSDT/XSDT for the correct instance of the
+ * requested table
+ */
+ for (i = 0, j = 0; i < TableCount; i++)
{
- /* Found it, return the physical address */
+ /* Get the next table pointer */
+
+ if (AcpiGbl_RSDP->Revision < 2)
+ {
+ PhysicalAddress = ((RSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i];
+ }
+ else
+ {
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
+ ACPI_GET_ADDRESS (((XSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]);
+ }
+
+ /* Get addressibility if necessary */
+
+ Status = AcpiTbGetTablePointer (PhysicalAddress, Flags, &TableSize, &TablePtr);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+ /* Compare table signatures and table instance */
- PhysAddr = HI_RSDP_WINDOW_BASE;
- PhysAddr += (MemRover - TablePtr);
+ if (!STRNCMP ((char *) TablePtr, Signature, STRLEN (Signature)))
+ {
+ /* An instance of the table was found */
+
+ j++;
+ if (j >= Instance)
+ {
+ /* Found the correct instance */
+
+ *TablePointer = TablePtr;
+ goto Cleanup;
+ }
+ }
- TableInfo->PhysicalAddress = PhysAddr;
+ /* Delete table mapping if using virtual addressing */
- return_ACPI_STATUS (AE_OK);
+ if (TableSize)
+ {
+ AcpiOsUnmapMemory (TablePtr, TableSize);
+ }
}
+ /* Did not find the table */
- /* RSDP signature was not found */
+ Status = AE_NOT_EXIST;
- return_ACPI_STATUS (AE_NOT_FOUND);
+
+Cleanup:
+ if (RsdtSize)
+ {
+ AcpiOsUnmapMemory (RsdtPtr, RsdtSize);
+ }
+ return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c
index f96a27931872..a9b8d0f61557 100644
--- a/sys/contrib/dev/acpica/utglobal.c
+++ b/sys/contrib/dev/acpica/utglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utglobal - Global variables for the ACPI subsystem
- * $Revision: 122 $
+ * $Revision: 123 $
*
*****************************************************************************/
@@ -235,17 +235,18 @@ UINT8 AcpiGbl_NsProperties[] =
NSP_NORMAL, /* 21 Alias */
NSP_NORMAL, /* 22 Notify */
NSP_NORMAL, /* 23 Address Handler */
- NSP_NEWSCOPE | NSP_LOCAL, /* 24 Resource */
- NSP_NORMAL, /* 25 DefFieldDefn */
- NSP_NORMAL, /* 26 BankFieldDefn */
- NSP_NORMAL, /* 27 IndexFieldDefn */
- NSP_NORMAL, /* 28 If */
- NSP_NORMAL, /* 29 Else */
- NSP_NORMAL, /* 30 While */
- NSP_NEWSCOPE, /* 31 Scope */
- NSP_LOCAL, /* 32 DefAny */
- NSP_NORMAL, /* 33 Extra */
- NSP_NORMAL /* 34 Invalid */
+ NSP_NEWSCOPE | NSP_LOCAL, /* 24 Resource Desc */
+ NSP_NEWSCOPE | NSP_LOCAL, /* 25 Resource Field */
+ NSP_NORMAL, /* 26 DefFieldDefn */
+ NSP_NORMAL, /* 27 BankFieldDefn */
+ NSP_NORMAL, /* 28 IndexFieldDefn */
+ NSP_NORMAL, /* 29 If */
+ NSP_NORMAL, /* 30 Else */
+ NSP_NORMAL, /* 31 While */
+ NSP_NEWSCOPE, /* 32 Scope */
+ NSP_LOCAL, /* 33 DefAny */
+ NSP_NORMAL, /* 34 Extra */
+ NSP_NORMAL /* 35 Invalid */
};
@@ -359,17 +360,18 @@ static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of AC
/* 21 */ "Alias",
/* 22 */ "Notify",
/* 23 */ "AddrHndlr",
- /* 24 */ "Resource",
- /* 25 */ "RgnFldDfn",
- /* 26 */ "BnkFldDfn",
- /* 27 */ "IdxFldDfn",
- /* 28 */ "If",
- /* 29 */ "Else",
- /* 30 */ "While",
- /* 31 */ "Scope",
- /* 32 */ "DefAny",
- /* 33 */ "Extra",
- /* 34 */ "Invalid"
+ /* 24 */ "RsrcDesc",
+ /* 25 */ "RsrcField",
+ /* 26 */ "RgnFldDfn",
+ /* 27 */ "BnkFldDfn",
+ /* 28 */ "IdxFldDfn",
+ /* 29 */ "If",
+ /* 30 */ "Else",
+ /* 31 */ "While",
+ /* 32 */ "Scope",
+ /* 33 */ "DefAny",
+ /* 34 */ "Extra",
+ /* 35 */ "Invalid"
};