summaryrefslogtreecommitdiff
path: root/source/components/disassembler
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/disassembler')
-rw-r--r--source/components/disassembler/dmbuffer.c84
-rw-r--r--source/components/disassembler/dmopcode.c4
-rw-r--r--source/components/disassembler/dmresrc.c8
-rw-r--r--source/components/disassembler/dmresrcl.c6
-rw-r--r--source/components/disassembler/dmutils.c2
5 files changed, 32 insertions, 72 deletions
diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c
index f8fdbaa5dd35..79c37e2e3ea8 100644
--- a/source/components/disassembler/dmbuffer.c
+++ b/source/components/disassembler/dmbuffer.c
@@ -73,53 +73,13 @@ AcpiDmPldBuffer (
UINT8 *ByteData,
UINT32 ByteCount);
+static const char *
+AcpiDmFindNameByIndex (
+ UINT64 Index,
+ const char **List);
-#define ACPI_BUFFER_BYTES_PER_LINE 8
-
-
-/* Strings for ToPld */
-
-static char *DmPanelList[] =
-{
- "TOP",
- "BOTTOM",
- "LEFT",
- "RIGHT",
- "FRONT",
- "BACK",
- "UNKNOWN",
- NULL
-};
-
-static char *DmVerticalPositionList[] =
-{
- "UPPER",
- "CENTER",
- "LOWER",
- NULL
-};
-
-static char *DmHorizontalPositionList[] =
-{
- "LEFT",
- "CENTER",
- "RIGHT",
- NULL
-};
-static char *DmShapeList[] =
-{
- "ROUND",
- "OVAL",
- "SQUARE",
- "VERTICALRECTANGLE",
- "HORIZONTALRECTANGLE",
- "VERTICALTRAPEZOID",
- "HORIZONTALTRAPEZOID",
- "UNKNOWN",
- "CHAMFERED",
- NULL
-};
+#define ACPI_BUFFER_BYTES_PER_LINE 8
/*******************************************************************************
@@ -653,24 +613,24 @@ AcpiDmIsPldBuffer (
*
******************************************************************************/
-static char *
+static const char *
AcpiDmFindNameByIndex (
UINT64 Index,
- char **List)
+ const char **List)
{
- char *Str;
- UINT32 i;
+ const char *NameString;
+ UINT32 i;
/* Bounds check */
- Str = List[0];
+ NameString = List[0];
i = 0;
- while(Str)
+ while (NameString)
{
i++;
- Str = List[i];
+ NameString = List[i];
}
if (Index >= i)
@@ -698,12 +658,12 @@ AcpiDmFindNameByIndex (
*
******************************************************************************/
-#define ACPI_PLD_OUTPUT08 "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT08P "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16 "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16P "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT24 "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUTSTR "%*.s%-18s = \"%s\",\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08 "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08P "%*.s%-22s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16 "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16P "%*.s%-22s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT24 "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUTSTR "%*.s%-22s = \"%s\",\n", ACPI_MUL_4 (Level), " "
static void
AcpiDmPldBuffer (
@@ -751,16 +711,16 @@ AcpiDmPldBuffer (
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Dock", PldInfo->Dock);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Lid", PldInfo->Lid);
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Panel",
- AcpiDmFindNameByIndex(PldInfo->Panel, DmPanelList));
+ AcpiDmFindNameByIndex(PldInfo->Panel, AcpiGbl_PldPanelList));
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_VerticalPosition",
- AcpiDmFindNameByIndex(PldInfo->VerticalPosition, DmVerticalPositionList));
+ AcpiDmFindNameByIndex(PldInfo->VerticalPosition, AcpiGbl_PldVerticalPositionList));
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_HorizontalPosition",
- AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, DmHorizontalPositionList));
+ AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, AcpiGbl_PldHorizontalPositionList));
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Shape",
- AcpiDmFindNameByIndex(PldInfo->Shape, DmShapeList));
+ AcpiDmFindNameByIndex(PldInfo->Shape, AcpiGbl_PldShapeList));
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupOrientation", PldInfo->GroupOrientation);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupToken", PldInfo->GroupToken);
diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c
index 20d7ce5fc611..8f163ca7e5e2 100644
--- a/source/components/disassembler/dmopcode.c
+++ b/source/components/disassembler/dmopcode.c
@@ -646,8 +646,8 @@ AcpiDmMatchKeyword (
}
else
{
- AcpiOsPrintf ("%s", ACPI_CAST_PTR (char,
- AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]));
+ AcpiOsPrintf ("%s",
+ AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]);
}
}
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index 8bfab9904561..a486f1d89208 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -145,7 +145,7 @@ AcpiDmDescriptorName (
void
AcpiDmDumpInteger8 (
UINT8 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%2.2X, // %s\n", Value, Name);
}
@@ -153,7 +153,7 @@ AcpiDmDumpInteger8 (
void
AcpiDmDumpInteger16 (
UINT16 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%4.4X, // %s\n", Value, Name);
}
@@ -161,7 +161,7 @@ AcpiDmDumpInteger16 (
void
AcpiDmDumpInteger32 (
UINT32 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%8.8X, // %s\n", Value, Name);
}
@@ -169,7 +169,7 @@ AcpiDmDumpInteger32 (
void
AcpiDmDumpInteger64 (
UINT64 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n", ACPI_FORMAT_UINT64 (Value), Name);
}
diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c
index 89071c649c76..52fd3356b8d8 100644
--- a/source/components/disassembler/dmresrcl.c
+++ b/source/components/disassembler/dmresrcl.c
@@ -52,7 +52,7 @@
/* Common names for address and memory descriptors */
-static char *AcpiDmAddressNames[] =
+static const char *AcpiDmAddressNames[] =
{
"Granularity",
"Range Minimum",
@@ -61,7 +61,7 @@ static char *AcpiDmAddressNames[] =
"Length"
};
-static char *AcpiDmMemoryNames[] =
+static const char *AcpiDmMemoryNames[] =
{
"Range Minimum",
"Range Maximum",
@@ -1028,7 +1028,7 @@ AcpiDmInterruptDescriptor (
void
AcpiDmVendorCommon (
- char *Name,
+ const char *Name,
UINT8 *ByteData,
UINT32 Length,
UINT32 Level)
diff --git a/source/components/disassembler/dmutils.c b/source/components/disassembler/dmutils.c
index 9e2371b85b91..2a82e1e3f439 100644
--- a/source/components/disassembler/dmutils.c
+++ b/source/components/disassembler/dmutils.c
@@ -227,7 +227,7 @@ AcpiDmIndent (
return;
}
- AcpiOsPrintf ("%*.s", ACPI_MUL_4 (Level), " ");
+ AcpiOsPrintf ("%*.s", (Level * 4), " ");
}