diff options
author | Levi Yun <yeoreum.yun@arm.com> | 2024-08-21 16:08:54 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-01-17 14:55:42 +0000 |
commit | a5212d3db79312f65f0392f294e43193c148199f (patch) | |
tree | d1c0eb5ff119fc49dab41997f864293ef1632050 /StandaloneMmPkg/Include | |
parent | 54e394b4a20ea5ad0a1dee32e3ea498f5d7d3188 (diff) | |
download | edk2-a5212d3db79312f65f0392f294e43193c148199f.tar.gz |
StandaloneMm/Library: Apply transfer list boot protocol in StandaloneMm
To remove hob creation in StandaloneMm entrypoint,
TF-A should pass PHIT hob information to StandaloneMm.
When it passes PHIT hob, it passes according to
firmware handoff specification[0].
This patch applies boot protocol using transfer list with firmware
handoff specification and remove hob creation in StandaloneMm
entrypoint.
Link: https://github.com/FirmwareHandoff/firmware_handoff [0]
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
Diffstat (limited to 'StandaloneMmPkg/Include')
-rw-r--r-- | StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h | 107 |
1 files changed, 57 insertions, 50 deletions
diff --git a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h index c7196087ae..d6e6a8137e 100644 --- a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h +++ b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h @@ -2,20 +2,66 @@ Entry point to the Standalone MM Foundation when initialized during the SEC
phase on ARM platforms
-Copyright (c) 2017 - 2021, Arm Ltd. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
+ Copyright (c) 2017 - 2024, Arm Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Glossary:
+ - SPM_MM - An implementation where the Secure Partition Manager resides at EL3
+ with management services running from an isolated Secure Partitions
+ at S-EL0, and the communication protocol is the Management Mode(MM)
+ interface.
+ - FF-A - Firmware Framework for Arm A-profile
+ - TL - Transfer List
+
+ @par Reference(s):
+ - Transfer List [https://github.com/FirmwareHandoff/firmware_handoff]
+ - Secure Partition Manager [https://trustedfirmware-a.readthedocs.io/en/latest/components/secure-partition-manager-mm.html].
+ - Arm Firmware Framework for Arm A-Profile [https://developer.arm.com/documentation/den0077/j/?lang=en]
**/
#ifndef __STANDALONEMMCORE_ENTRY_POINT_H__
#define __STANDALONEMMCORE_ENTRY_POINT_H__
-#include <StandaloneMmCpu.h>
#include <Library/PeCoffLib.h>
#include <Library/FvLib.h>
#define CPU_INFO_FLAG_PRIMARY_CPU 0x00000001
+/*
+ * BOOT protocol used to boot StandaloneMm
+ */
+typedef enum {
+ /// Unknown Boot protocol.
+ BootProtocolUnknown,
+
+ /// Boot information delivered via Transfer List
+ /// with 32 bits register convention
+ BootProtocolTl32,
+
+ /// Boot information delivered via Transfer List
+ /// with 64 bits register convention
+ BootProtocolTl64,
+
+ BootProtocolMax,
+} BOOT_PROTOCOL;
+
+/*
+ * Communication ABI protocol to communicate between normal/secure partition.
+ */
+typedef enum {
+ /// Unknown Communication ABI protocol
+ AbiProtocolUnknown,
+
+ /// Communicate via SPM_MM ABI protocol
+ AbiProtocolSpmMm,
+
+ /// Communicate via FF-A ABI protocol
+ AbiProtocolFfa,
+
+ AbiProtocolMax,
+} ABI_PROTOCOL;
+
typedef struct {
UINT8 Type; /* type of the structure */
UINT8 Version; /* version of this structure */
@@ -23,31 +69,6 @@ typedef struct { UINT32 Attr; /* attributes: unused bits SBZ */
} EFI_PARAM_HEADER;
-typedef struct {
- UINT64 Mpidr;
- UINT32 LinearId;
- UINT32 Flags;
-} EFI_SECURE_PARTITION_CPU_INFO;
-
-typedef struct {
- EFI_PARAM_HEADER Header;
- UINT64 SpMemBase;
- UINT64 SpMemLimit;
- UINT64 SpImageBase;
- UINT64 SpStackBase;
- UINT64 SpHeapBase;
- UINT64 SpNsCommBufBase;
- UINT64 SpSharedBufBase;
- UINT64 SpImageSize;
- UINT64 SpPcpuStackSize;
- UINT64 SpHeapSize;
- UINT64 SpNsCommBufSize;
- UINT64 SpSharedBufSize;
- UINT32 NumSpMemRegions;
- UINT32 NumCpus;
- EFI_SECURE_PARTITION_CPU_INFO *CpuInfo;
-} EFI_SECURE_PARTITION_BOOT_INFO;
-
typedef RETURN_STATUS (*REGION_PERMISSION_UPDATE_FUNC) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
@@ -123,35 +144,21 @@ LocateStandaloneMmCorePeCoffData ( );
/**
- Use the boot information passed by privileged firmware to populate a HOB list
- suitable for consumption by the MM Core and drivers.
-
- @param [in] PayloadBootInfo Boot information passed by privileged
- firmware
-
-**/
-VOID *
-EFIAPI
-CreateHobListFromBootInfo (
- IN EFI_SECURE_PARTITION_BOOT_INFO *PayloadBootInfo
- );
-
-/**
The entry point of Standalone MM Foundation.
- @param [in] SharedBufAddress Pointer to the Buffer between SPM and SP.
- @param [in] SharedBufSize Size of the shared buffer.
- @param [in] cookie1 Cookie 1
- @param [in] cookie2 Cookie 2
+ @param [in] Arg0 Boot information passed according to boot protocol.
+ @param [in] Arg1 Boot information passed according to boot protocol.
+ @param [in] Arg2 Boot information passed according to boot protocol.
+ @param [in] Arg3 Boot information passed according to boot protocol.
**/
VOID
EFIAPI
_ModuleEntryPoint (
- IN VOID *SharedBufAddress,
- IN UINT64 SharedBufSize,
- IN UINT64 cookie1,
- IN UINT64 cookie2
+ IN UINTN Arg0,
+ IN UINTN Arg1,
+ IN UINTN Arg2,
+ IN UINTN Arg3
);
/**
|