summaryrefslogtreecommitdiff
path: root/ArmPkg/Include
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r--ArmPkg/Include/IndustryStandard/ArmTransferList.h20
-rw-r--r--ArmPkg/Include/Library/ArmTransferListLib.h37
2 files changed, 57 insertions, 0 deletions
diff --git a/ArmPkg/Include/IndustryStandard/ArmTransferList.h b/ArmPkg/Include/IndustryStandard/ArmTransferList.h
index 303384622f..2bc0d80177 100644
--- a/ArmPkg/Include/IndustryStandard/ArmTransferList.h
+++ b/ArmPkg/Include/IndustryStandard/ArmTransferList.h
@@ -74,6 +74,12 @@
#define TRANSFER_LIST_FL_HAS_CHECKSUM BIT0
/*
+ * Flag values for TPM event log table entry layout XFERLIST_EVLOG->Flags,
+ * see https://github.com/FirmwareHandoff/firmware_handoff/blob/main/source/transfer_list.rst#tpm-event-log-table-entry-layout-xferlist_evlog
+ */
+#define TRANSFER_LIST_EVENTLOG_FL_NEED_TO_REPLAY BIT0 /* Need to replay */
+
+/*
* Operation codes indicating the validity of the Transfer List.
*/
typedef enum {
@@ -137,4 +143,18 @@ typedef struct TransferEntryHeader {
UINT32 DataSize;
} TRANSFER_ENTRY_HEADER;
+/*
+ * TPM event log information entry,
+ * see Section 'TPM event log table entry layout (XFERLIST_EVLOG)' in
+ * the Firmware Handoff specification.
+ */
+typedef struct TransferListEventLog {
+ /// See the TRANSFER_LIST_EVENT_LOG_FL_*
+ UINT32 Flags;
+
+ /// TPM event log as much as
+ /// TRNASFER_ENTRY_HEADER->DataSize - sizeof (TRANSFER_LIST_EVENTLOG)->Flags
+ UINT8 EventLog[];
+} TRANSFER_LIST_EVENTLOG;
+
#endif // ARM_TRANSFER_LIST_
diff --git a/ArmPkg/Include/Library/ArmTransferListLib.h b/ArmPkg/Include/Library/ArmTransferListLib.h
index fb0c69972e..09ade9f4a1 100644
--- a/ArmPkg/Include/Library/ArmTransferListLib.h
+++ b/ArmPkg/Include/Library/ArmTransferListLib.h
@@ -19,6 +19,21 @@
#include <Pi/PiHob.h>
/**
+ Get the TransferList from HOB list.
+
+ @param[out] TransferList TransferList
+
+ @retval EFI_SUCCESS TransferList is found.
+ @retval EFI_NOT_FOUND TransferList is not found.
+
+**/
+EFI_STATUS
+EFIAPI
+TransferListGetFromHobList (
+ OUT TRANSFER_LIST_HEADER **TransferList
+ );
+
+/**
Return the first Transfer Entry Node in the Transfer List.
@param [in] TransferListHeader Pointer to the Transfer List Header.
@@ -157,4 +172,26 @@ TransferListFindEntry (
IN UINT16 TagId
);
+/**
+ Get TPM event log from TransferList
+
+ @param [in] TransferListHeader Pointer to the Transfer List Header
+ @param [out] EventLog Pointer to Eventlog in TransferList
+ @param [out] EventLogSize Size of Event log
+ @param [out] EventLogFlags Flags for Event log
+
+ @return EFI_SUCCESS
+ @return EFI_NOT_FOUND No Event log in TransferListHeader
+ @return EFI_INVALID_PARAMETER Invalid parameters
+
+**/
+EFI_STATUS
+EFIAPI
+TransferListGetEventLog (
+ IN TRANSFER_LIST_HEADER *TransferListHeader,
+ OUT VOID **EventLog,
+ OUT UINTN *EventLogSize,
+ OUT UINT32 *EventLogFlags OPTIONAL
+ );
+
#endif // ARM_TRANSFER_LIST_LIB_