summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c79
1 files changed, 41 insertions, 38 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
index 3b06b05dee..e5267b1d04 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
@@ -16,7 +16,7 @@
#include "AcpiTableParser.h"
// Local variables
-STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
+STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
/**
This function validates the Interrupt Type.
@@ -29,24 +29,26 @@ STATIC
VOID
EFIAPI
ValidateInterruptType (
- IN UINT8* Ptr,
- IN VOID* Context
+ IN UINT8 *Ptr,
+ IN VOID *Context
)
{
-#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
- UINT8 InterruptType;
+ #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
+ UINT8 InterruptType;
InterruptType = *Ptr;
if (InterruptType !=
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC) {
+ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC)
+ {
IncrementErrorCount ();
Print (
L"\nERROR: InterruptType = %d. This must be 8 on ARM Platforms",
InterruptType
);
}
-#endif
+
+ #endif
}
/**
@@ -60,12 +62,12 @@ STATIC
VOID
EFIAPI
ValidateIrq (
- IN UINT8* Ptr,
- IN VOID* Context
+ IN UINT8 *Ptr,
+ IN VOID *Context
)
{
-#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
- UINT8 Irq;
+ #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
+ UINT8 Irq;
Irq = *Ptr;
@@ -76,35 +78,36 @@ ValidateIrq (
Irq
);
}
-#endif
+
+ #endif
}
/**
An ACPI_PARSER array describing the ACPI SPCR Table.
**/
-STATIC CONST ACPI_PARSER SpcrParser[] = {
+STATIC CONST ACPI_PARSER SpcrParser[] = {
PARSE_ACPI_HEADER (&AcpiHdrInfo),
- {L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},
- {L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},
- {L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL},
- {L"Interrupt Type", 1, 52, L"%d", NULL, NULL, ValidateInterruptType, NULL},
- {L"IRQ", 1, 53, L"%d", NULL, NULL, ValidateIrq, NULL},
- {L"Global System Interrupt", 4, 54, L"0x%x", NULL, NULL, NULL, NULL},
- {L"Baud Rate", 1, 58, L"%d", NULL, NULL, NULL, NULL},
- {L"Parity", 1, 59, L"%d", NULL, NULL, NULL, NULL},
- {L"Stop Bits", 1, 60, L"%d", NULL, NULL, NULL, NULL},
- {L"Flow Control", 1, 61, L"0x%x", NULL, NULL, NULL, NULL},
- {L"Terminal Type", 1, 62, L"%d", NULL, NULL, NULL, NULL},
- {L"Reserved", 1, 63, L"%x", NULL, NULL, NULL, NULL},
-
- {L"PCI Device ID", 2, 64, L"0x%x", NULL, NULL, NULL, NULL},
- {L"PCI Vendor ID", 2, 66, L"0x%x", NULL, NULL, NULL, NULL},
- {L"PCI Bus Number", 1, 68, L"0x%x", NULL, NULL, NULL, NULL},
- {L"PCI Device Number", 1, 69, L"0x%x", NULL, NULL, NULL, NULL},
- {L"PCI Function Number", 1, 70, L"0x%x", NULL, NULL, NULL, NULL},
- {L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL},
- {L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL},
- {L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}
+ { L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL },
+ { L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL },
+ { L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL },
+ { L"Interrupt Type", 1, 52, L"%d", NULL, NULL, ValidateInterruptType, NULL },
+ { L"IRQ", 1, 53, L"%d", NULL, NULL, ValidateIrq, NULL },
+ { L"Global System Interrupt", 4, 54, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Baud Rate", 1, 58, L"%d", NULL, NULL, NULL, NULL },
+ { L"Parity", 1, 59, L"%d", NULL, NULL, NULL, NULL },
+ { L"Stop Bits", 1, 60, L"%d", NULL, NULL, NULL, NULL },
+ { L"Flow Control", 1, 61, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Terminal Type", 1, 62, L"%d", NULL, NULL, NULL, NULL },
+ { L"Reserved", 1, 63, L"%x", NULL, NULL, NULL, NULL },
+
+ { L"PCI Device ID", 2, 64, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"PCI Vendor ID", 2, 66, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"PCI Bus Number", 1, 68, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"PCI Device Number", 1, 69, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"PCI Function Number", 1, 70, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL }
};
/**
@@ -122,10 +125,10 @@ STATIC CONST ACPI_PARSER SpcrParser[] = {
VOID
EFIAPI
ParseAcpiSpcr (
- IN BOOLEAN Trace,
- IN UINT8* Ptr,
- IN UINT32 AcpiTableLength,
- IN UINT8 AcpiTableRevision
+ IN BOOLEAN Trace,
+ IN UINT8 *Ptr,
+ IN UINT32 AcpiTableLength,
+ IN UINT8 AcpiTableRevision
)
{
if (!Trace) {