From 6a706d187176b1460f510ec386f8070f38d75556 Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Tue, 20 Aug 2024 13:39:18 -0400 Subject: [PATCH] updates to new nv index dynamic event processing --- .../utils/tpm/eventlog/events/EvNoAction.java | 19 +++++++++++++------ .../events/NvIndexDynamicEventLogData.java | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java index 9635b1c7..5e38264d 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java @@ -10,13 +10,17 @@ import java.nio.charset.StandardCharsets; /** * Class to process the EV_NO_ACTION event. * The first 16 bytes of the event data MUST be a String based identifier (Signature). - * The only currently defined Signatures are - * 1) "Spec ID Event03" + * Currently defined Signatures are + * "Spec ID Event03" * - implies the data is a TCG_EfiSpecIDEvent * - TCG_EfiSpecIDEvent is the first event in a TPM Event Log and is used to determine * if the format of the Log (SHA1 vs Crypto Agile). - * 2) "NvIndexInstance" + * "StartupLocality" + * - implies the data represents locality info (use lookup to interpret) + * "NvIndexInstance" * - implies the data is a NV_INDEX_INSTANCE_EVENT_LOG_DATA + * "NvIndexDynamic" + * - implies the data is a NV_INDEX_DYNAMIC_EVENT_LOG_DATA *

* Notes: * 1. First 16 bytes of the structure is an ASCII with a fixed Length of 16 @@ -74,10 +78,13 @@ public class EvNoAction { } else if (signature.contains("NvIndexInstance")) { NvIndexInstanceEventLogData nvIndexInstanceEvent = new NvIndexInstanceEventLogData(eventData); noActionInfo += nvIndexInstanceEvent.toString(); + } else if (signature.contains("NvIndexDynamic")) { + NvIndexDynamicEventLogData nvIndexDynamicEvent = new NvIndexDynamicEventLogData(eventData); + noActionInfo += nvIndexDynamicEvent.toString(); } else { - noActionInfo = "EV_NO_ACTION event named " + signature - + " encountered but support for processing it has not been" - + " added to this application.\n"; + noActionInfo = " EV_NO_ACTION event named \"" + signature + + "\" encountered but support for processing it has not been" + + " added to this application.\n"; } } diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexDynamicEventLogData.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexDynamicEventLogData.java index c5d8fbdc..b4fa78e8 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexDynamicEventLogData.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexDynamicEventLogData.java @@ -7,7 +7,7 @@ import java.nio.charset.StandardCharsets; /** * Class to process the NV_INDEX_DYNAMIC_EVENT_LOG_DATA per PFP. * Per PFP, the first 16 bytes of the structure are a String based identifier (Signature), - * which are a NULL-terminated ASCII string "NvIndexInstance". + * which are a NULL-terminated ASCII string "NvIndexDynamic". * * HEADERS defined by PFP v1.06 Rev 52. * Certain fields are common to both ..HEADER and ..HEADER2, and are noted below the structures.