Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica/dist Merge ACPICA 20110623.
details: https://anonhg.NetBSD.org/src/rev/d57cc028e3bd
branches: trunk
changeset: 766581:d57cc028e3bd
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Jun 28 09:04:29 2011 +0000
description:
Merge ACPICA 20110623.
diffstat:
sys/external/bsd/acpica/dist/common/dmtbinfo.c | 63 +-
sys/external/bsd/acpica/dist/compiler/aslutils.c | 41 +-
sys/external/bsd/acpica/dist/debugger/dbdisply.c | 97 +-
sys/external/bsd/acpica/dist/debugger/dbexec.c | 405 ++++-
sys/external/bsd/acpica/dist/debugger/dbinput.c | 112 +-
sys/external/bsd/acpica/dist/debugger/dbutils.c | 7 +-
sys/external/bsd/acpica/dist/events/evrgnini.c | 2 +-
sys/external/bsd/acpica/dist/include/acdebug.h | 7 +
sys/external/bsd/acpica/dist/include/acdisasm.h | 11 +-
sys/external/bsd/acpica/dist/include/acglobal.h | 20 +-
sys/external/bsd/acpica/dist/include/aclocal.h | 3 +
sys/external/bsd/acpica/dist/include/acpiosxf.h | 6 +-
sys/external/bsd/acpica/dist/include/acpixf.h | 3 +-
sys/external/bsd/acpica/dist/include/actypes.h | 19 +-
sys/external/bsd/acpica/dist/namespace/nsrepair2.c | 15 +
sys/external/bsd/acpica/dist/osunixxf.c | 1195 ---------------
sys/external/bsd/acpica/dist/tools/acpiexec/osunixdir.c | 251 ---
sys/external/bsd/acpica/dist/tools/acpisrc/osunixdir.c | 251 ---
sys/external/bsd/acpica/dist/utilities/utdecode.c | 7 +-
19 files changed, 674 insertions(+), 1841 deletions(-)
diffs (truncated from 3016 to 300 lines):
diff -r 44626a12e6d1 -r d57cc028e3bd sys/external/bsd/acpica/dist/common/dmtbinfo.c
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c Tue Jun 28 09:01:37 2011 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c Tue Jun 28 09:04:29 2011 +0000
@@ -51,6 +51,31 @@
ACPI_MODULE_NAME ("dmtbinfo")
/*
+ * How to add a new table:
+ *
+ * - Add the C table definition to the actbl1.h or actbl2.h header.
+ * - Add ACPI_xxxx_OFFSET macro(s) for the table (and subtables) to list below.
+ * - Define the table in this file (for the disassembler). If any
+ * new data types are required (ACPI_DMT_*), see below.
+ * - Add an external declaration for the new table definition (AcpiDmTableInfo*)
+ * in acdisam.h
+ * - Add new table definition to the dispatch table in dmtable.c (AcpiDmTableData)
+ * If a simple table (with no subtables), no disassembly code is needed.
+ * Otherwise, create the AcpiDmDump* function for to disassemble the table
+ * and add it to the dmtbdump.c file.
+ * - Add an external declaration for the new AcpiDmDump* function in acdisasm.h
+ * - Add the new AcpiDmDump* function to the dispatch table in dmtable.c
+ * - Create a template for the new table
+ * - Add data table compiler support
+ *
+ * How to add a new data type (ACPI_DMT_*):
+ *
+ * - Add new type at the end of the ACPI_DMT list in acdisasm.h
+ * - Add length and implementation cases in dmtable.c (disassembler)
+ * - Add type and length cases in dtutils.c (DT compiler)
+ */
+
+/*
* Macros used to generate offsets to specific table fields
*/
#define ACPI_FACS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_FACS,f)
@@ -131,6 +156,9 @@
#define ACPI_MADTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_MCFG0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
#define ACPI_MSCT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
+#define ACPI_SLICH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
+#define ACPI_SLIC0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_KEY,f)
+#define ACPI_SLIC1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
#define ACPI_SRATH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
#define ACPI_SRAT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
#define ACPI_SRAT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
@@ -1256,13 +1284,42 @@
/*******************************************************************************
*
- * SLIC - Software Licensing Description Table. NOT FULLY IMPLEMENTED, do not
- * have the table definition.
+ * SLIC - Software Licensing Description Table. There is no common table, just
+ * the standard ACPI header and then subtables.
*
******************************************************************************/
-ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[] =
+/* Common Subtable header (one per Subtable) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[] =
+{
+ {ACPI_DMT_SLIC, ACPI_SLICH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT32, ACPI_SLICH_OFFSET (Length), "Length", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[] =
{
+ {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (KeyType), "Key Type", 0},
+ {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (Version), "Version", 0},
+ {ACPI_DMT_UINT16, ACPI_SLIC0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Algorithm), "Algorithm", 0},
+ {ACPI_DMT_NAME4, ACPI_SLIC0_OFFSET (Magic), "Magic", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (BitLength), "BitLength", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Exponent), "Exponent", 0},
+ {ACPI_DMT_BUF128, ACPI_SLIC0_OFFSET (Modulus[0]), "Modulus", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[] =
+{
+ {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (Version), "Version", 0},
+ {ACPI_DMT_NAME6, ACPI_SLIC1_OFFSET (OemId[0]), "Oem ID", 0},
+ {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (OemTableId[0]), "Oem Table ID", 0},
+ {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (WindowsFlag[0]), "Windows Flag", 0},
+ {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (SlicVersion), "SLIC Version", 0},
+ {ACPI_DMT_BUF16, ACPI_SLIC1_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_BUF128, ACPI_SLIC1_OFFSET (Signature[0]), "Signature", 0},
ACPI_DMT_TERMINATOR
};
diff -r 44626a12e6d1 -r d57cc028e3bd sys/external/bsd/acpica/dist/compiler/aslutils.c
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c Tue Jun 28 09:01:37 2011 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c Tue Jun 28 09:04:29 2011 +0000
@@ -53,13 +53,6 @@
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("aslutils")
-#ifdef _USE_BERKELEY_YACC
-extern const char * const AslCompilername[];
-static const char * const *yytname = &AslCompilername[254];
-#else
-extern const char * const yytname[];
-#endif
-
char AslHexLookup[] =
{
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
@@ -68,12 +61,6 @@
/* Local prototypes */
-static ACPI_STATUS
-UtStrtoul64 (
- char *String,
- UINT32 Base,
- UINT64 *RetInteger);
-
static void
UtPadNameWithUnderscores (
char *NameSeg,
@@ -450,32 +437,6 @@
/*******************************************************************************
*
- * FUNCTION: UtGetOpName
- *
- * PARAMETERS: ParseOpcode - Parser keyword ID
- *
- * RETURN: Pointer to the opcode name
- *
- * DESCRIPTION: Get the ascii name of the parse opcode
- *
- ******************************************************************************/
-
-char *
-UtGetOpName (
- UINT32 ParseOpcode)
-{
-
- /*
- * First entries (ASL_YYTNAME_START) in yytname are special reserved names.
- * Ignore first 8 characters of the name
- */
- return ((char *) yytname
- [(ParseOpcode - ASL_FIRST_PARSE_OPCODE) + ASL_YYTNAME_START] + 8);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: UtDisplaySummary
*
* PARAMETERS: FileID - ID of outpout file
@@ -884,7 +845,7 @@
*
******************************************************************************/
-static ACPI_STATUS
+ACPI_STATUS
UtStrtoul64 (
char *String,
UINT32 Base,
diff -r 44626a12e6d1 -r d57cc028e3bd sys/external/bsd/acpica/dist/debugger/dbdisply.c
--- a/sys/external/bsd/acpica/dist/debugger/dbdisply.c Tue Jun 28 09:01:37 2011 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbdisply.c Tue Jun 28 09:04:29 2011 +0000
@@ -69,6 +69,50 @@
void *Target);
+/*
+ * System handler information.
+ * Used for Handlers command, in AcpiDbDisplayHandlers.
+ */
+#define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
+#define ACPI_HANDLER_NAME_STRING "%30s : "
+#define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
+#define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
+
+/* All predefined Address Space IDs */
+
+static ACPI_ADR_SPACE_TYPE AcpiGbl_SpaceIdList[] =
+{
+ ACPI_ADR_SPACE_SYSTEM_MEMORY,
+ ACPI_ADR_SPACE_SYSTEM_IO,
+ ACPI_ADR_SPACE_PCI_CONFIG,
+ ACPI_ADR_SPACE_EC,
+ ACPI_ADR_SPACE_SMBUS,
+ ACPI_ADR_SPACE_CMOS,
+ ACPI_ADR_SPACE_PCI_BAR_TARGET,
+ ACPI_ADR_SPACE_IPMI,
+ ACPI_ADR_SPACE_DATA_TABLE,
+ ACPI_ADR_SPACE_FIXED_HARDWARE
+};
+
+/* Global handler information */
+
+typedef struct acpi_handler_info
+{
+ void *Handler;
+ char *Name;
+
+} ACPI_HANDLER_INFO;
+
+static ACPI_HANDLER_INFO AcpiGbl_HandlerList[] =
+{
+ {&AcpiGbl_SystemNotify.Handler, "System Notifications"},
+ {&AcpiGbl_DeviceNotify.Handler, "Device Notifications"},
+ {&AcpiGbl_TableHandler, "ACPI Table Events"},
+ {&AcpiGbl_ExceptionHandler, "Control Method Exceptions"},
+ {&AcpiGbl_InterfaceHandler, "OSI Invocations"}
+};
+
+
/*******************************************************************************
*
* FUNCTION: AcpiDbGetPointer
@@ -887,6 +931,7 @@
}
}
+
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayHandlers
@@ -899,46 +944,6 @@
*
******************************************************************************/
-#define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
-#define ACPI_HANDLER_NAME_STRING "%30s : "
-#define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
-#define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
-
-/* All predefined Space IDs */
-
-static ACPI_ADR_SPACE_TYPE SpaceIdList[] =
-{
- ACPI_ADR_SPACE_SYSTEM_MEMORY,
- ACPI_ADR_SPACE_SYSTEM_IO,
- ACPI_ADR_SPACE_PCI_CONFIG,
- ACPI_ADR_SPACE_EC,
- ACPI_ADR_SPACE_SMBUS,
- ACPI_ADR_SPACE_CMOS,
- ACPI_ADR_SPACE_PCI_BAR_TARGET,
- ACPI_ADR_SPACE_IPMI,
- ACPI_ADR_SPACE_DATA_TABLE,
- ACPI_ADR_SPACE_FIXED_HARDWARE
-};
-
-/* Global handler information */
-
-typedef struct acpi_handler_info
-{
- void *Handler;
- const char *Name;
-
-} ACPI_HANDLER_INFO;
-
-ACPI_HANDLER_INFO HandlerList[] =
-{
- {&AcpiGbl_SystemNotify.Handler, "System Notifications"},
- {&AcpiGbl_DeviceNotify.Handler, "Device Notifications"},
- {&AcpiGbl_TableHandler, "ACPI Table Events"},
- {&AcpiGbl_ExceptionHandler, "Control Method Exceptions"},
- {&AcpiGbl_InterfaceHandler, "OSI Invocations"}
-};
-
-
void
AcpiDbDisplayHandlers (
void)
@@ -956,9 +961,9 @@
ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
if (ObjDesc)
{
- for (i = 0; i < ACPI_ARRAY_LENGTH (SpaceIdList); i++)
+ for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_SpaceIdList); i++)
{
- SpaceId = SpaceIdList[i];
+ SpaceId = AcpiGbl_SpaceIdList[i];
HandlerObj = ObjDesc->Device.Handler;
AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
@@ -1008,13 +1013,13 @@
AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
- for (i = 0; i < ACPI_ARRAY_LENGTH (HandlerList); i++)
+ for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_HandlerList); i++)
{
- AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, HandlerList[i].Name);
- if (HandlerList[i].Handler)
+ AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, AcpiGbl_HandlerList[i].Name);
+ if (AcpiGbl_HandlerList[i].Handler)
{
AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
- HandlerList[i].Handler);
+ AcpiGbl_HandlerList[i].Handler);
}
Home |
Main Index |
Thread Index |
Old Index