TianoCore EDK2 master
|
#include <IndustryStandard/Acpi.h>
#include <Library/UefiLib.h>
#include "AcpiParser.h"
#include "AcpiTableParser.h"
#include "AcpiView.h"
Go to the source code of this file.
Macros | |
#define | PARSE_HEST_ERROR_SOURCE_COMMON_HEADER(FlagsValidateFunc, CheckRecordCount) |
#define | PARSE_HEST_PCI_ERROR_SOURCE_COMMON_HEADER() |
#define | PARSE_HEST_GHES_ERROR_SOURCE() |
Functions | |
STATIC VOID EFIAPI | ValidateErrorNotificationType (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | DumpSourceFlags (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length) |
STATIC VOID EFIAPI | DumpErrorNotificationType (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length) |
STATIC VOID EFIAPI | DumpErrorNotificationCwe (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length) |
STATIC VOID EFIAPI | ValidatePciBusReservedBits (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidateIA32ErrorSourceFlags (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidatePciErrorSourceFlags (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidateGhesSourceFlags (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidateEnabledField (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidateRecordCount (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | DumpNotificationStructure (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length) |
STATIC VOID EFIAPI | DumpPciBus (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length) |
STATIC EFI_STATUS EFIAPI | DumpIA32ArchMachineCheckErrorBankStructure (IN UINT8 *HestTable, UINT32 AcpiTableLength, UINT32 *Offset) |
VOID EFIAPI | ParseAcpiHest (IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision) |
HEST table parser
Copyright (c) 2024, Arm Limited. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HestParser.c.
#define PARSE_HEST_ERROR_SOURCE_COMMON_HEADER | ( | FlagsValidateFunc, | |
CheckRecordCount | |||
) |
Helper macro to populate the header fields of error source descriptor in the ACPI_PARSER array.
Definition at line 563 of file HestParser.c.
#define PARSE_HEST_GHES_ERROR_SOURCE | ( | ) |
Helper macro to populate the header fields of GHES related error source descriptor in the ACPI_PARSER array.
Definition at line 596 of file HestParser.c.
#define PARSE_HEST_PCI_ERROR_SOURCE_COMMON_HEADER | ( | ) |
Helper macro to populate the header fields of PCI related error source descriptor in the ACPI_PARSER array.
Definition at line 579 of file HestParser.c.
STATIC VOID EFIAPI DumpErrorNotificationCwe | ( | IN CONST CHAR16 *Format | OPTIONAL, |
IN UINT8 * | Ptr, | ||
IN UINT32 | Length | ||
) |
Dumps Configuration Write Enable fields of Hardware Error Notification Structure.
[in] | Format | Optional format string for tracing the data. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the field. |
Definition at line 214 of file HestParser.c.
STATIC VOID EFIAPI DumpErrorNotificationType | ( | IN CONST CHAR16 *Format | OPTIONAL, |
IN UINT8 * | Ptr, | ||
IN UINT32 | Length | ||
) |
Dumps type fields of Error Notification Structure
[in] | Format | Optional format string for tracing the data. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the field. |
Definition at line 186 of file HestParser.c.
STATIC EFI_STATUS EFIAPI DumpIA32ArchMachineCheckErrorBankStructure | ( | IN UINT8 * | HestTable, |
UINT32 | AcpiTableLength, | ||
UINT32 * | Offset | ||
) |
Dumps the IA32 Arch Machine Check Error Bank structure fields.
[in] | HestTable | Start pointer to Hest table. |
[in] | AcpiTableLength | Length of HestTable. |
[in,out] | Offset | Offset to machine check bank structure from HestTable. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | Invalid Hest Table |
Definition at line 518 of file HestParser.c.
STATIC VOID EFIAPI DumpNotificationStructure | ( | IN CONST CHAR16 *Format | OPTIONAL, |
IN UINT8 * | Ptr, | ||
IN UINT32 | Length | ||
) |
Dumps the notification structure fields.
[in] | Format | Optional format string for tracing the data. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the field. |
Definition at line 447 of file HestParser.c.
STATIC VOID EFIAPI DumpPciBus | ( | IN CONST CHAR16 *Format | OPTIONAL, |
IN UINT8 * | Ptr, | ||
IN UINT32 | Length | ||
) |
Dumps bus field in the PCI related Error Source Structure. from HestTable.
[in] | Format | Optional format string for tracing the data. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the field. |
Definition at line 482 of file HestParser.c.
STATIC VOID EFIAPI DumpSourceFlags | ( | IN CONST CHAR16 *Format | OPTIONAL, |
IN UINT8 * | Ptr, | ||
IN UINT32 | Length | ||
) |
Dumps flags fields of error source descriptor.
[in] | Format | Optional format string for tracing the data. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the field. |
Definition at line 154 of file HestParser.c.
VOID EFIAPI ParseAcpiHest | ( | IN BOOLEAN | Trace, |
IN UINT8 * | Ptr, | ||
IN UINT32 | AcpiTableLength, | ||
IN UINT8 | AcpiTableRevision | ||
) |
This function parses the ACPI HEST table. When trace is enabled this function parses the HEST table and traces the ACPI table fields.
This function also performs validation of the ACPI table fields.
[in] | Trace | If TRUE, trace the ACPI fields. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | AcpiTableLength | Length of the ACPI table. |
[in] | AcpiTableRevision | Revision of the ACPI table. |
Definition at line 748 of file HestParser.c.
This function validates the enabled field of error source descriptor structure.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 394 of file HestParser.c.
STATIC VOID EFIAPI ValidateErrorNotificationType | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates the Type field of Hardware Error Notification Structure
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 123 of file HestParser.c.
This function validates the flags field of Ghes related error source descriptor structure.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 366 of file HestParser.c.
STATIC VOID EFIAPI ValidateIA32ErrorSourceFlags | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates the flags field of IA32 related error source descriptor structure.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 297 of file HestParser.c.
STATIC VOID EFIAPI ValidatePciBusReservedBits | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates reserved bits of pci related Error source structure's bus field.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 264 of file HestParser.c.
STATIC VOID EFIAPI ValidatePciErrorSourceFlags | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates the flags field of PCI related error source descriptor structure.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 335 of file HestParser.c.
This function validates the number of records to preallocated and max sections per record fields of error source descriptor structure.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 419 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorIA32ArchMachineCheckBankStructureParser[] |
An ACPI_PARSER array describing IA-32 Architecture Machine Check Bank Structure Cf ACPI 6.5 Table 18.4: IA-32 Architecture Machine Check Error Bank Structure
Definition at line 85 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorNotificationCweParser[] |
An ACPI_PARSER array describing the Hardware Error Notification Structure's Configuration Write Enable Field (CWE) Cf ACPI 6.5 Table 18.14: Hardware Error Notification Structure
Definition at line 102 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorNotificationParser[] |
An ACPI_PARSER array describing the Hardware Error Notification Structure Cf ACPI 6.5 Table 18.14: Hardware Error Notification Structure
Definition at line 240 of file HestParser.c.
An String array for Error Notification Structure's type. Cf ACPI 6.5 Table 18.14: Hardware Error Notification Structure
Definition at line 27 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceFlags[] |
An ACPI_PARSER array describing the HEST error source flags information.
Definition at line 74 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceGhesParser[] |
An ACPI_PARSER array describing the HEST GHES error source descriptor. Cf ACPI 6.5 Table 18.10: Generic Hardware Error Source Structure
Definition at line 703 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceGhesv2Parser[] |
An ACPI_PARSER array describing the HEST GHESv2 error source descriptor. Cf ACPI 6.5 Table 18.11: Generic Hardware Error Source version 2 Structure
Definition at line 711 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceIA32ArchCorrectedMachineCheckParser[] |
An ACPI_PARSER array describing the IA-32 Architecture Machine Check Exception error source descriptor. Cf ACPI 6.5 Table 18.5: IA-32 Architecture Machine Check Exception Structure
Definition at line 636 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceIA32ArchDeferredMachineCheckParser[] |
An ACPI_PARSER array describing the IA-32 Architecture Deferred Machine Check error source descriptor. Cf ACPI 6.5 Table 18.15: IA-32 Architecture Deferred Machine Check Structure
Definition at line 723 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceIA32ArchMachineCheckExceptionParser[] |
An ACPI_PARSER array describing the IA-32 Architecture Machine Check Exception error source descriptor. Cf ACPI 6.5 Table 18.3: IA-32 Architecture Machine Check Exception Structure
Definition at line 617 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceIA32ArchNonMaskableInterruptParser[] |
An ACPI_PARSER array describing the IA-32 Non-Maskable Interrupt error source descriptor. Cf ACPI 6.5 Table 18.6: IA-32 Architecture NMI Error Structure
Definition at line 653 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourcePciCommonBusParser[] |
An ACPI_PARSER array describing the PCI related Error Source Bus field.
Definition at line 279 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourcePciExpressBridgeAerParser[] |
An ACPI_PARSER array describing the HEST PCIe/PCI-X Bridge AER error source descriptor. Cf ACPI 6.5 Table 18.9: PCI Express/PCI-X Bridge AER Structure
Definition at line 689 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourcePciExpressDeviceAerParser[] |
An ACPI_PARSER array describing the HEST PCIe Device AER error source descriptor. Cf ACPI 6.5 Table 18.8: PCI Express Device AER Structure
Definition at line 680 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourcePciExpressRootPortAerParser[] |
An ACPI_PARSER array describing the HEST PCIe Root Port AER error source descriptor. Cf ACPI 6.5 Table 18.7: PCI Express Root Port AER Structure
Definition at line 669 of file HestParser.c.
STATIC CONST ACPI_PARSER HestErrorSourceTypeParser[] |
An ACPI_PARSER array describing the HEST error source descriptor type.
Definition at line 67 of file HestParser.c.
STATIC CONST ACPI_PARSER HestParser[] |
An ACPI_PARSER array describing the ACPI HEST Table.
Definition at line 45 of file HestParser.c.
STATIC ACPI_DESCRIPTION_HEADER_INFO mAcpiHdrInfo |
Definition at line 18 of file HestParser.c.
STATIC UINT32* mHestErrorSourceCount |
Definition at line 19 of file HestParser.c.
STATIC UINT16* mHestErrorSourceType |
Definition at line 20 of file HestParser.c.
STATIC UINT8* mHestIA32HardwareBankCount |
Definition at line 21 of file HestParser.c.