mirror of https://github.com/acidanthera/audk.git
ShellPkg: acpiview: SPCR: Remove redundant forward declaration
Reposition blocks of code to remove redundant forward function declarations in order to reduce the code size. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
This commit is contained in:
parent
86da432af3
commit
cca8826cc0
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
SPCR table parser
|
SPCR table parser
|
||||||
|
|
||||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
@par Reference(s):
|
@par Reference(s):
|
||||||
|
@ -18,64 +18,6 @@
|
||||||
// Local variables
|
// Local variables
|
||||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||||
|
|
||||||
/**
|
|
||||||
This function validates the Interrupt Type.
|
|
||||||
|
|
||||||
@param [in] Ptr Pointer to the start of the field data.
|
|
||||||
@param [in] Context Pointer to context specific information e.g. this
|
|
||||||
could be a pointer to the ACPI table header.
|
|
||||||
**/
|
|
||||||
STATIC
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
ValidateInterruptType (
|
|
||||||
IN UINT8* Ptr,
|
|
||||||
IN VOID* Context
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
This function validates the Irq.
|
|
||||||
|
|
||||||
@param [in] Ptr Pointer to the start of the field data.
|
|
||||||
@param [in] Context Pointer to context specific information e.g. this
|
|
||||||
could be a pointer to the ACPI table header.
|
|
||||||
**/
|
|
||||||
STATIC
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
ValidateIrq (
|
|
||||||
IN UINT8* Ptr,
|
|
||||||
IN VOID* Context
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
An ACPI_PARSER array describing the ACPI SPCR Table.
|
|
||||||
**/
|
|
||||||
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}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function validates the Interrupt Type.
|
This function validates the Interrupt Type.
|
||||||
|
|
||||||
|
@ -137,6 +79,34 @@ ValidateIrq (
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
An ACPI_PARSER array describing the ACPI SPCR Table.
|
||||||
|
**/
|
||||||
|
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}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function parses the ACPI SPCR table.
|
This function parses the ACPI SPCR table.
|
||||||
When trace is enabled this function parses the SPCR table and
|
When trace is enabled this function parses the SPCR table and
|
||||||
|
|
Loading…
Reference in New Issue