/** @file\r
SPCR table parser\r
\r
- Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
+ Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
@par Reference(s):\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/**\r
- This function validates the Interrupt Type.\r
-\r
- @param [in] Ptr Pointer to the start of the field data.\r
- @param [in] Context Pointer to context specific information e.g. this\r
- could be a pointer to the ACPI table header.\r
-**/\r
-STATIC\r
-VOID\r
-EFIAPI\r
-ValidateInterruptType (\r
- IN UINT8* Ptr,\r
- IN VOID* Context\r
- );\r
-\r
-/**\r
- This function validates the Irq.\r
-\r
- @param [in] Ptr Pointer to the start of the field data.\r
- @param [in] Context Pointer to context specific information e.g. this\r
- could be a pointer to the ACPI table header.\r
-**/\r
-STATIC\r
-VOID\r
-EFIAPI\r
-ValidateIrq (\r
- IN UINT8* Ptr,\r
- IN VOID* Context\r
- );\r
-\r
-/**\r
- An ACPI_PARSER array describing the ACPI SPCR Table.\r
-**/\r
-STATIC CONST ACPI_PARSER SpcrParser[] = {\r
- PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
- {L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},\r
- {L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},\r
- {L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL},\r
- {L"Interrupt Type", 1, 52, L"%d", NULL, NULL, ValidateInterruptType, NULL},\r
- {L"IRQ", 1, 53, L"%d", NULL, NULL, ValidateIrq, NULL},\r
- {L"Global System Interrupt", 4, 54, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"Baud Rate", 1, 58, L"%d", NULL, NULL, NULL, NULL},\r
- {L"Parity", 1, 59, L"%d", NULL, NULL, NULL, NULL},\r
- {L"Stop Bits", 1, 60, L"%d", NULL, NULL, NULL, NULL},\r
- {L"Flow Control", 1, 61, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"Terminal Type", 1, 62, L"%d", NULL, NULL, NULL, NULL},\r
- {L"Reserved", 1, 63, L"%x", NULL, NULL, NULL, NULL},\r
-\r
- {L"PCI Device ID", 2, 64, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"PCI Vendor ID", 2, 66, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"PCI Bus Number", 1, 68, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"PCI Device Number", 1, 69, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"PCI Function Number", 1, 70, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL},\r
- {L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}\r
-};\r
-\r
/**\r
This function validates the Interrupt Type.\r
\r
#endif\r
}\r
\r
+/**\r
+ An ACPI_PARSER array describing the ACPI SPCR Table.\r
+**/\r
+STATIC CONST ACPI_PARSER SpcrParser[] = {\r
+ PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
+ {L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},\r
+ {L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},\r
+ {L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL},\r
+ {L"Interrupt Type", 1, 52, L"%d", NULL, NULL, ValidateInterruptType, NULL},\r
+ {L"IRQ", 1, 53, L"%d", NULL, NULL, ValidateIrq, NULL},\r
+ {L"Global System Interrupt", 4, 54, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"Baud Rate", 1, 58, L"%d", NULL, NULL, NULL, NULL},\r
+ {L"Parity", 1, 59, L"%d", NULL, NULL, NULL, NULL},\r
+ {L"Stop Bits", 1, 60, L"%d", NULL, NULL, NULL, NULL},\r
+ {L"Flow Control", 1, 61, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"Terminal Type", 1, 62, L"%d", NULL, NULL, NULL, NULL},\r
+ {L"Reserved", 1, 63, L"%x", NULL, NULL, NULL, NULL},\r
+\r
+ {L"PCI Device ID", 2, 64, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"PCI Vendor ID", 2, 66, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"PCI Bus Number", 1, 68, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"PCI Device Number", 1, 69, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"PCI Function Number", 1, 70, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL},\r
+ {L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}\r
+};\r
+\r
/**\r
This function parses the ACPI SPCR table.\r
When trace is enabled this function parses the SPCR table and\r