summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/dmbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/dmbuffer.c')
-rw-r--r--sys/contrib/dev/acpica/dmbuffer.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/sys/contrib/dev/acpica/dmbuffer.c b/sys/contrib/dev/acpica/dmbuffer.c
index cd6f1f0..5540220 100644
--- a/sys/contrib/dev/acpica/dmbuffer.c
+++ b/sys/contrib/dev/acpica/dmbuffer.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmbuffer - AML disassembler, buffer and string support
- * $Revision: 1.19 $
+ * $Revision: 1.25 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -143,7 +143,8 @@ AcpiDmUnicode (
*
* RETURN: None
*
- * DESCRIPTION: Dump an AML "ByteList" in Hex format
+ * DESCRIPTION: Dump an AML "ByteList" in Hex format. 8 bytes per line, prefixed
+ * with the hex buffer offset.
*
******************************************************************************/
@@ -156,12 +157,31 @@ AcpiDmDisasmByteList (
UINT32 i;
- AcpiDmIndent (Level);
+ if (!ByteCount)
+ {
+ return;
+ }
/* Dump the byte list */
for (i = 0; i < ByteCount; i++)
{
+ /* New line every 8 bytes */
+
+ if (((i % 8) == 0) && (i < ByteCount))
+ {
+ if (i > 0)
+ {
+ AcpiOsPrintf ("\n");
+ }
+
+ AcpiDmIndent (Level);
+ if (ByteCount > 7)
+ {
+ AcpiOsPrintf ("/* %04X */ ", i);
+ }
+ }
+
AcpiOsPrintf ("0x%2.2X", (UINT32) ByteData[i]);
/* Add comma if there are more bytes to display */
@@ -170,14 +190,6 @@ AcpiDmDisasmByteList (
{
AcpiOsPrintf (", ");
}
-
- /* New line every 8 bytes */
-
- if ((((i+1) % 8) == 0) && ((i+1) < ByteCount))
- {
- AcpiOsPrintf ("\n");
- AcpiDmIndent (Level);
- }
}
if (Level)
@@ -221,7 +233,7 @@ AcpiDmByteList (
{
case ACPI_DASM_RESOURCE:
- AcpiDmResourceTemplate (Info, ByteData, ByteCount);
+ AcpiDmResourceTemplate (Info, Op->Common.Parent, ByteData, ByteCount);
break;
case ACPI_DASM_STRING:
@@ -460,7 +472,7 @@ AcpiDmIsEisaId (
/* We are looking for _HID */
- if (ACPI_STRNCMP ((char *) &Name, METHOD_NAME__HID, 4))
+ if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
{
return;
}
OpenPOWER on IntegriCloud