From 137c801b3a43b402e19afa8179b3b01c082857df Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:00:18 -0400 Subject: [PATCH] added pciids translations to SPDM Device Context file --- .../events/DeviceSecurityEventDataPciContext.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java index ed8f4c89..01b182b8 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java @@ -3,6 +3,9 @@ package hirs.utils.tpm.eventlog.events; import hirs.utils.HexUtils; import lombok.Getter; +import static hirs.utils.PciIds.translateDevice; +import static hirs.utils.PciIds.translateVendor; + /** * Class to process the DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT event per PFP. *

@@ -108,11 +111,11 @@ public class DeviceSecurityEventDataPciContext extends DeviceSecurityEventDataDe dSEDpciContextInfo += super.toString(); dSEDpciContextInfo += "\n Device Type = PCI"; - dSEDpciContextInfo += "\n VendorID = 0x" + vendorId; - dSEDpciContextInfo += "\n DeviceID = 0x" + deviceId; + dSEDpciContextInfo += "\n Vendor = " + translateVendor(vendorId); + dSEDpciContextInfo += "\n Device = " + translateDevice(vendorId, deviceId); dSEDpciContextInfo += "\n RevisionID = 0x" + revisionId; dSEDpciContextInfo += "\n ClassCode = 0x" + classCode; - dSEDpciContextInfo += "\n SubsystemVendorID = 0x" + subsystemVendorId; + dSEDpciContextInfo += "\n SubsystemVendor = " + translateVendor(subsystemVendorId); dSEDpciContextInfo += "\n SubsystemID = 0x" + subsystemId; return dSEDpciContextInfo;