aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/components/disassembler
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/disassembler')
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmbuffer.c335
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmdeferred.c3
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmnames.c3
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmobject.c3
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmopcode.c206
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrc.c12
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcl.c43
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c93
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcs.c35
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmutils.c3
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmwalk.c45
11 files changed, 612 insertions, 169 deletions
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c b/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
index 32a7ddf21b9f..9e479fb8ad72 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,12 +41,13 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acutils.h>
#include <contrib/dev/acpica/include/acdisasm.h>
#include <contrib/dev/acpica/include/acparser.h>
#include <contrib/dev/acpica/include/amlcode.h>
+#include <contrib/dev/acpica/include/acinterp.h>
#ifdef ACPI_DISASSEMBLER
@@ -57,11 +58,15 @@
/* Local prototypes */
static void
+AcpiDmUuid (
+ ACPI_PARSE_OBJECT *Op);
+
+static void
AcpiDmUnicode (
ACPI_PARSE_OBJECT *Op);
static void
-AcpiDmIsEisaIdElement (
+AcpiDmGetHardwareIdType (
ACPI_PARSE_OBJECT *Op);
static void
@@ -71,6 +76,9 @@ AcpiDmPldBuffer (
UINT32 ByteCount);
+#define ACPI_BUFFER_BYTES_PER_LINE 8
+
+
/*******************************************************************************
*
* FUNCTION: AcpiDmDisasmByteList
@@ -93,6 +101,9 @@ AcpiDmDisasmByteList (
UINT32 ByteCount)
{
UINT32 i;
+ UINT32 j;
+ UINT32 CurrentIndex;
+ UINT8 BufChar;
if (!ByteCount)
@@ -100,39 +111,68 @@ AcpiDmDisasmByteList (
return;
}
- /* Dump the byte list */
-
- for (i = 0; i < ByteCount; i++)
+ for (i = 0; i < ByteCount; i += ACPI_BUFFER_BYTES_PER_LINE)
{
- /* New line every 8 bytes */
+ /* Line indent and offset prefix for each new line */
+
+ AcpiDmIndent (Level);
+ if (ByteCount > ACPI_BUFFER_BYTES_PER_LINE)
+ {
+ AcpiOsPrintf ("/* %04X */ ", i);
+ }
+
+ /* Dump the actual hex values */
- if (((i % 8) == 0) && (i < ByteCount))
+ for (j = 0; j < ACPI_BUFFER_BYTES_PER_LINE; j++)
{
- if (i > 0)
+ CurrentIndex = i + j;
+ if (CurrentIndex >= ByteCount)
{
- AcpiOsPrintf ("\n");
+ /* Dump fill spaces */
+
+ AcpiOsPrintf (" ");
+ continue;
}
- AcpiDmIndent (Level);
- if (ByteCount > 8)
+ AcpiOsPrintf (" 0x%2.2X", ByteData[CurrentIndex]);
+
+ /* Add comma if there are more bytes to display */
+
+ if (CurrentIndex < (ByteCount - 1))
{
- AcpiOsPrintf ("/* %04X */ ", i);
+ AcpiOsPrintf (",");
+ }
+ else
+ {
+ AcpiOsPrintf (" ");
}
}
- AcpiOsPrintf (" 0x%2.2X", (UINT32) ByteData[i]);
+ /* Dump the ASCII equivalents within a comment */
- /* Add comma if there are more bytes to display */
-
- if (i < (ByteCount -1))
+ AcpiOsPrintf (" /* ");
+ for (j = 0; j < ACPI_BUFFER_BYTES_PER_LINE; j++)
{
- AcpiOsPrintf (",");
+ CurrentIndex = i + j;
+ if (CurrentIndex >= ByteCount)
+ {
+ break;
+ }
+
+ BufChar = ByteData[CurrentIndex];
+ if (ACPI_IS_PRINT (BufChar))
+ {
+ AcpiOsPrintf ("%c", BufChar);
+ }
+ else
+ {
+ AcpiOsPrintf (".");
+ }
}
- }
- if (Level)
- {
- AcpiOsPrintf ("\n");
+ /* Finished with this line */
+
+ AcpiOsPrintf (" */\n");
}
}
@@ -181,6 +221,11 @@ AcpiDmByteList (
AcpiOsPrintf ("\n");
break;
+ case ACPI_DASM_UUID:
+
+ AcpiDmUuid (Op);
+ break;
+
case ACPI_DASM_UNICODE:
AcpiDmUnicode (Op);
@@ -206,6 +251,137 @@ AcpiDmByteList (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmIsUuidBuffer
+ *
+ * PARAMETERS: Op - Buffer Object to be examined
+ *
+ * RETURN: TRUE if buffer contains a UUID
+ *
+ * DESCRIPTION: Determine if a buffer Op contains a UUID
+ *
+ * To help determine whether the buffer is a UUID versus a raw data buffer,
+ * there a are a couple bytes we can look at:
+ *
+ * xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
+ *
+ * The variant covered by the UUID specification is indicated by the two most
+ * significant bits of N being 1 0 (i.e., the hexadecimal N will always be
+ * 8, 9, A, or B).
+ *
+ * The variant covered by the UUID specification has five versions. For this
+ * variant, the four bits of M indicates the UUID version (i.e., the
+ * hexadecimal M will be either 1, 2, 3, 4, or 5).
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcpiDmIsUuidBuffer (
+ ACPI_PARSE_OBJECT *Op)
+{
+ UINT8 *ByteData;
+ UINT32 ByteCount;
+ ACPI_PARSE_OBJECT *SizeOp;
+ ACPI_PARSE_OBJECT *NextOp;
+
+
+ /* Buffer size is the buffer argument */
+
+ SizeOp = Op->Common.Value.Arg;
+
+ /* Next, the initializer byte list to examine */
+
+ NextOp = SizeOp->Common.Next;
+ if (!NextOp)
+ {
+ return (FALSE);
+ }
+
+ /* Extract the byte list info */
+
+ ByteData = NextOp->Named.Data;
+ ByteCount = (UINT32) NextOp->Common.Value.Integer;
+
+ /* Byte count must be exactly 16 */
+
+ if (ByteCount != UUID_BUFFER_LENGTH)
+ {
+ return (FALSE);
+ }
+
+ /* Check for valid "M" and "N" values (see function header above) */
+
+ if (((ByteData[7] & 0xF0) == 0x00) || /* M={1,2,3,4,5} */
+ ((ByteData[7] & 0xF0) > 0x50) ||
+ ((ByteData[8] & 0xF0) < 0x80) || /* N={8,9,A,B} */
+ ((ByteData[8] & 0xF0) > 0xB0))
+ {
+ return (FALSE);
+ }
+
+ /* Ignore the Size argument in the disassembly of this buffer op */
+
+ SizeOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+ return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmUuid
+ *
+ * PARAMETERS: Op - Byte List op containing a UUID
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Dump a buffer containing a UUID as a standard ASCII string.
+ *
+ * Output Format:
+ * In its canonical form, the UUID is represented by a string containing 32
+ * lowercase hexadecimal digits, displayed in 5 groups separated by hyphens.
+ * The complete form is 8-4-4-4-12 for a total of 36 characters (32
+ * alphanumeric characters representing hex digits and 4 hyphens). In bytes,
+ * 4-2-2-2-6. Example:
+ *
+ * ToUUID ("107ededd-d381-4fd7-8da9-08e9a6c79644")
+ *
+ ******************************************************************************/
+
+static void
+AcpiDmUuid (
+ ACPI_PARSE_OBJECT *Op)
+{
+ UINT8 *Data;
+ const char *Description;
+
+
+ Data = ACPI_CAST_PTR (UINT8, Op->Named.Data);
+
+ /* Emit the 36-byte UUID string in the proper format/order */
+
+ AcpiOsPrintf (
+ "\"%2.2x%2.2x%2.2x%2.2x-"
+ "%2.2x%2.2x-"
+ "%2.2x%2.2x-"
+ "%2.2x%2.2x-"
+ "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\")",
+ Data[3], Data[2], Data[1], Data[0],
+ Data[5], Data[4],
+ Data[7], Data[6],
+ Data[8], Data[9],
+ Data[10], Data[11], Data[12], Data[13], Data[14], Data[15]);
+
+ /* Dump the UUID description string if available */
+
+ Description = AcpiAhMatchUuid (Data);
+ if (Description)
+ {
+ AcpiOsPrintf (" /* %s */", Description);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmIsUnicodeBuffer
*
* PARAMETERS: Op - Buffer Object to be examined
@@ -537,19 +713,20 @@ AcpiDmUnicode (
/*******************************************************************************
*
- * FUNCTION: AcpiDmIsEisaIdElement
+ * FUNCTION: AcpiDmGetHardwareIdType
*
* PARAMETERS: Op - Op to be examined
*
* RETURN: None
*
- * DESCRIPTION: Determine if an Op (argument to _HID or _CID) can be converted
- * to an EISA ID.
+ * DESCRIPTION: Determine the type of the argument to a _HID or _CID
+ * 1) Strings are allowed
+ * 2) If Integer, determine if it is a valid EISAID
*
******************************************************************************/
static void
-AcpiDmIsEisaIdElement (
+AcpiDmGetHardwareIdType (
ACPI_PARSE_OBJECT *Op)
{
UINT32 BigEndianId;
@@ -557,55 +734,66 @@ AcpiDmIsEisaIdElement (
UINT32 i;
- /* The parameter must be either a word or a dword */
-
- if ((Op->Common.AmlOpcode != AML_DWORD_OP) &&
- (Op->Common.AmlOpcode != AML_WORD_OP))
+ switch (Op->Common.AmlOpcode)
{
- return;
- }
+ case AML_STRING_OP:
- /* Swap from little-endian to big-endian to simplify conversion */
+ /* Mark this string as an _HID/_CID string */
- BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer);
+ Op->Common.DisasmOpcode = ACPI_DASM_HID_STRING;
+ break;
- /* Create the 3 leading ASCII letters */
+ case AML_WORD_OP:
+ case AML_DWORD_OP:
- Prefix[0] = ((BigEndianId >> 26) & 0x1F) + 0x40;
- Prefix[1] = ((BigEndianId >> 21) & 0x1F) + 0x40;
- Prefix[2] = ((BigEndianId >> 16) & 0x1F) + 0x40;
+ /* Determine if a Word/Dword is a valid encoded EISAID */
- /* Verify that all 3 are ascii and alpha */
+ /* Swap from little-endian to big-endian to simplify conversion */
- for (i = 0; i < 3; i++)
- {
- if (!ACPI_IS_ASCII (Prefix[i]) ||
- !ACPI_IS_ALPHA (Prefix[i]))
+ BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer);
+
+ /* Create the 3 leading ASCII letters */
+
+ Prefix[0] = ((BigEndianId >> 26) & 0x1F) + 0x40;
+ Prefix[1] = ((BigEndianId >> 21) & 0x1F) + 0x40;
+ Prefix[2] = ((BigEndianId >> 16) & 0x1F) + 0x40;
+
+ /* Verify that all 3 are ascii and alpha */
+
+ for (i = 0; i < 3; i++)
{
- return;
+ if (!ACPI_IS_ASCII (Prefix[i]) ||
+ !ACPI_IS_ALPHA (Prefix[i]))
+ {
+ return;
+ }
}
- }
- /* OK - mark this node as convertable to an EISA ID */
+ /* Mark this node as convertable to an EISA ID string */
- Op->Common.DisasmOpcode = ACPI_DASM_EISAID;
+ Op->Common.DisasmOpcode = ACPI_DASM_EISAID;
+ break;
+
+ default:
+ break;
+ }
}
/*******************************************************************************
*
- * FUNCTION: AcpiDmIsEisaId
+ * FUNCTION: AcpiDmCheckForHardwareId
*
* PARAMETERS: Op - Op to be examined
*
* RETURN: None
*
- * DESCRIPTION: Determine if a Name() Op can be converted to an EisaId.
+ * DESCRIPTION: Determine if a Name() Op is a _HID/_CID.
*
******************************************************************************/
void
-AcpiDmIsEisaId (
+AcpiDmCheckForHardwareId (
ACPI_PARSE_OBJECT *Op)
{
UINT32 Name;
@@ -630,7 +818,7 @@ AcpiDmIsEisaId (
if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
{
- AcpiDmIsEisaIdElement (NextOp);
+ AcpiDmGetHardwareIdType (NextOp);
return;
}
@@ -645,20 +833,24 @@ AcpiDmIsEisaId (
if (NextOp->Common.AmlOpcode != AML_PACKAGE_OP)
{
- AcpiDmIsEisaIdElement (NextOp);
+ AcpiDmGetHardwareIdType (NextOp);
return;
}
- /* _CID with Package: get the package length */
+ /* _CID with Package: get the package length, check all elements */
NextOp = AcpiPsGetDepthNext (NULL, NextOp);
+ if (!NextOp)
+ {
+ return;
+ }
/* Don't need to use the length, just walk the peer list */
NextOp = NextOp->Common.Next;
while (NextOp)
{
- AcpiDmIsEisaIdElement (NextOp);
+ AcpiDmGetHardwareIdType (NextOp);
NextOp = NextOp->Common.Next;
}
}
@@ -666,41 +858,38 @@ AcpiDmIsEisaId (
/*******************************************************************************
*
- * FUNCTION: AcpiDmEisaId
+ * FUNCTION: AcpiDmDecompressEisaId
*
* PARAMETERS: EncodedId - Raw encoded EISA ID.
*
* RETURN: None
*
- * DESCRIPTION: Convert an encoded EISAID back to the original ASCII String.
+ * DESCRIPTION: Convert an encoded EISAID back to the original ASCII String
+ * and emit the correct ASL statement. If the ID is known, emit
+ * a description of the ID as a comment.
*
******************************************************************************/
void
-AcpiDmEisaId (
+AcpiDmDecompressEisaId (
UINT32 EncodedId)
{
- UINT32 BigEndianId;
-
-
- /* Swap from little-endian to big-endian to simplify conversion */
-
- BigEndianId = AcpiUtDwordByteSwap (EncodedId);
+ char IdBuffer[ACPI_EISAID_STRING_SIZE];
+ const AH_DEVICE_ID *Info;
- /* Split to form "AAANNNN" string */
+ /* Convert EISAID to a string an emit the statement */
- AcpiOsPrintf ("EisaId (\"%c%c%c%4.4X\")",
+ AcpiExEisaIdToString (IdBuffer, EncodedId);
+ AcpiOsPrintf ("EisaId (\"%s\")", IdBuffer);
- /* Three Alpha characters (AAA), 5 bits each */
+ /* If we know about the ID, emit the description */
- (int) ((BigEndianId >> 26) & 0x1F) + 0x40,
- (int) ((BigEndianId >> 21) & 0x1F) + 0x40,
- (int) ((BigEndianId >> 16) & 0x1F) + 0x40,
-
- /* Numeric part (NNNN) is simply the lower 16 bits */
-
- (UINT32) (BigEndianId & 0xFFFF));
+ Info = AcpiAhMatchHardwareId (IdBuffer);
+ if (Info)
+ {
+ AcpiOsPrintf (" /* %s */", Info->Description);
+ }
}
#endif
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c b/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c
index b047a6033cc0..9fa82b098a2b 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmnames.c b/sys/contrib/dev/acpica/components/disassembler/dmnames.c
index db7434d8b2f2..e0b8545d7334 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmnames.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/amlcode.h>
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmobject.c b/sys/contrib/dev/acpica/components/disassembler/dmobject.c
index 5541e5aa8f89..6df0ff51eef7 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmobject.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmobject.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acnamesp.h>
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
index 5435e136df15..e8f2c9752fdc 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,6 +46,8 @@
#include <contrib/dev/acpica/include/acparser.h>
#include <contrib/dev/acpica/include/amlcode.h>
#include <contrib/dev/acpica/include/acdisasm.h>
+#include <contrib/dev/acpica/include/acinterp.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
#ifdef ACPI_DISASSEMBLER
@@ -61,6 +63,159 @@ AcpiDmMatchKeyword (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDisplayTargetPathname
+ *
+ * PARAMETERS: Op - Parse object
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: For AML opcodes that have a target operand, display the full
+ * pathname for the target, in a comment field. Handles Return()
+ * statements also.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDisplayTargetPathname (
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *NextOp;
+ ACPI_PARSE_OBJECT *PrevOp = NULL;
+ char *Pathname;
+ const ACPI_OPCODE_INFO *OpInfo;
+
+
+ if (Op->Common.AmlOpcode == AML_RETURN_OP)
+ {
+ PrevOp = Op->Asl.Value.Arg;
+ }
+ else
+ {
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+ if (!(OpInfo->Flags & AML_HAS_TARGET))
+ {
+ return;
+ }
+
+ /* Target is the last Op in the arg list */
+
+ NextOp = Op->Asl.Value.Arg;
+ while (NextOp)
+ {
+ PrevOp = NextOp;
+ NextOp = PrevOp->Asl.Next;
+ }
+ }
+
+ if (!PrevOp)
+ {
+ return;
+ }
+
+ /* We must have a namepath AML opcode */
+
+ if (PrevOp->Asl.AmlOpcode != AML_INT_NAMEPATH_OP)
+ {
+ return;
+ }
+
+ /* A null string is the "no target specified" case */
+
+ if (!PrevOp->Asl.Value.String)
+ {
+ return;
+ }
+
+ /* No node means "unresolved external reference" */
+
+ if (!PrevOp->Asl.Node)
+ {
+ AcpiOsPrintf (" /* External reference */");
+ return;
+ }
+
+ /* Ignore if path is already from the root */
+
+ if (*PrevOp->Asl.Value.String == '\\')
+ {
+ return;
+ }
+
+ /* Now: we can get the full pathname */
+
+ Pathname = AcpiNsGetExternalPathname (PrevOp->Asl.Node);
+ if (!Pathname)
+ {
+ return;
+ }
+
+ AcpiOsPrintf (" /* %s */", Pathname);
+ ACPI_FREE (Pathname);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmNotifyDescription
+ *
+ * PARAMETERS: Op - Name() parse object
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Emit a description comment for the value associated with a
+ * Notify() operator.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmNotifyDescription (
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *NextOp;
+ ACPI_NAMESPACE_NODE *Node;
+ UINT8 NotifyValue;
+ UINT8 Type = ACPI_TYPE_ANY;
+
+
+ /* The notify value is the second argument */
+
+ NextOp = Op->Asl.Value.Arg;
+ NextOp = NextOp->Asl.Next;
+
+ switch (NextOp->Common.AmlOpcode)
+ {
+ case AML_ZERO_OP:
+ case AML_ONE_OP:
+
+ NotifyValue = (UINT8) NextOp->Common.AmlOpcode;
+ break;
+
+ case AML_BYTE_OP:
+
+ NotifyValue = (UINT8) NextOp->Asl.Value.Integer;
+ break;
+
+ default:
+ return;
+ }
+
+ /*
+ * Attempt to get the namespace node so we can determine the object type.
+ * Some notify values are dependent on the object type (Device, Thermal,
+ * or Processor).
+ */
+ Node = Op->Asl.Node;
+ if (Node)
+ {
+ Type = Node->Type;
+ }
+
+ AcpiOsPrintf (" // %s", AcpiUtGetNotifyName (NotifyValue, Type));
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmPredefinedDescription
*
* PARAMETERS: Op - Name() parse object
@@ -183,14 +338,11 @@ AcpiDmPredefinedDescription (
/* Match the name in the info table */
- for (Info = AslPredefinedInfo; Info->Name; Info++)
+ Info = AcpiAhMatchPredefinedName (NameString);
+ if (Info)
{
- if (ACPI_COMPARE_NAME (NameString, Info->Name))
- {
- AcpiOsPrintf (" // %4.4s: %s",
- NameString, ACPI_CAST_PTR (char, Info->Description));
- return;
- }
+ AcpiOsPrintf (" // %4.4s: %s",
+ NameString, ACPI_CAST_PTR (char, Info->Description));
}
#endif
@@ -267,14 +419,11 @@ AcpiDmFieldPredefinedDescription (
/* Match the name in the info table */
- for (Info = AslPredefinedInfo; Info->Name; Info++)
+ Info = AcpiAhMatchPredefinedName (Tag);
+ if (Info)
{
- if (ACPI_COMPARE_NAME (Tag, Info->Name))
- {
- AcpiOsPrintf (" // %4.4s: %s", Tag,
- ACPI_CAST_PTR (char, Info->Description));
- return;
- }
+ AcpiOsPrintf (" // %4.4s: %s", Tag,
+ ACPI_CAST_PTR (char, Info->Description));
}
#endif
@@ -527,6 +676,7 @@ AcpiDmDisassembleOneOp (
ACPI_PARSE_OBJECT *Child;
ACPI_STATUS Status;
UINT8 *Aml;
+ const AH_DEVICE_ID *IdInfo;
if (!Op)
@@ -605,7 +755,7 @@ AcpiDmDisassembleOneOp (
if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
{
- AcpiDmEisaId ((UINT32) Op->Common.Value.Integer);
+ AcpiDmDecompressEisaId ((UINT32) Op->Common.Value.Integer);
}
else
{
@@ -617,7 +767,7 @@ AcpiDmDisassembleOneOp (
if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
{
- AcpiDmEisaId ((UINT32) Op->Common.Value.Integer);
+ AcpiDmDecompressEisaId ((UINT32) Op->Common.Value.Integer);
}
else
{
@@ -634,6 +784,19 @@ AcpiDmDisassembleOneOp (
case AML_STRING_OP:
AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT16_MAX);
+
+ /* For _HID/_CID strings, attempt to output a descriptive comment */
+
+ if (Op->Common.DisasmOpcode == ACPI_DASM_HID_STRING)
+ {
+ /* If we know about the ID, emit the description */
+
+ IdInfo = AcpiAhMatchHardwareId (Op->Common.Value.String);
+ if (IdInfo)
+ {
+ AcpiOsPrintf (" /* %s */", IdInfo->Description);
+ }
+ }
break;
case AML_BUFFER_OP:
@@ -664,7 +827,12 @@ AcpiDmDisassembleOneOp (
}
}
- if (AcpiDmIsUnicodeBuffer (Op))
+ if (AcpiDmIsUuidBuffer (Op))
+ {
+ Op->Common.DisasmOpcode = ACPI_DASM_UUID;
+ AcpiOsPrintf ("ToUUID (");
+ }
+ else if (AcpiDmIsUnicodeBuffer (Op))
{
Op->Common.DisasmOpcode = ACPI_DASM_UNICODE;
AcpiOsPrintf ("Unicode (");
@@ -765,7 +933,9 @@ AcpiDmDisassembleOneOp (
Length = (UINT32) Child->Common.Value.Integer;
Info->Level += 1;
+ Info->MappingOp = Op;
Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
+
AcpiDmResourceTemplate (Info, Op->Common.Parent, Aml, Length);
Info->Level -= 1;
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrc.c b/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
index 6cdd07b1b771..04a6fbb02a5d 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/amlcode.h>
@@ -260,6 +259,11 @@ AcpiDmResourceTemplate (
ACPI_NAMESPACE_NODE *Node;
+ if (Op->Asl.AmlOpcode != AML_FIELD_OP)
+ {
+ Info->MappingOp = Op;
+ }
+
Level = Info->Level;
ResourceName = ACPI_DEFAULT_RESNAME;
Node = Op->Common.Node;
@@ -328,7 +332,7 @@ AcpiDmResourceTemplate (
/* Go ahead and insert EndDependentFn() */
- AcpiDmEndDependentDescriptor (Aml, ResourceLength, Level);
+ AcpiDmEndDependentDescriptor (Info, Aml, ResourceLength, Level);
AcpiDmIndent (Level);
AcpiOsPrintf (
@@ -350,7 +354,7 @@ AcpiDmResourceTemplate (
}
AcpiGbl_DmResourceDispatch [ResourceIndex] (
- Aml, ResourceLength, Level);
+ Info, Aml, ResourceLength, Level);
/* Descriptor post-processing */
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
index 792ae808d710..a6c38a8d169a 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdisasm.h>
@@ -576,7 +575,8 @@ AcpiDmResourceSource (
*
* FUNCTION: AcpiDmWordDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -588,6 +588,7 @@ AcpiDmResourceSource (
void
AcpiDmWordDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -621,7 +622,8 @@ AcpiDmWordDescriptor (
*
* FUNCTION: AcpiDmDwordDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -633,6 +635,7 @@ AcpiDmWordDescriptor (
void
AcpiDmDwordDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -666,7 +669,8 @@ AcpiDmDwordDescriptor (
*
* FUNCTION: AcpiDmQwordDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -678,6 +682,7 @@ AcpiDmDwordDescriptor (
void
AcpiDmQwordDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -711,7 +716,8 @@ AcpiDmQwordDescriptor (
*
* FUNCTION: AcpiDmExtendedDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -723,6 +729,7 @@ AcpiDmQwordDescriptor (
void
AcpiDmExtendedDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -758,7 +765,8 @@ AcpiDmExtendedDescriptor (
*
* FUNCTION: AcpiDmMemory24Descriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -770,6 +778,7 @@ AcpiDmExtendedDescriptor (
void
AcpiDmMemory24Descriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -797,7 +806,8 @@ AcpiDmMemory24Descriptor (
*
* FUNCTION: AcpiDmMemory32Descriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -809,6 +819,7 @@ AcpiDmMemory24Descriptor (
void
AcpiDmMemory32Descriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -836,7 +847,8 @@ AcpiDmMemory32Descriptor (
*
* FUNCTION: AcpiDmFixedMemory32Descriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -848,6 +860,7 @@ AcpiDmMemory32Descriptor (
void
AcpiDmFixedMemory32Descriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -877,7 +890,8 @@ AcpiDmFixedMemory32Descriptor (
*
* FUNCTION: AcpiDmGenericRegisterDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -889,6 +903,7 @@ AcpiDmFixedMemory32Descriptor (
void
AcpiDmGenericRegisterDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -933,7 +948,8 @@ AcpiDmGenericRegisterDescriptor (
*
* FUNCTION: AcpiDmInterruptDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -945,6 +961,7 @@ AcpiDmGenericRegisterDescriptor (
void
AcpiDmInterruptDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -1039,7 +1056,8 @@ AcpiDmVendorCommon (
*
* FUNCTION: AcpiDmVendorLargeDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -1051,6 +1069,7 @@ AcpiDmVendorCommon (
void
AcpiDmVendorLargeDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
index f938f93070d9..452cde04b7be 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdisasm.h>
@@ -56,24 +55,28 @@
static void
AcpiDmI2cSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmSpiSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmUartSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level);
static void
AcpiDmGpioCommon (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Level);
@@ -168,7 +171,8 @@ Finish:
*
* FUNCTION: AcpiDmGpioCommon
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Level - Current source code indentation level
*
* RETURN: None
@@ -179,12 +183,14 @@ Finish:
static void
AcpiDmGpioCommon (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Level)
{
- UINT32 PinCount;
UINT16 *PinList;
UINT8 *VendorData;
+ char *DeviceName = NULL;
+ UINT32 PinCount;
UINT32 i;
@@ -193,9 +199,8 @@ AcpiDmGpioCommon (
AcpiDmIndent (Level + 1);
if (Resource->Gpio.ResSourceOffset)
{
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
}
AcpiOsPrintf (", ");
@@ -243,6 +248,10 @@ AcpiDmGpioCommon (
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("}\n");
+
+#ifndef _KERNEL
+ MpSaveGpioInfo (Info->MappingOp, Resource, PinCount, PinList, DeviceName);
+#endif
}
@@ -250,7 +259,8 @@ AcpiDmGpioCommon (
*
* FUNCTION: AcpiDmGpioIntDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -262,6 +272,7 @@ AcpiDmGpioCommon (
static void
AcpiDmGpioIntDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -274,7 +285,7 @@ AcpiDmGpioIntDescriptor (
AcpiDmIndent (Level);
AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.IntFlags)],
- AcpiGbl_LlDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->Gpio.IntFlags, 1)],
+ AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 1)],
AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
/* PinConfig, DebounceTimeout */
@@ -292,7 +303,7 @@ AcpiDmGpioIntDescriptor (
/* Dump the GpioInt/GpioIo common portion of the descriptor */
- AcpiDmGpioCommon (Resource, Level);
+ AcpiDmGpioCommon (Info, Resource, Level);
}
@@ -300,7 +311,8 @@ AcpiDmGpioIntDescriptor (
*
* FUNCTION: AcpiDmGpioIoDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -312,6 +324,7 @@ AcpiDmGpioIntDescriptor (
static void
AcpiDmGpioIoDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -344,7 +357,7 @@ AcpiDmGpioIoDescriptor (
/* Dump the GpioInt/GpioIo common portion of the descriptor */
- AcpiDmGpioCommon (Resource, Level);
+ AcpiDmGpioCommon (Info, Resource, Level);
}
@@ -352,7 +365,8 @@ AcpiDmGpioIoDescriptor (
*
* FUNCTION: AcpiDmGpioDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -364,6 +378,7 @@ AcpiDmGpioIoDescriptor (
void
AcpiDmGpioDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -377,12 +392,12 @@ AcpiDmGpioDescriptor (
{
case AML_RESOURCE_GPIO_TYPE_INT:
- AcpiDmGpioIntDescriptor (Resource, Length, Level);
+ AcpiDmGpioIntDescriptor (Info, Resource, Length, Level);
break;
case AML_RESOURCE_GPIO_TYPE_IO:
- AcpiDmGpioIoDescriptor (Resource, Length, Level);
+ AcpiDmGpioIoDescriptor (Info, Resource, Length, Level);
break;
default:
@@ -460,7 +475,8 @@ AcpiDmDumpSerialBusVendorData (
*
* FUNCTION: AcpiDmI2cSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -472,11 +488,13 @@ AcpiDmDumpSerialBusVendorData (
static void
AcpiDmI2cSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
+ char *DeviceName;
/* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
@@ -496,9 +514,8 @@ AcpiDmI2cSerialBusDescriptor (
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
/* ResourceSourceIndex, ResourceUsage */
@@ -519,6 +536,10 @@ AcpiDmI2cSerialBusDescriptor (
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
+
+#ifndef _KERNEL
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
+#endif
}
@@ -526,7 +547,8 @@ AcpiDmI2cSerialBusDescriptor (
*
* FUNCTION: AcpiDmSpiSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -538,11 +560,13 @@ AcpiDmI2cSerialBusDescriptor (
static void
AcpiDmSpiSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
+ char *DeviceName;
/* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
@@ -571,9 +595,8 @@ AcpiDmSpiSerialBusDescriptor (
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
/* ResourceSourceIndex, ResourceUsage */
@@ -594,6 +617,10 @@ AcpiDmSpiSerialBusDescriptor (
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
+
+#ifndef _KERNEL
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
+#endif
}
@@ -601,7 +628,8 @@ AcpiDmSpiSerialBusDescriptor (
*
* FUNCTION: AcpiDmUartSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -613,11 +641,13 @@ AcpiDmSpiSerialBusDescriptor (
static void
AcpiDmUartSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
UINT32 ResourceSourceOffset;
+ char *DeviceName;
/* ConnectionSpeed, BitsPerByte, StopBits */
@@ -649,9 +679,8 @@ AcpiDmUartSerialBusDescriptor (
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Resource->CommonSerialBus.TypeDataLength;
- AcpiUtPrintString (
- ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
- ACPI_UINT16_MAX);
+ DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
+ AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
/* ResourceSourceIndex, ResourceUsage */
@@ -672,6 +701,10 @@ AcpiDmUartSerialBusDescriptor (
AcpiDmIndent (Level + 1);
AcpiDmDumpSerialBusVendorData (Resource, Level);
AcpiOsPrintf (")\n");
+
+#ifndef _KERNEL
+ MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
+#endif
}
@@ -679,7 +712,8 @@ AcpiDmUartSerialBusDescriptor (
*
* FUNCTION: AcpiDmSerialBusDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -691,13 +725,14 @@ AcpiDmUartSerialBusDescriptor (
void
AcpiDmSerialBusDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
- Resource, Length, Level);
+ Info, Resource, Length, Level);
}
#endif
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c
index 778d6638bba6..549c3d6b33da 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdisasm.h>
@@ -57,7 +56,8 @@
*
* FUNCTION: AcpiDmIrqDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -69,6 +69,7 @@
void
AcpiDmIrqDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -102,7 +103,8 @@ AcpiDmIrqDescriptor (
*
* FUNCTION: AcpiDmDmaDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -114,6 +116,7 @@ AcpiDmIrqDescriptor (
void
AcpiDmDmaDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -139,7 +142,8 @@ AcpiDmDmaDescriptor (
*
* FUNCTION: AcpiDmFixedDmaDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -151,6 +155,7 @@ AcpiDmDmaDescriptor (
void
AcpiDmFixedDmaDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -182,7 +187,8 @@ AcpiDmFixedDmaDescriptor (
*
* FUNCTION: AcpiDmIoDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -194,6 +200,7 @@ AcpiDmFixedDmaDescriptor (
void
AcpiDmIoDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -227,7 +234,8 @@ AcpiDmIoDescriptor (
*
* FUNCTION: AcpiDmFixedIoDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -239,6 +247,7 @@ AcpiDmIoDescriptor (
void
AcpiDmFixedIoDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -265,7 +274,8 @@ AcpiDmFixedIoDescriptor (
*
* FUNCTION: AcpiDmStartDependentDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -277,6 +287,7 @@ AcpiDmFixedIoDescriptor (
void
AcpiDmStartDependentDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -304,7 +315,8 @@ AcpiDmStartDependentDescriptor (
*
* FUNCTION: AcpiDmEndDependentDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -316,6 +328,7 @@ AcpiDmStartDependentDescriptor (
void
AcpiDmEndDependentDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
@@ -332,7 +345,8 @@ AcpiDmEndDependentDescriptor (
*
* FUNCTION: AcpiDmVendorSmallDescriptor
*
- * PARAMETERS: Resource - Pointer to the resource descriptor
+ * PARAMETERS: Info - Extra resource info
+ * Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
@@ -344,6 +358,7 @@ AcpiDmEndDependentDescriptor (
void
AcpiDmVendorSmallDescriptor (
+ ACPI_OP_WALK_INFO *Info,
AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmutils.c b/sys/contrib/dev/acpica/components/disassembler/dmutils.c
index 5d35d8359865..bb9ef73c917f 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmutils.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/amlcode.h>
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmwalk.c b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
index 5a3fbc65658c..8021a9731864 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
@@ -285,7 +284,8 @@ AcpiDmBlockType (
case AML_BUFFER_OP:
- if (Op->Common.DisasmOpcode == ACPI_DASM_UNICODE)
+ if ((Op->Common.DisasmOpcode == ACPI_DASM_UNICODE) ||
+ (Op->Common.DisasmOpcode == ACPI_DASM_UUID))
{
return (BLOCK_NONE);
}
@@ -568,7 +568,7 @@ AcpiDmDescendingOp (
/* Check for _HID and related EISAID() */
- AcpiDmIsEisaId (Op);
+ AcpiDmCheckForHardwareId (Op);
AcpiOsPrintf (", ");
break;
@@ -842,6 +842,15 @@ AcpiDmAscendingOp (
AcpiDmFieldPredefinedDescription (Op);
}
+ /* Decode Notify() values */
+
+ if (Op->Common.AmlOpcode == AML_NOTIFY_OP)
+ {
+ AcpiDmNotifyDescription (Op);
+ }
+
+ AcpiDmDisplayTargetPathname (Op);
+
/* Could be a nested operator, check if comma required */
if (!AcpiDmCommaIfListMember (Op))
@@ -949,6 +958,13 @@ AcpiDmAscendingOp (
}
/*
+ * The parent Op is guaranteed to be valid because of the flag
+ * ACPI_PARSEOP_PARAMLIST -- which means that this op is part of
+ * a parameter list and thus has a valid parent.
+ */
+ ParentOp = Op->Common.Parent;
+
+ /*
* Just completed a parameter node for something like "Buffer (param)".
* Close the paren and open up the term list block with a brace
*/
@@ -956,25 +972,24 @@ AcpiDmAscendingOp (
{
AcpiOsPrintf (")");
- /* Emit description comment for Name() with a predefined ACPI name */
-
- ParentOp = Op->Common.Parent;
- if (ParentOp)
+ /*
+ * Emit a description comment for a Name() operator that is a
+ * predefined ACPI name. Must check the grandparent.
+ */
+ ParentOp = ParentOp->Common.Parent;
+ if (ParentOp &&
+ (ParentOp->Asl.AmlOpcode == AML_NAME_OP))
{
- ParentOp = ParentOp->Common.Parent;
- if (ParentOp && ParentOp->Asl.AmlOpcode == AML_NAME_OP)
- {
- AcpiDmPredefinedDescription (ParentOp);
- }
+ AcpiDmPredefinedDescription (ParentOp);
}
+
AcpiOsPrintf ("\n");
AcpiDmIndent (Level - 1);
AcpiOsPrintf ("{\n");
}
else
{
- Op->Common.Parent->Common.DisasmFlags |=
- ACPI_PARSEOP_EMPTY_TERMLIST;
+ ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST;
AcpiOsPrintf (") {");
}
}