diff options
Diffstat (limited to 'sys/contrib/dev/acpica/components/resources/rsdump.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/resources/rsdump.c | 64 |
1 files changed, 30 insertions, 34 deletions
diff --git a/sys/contrib/dev/acpica/components/resources/rsdump.c b/sys/contrib/dev/acpica/components/resources/rsdump.c index 9c1a7ec..8699730 100644 --- a/sys/contrib/dev/acpica/components/resources/rsdump.c +++ b/sys/contrib/dev/acpica/components/resources/rsdump.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,38 +51,37 @@ /* * All functions in this module are used by the AML Debugger only */ -#if defined(ACPI_DEBUGGER) /* Local prototypes */ static void AcpiRsOutString ( - char *Title, - char *Value); + const char *Title, + const char *Value); static void AcpiRsOutInteger8 ( - char *Title, + const char *Title, UINT8 Value); static void AcpiRsOutInteger16 ( - char *Title, + const char *Title, UINT16 Value); static void AcpiRsOutInteger32 ( - char *Title, + const char *Title, UINT32 Value); static void AcpiRsOutInteger64 ( - char *Title, + const char *Title, UINT64 Value); static void AcpiRsOutTitle ( - char *Title); + const char *Title); static void AcpiRsDumpByteList ( @@ -264,8 +263,8 @@ AcpiRsDumpDescriptor ( { UINT8 *Target = NULL; UINT8 *PreviousTarget; - char *Name; - UINT8 Count; + const char *Name; + UINT8 Count; /* First table entry must contain the table length (# of table entries) */ @@ -308,8 +307,7 @@ AcpiRsDumpDescriptor ( if (Table->Pointer) { - AcpiRsOutString (Name, ACPI_CAST_PTR (char, - Table->Pointer [*Target])); + AcpiRsOutString (Name, Table->Pointer [*Target]); } else { @@ -336,20 +334,17 @@ AcpiRsDumpDescriptor ( case ACPI_RSD_1BITFLAG: - AcpiRsOutString (Name, ACPI_CAST_PTR (char, - Table->Pointer [*Target & 0x01])); + AcpiRsOutString (Name, Table->Pointer [*Target & 0x01]); break; case ACPI_RSD_2BITFLAG: - AcpiRsOutString (Name, ACPI_CAST_PTR (char, - Table->Pointer [*Target & 0x03])); + AcpiRsOutString (Name, Table->Pointer [*Target & 0x03]); break; case ACPI_RSD_3BITFLAG: - AcpiRsOutString (Name, ACPI_CAST_PTR (char, - Table->Pointer [*Target & 0x07])); + AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]); break; case ACPI_RSD_SHORTLIST: @@ -543,9 +538,10 @@ AcpiRsDumpAddressCommon ( static void AcpiRsOutString ( - char *Title, - char *Value) + const char *Title, + const char *Value) { + AcpiOsPrintf ("%27s : %s", Title, Value); if (!*Value) { @@ -556,7 +552,7 @@ AcpiRsOutString ( static void AcpiRsOutInteger8 ( - char *Title, + const char *Title, UINT8 Value) { AcpiOsPrintf ("%27s : %2.2X\n", Title, Value); @@ -564,33 +560,37 @@ AcpiRsOutInteger8 ( static void AcpiRsOutInteger16 ( - char *Title, + const char *Title, UINT16 Value) { + AcpiOsPrintf ("%27s : %4.4X\n", Title, Value); } static void AcpiRsOutInteger32 ( - char *Title, + const char *Title, UINT32 Value) { + AcpiOsPrintf ("%27s : %8.8X\n", Title, Value); } static void AcpiRsOutInteger64 ( - char *Title, + const char *Title, UINT64 Value) { + AcpiOsPrintf ("%27s : %8.8X%8.8X\n", Title, ACPI_FORMAT_UINT64 (Value)); } static void AcpiRsOutTitle ( - char *Title) + const char *Title) { + AcpiOsPrintf ("%27s : ", Title); } @@ -618,8 +618,7 @@ AcpiRsDumpByteList ( for (i = 0; i < Length; i++) { - AcpiOsPrintf ("%25s%2.2X : %2.2X\n", - "Byte", i, Data[i]); + AcpiOsPrintf ("%25s%2.2X : %2.2X\n", "Byte", i, Data[i]); } } @@ -635,6 +634,7 @@ AcpiRsDumpShortByteList ( { AcpiOsPrintf ("%X ", Data[i]); } + AcpiOsPrintf ("\n"); } @@ -648,8 +648,7 @@ AcpiRsDumpDwordList ( for (i = 0; i < Length; i++) { - AcpiOsPrintf ("%25s%2.2X : %8.8X\n", - "Dword", i, Data[i]); + AcpiOsPrintf ("%25s%2.2X : %8.8X\n", "Dword", i, Data[i]); } } @@ -663,9 +662,6 @@ AcpiRsDumpWordList ( for (i = 0; i < Length; i++) { - AcpiOsPrintf ("%25s%2.2X : %4.4X\n", - "Word", i, Data[i]); + AcpiOsPrintf ("%25s%2.2X : %4.4X\n", "Word", i, Data[i]); } } - -#endif |