diff options
author | Levi Yun <yeoreum.yun@arm.com> | 2024-07-30 12:05:00 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-01-17 14:55:42 +0000 |
commit | d1d690f3639e1daba29bf6e36a72a1a28df35263 (patch) | |
tree | c45745008b1d93d20971320da3acf852636da7df /ArmPkg | |
parent | 173af697ddd630ba8824700d88911f0b7e5525d1 (diff) | |
download | edk2-d1d690f3639e1daba29bf6e36a72a1a28df35263.tar.gz |
ArmPkg/IndustryStandard: Introduce ArmFfaBootInfo.h
ArmFfaBootInfo.h contains boot information used in FF-A [0].
This boot information will be used to
initalize firmware (i.e) StandaloneMm.
Links: https://developer.arm.com/documentation/den0077/latest/ [0]
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Include/IndustryStandard/ArmFfaBootInfo.h | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaBootInfo.h b/ArmPkg/Include/IndustryStandard/ArmFfaBootInfo.h new file mode 100644 index 0000000000..aceb69a97e --- /dev/null +++ b/ArmPkg/Include/IndustryStandard/ArmFfaBootInfo.h @@ -0,0 +1,110 @@ +/** @file
+ Boot information protocol definitions as specified in the
+ FF-A v1.2 specification.
+
+ Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Glossary:
+ - FF-A - Firmware Framework for Arm A-profile
+
+ @par Reference(s):
+ - FF-A Version 1.2 [https://developer.arm.com/documentation/den0077/latest/]
+
+**/
+
+#ifndef ARM_FFA_BOOT_INFO_H_
+#define ARM_FFA_BOOT_INFO_H_
+
+#define FFA_BOOT_INFO_SIGNATURE 0x00000FFA
+
+#define FFA_BOOT_INFO_NAME_SIZE 16
+
+/* Boot information type. */
+#define FFA_BOOT_INFO_TYPE_STD 0x0U
+#define FFA_BOOT_INFO_TYPE_IMPDEF 0x1U
+
+#define FFA_BOOT_INFO_TYPE_MASK 0x1U
+#define FFA_BOOT_INFO_TYPE_SHIFT 0x7U
+#define FFA_BOOT_INFO_TYPE(type) \
+ (((type) >> FFA_BOOT_INFO_TYPE_SHIFT) & FFA_BOOT_INFO_TYPE_MASK)
+
+/* Boot information identifier. */
+#define FFA_BOOT_INFO_TYPE_ID_FDT 0x0U
+#define FFA_BOOT_INFO_TYPE_ID_HOB 0x1U
+
+#define FFA_BOOT_INFO_TYPE_ID_MASK 0x3FU
+#define FFA_BOOT_INFO_TYPE_ID_SHIFT 0x0U
+#define FFA_BOOT_INFO_TYPE_ID(type) \
+ (((type) >> FFA_BOOT_INFO_TYPE_ID_SHIFT) & FFA_BOOT_INFO_TYPE_ID_MASK)
+
+/* Format of Flags Name field. */
+#define FFA_BOOT_INFO_FLAG_NAME_STRING 0x0U
+#define FFA_BOOT_INFO_FLAG_NAME_UUID 0x1U
+
+#define FFA_BOOT_INFO_FLAG_NAME_MASK 0x3U
+#define FFA_BOOT_INFO_FLAG_NAME_SHIFT 0x0U
+#define FFA_BOOT_INFO_FLAG_NAME(flag) \
+ (((flag) >> FFA_BOOT_INFO_FLAG_NAME_SHIFT) & FFA_BOOT_INFO_FLAG_NAME_MASK)
+
+/* Format of Flags Contents field. */
+#define FFA_BOOT_INFO_FLAG_CONTENT_ADDR 0x0U
+#define FFA_BOOT_INFO_FLAG_CONTENT_VAL 0x1U
+
+#define FFA_BOOT_INFO_FLAG_CONTENT_MASK 0x1U
+#define FFA_BOOT_INFO_FLAG_CONTENT_SHIFT 0x2U
+#define FFA_BOOT_INFO_FLAG_CONTENT(flag) \
+ (((flag) >> FFA_BOOT_INFO_FLAG_CONTENT_SHIFT) & FFA_BOOT_INFO_FLAG_CONTENT_MASK)
+
+/** Descriptor to pass boot information as per the FF-A v1.2 spec.
+ */
+typedef struct {
+ /// Name of Boot information
+ UINT8 Name[FFA_BOOT_INFO_NAME_SIZE];
+
+ /// Type of boot information
+ UINT8 Type;
+
+ /// Reserved
+ UINT8 Reserved;
+
+ /// Flags to describe properties of boot information
+ UINT16 Flags;
+
+ /// Size (in bytes) of boot information
+ UINT32 Size;
+
+ /// Address of boot information
+ UINT64 Content;
+} EFI_FFA_BOOT_INFO_DESC;
+
+/** Descriptor that contains boot info blobs size, number of desc it contains
+ * size of each descriptor and offset to the first descriptor.
+ */
+typedef struct {
+ /// Hexadecimal value FFA_BOOT_INFO_SIGNATURE to identify the header
+ UINT32 Magic;
+
+ /// Version of the boot information blob
+ UINT32 Version;
+
+ /// Size of boot information blob
+ UINT32 SizeBootInfoBlob;
+
+ /// Size of boot information descriptor
+ UINT32 SizeBootInfoDesc;
+
+ /// Count of boot information descriptor
+ UINT32 CountBootInfoDesc;
+
+ /// Offset to array of boot information descriptors
+ UINT32 OffsetBootInfoDesc;
+
+ /// Reserved
+ UINT64 Reserved;
+
+ /// Optional Padding
+ /// Boot information descriptor array
+} EFI_FFA_BOOT_INFO_HEADER;
+
+#endif
|