summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c54
1 files changed, 28 insertions, 26 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c
index e39061f8e2..ff09f3ca7f 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c
@@ -15,11 +15,11 @@
#include "AcpiTableParser.h"
// Local variables
-STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
+STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
/** An ACPI_PARSER array describing the ACPI XSDT table.
*/
-STATIC CONST ACPI_PARSER XsdtParser[] = {
+STATIC CONST ACPI_PARSER XsdtParser[] = {
PARSE_ACPI_HEADER (&AcpiHdrInfo)
};
@@ -30,7 +30,7 @@ CONST ACPI_DESCRIPTION_HEADER_INFO *
EFIAPI
GetAcpiXsdtHeaderInfo (
VOID
-)
+ )
{
return &AcpiHdrInfo;
}
@@ -48,17 +48,17 @@ GetAcpiXsdtHeaderInfo (
VOID
EFIAPI
ParseAcpiXsdt (
- IN BOOLEAN Trace,
- IN UINT8* Ptr,
- IN UINT32 AcpiTableLength,
- IN UINT8 AcpiTableRevision
+ IN BOOLEAN Trace,
+ IN UINT8 *Ptr,
+ IN UINT32 AcpiTableLength,
+ IN UINT8 AcpiTableRevision
)
{
- UINT32 Offset;
- UINT32 TableOffset;
- UINT64* TablePointer;
- UINTN EntryIndex;
- CHAR16 Buffer[32];
+ UINT32 Offset;
+ UINT32 TableOffset;
+ UINT64 *TablePointer;
+ UINTN EntryIndex;
+ CHAR16 Buffer[32];
Offset = ParseAcpi (
Trace,
@@ -72,24 +72,24 @@ ParseAcpiXsdt (
TableOffset = Offset;
if (Trace) {
- EntryIndex = 0;
- TablePointer = (UINT64*)(Ptr + TableOffset);
+ EntryIndex = 0;
+ TablePointer = (UINT64 *)(Ptr + TableOffset);
while (Offset < AcpiTableLength) {
- CONST UINT32* Signature;
- CONST UINT32* Length;
- CONST UINT8* Revision;
+ CONST UINT32 *Signature;
+ CONST UINT32 *Length;
+ CONST UINT8 *Revision;
- if ((UINT64*)(UINTN)(*TablePointer) != NULL) {
- UINT8* SignaturePtr;
+ if ((UINT64 *)(UINTN)(*TablePointer) != NULL) {
+ UINT8 *SignaturePtr;
ParseAcpiHeader (
- (UINT8*)(UINTN)(*TablePointer),
+ (UINT8 *)(UINTN)(*TablePointer),
&Signature,
&Length,
&Revision
);
- SignaturePtr = (UINT8*)Signature;
+ SignaturePtr = (UINT8 *)Signature;
UnicodeSPrint (
Buffer,
@@ -114,7 +114,7 @@ ParseAcpiXsdt (
Print (L"0x%lx\n", *TablePointer);
// Validate the table pointers are not NULL
- if ((UINT64*)(UINTN)(*TablePointer) == NULL) {
+ if ((UINT64 *)(UINTN)(*TablePointer) == NULL) {
IncrementErrorCount ();
Print (
L"ERROR: Invalid table entry at 0x%lx, table address is 0x%lx\n",
@@ -122,18 +122,20 @@ ParseAcpiXsdt (
*TablePointer
);
}
+
Offset += sizeof (UINT64);
TablePointer++;
} // while
}
// Process the tables
- Offset = TableOffset;
- TablePointer = (UINT64*)(Ptr + TableOffset);
+ Offset = TableOffset;
+ TablePointer = (UINT64 *)(Ptr + TableOffset);
while (Offset < AcpiTableLength) {
- if ((UINT64*)(UINTN)(*TablePointer) != NULL) {
- ProcessAcpiTable ((UINT8*)(UINTN)(*TablePointer));
+ if ((UINT64 *)(UINTN)(*TablePointer) != NULL) {
+ ProcessAcpiTable ((UINT8 *)(UINTN)(*TablePointer));
}
+
Offset += sizeof (UINT64);
TablePointer++;
} // while