From: "Oliver Smith-Denny" <osde@linux.microsoft.com>
To: devel@edk2.groups.io, nishant.sharma@arm.com
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <sami.mujawar@arm.com>,
Thomas Abraham <thomas.abraham@arm.com>,
Sayanta Pattanayak <sayanta.pattanayak@arm.com>,
Achin Gupta <achin.gupta@arm.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 04/20] ArmPkg: Add data structures to receive FF-A boot information
Date: Wed, 12 Jul 2023 10:27:56 -0700 [thread overview]
Message-ID: <0f50aa89-96e3-775a-e794-65b7d8ed8713@linux.microsoft.com> (raw)
In-Reply-To: <20230711143658.781597-5-nishant.sharma@arm.com>
On 7/11/2023 7:36 AM, Nishant Sharma wrote:
> From: Achin Gupta <achin.gupta@arm.com>
>
> The SPMC will pass the manifest to the StMM SP which contains the boot
> information required for SP initialisation. This patch defines the data
> structures defined in Section 5.4 of the FF-A v1.1 BETA0 spec to enable
> this support. The manifest is identified by the TF-A UUID_TOS_FW_CONFIG.
>
> Signed-off-by: Achin Gupta <achin.gupta@arm.com>
> Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
> ---
> ArmPkg/Include/IndustryStandard/ArmFfaSvc.h | 69 +++++++++++++++++++-
> 1 file changed, 68 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
> index 4126a4985bb2..54cc96598032 100644
> --- a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
> +++ b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
> @@ -3,7 +3,7 @@
> communication between S-EL0 and the Secure Partition
> Manager(SPM)
>
> - Copyright (c) 2020, ARM Limited. All rights reserved.
> + Copyright (c) 2020 - 2023, ARM Limited. All rights reserved.
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -53,4 +53,71 @@
> // https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/stmm_sp.c#L66
> #define ARM_FFA_DESTINATION_ENDPOINT_ID 3
>
> +/******************************************************************************
> + * Boot information protocol as per the FF-A v1.1 spec.
> + *****************************************************************************/
> +#define FFA_INIT_DESC_SIGNATURE 0x00000FFA
> +
> +/* Boot information type. */
> +#define FFA_BOOT_INFO_TYPE_STD 0x0U
> +#define FFA_BOOT_INFO_TYPE_IMPL 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_MASK) \
> + << FFA_BOOT_INFO_TYPE_SHIFT)
> +
> +/* 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_MASK) \
> + << FFA_BOOT_INFO_TYPE_ID_SHIFT)
> +
> +/* 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(type) \
> + (((type) & FFA_BOOT_INFO_FLAG_NAME_MASK) \
> + << FFA_BOOT_INFO_FLAG_NAME_SHIFT)
> +
> +/* Format of Flags Contents field. */
> +#define FFA_BOOT_INFO_FLAG_CONTENT_ADR 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(content) \
> + (((content) & FFA_BOOT_INFO_FLAG_CONTENT_MASK) \
> + << FFA_BOOT_INFO_FLAG_CONTENT_SHIFT)
> +
> +// Descriptor to pass boot information as per the FF-A v1.1 spec.
> +typedef struct {
> + UINT32 Name[4];
> + UINT8 Type;
> + UINT8 Reserved;
> + UINT16 Flags;
> + UINT32 SizeBotInfo;
> + UINT64 Content;
> +} EFI_FFA_BOOT_INFO_DESC;
> +
> +// Descriptor that contains boot info blobs size, number of desc it cointains
typo, should be "contains"
> +// size of each descriptor and offset to the first descriptor.
> +typedef struct {
> + UINT32 Magic; // 0xFFA^M
caught a copy paste "^M" here.
Thanks,
Oliver
> + UINT32 Version;
> + UINT32 SizeBootInfoBlob;
> + UINT32 SizeBootInfoDesc;
> + UINT32 CountBootInfoDesc;
> + UINT32 OffsetBootInfoDesc;
> + UINT64 Reserved;
> +} EFI_FFA_BOOT_INFO_HEADER;
> +
> #endif // ARM_FFA_SVC_H_
next prev parent reply other threads:[~2023-07-12 17:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 14:36 [edk2-platforms][PATCH V1 00/20] Add the support for ARM Firmware First Framework Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 01/20] ArmPkg: Change PcdFfaEnable flag datatype Nishant Sharma
2023-07-12 17:21 ` [edk2-devel] " Oliver Smith-Denny
2023-07-12 17:23 ` Chris Fernald
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 02/20] StandaloneMmPkg: Allocate and initialise SP stack from internal memory Nishant Sharma
2023-07-12 17:47 ` [edk2-devel] " Chris Fernald
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 03/20] StandaloneMmPkg: Include libfdt in the StMM Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 04/20] ArmPkg: Add data structures to receive FF-A boot information Nishant Sharma
2023-07-12 17:27 ` Oliver Smith-Denny [this message]
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 05/20] ArmPkg/ArmFfaSvc: Add helper macros and fids Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 06/20] ArmPkg: Add support for FFA_MEM_PERM_GET/SET ABIs Nishant Sharma
2023-07-12 17:43 ` [edk2-devel] " Oliver Smith-Denny
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 07/20] StandaloneMmPkg: define new data structure to stage FF-A boot information Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 08/20] StandaloneMmPkg: Add backwards compatible support to detect FF-A v1.1 Nishant Sharma
2023-07-12 20:31 ` [edk2-devel] " Oliver Smith-Denny
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 09/20] StandaloneMmPkg: parse SP manifest and populate new boot information Nishant Sharma
2023-07-13 15:24 ` [edk2-devel] " Girish Mahadevan
2023-07-13 16:48 ` Chris Fernald
2023-07-13 20:49 ` Achin Gupta
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 10/20] StandaloneMmPkg: Populate Hoblist for SP init from StMM " Nishant Sharma
2023-07-12 20:52 ` [edk2-devel] " Oliver Smith-Denny
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 11/20] StandaloneMmPkg: Skip zero sized sections while tweaking page permissions Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 12/20] StandaloneMmPkg: Add global check for FF-A abis Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 13/20] ArmPkg: Bump the StMM SP FF-A minor version to 1 Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 14/20] ArmPkg/MmCommunicationDxe: Introduce FF-A version check Nishant Sharma
2023-07-13 16:56 ` [edk2-devel] " Chris Fernald
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 15/20] ArmPkg/MmCommunicationDxe: Add support for obtaining FF-A partition ID Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 16/20] ArmPkg/MmCommunicationDxe: Register FF-A RX/TX buffers Nishant Sharma
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 17/20] ArmPkg/MmCommunicationDxe: Unmap FF-A RX/TX buffers during ExitBootServices Nishant Sharma
2023-07-12 20:59 ` [edk2-devel] " Oliver Smith-Denny
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 18/20] ArmPkg/MmCommunicationDxe: Discover the StMM SP Nishant Sharma
2023-07-12 21:10 ` [edk2-devel] " Oliver Smith-Denny
2023-07-12 21:48 ` Girish Mahadevan
2023-07-13 17:16 ` Chris Fernald
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 19/20] ArmPkg/MmCommunicationDxe: Use the FF-A transport for MM requests Nishant Sharma
2023-07-11 19:22 ` [edk2-devel] " Kun Qin
2023-07-12 14:21 ` achin.gupta
2023-07-12 17:13 ` Kun Qin
2023-07-12 21:49 ` Girish Mahadevan
2023-07-11 14:36 ` [edk2-platforms][PATCH V1 20/20] StandaloneMmPkg: Add support for MM requests as FF-A direct messages Nishant Sharma
2023-07-12 21:13 ` [edk2-devel] [edk2-platforms][PATCH V1 00/20] Add the support for ARM Firmware First Framework Oliver Smith-Denny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f50aa89-96e3-775a-e794-65b7d8ed8713@linux.microsoft.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox