diff --git a/ArmPkg/ArmPkg.ci.yaml b/ArmPkg/ArmPkg.ci.yaml index 292a25c9eb4d..65685b4ea7be 100644 --- a/ArmPkg/ArmPkg.ci.yaml +++ b/ArmPkg/ArmPkg.ci.yaml @@ -51,7 +51,8 @@ "EmbeddedPkg/EmbeddedPkg.dec", "MdeModulePkg/MdeModulePkg.dec", "MdePkg/MdePkg.dec", - "ShellPkg/ShellPkg.dec" + "ShellPkg/ShellPkg.dec", + "StandaloneMmPkg/StandaloneMmPkg.dec" ], # For host based unit tests "AcceptableDependencies-HOST_APPLICATION":[ diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index df56e6326d08..c65660658d1e 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -101,6 +101,10 @@ # ArmFfaLib|Include/Library/ArmFfaLib.h + ## @libraryclass Defines a set of interfaces for the MM core entrypoint for + ## AArch64 and ARM. + StandaloneMmCoreEntryPoint|Include/Library/ArmStandaloneMmCoreEntryPoint.h + [Guids.common] gArmTokenSpaceGuid = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } } @@ -126,6 +130,8 @@ ## ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h gArmScmiPerformanceProtocolGuid = { 0x9b8ba84, 0x3dd3, 0x49a6, { 0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad } } + gEdkiiPiMmCpuDriverEpProtocolGuid = { 0x6ecbd5a1, 0xc0f8, 0x4702, { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }} + [Ppis] ## Include/Ppi/ArmMpCoreInfo.h gArmMpCoreInfoPpiGuid = { 0x6847cc74, 0xe9ec, 0x4f8f, {0xa2, 0x9d, 0xab, 0x44, 0xe7, 0x54, 0xa8, 0xfc} } diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index fa275db1381d..e716dac50417 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -106,6 +106,15 @@ PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf ArmFfaLib|ArmPkg/Library/ArmFfaLib/ArmFfaPeiLib.inf +[LibraryClasses.common.MM_CORE_STANDALONE] + StandaloneMmCoreEntryPoint|ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf + HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf + +[LibraryClasses.common.MM_STANDALONE] + StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf + HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf + MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf + [Components.common] ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf @@ -166,6 +175,12 @@ ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.inf +[Components.common.MM_CORE_STANALONE] + ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf + +[Components.common.MM_STANDALONE] + ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf + [Components.AARCH64] ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c b/ArmPkg/Drivers/StandaloneMmCpu/EventHandle.c similarity index 100% rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c rename to ArmPkg/Drivers/StandaloneMmCpu/EventHandle.c diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c b/ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c similarity index 100% rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c rename to ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c diff --git a/StandaloneMmPkg/Include/StandaloneMmCpu.h b/ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h similarity index 100% rename from StandaloneMmPkg/Include/StandaloneMmCpu.h rename to ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf b/ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf similarity index 93% rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf rename to ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf index 36b70ba1b9f8..dcf94d5778d7 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf +++ b/ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf @@ -19,10 +19,12 @@ ENTRY_POINT = StandaloneMmCpuInitialize [Sources] - StandaloneMmCpu.c EventHandle.c + StandaloneMmCpu.c + StandaloneMmCpu.h [Packages] + ArmPkg/ArmPkg.dec MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec StandaloneMmPkg/StandaloneMmPkg.dec diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint64.S b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/AArch64/ModuleEntryPoint.S similarity index 100% rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint64.S rename to ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/AArch64/ModuleEntryPoint.S diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint32.S b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint.S similarity index 100% rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint32.S rename to ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint.S diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.c similarity index 96% rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c rename to ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.c index f5d2361c5f5f..5e33999a9e84 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c +++ b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.c @@ -22,12 +22,11 @@ #include -#include - #include #include #include +#include #include #include #include diff --git a/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf new file mode 100644 index 000000000000..9afd8e971546 --- /dev/null +++ b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf @@ -0,0 +1,72 @@ +## @file +# Module entry point library for DXE core. +# +# Copyright (c) 2024, Arm Ltd. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION = 0x0001001A + BASE_NAME = ArmStandaloneMmCoreEntryPoint + FILE_GUID = 16d7b2e4-a025-11ef-8931-6b032fa329a6 + MODULE_TYPE = MM_CORE_STANDALONE + VERSION_STRING = 1.0 + PI_SPECIFICATION_VERSION = 0x00010032 + LIBRARY_CLASS = StandaloneMmCoreEntryPoint|MM_CORE_STANDALONE + +# +# VALID_ARCHITECTURES = ARM AARCH64 +# + +[Sources] + ArmStandaloneMmCoreEntryPoint.c + SetPermissions.c + +[Sources.AARCH64] + AArch64/ModuleEntryPoint.S + +[Sources.ARM] + Arm/ModuleEntryPoint.S + +[Packages] + ArmPkg/ArmPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + StandaloneMmPkg/StandaloneMmPkg.dec + +[Packages] + ArmPkg/ArmPkg.dec + +[LibraryClasses] + BaseLib + DebugLib + StandaloneMmMmuLib + ArmSvcLib + ArmTransferListLib + ArmFfaLib + +[Guids] + gMpInformationHobGuid + gEfiMmPeiMmramMemoryReserveGuid + gEfiStandaloneMmNonSecureBufferGuid + gEfiHobListGuid + +[Protocols] + gEdkiiPiMmCpuDriverEpProtocolGuid + gEfiMmCommunication2ProtocolGuid + +[Pcd] + gArmTokenSpaceGuid.PcdStMmStackSize + +# +# This configuration fails for CLANGPDB, which does not support PIE in the GCC +# sense. Such however is required for ARM family StandaloneMmCore +# self-relocation, and thus the CLANGPDB toolchain is unsupported for ARM and +# AARCH64 for this module. +# +[BuildOptions] + GCC:*_*_ARM_CC_FLAGS = -fpie + GCC:*_*_AARCH64_CC_FLAGS = -fpie diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/SetPermissions.c similarity index 96% rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c rename to ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/SetPermissions.c index 5c6bd0e1d7d2..fd3fdae4f086 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c +++ b/ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/SetPermissions.c @@ -13,7 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include -#include +#include #include #include #include diff --git a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h deleted file mode 100644 index 1549211613ba..000000000000 --- a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h +++ /dev/null @@ -1,294 +0,0 @@ -/** @file - Entry point to the Standalone MM Foundation when initialized during the SEC - phase on ARM platforms - - Copyright (c) 2017 - 2024, Arm Ltd. All rights reserved.
- 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/latest] - -**/ - -#ifndef __STANDALONEMMCORE_ENTRY_POINT_H__ -#define __STANDALONEMMCORE_ENTRY_POINT_H__ - -#include -#include -#include -#include - -#define CPU_INFO_FLAG_PRIMARY_CPU 0x00000001 - -/* - * Index information for mm range descriptors in - * gEfiMmPeiMmramMemoryReserveGuid Guid Hob. - */ -#define MMRAM_DESC_IDX_IMAGE 0 -#define MMRAM_DESC_IDX_SECURE_SHARED_BUFFER 1 -#define MMRAM_DESC_IDX_NORMAL_SHARED_BUFFER 2 -#define MMRAM_DESC_IDX_HEAP 3 -#define MMRAM_DESC_MIN_COUNT 4 - -/* - * Communication ABI protocol to communicate between normal/secure partition. - */ -typedef enum { - /// Unknown Communication ABI protocol - CommProtocolUnknown, - - /// Communicate via SPM_MM ABI protocol - CommProtocolSpmMm, - - /// Communicate via FF-A ABI protocol - CommProtocolFfa, - - CommProtocolMax, -} COMM_PROTOCOL; - -/** When using FF-A ABI, there're ways to request service to StandaloneMm - - FF-A with MmCommunication protocol. - - FF-A service with each specification. - MmCommunication Protocol can use FFA_MSG_SEND_DIRECT_REQ or REQ2, - Other FF-A services should use FFA_MSG_SEND_DIRECT_REQ2. - In case of FF-A with MmCommunication protocol via FFA_MSG_SEND_DIRECT_REQ, - register x3 saves Communication Buffer with gEfiMmCommunication2ProtocolGuid. - In case of FF-A with MmCommunication protocol via FFA_MSG_SEND_DIRECT_REQ2, - register x2/x3 save gEfiMmCommunication2ProtocolGuid and - register x4 saves Communication Buffer with Service Guid. - - Other FF-A services (ServiceTypeMisc) delivers register values according to - there own service specification. - That means it doesn't use MmCommunication Buffer with MmCommunication Header - format. - (i.e) Tpm service via FF-A or Firmware Update service via FF-A. - To support latter services by StandaloneMm, it defines SERVICE_TYPE_MISC. - So that StandaloneMmEntryPointCore.c generates MmCommunication Header - with delivered register values to dispatch service provided StandaloneMmCore. - So that service handler can get proper information from delivered register. - - In case of SPM_MM Abi, it only supports MmCommunication service. - */ -typedef enum { - /// Unknown - ServiceTypeUnknown, - - /// MmCommunication services - ServiceTypeMmCommunication, - - /// Misc services - ServiceTypeMisc, - - ServiceTypeMax, -} SERVICE_TYPE; - -/** Direct message request/response version - */ -typedef enum { - /// Direct message version 1. Use FFA_DIRECT_MSG_REQ/RESP - DirectMsgV1, - - /// Direct message version 2. Use FFA_DIRECT_MSG_REQ2/RESP2 - DirectMsgV2, - - DirectMsgMax, -} DIRECT_MSG_VERSION; - -/** Service table entry to return service type matched with service guid - */ -typedef struct ServiceTableEntry { - /// Service Guid - EFI_GUID *ServiceGuid; - - /// Service Type - SERVICE_TYPE ServiceType; -} SERVICE_TABLE_ENTRY; - -/** Ffa Abi data used in FFA_MSG_SEND_DIRECT_RESP/RESP2. - */ -typedef struct FfaMsgInfo { - /// Source partition id - UINT16 SourcePartId; - - /// Destination partition id - UINT16 DestPartId; - - /// Direct Message version - DIRECT_MSG_VERSION DirectMsgVersion; - - /// Service Type - SERVICE_TYPE ServiceType; -} FFA_MSG_INFO; - -/** MmCommunication Header for Misc service. - Misc service doesn't use MmCommunication Buffer. - This structure is used to dispatch Misc services by StandaloneMm. - */ -typedef struct { - /// Service guid - EFI_GUID HeaderGuid; - - /// Length of Message. In case of misc service, sizeof (EventSvcArgs) - UINTN MessageLength; - - /// Delivered register values. - DIRECT_MSG_ARGS DirectMsgArgs; -} MISC_MM_COMMUNICATE_BUFFER; - -typedef struct { - UINT8 Type; /* type of the structure */ - UINT8 Version; /* version of this structure */ - UINT16 Size; /* size of this structure in bytes */ - UINT32 Attr; /* attributes: unused bits SBZ */ -} EFI_PARAM_HEADER; - -typedef RETURN_STATUS (*REGION_PERMISSION_UPDATE_FUNC) ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length - ); - -/** - Privileged firmware assigns RO & Executable attributes to all memory occupied - by the Boot Firmware Volume. This function sets the correct permissions of - sections in the Standalone MM Core module to be able to access RO and RW data - and make further progress in the boot process. - - @param [in] ImageContext Pointer to PE/COFF image context - @param [in] ImageBase Base of image in memory - @param [in] SectionHeaderOffset Offset of PE/COFF image section header - @param [in] NumberOfSections Number of Sections - @param [in] TextUpdater Function to change code permissions - @param [in] ReadOnlyUpdater Function to change RO permissions - @param [in] ReadWriteUpdater Function to change RW permissions - -**/ -EFI_STATUS -EFIAPI -UpdateMmFoundationPeCoffPermissions ( - IN CONST PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext, - IN EFI_PHYSICAL_ADDRESS ImageBase, - IN UINT32 SectionHeaderOffset, - IN CONST UINT16 NumberOfSections, - IN REGION_PERMISSION_UPDATE_FUNC TextUpdater, - IN REGION_PERMISSION_UPDATE_FUNC ReadOnlyUpdater, - IN REGION_PERMISSION_UPDATE_FUNC ReadWriteUpdater - ); - -/** - Privileged firmware assigns RO & Executable attributes to all memory occupied - by the Boot Firmware Volume. This function locates the section information of - the Standalone MM Core module to be able to change permissions of the - individual sections later in the boot process. - - @param [in] TeData Pointer to PE/COFF image data - @param [in, out] ImageContext Pointer to PE/COFF image context - @param [out] ImageBase Pointer to ImageBase variable - @param [in, out] SectionHeaderOffset Offset of PE/COFF image section header - @param [in, out] NumberOfSections Number of Sections - -**/ -EFI_STATUS -EFIAPI -GetStandaloneMmCorePeCoffSections ( - IN VOID *TeData, - IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext, - OUT EFI_PHYSICAL_ADDRESS *ImageBase, - IN OUT UINT32 *SectionHeaderOffset, - IN OUT UINT16 *NumberOfSections - ); - -/** - Privileged firmware assigns RO & Executable attributes to all memory occupied - by the Boot Firmware Volume. This function locates the Standalone MM Core - module PE/COFF image in the BFV and returns this information. - - @param [in] BfvAddress Base Address of Boot Firmware Volume - @param [in, out] TeData Pointer to address for allocating memory - for PE/COFF image data - @param [in, out] TeDataSize Pointer to size of PE/COFF image data - -**/ -EFI_STATUS -EFIAPI -LocateStandaloneMmCorePeCoffData ( - IN EFI_FIRMWARE_VOLUME_HEADER *BfvAddress, - IN OUT VOID **TeData, - IN OUT UINTN *TeDataSize - ); - -/** - The handoff between the SPMC to StandaloneMM depends on the - communication interface between the SPMC and StandaloneMM. - When SpmMM is used, the handoff is implemented using the - Firmware Handoff protocol. When FF-A is used the FF-A boot - protocol is used. - - @param [in] Arg0 In case of FF-A, address of FF-A boot information - In case of SPM_MM, this parameter must be zero - @param [in] Arg1 In case of FF-A, this parameter must be zero - In case of SPM_MM, Signature and register convention version - @param [in] Arg2 Must be zero - @param [in] Arg3 In case of FF-A, this parameter must be zero - In case of SPM_MM, address of transfer list - -**/ -VOID -EFIAPI -CEntryPoint ( - IN UINTN Arg0, - IN UINTN Arg1, - IN UINTN Arg2, - IN UINTN Arg3 - ); - -/** - Auto generated function that calls the library constructors for all of the module's dependent libraries. - - This function must be called by CEntryPoint(). - This function calls the set of library constructors for the set of library instances - that a module depends on. This includes library instances that a module depends on - directly and library instances that a module depends on indirectly through other - libraries. This function is auto generated by build tools and those build tools are - responsible for collecting the set of library instances, determine which ones have - constructors, and calling the library constructors in the proper order based upon - each of the library instances own dependencies. - - @param ImageHandle The image handle of the DXE Core. - @param SystemTable A pointer to the EFI System Table. - -**/ -VOID -EFIAPI -ProcessLibraryConstructorList ( - IN EFI_HANDLE ImageHandle, - IN EFI_MM_SYSTEM_TABLE *MmSystemTable - ); - -/** - Auto generated function that calls a set of module entry points. - - This function must be called by CEntryPoint(). - This function calls the set of module entry points. - This function is auto generated by build tools and those build tools are responsible - for collecting the module entry points and calling them in a specified order. - - @param HobStart Pointer to the beginning of the HOB List passed in from the PEI Phase. - -**/ -VOID -EFIAPI -ProcessModuleEntryPointList ( - IN VOID *HobStart - ); - -#endif diff --git a/StandaloneMmPkg/Include/Protocol/PiMmCpuDriverEp.h b/StandaloneMmPkg/Include/Protocol/PiMmCpuDriverEp.h deleted file mode 100644 index 4b2f61fa0618..000000000000 --- a/StandaloneMmPkg/Include/Protocol/PiMmCpuDriverEp.h +++ /dev/null @@ -1,60 +0,0 @@ -/** @file - This file describes the PiMm Cpu Driver Entry Point Protocol. - the protocol is for defining handler for mm communication request event - according to cpu driver. - - Copyright (c) 2024, Arm Limited. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef PI_MM_CPU_DRIVER_EP_H_ -#define PI_MM_CPU_DRIVER_EP_H_ - -#include - -#define EDKII_PI_MM_CPU_DRIVER_EP_GUID { \ - 0x6ecbd5a1, 0xc0f8, 0x4702, { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 } \ - } - -/** - The PI Standalone MM entry point for handling mm communication request - Here is an example of how the EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL - is utilized in ARM: - 1. StandaloneMmCoreEntryPoint loads StandaloneMmCore. - 2. StandaloneMmCore dispatches all MM drivers, - including the StandaloneMmCpu driver. - 3. The StandaloneMmCpu driver declares its MMI CPU entry point through - the PI_MM_CPU_DRIVER_EP_PROTOCOL. - 4. After all drivers have been dispatched, - StandaloneMmCoreEntryPoint retrieves the MMI CPU entry point - by locating the protocol. - 5. The DelegatedEventLoop then calls the MM CPU entry point. - - See StandaloneMmPkg/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c - - @param [in] EventId The event Id based on firmware. - @param [in] CommBufferAddr Address of the communication buffer. - - @retval EFI_SUCCESS Success. - @retval EFI_INVALID_PARAMETER A parameter was invalid. - @retval EFI_ACCESS_DENIED Access not permitted. - @retval EFI_OUT_OF_RESOURCES Out of resources. - @retval EFI_UNSUPPORTED Operation not supported. -**/ -typedef -EFI_STATUS -(EFIAPI *EDKII_PI_MM_CPU_DRIVER_ENTRYPOINT)( - IN UINTN EventId, - IN UINTN CommBufferAddr - ); - -typedef struct _EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL; - -struct _EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL { - EDKII_PI_MM_CPU_DRIVER_ENTRYPOINT PiMmCpuDriverEntryPoint; -}; - -extern EFI_GUID gEdkiiPiMmCpuDriverEpProtocolGuid; - -#endif diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf index 14d42258e79f..9f66a8f84c09 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf @@ -21,16 +21,6 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only) # -[Sources.AARCH64, Sources.ARM] - Arm/StandaloneMmCoreEntryPoint.c - Arm/SetPermissions.c - -[Sources.AARCH64] - Arm/ModuleEntryPoint64.S - -[Sources.ARM] - Arm/ModuleEntryPoint32.S - [Sources.X64] X64/StandaloneMmCoreEntryPoint.c @@ -39,34 +29,15 @@ MdeModulePkg/MdeModulePkg.dec StandaloneMmPkg/StandaloneMmPkg.dec -[Packages.ARM, Packages.AARCH64] - ArmPkg/ArmPkg.dec - [LibraryClasses] BaseLib DebugLib -[LibraryClasses.ARM, LibraryClasses.AARCH64] - StandaloneMmMmuLib - ArmSvcLib - ArmTransferListLib - ArmFfaLib - [Guids] gMpInformationHobGuid gEfiMmPeiMmramMemoryReserveGuid gEfiStandaloneMmNonSecureBufferGuid -[Guids.ARM, Guids.AARCH64] - gEfiHobListGuid - -[Protocols.ARM, Protocols.AARCH64] - gEdkiiPiMmCpuDriverEpProtocolGuid - gEfiMmCommunication2ProtocolGuid - -[FixedPcd.ARM, FixedPcd.AARCH64] - gArmTokenSpaceGuid.PcdStMmStackSize - # # This configuration fails for CLANGPDB, which does not support PIE in the GCC # sense. Such however is required for ARM family StandaloneMmCore diff --git a/StandaloneMmPkg/StandaloneMmPkg.dec b/StandaloneMmPkg/StandaloneMmPkg.dec index 800d3e2264a7..632e8333bbc2 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dec +++ b/StandaloneMmPkg/StandaloneMmPkg.dec @@ -33,11 +33,6 @@ [LibraryClasses.X64.PEIM] MmPlatformHobProducerLib|Include/Library/MmPlatformHobProducerLib.h -[LibraryClasses.AArch64, LibraryClasses.ARM] - ## @libraryclass Defines a set of interfaces for the MM core entrypoint for - ## AArch64 and ARM. - StandaloneMmCoreEntryPoint|Include/Library/Arm/StandaloneMmCoreEntryPoint.h - [Guids] gStandaloneMmPkgTokenSpaceGuid = { 0x18fe7632, 0xf5c8, 0x4e63, { 0x8d, 0xe8, 0x17, 0xa5, 0x5c, 0x59, 0x13, 0xbd }} gMpInformationHobGuid = { 0xba33f15d, 0x4000, 0x45c1, { 0x8e, 0x88, 0xf9, 0x16, 0x92, 0xd4, 0x57, 0xe3 }} @@ -50,8 +45,6 @@ gExtraGuidedSectionHandlerInfoGuid = { 0xa558d266, 0x7bfc, 0x11ef, { 0xb4, 0xf0, 0x5f, 0x7b, 0x86, 0xa7, 0xfb, 0x80 }} [Protocols] - gEdkiiPiMmCpuDriverEpProtocolGuid = { 0x6ecbd5a1, 0xc0f8, 0x4702, { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }} - gEventMmDispatchGuid = { 0x7e6efffa, 0x69b4, 0x4c1b, { 0xa4, 0xc7, 0xaf, 0xf9, 0xc9, 0x24, 0x4f, 0xee }} [PcdsFixedAtBuild, PcdsPatchableInModule]