From 8593eca04817583c4a00e35e7890f9e056ee22f9 Mon Sep 17 00:00:00 2001 From: Sarah Walker Date: Thu, 2 Jan 2025 14:11:06 +0000 Subject: [PATCH] ShellPkg: AcpiView: TPM2 parser for Arm FF-A Add support for the ARM FF-A Start Method Specific Parameters to the TPM2 parser Signed-off-by: Sarah Walker --- .../Parsers/Tpm2/Tpm2Parser.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Tpm2/Tpm2Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Tpm2/Tpm2Parser.c index a0be2622a4..6f226759a5 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Tpm2/Tpm2Parser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Tpm2/Tpm2Parser.c @@ -56,6 +56,16 @@ STATIC CONST ACPI_PARSER Tpm2StartMethodArmSmc[] = { { L"SMC/HVC Function ID", 4, 8, L"0x%x", NULL, NULL, NULL, NULL }, }; +/** + An ACPI_PARSER array describing the Start Method Specific Parameters for Arm FF-A table. +**/ +STATIC CONST ACPI_PARSER Tpm2StartMethodArmFFA[] = { + { L"Flags", 1, 0, L"0x%x", NULL, NULL, NULL, NULL }, + { L"Attributes", 1, 1, L"0x%x", NULL, NULL, NULL, NULL }, + { L"Partition ID", 2, 2, L"0x%x", NULL, NULL, NULL, NULL }, + { L"Reserved", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL }, +}; + /** This function parses the ACPI TPM2 table. When trace is enabled this function parses the TPM2 table and @@ -109,6 +119,17 @@ ParseAcpiTpm2 ( ); break; + case EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE_WITH_FFA: + ParseAcpi ( + TRUE, + 0, + "Start Method Specific Parameters for Arm FF-A", + Ptr + Offset, + AcpiTableLength - Offset, + PARSER_PARAMS (Tpm2StartMethodArmFFA) + ); + break; + default: Print ( L"WARNING: Start Method %u not supported\n",