forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new parser for the RASF Table as specified in ACPI6.5 Signed-off-by: Carsten Haitzler <[email protected]>
- Loading branch information
1 parent
c82bf39
commit df88429
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rasf/RasfParser.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** @file | ||
RASF table parser | ||
Copyright (c) 2024, Arm Limited. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
@par Reference(s): | ||
- ACPI 6.5 Specification - August 2022 | ||
**/ | ||
|
||
#include <Library/PrintLib.h> | ||
#include <Library/BaseLib.h> | ||
#include <Library/UefiLib.h> | ||
#include "AcpiParser.h" | ||
#include "AcpiView.h" | ||
|
||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; | ||
|
||
/** | ||
An ACPI_PARSER array describing the ACPI RASF Table. | ||
**/ | ||
STATIC CONST ACPI_PARSER RasfParser[] = { | ||
PARSE_ACPI_HEADER (&AcpiHdrInfo), | ||
{ L"RASF PCC Identifier", 12,36, L"%02X %02X %02X %02X - %02X %02X %02X %02X - %02X %02X %02X %02X", Dump12Chars, NULL, NULL, NULL } | ||
}; | ||
|
||
/** | ||
This function parses the ACPI RASF table. | ||
When trace is enabled this function parses the RASF table and | ||
traces the ACPI table fields. | ||
This function also performs validation of the ACPI table fields. | ||
@param [in] Trace If TRUE, trace the ACPI fields. | ||
@param [in] Ptr Pointer to the start of the buffer. | ||
@param [in] AcpiTableLength Length of the ACPI table. | ||
@param [in] AcpiTableRevision Revision of the ACPI table. | ||
**/ | ||
VOID | ||
EFIAPI | ||
ParseAcpiRasf ( | ||
IN BOOLEAN Trace, | ||
IN UINT8 *Ptr, | ||
IN UINT32 AcpiTableLength, | ||
IN UINT8 AcpiTableRevision | ||
) | ||
{ | ||
if (!Trace) { | ||
return; | ||
} | ||
|
||
// Parse ACPI Header + RASF "fixed" fields | ||
ParseAcpi ( | ||
Trace, | ||
0, | ||
"RASF", | ||
Ptr, | ||
AcpiTableLength, | ||
PARSER_PARAMS (RasfParser) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters