summaryrefslogtreecommitdiff
path: root/ArmPkg/Include
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r--ArmPkg/Include/Guid/TransferListHob.h23
-rw-r--r--ArmPkg/Include/IndustryStandard/ArmTransferList.h12
-rw-r--r--ArmPkg/Include/Library/ArmTransferListLib.h58
3 files changed, 90 insertions, 3 deletions
diff --git a/ArmPkg/Include/Guid/TransferListHob.h b/ArmPkg/Include/Guid/TransferListHob.h
new file mode 100644
index 0000000..b8f9cc0
--- /dev/null
+++ b/ArmPkg/Include/Guid/TransferListHob.h
@@ -0,0 +1,23 @@
+/** @file
+ GUID for the HOB that contains the copy of the Transfer List
+
+ Copyright (C) 2024, Arm Limited. All rights reserved.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Reference(s):
+ - https://github.com/FirmwareHandoff/firmware_handoff
+
+**/
+
+#ifndef ARM_TRANSFER_LIST_HOB_H__
+#define ARM_TRANSFER_LIST_HOB_H__
+
+#define ARM_TRANSFER_LIST_HOB_GUID {\
+ 0xebe7bae8, 0xfe18, 0x43c5, \
+ { 0xbf, 0x3f, 0xf2, 0xb1, 0xaf, 0xb2, 0xdf, 0xb8 } \
+ }
+
+extern EFI_GUID gArmTransferListHobGuid;
+
+#endif
diff --git a/ArmPkg/Include/IndustryStandard/ArmTransferList.h b/ArmPkg/Include/IndustryStandard/ArmTransferList.h
index 455c7d8..3033846 100644
--- a/ArmPkg/Include/IndustryStandard/ArmTransferList.h
+++ b/ArmPkg/Include/IndustryStandard/ArmTransferList.h
@@ -2,7 +2,7 @@
Header file defining a Transfer List and Transfer Entry as specified by the
A-profile Firmware Handoff Protocol specification.
- Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
+ Copyright (c) 2025, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -74,6 +74,16 @@
#define TRANSFER_LIST_FL_HAS_CHECKSUM BIT0
/*
+ * Operation codes indicating the validity of the Transfer List.
+ */
+typedef enum {
+ TRANSFER_LIST_OPS_INVALID, /* invalid for any operation */
+ TRANSFER_LIST_OPS_ALL, /* valid for all operations */
+ TRANSFER_LIST_OPS_RO, /* valid for read only */
+ TRANSFER_LIST_OPS_CUSTOM, /* abort or switch to special code to interpret */
+} TRANSFER_LIST_OPS;
+
+/*
* Transfer list starts with the following header.
* Transfer entries followed after the following header.
*/
diff --git a/ArmPkg/Include/Library/ArmTransferListLib.h b/ArmPkg/Include/Library/ArmTransferListLib.h
index 96a1227..fb0c699 100644
--- a/ArmPkg/Include/Library/ArmTransferListLib.h
+++ b/ArmPkg/Include/Library/ArmTransferListLib.h
@@ -2,7 +2,7 @@
Library that implements the helper functions to parse and pack a Transfer
List as specified by the A-profile Firmware Handoff Specification.
- Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
+ Copyright (c) 2022 - 2025, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -21,7 +21,7 @@
/**
Return the first Transfer Entry Node in the Transfer List.
- @param [in] TransferListHeader TransferListHeader
+ @param [in] TransferListHeader Pointer to the Transfer List Header.
@return Pointer to the Transfer Entry Node if successful otherwise NULL
@@ -103,4 +103,58 @@ TransferListGetEntryData (
IN TRANSFER_ENTRY_HEADER *TransferEntry
);
+/**
+ Dump the transfer list to the debug output.
+
+ @param [in] TransferListHeader Pointer to the Transfer List Header
+
+**/
+VOID
+EFIAPI
+TransferListDump (
+ IN TRANSFER_LIST_HEADER *TransferListHeader
+ );
+
+/**
+ Verify the checksum of the transfer list.
+
+ @param [in] TransferListHeader Pointer to the Transfer List Header
+
+ @retval FALSE Invalid Checksum
+ @retval TRUE Valid Checksum
+**/
+BOOLEAN
+EFIAPI
+TransferListVerifyChecksum (
+ IN TRANSFER_LIST_HEADER *TransferListHeader
+ );
+
+/**
+ Check the header of the Transfer List.
+
+ @param [in] TransferListHeader Pointer to the Transfer List Header
+
+ @return TRANSFER_LIST_OPS code indicating the validity of the Transfer List
+**/
+TRANSFER_LIST_OPS
+EFIAPI
+TransferListCheckHeader (
+ IN TRANSFER_LIST_HEADER *TransferListHeader
+ );
+
+/**
+ Find a Transfer Entry Node in the Transfer List matched with the given tag-id.
+
+ @param [in] TransferListHeader Pointer to the Transfer List Header
+ @param [in] TagId Tag id
+
+ @return Pointer to the Transfer Entry Node if successful otherwise NULL
+**/
+TRANSFER_ENTRY_HEADER *
+EFIAPI
+TransferListFindEntry (
+ IN TRANSFER_LIST_HEADER *TransferListHeader,
+ IN UINT16 TagId
+ );
+
#endif // ARM_TRANSFER_LIST_LIB_