Index: acconfig.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/acconfig.h,v retrieving revision 1.8 diff -u -r1.8 acconfig.h --- acconfig.h 2001/05/29 19:56:18 1.8 +++ acconfig.h 2001/06/24 07:34:26 @@ -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 */ @@ -189,14 +189,13 @@ #define DEBUGGER_SINGLE_THREADED 0 #define DEBUGGER_MULTI_THREADED 1 -#ifndef DEBUGGER_THREADING #ifdef ACPI_APPLICATION #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED #else #define DEBUGGER_THREADING DEBUGGER_MULTI_THREADED #endif -#endif + /****************************************************************************** * Index: aclocal.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/aclocal.h,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 aclocal.h --- aclocal.h 2001/05/29 19:52:27 1.1.1.7 +++ aclocal.h 2001/06/24 07:34:28 @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: aclocal.h - Internal data types used across the ACPI subsystem - * $Revision: 121 $ + * $Revision: 123 $ * *****************************************************************************/ @@ -124,6 +124,11 @@ 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,7 +295,9 @@ #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 */ @@ -919,6 +926,26 @@ NATIVE_CHAR Buffer[ACPI_DEVICE_ID_LENGTH]; } 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; + /***************************************************************************** Index: acoutput.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/acoutput.h,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 acoutput.h --- acoutput.h 2001/05/29 19:52:28 1.1.1.5 +++ acoutput.h 2001/06/24 07:34:28 @@ -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) Index: acpiosxf.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/acpiosxf.h,v retrieving revision 1.2 diff -u -r1.2 acpiosxf.h --- acpiosxf.h 2001/05/29 20:03:32 1.2 +++ acpiosxf.h 2001/06/24 07:42:58 @@ -392,6 +392,11 @@ void *Pointer, UINT32 Length); +UINT32 +AcpiOsGetTimer ( + void); + + /* * Debug print routines Index: acpixf.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/acpixf.h,v retrieving revision 1.6 diff -u -r1.6 acpixf.h --- acpixf.h 2001/05/29 19:56:18 1.6 +++ acpixf.h 2001/06/24 07:34:29 @@ -205,6 +205,13 @@ UINT32 Instance, ACPI_BUFFER *RetBuffer); +ACPI_STATUS +AcpiGetFirmwareTable ( + ACPI_STRING Signature, + UINT32 Instance, + UINT32 Flags, + ACPI_TABLE_HEADER **TablePointer); + /* * Namespace and name interfaces @@ -427,8 +434,5 @@ ACPI_HANDLE ProcessorHandle, UINT32 *PmTimerTicks); -ACPI_STATUS -AcpiSetSystemSleepState ( - UINT8 SleepState); #endif /* __ACXFACE_H__ */ Index: actables.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/actables.h,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 actables.h --- actables.h 2001/01/31 09:17:45 1.1.1.4 +++ actables.h 2001/06/24 07:34:29 @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actables.h - ACPI table management - * $Revision: 29 $ + * $Revision: 31 $ * *****************************************************************************/ @@ -145,6 +145,10 @@ AcpiTbBuildCommonFacs ( ACPI_TABLE_DESC *TableInfo); +UINT32 +AcpiTbGetTableCount ( + RSDP_DESCRIPTOR *RSDP, + ACPI_TABLE_HEADER *RSDT); /* * tbget - Table "get" routines @@ -171,7 +175,21 @@ 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 @@ ACPI_STATUS AcpiTbFindRsdp ( - ACPI_TABLE_DESC *TableInfo); + ACPI_TABLE_DESC *TableInfo, + UINT32 Flags); /* @@ -257,7 +276,7 @@ AcpiTbMapAcpiTable ( ACPI_PHYSICAL_ADDRESS PhysicalAddress, UINT32 *Size, - void **LogicalAddress); + ACPI_TABLE_HEADER **LogicalAddress); ACPI_STATUS AcpiTbVerifyTableChecksum ( Index: actypes.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/actypes.h,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 actypes.h --- actypes.h 2001/05/29 19:52:28 1.1.1.7 +++ actypes.h 2001/06/24 07:34:30 @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actypes.h - Common data types for the entire ACPI subsystem - * $Revision: 178 $ + * $Revision: 180 $ * *****************************************************************************/ @@ -336,8 +336,11 @@ /* - * 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 @@ #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 @@ #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 @@ #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 @@ 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 */ Index: dbexec.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/dbexec.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 dbexec.c --- dbexec.c 2001/05/29 19:52:29 1.1.1.6 +++ dbexec.c 2001/06/24 07:34:49 @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbexec - debugger control method execution - * $Revision: 25 $ + * $Revision: 26 $ * ******************************************************************************/ @@ -130,18 +130,6 @@ #define _COMPONENT ACPI_DEBUGGER 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; Index: evevent.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/evevent.c,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 evevent.c --- evevent.c 2001/05/29 19:52:31 1.1.1.7 +++ evevent.c 2001/06/24 07:34:24 @@ -2,7 +2,7 @@ * * Module Name: evevent - Fixed and General Purpose AcpiEvent * handling and dispatch - * $Revision: 42 $ + * $Revision: 43 $ * *****************************************************************************/ @@ -284,7 +284,7 @@ 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 @@ 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 */ Index: exprep.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/exprep.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 exprep.c --- exprep.c 2001/05/29 19:52:33 1.1.1.6 +++ exprep.c 2001/06/24 07:34:54 @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exprep - ACPI AML (p-code) execution - field prep utilities - * $Revision: 89 $ + * $Revision: 90 $ * *****************************************************************************/ @@ -260,7 +260,7 @@ 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 @@ 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 @@ */ 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. Index: hwsleep.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/hwsleep.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 hwsleep.c --- hwsleep.c 2001/05/29 19:52:34 1.1.1.3 +++ hwsleep.c 2001/06/24 07:34:26 @@ -2,7 +2,7 @@ /****************************************************************************** * * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface - * $Revision: 11 $ + * $Revision: 12 $ * *****************************************************************************/ @@ -269,33 +269,31 @@ 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(); Index: hwtimer.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/hwtimer.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 hwtimer.c --- hwtimer.c 2001/05/29 19:52:34 1.1.1.3 +++ hwtimer.c 2001/06/24 07:34:26 @@ -2,7 +2,7 @@ /****************************************************************************** * * Name: hwtimer.c - ACPI Power Management Timer Interface - * $Revision: 9 $ + * $Revision: 10 $ * *****************************************************************************/ @@ -138,8 +138,9 @@ AcpiGetTimerResolution ( UINT32 *Resolution) { - ACPI_STATUS Status; + ACPI_STATUS Status; + FUNCTION_TRACE ("AcpiGetTimerResolution"); @@ -185,7 +186,8 @@ AcpiGetTimer ( UINT32 *Ticks) { - ACPI_STATUS Status; + ACPI_STATUS Status; + FUNCTION_TRACE ("AcpiGetTimer"); @@ -246,6 +248,7 @@ UINT32 Milliseconds = 0; UINT32 Microseconds = 0; UINT32 Remainder = 0; + FUNCTION_TRACE ("AcpiGetTimerDuration"); Index: rsdump.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/rsdump.c,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 rsdump.c --- rsdump.c 2001/05/29 19:52:37 1.1.1.7 +++ rsdump.c 2001/06/24 07:34:33 @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: rsdump - Functions to display the resource structures. - * $Revision: 19 $ + * $Revision: 20 $ * ******************************************************************************/ @@ -144,18 +144,18 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ { while (!Done) { - AcpiOsPrintf ("\tResource structure %x.\n", Count++); + AcpiOsPrintf ("Resource structure %x.\n", Count++); switch (Resource->Id) { @@ -1067,7 +1067,7 @@ break; case ACPI_RSTYPE_END_DPF: - AcpiOsPrintf ("\tEndDependentFunctions Resource\n"); + AcpiOsPrintf ("EndDependentFunctions Resource\n"); /* AcpiRsDumpEndDependentFunctions (Resource->Data);*/ break; @@ -1085,7 +1085,7 @@ case ACPI_RSTYPE_END_TAG: /*RsDumpEndTag (Resource->Data);*/ - AcpiOsPrintf ("\tEndTag Resource\n"); + AcpiOsPrintf ("EndTag Resource\n"); Done = TRUE; break; @@ -1158,16 +1158,16 @@ 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; Index: tbconvrt.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/tbconvrt.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 tbconvrt.c --- tbconvrt.c 2001/05/29 19:52:38 1.1.1.5 +++ tbconvrt.c 2001/06/24 07:34:35 @@ -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); } @@ -168,10 +166,35 @@ * pointers contained within the RSDT/XSDT. The size of the pointers * is architecture-dependent. */ + + 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); - TableSize = TableInfo->Pointer->Length; - *NumberOfTables = (TableSize - - sizeof (ACPI_TABLE_HEADER)) / PointerSize; /* Compute size of the converted XSDT */ Index: tbget.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/tbget.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 tbget.c --- tbget.c 2001/05/29 19:52:39 1.1.1.6 +++ tbget.c 2001/06/24 07:34:35 @@ -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 @@ * 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 @@ } /* 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 @@ { 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 @@ /* * 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 @@ /******************************************************************************* * + * 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 @@ 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,30 +746,10 @@ ("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 */ Status = AcpiTbGetTable (PhysicalAddress, NULL, &TableInfo); @@ -646,26 +763,17 @@ /* 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 @@ * 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 @@ 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 @@ 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); } Index: tbutils.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/tbutils.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 tbutils.c --- tbutils.c 2001/05/29 19:52:39 1.1.1.6 +++ tbutils.c 2001/06/24 07:34:35 @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: tbutils - Table manipulation utilities - * $Revision: 37 $ + * $Revision: 38 $ * *****************************************************************************/ @@ -342,7 +342,7 @@ AcpiTbMapAcpiTable ( ACPI_PHYSICAL_ADDRESS PhysicalAddress, UINT32 *Size, - void **LogicalAddress) + ACPI_TABLE_HEADER **LogicalAddress) { ACPI_TABLE_HEADER *Table; UINT32 TableSize = *Size; Index: tbxface.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/tbxface.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 tbxface.c --- tbxface.c 2001/05/29 19:52:39 1.1.1.5 +++ tbxface.c 2001/06/24 07:34:36 @@ -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 @@ * 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 @@ * "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 @@ * 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 @@ * 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 @@ /* * AcpiTbGetTablePtr will return a NULL pointer if the - * table is not loaded. + * table is not loaded. */ if (TblPtr == NULL) { @@ -555,4 +546,5 @@ return_ACPI_STATUS (AE_OK); } + Index: tbxfroot.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/tbxfroot.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 tbxfroot.c --- tbxfroot.c 2001/05/29 19:52:39 1.1.1.5 +++ tbxfroot.c 2001/06/24 07:34:36 @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: tbxfroot - Find the root ACPI table (RSDT) - * $Revision: 37 $ + * $Revision: 39 $ * *****************************************************************************/ @@ -152,7 +152,7 @@ /* 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 @@ * * 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 @@ ACPI_STATUS AcpiTbFindRsdp ( - ACPI_TABLE_DESC *TableInfo) + ACPI_TABLE_DESC *TableInfo, + UINT32 Flags) { UINT8 *TablePtr; UINT8 *MemRover; @@ -246,75 +247,256 @@ 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); } + + Status = AcpiTbValidateRsdt (RsdtPtr); + if (ACPI_FAILURE (Status)) + { + goto Cleanup; + } + - MemRover = AcpiTbScanMemoryForRsdp (TablePtr, HI_RSDP_WINDOW_SIZE); + /* Get the number of table pointers within the RSDT */ - /* This mapping is no longer needed */ + TableCount = AcpiTbGetTableCount (AcpiGbl_RSDP, RsdtPtr); - AcpiOsUnmapMemory (TablePtr, HI_RSDP_WINDOW_SIZE); - 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; + } - PhysAddr = HI_RSDP_WINDOW_BASE; - PhysAddr += (MemRover - TablePtr); + /* Compare table signatures and table instance */ - TableInfo->PhysicalAddress = PhysAddr; + 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; + } + } - return_ACPI_STATUS (AE_OK); + /* Delete table mapping if using virtual addressing */ + + 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); } Index: utglobal.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/utglobal.c,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 utglobal.c --- utglobal.c 2001/05/29 19:52:40 1.1.1.6 +++ utglobal.c 2001/06/24 07:34:37 @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utglobal - Global variables for the ACPI subsystem - * $Revision: 122 $ + * $Revision: 123 $ * *****************************************************************************/ @@ -235,17 +235,18 @@ 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 @@ /* 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" };