Bugzilla: 3773 (https://bugzilla.tianocore.org/show_bug.cgi?id=3773)
Store processor data from the MADT and PPTT ACPI tables so that it can be used for processor ID validation. Signed-off-by: Chris Jones <christopher.jo...@arm.com> --- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 23 ++++++++++++++++--- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 24 +++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c index aaa68c99f51457050df0c6af39ab5e4912dc729f..837f22abf368449c22e526d0972aed57e4f96443 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c @@ -16,6 +16,7 @@ #include "AcpiParser.h" #include "AcpiTableParser.h" #include "AcpiViewConfig.h" +#include "Validators/AcpiDataStore.h" #include "MadtParser.h" // Local Variables @@ -281,9 +282,10 @@ ParseAcpiMadt ( IN UINT8 AcpiTableRevision ) { - UINT32 Offset; - UINT8 *InterruptContollerPtr; - UINT32 GICDCount; + UINT32 Offset; + UINT8 *InterruptContollerPtr; + UINT32 GICDCount; + EFI_STATUS Status; GICDCount = 0; @@ -352,6 +354,21 @@ ParseAcpiMadt ( *MadtInterruptControllerLength, PARSER_PARAMS (GicCParser) ); + + Status = StoreAcpiMetaData ( + MetaDataMadtGicC, + MetaDataMadtGicC, + InterruptContollerPtr, + *MadtInterruptControllerLength + ); + if (EFI_ERROR (Status)) { + Print ( + L"ERROR: Unable to store GICC type structure." \ + L"Status = 0x%x.", + Status + ); + } + break; } diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c index 8d52bb5e4811298ddc45cdaef41150f6ee7819af..3f4158a68779ea164daee839fc2b145c828bb62c 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c @@ -14,6 +14,7 @@ #include "AcpiParser.h" #include "AcpiView.h" #include "AcpiViewConfig.h" +#include "Validators/AcpiDataStore.h" #include "PpttParser.h" // Local variables @@ -370,9 +371,10 @@ DumpProcessorHierarchyNodeStructure ( IN UINT8 Length ) { - UINT32 Offset; - UINT32 Index; - CHAR16 Buffer[OUTPUT_FIELD_COLUMN_WIDTH]; + UINT32 Offset; + UINT32 Index; + CHAR16 Buffer[OUTPUT_FIELD_COLUMN_WIDTH]; + EFI_STATUS Status; Offset = ParseAcpi ( TRUE, @@ -383,6 +385,22 @@ DumpProcessorHierarchyNodeStructure ( PARSER_PARAMS (ProcessorHierarchyNodeStructureParser) ); + // Store the data for validation later. + Status = StoreAcpiMetaData ( + MetaDataPpttProcs, + MetaDataPpttProcs, + Ptr, + Length + ); + if (EFI_ERROR (Status)) { + Print ( + L"\nERROR: Unable to store processor type structure." \ + L" Status = 0x%x.", + Status + ); + return; + } + // Check if the values used to control the parsing logic have been // successfully read. if (NumberOfPrivateResources == NULL) { -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84918): https://edk2.groups.io/g/devel/message/84918 Mute This Topic: https://groups.io/mt/87748592/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-