|
TianoCore EDK2 master
|
#include <Library/ArmSvcLib.h>#include <Library/ArmFfaLib.h>#include <Library/ArmMmHandlerContext.h>#include <Library/PeCoffLib.h>#include <Library/FvLib.h>#include <Protocol/PiMmCpuDriverEp.h>Go to the source code of this file.
Data Structures | |
| struct | ServiceTableEntry |
| struct | MISC_MM_COMMUNICATE_BUFFER |
| struct | EFI_PARAM_HEADER |
Macros | |
| #define | CPU_INFO_FLAG_PRIMARY_CPU 0x00000001 |
| #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 |
Typedefs | |
| typedef struct ServiceTableEntry | SERVICE_TABLE_ENTRY |
| typedef RETURN_STATUS(* | REGION_PERMISSION_UPDATE_FUNC) (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length) |
Functions | |
| 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) |
| 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) |
| EFI_STATUS EFIAPI | LocateStandaloneMmCorePeCoffData (IN EFI_FIRMWARE_VOLUME_HEADER *BfvAddress, IN OUT VOID **TeData, IN OUT UINTN *TeDataSize) |
| VOID EFIAPI | CEntryPoint (IN UINTN Arg0, IN UINTN Arg1, IN UINTN Arg2, IN UINTN Arg3) |
| VOID EFIAPI | ProcessLibraryConstructorList (IN EFI_HANDLE ImageHandle, IN EFI_MM_SYSTEM_TABLE *MmSystemTable) |
| VOID EFIAPI | ProcessModuleEntryPointList (IN VOID *HobStart) |
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
Definition in file ArmStandaloneMmCoreEntryPoint.h.
| #define CPU_INFO_FLAG_PRIMARY_CPU 0x00000001 |
Definition at line 34 of file ArmStandaloneMmCoreEntryPoint.h.
| #define MMRAM_DESC_IDX_HEAP 3 |
Definition at line 43 of file ArmStandaloneMmCoreEntryPoint.h.
| #define MMRAM_DESC_IDX_IMAGE 0 |
Definition at line 40 of file ArmStandaloneMmCoreEntryPoint.h.
| #define MMRAM_DESC_IDX_NORMAL_SHARED_BUFFER 2 |
Definition at line 42 of file ArmStandaloneMmCoreEntryPoint.h.
| #define MMRAM_DESC_IDX_SECURE_SHARED_BUFFER 1 |
Definition at line 41 of file ArmStandaloneMmCoreEntryPoint.h.
| #define MMRAM_DESC_MIN_COUNT 4 |
Definition at line 44 of file ArmStandaloneMmCoreEntryPoint.h.
| typedef RETURN_STATUS(* REGION_PERMISSION_UPDATE_FUNC) (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length) |
Definition at line 78 of file ArmStandaloneMmCoreEntryPoint.h.
| typedef struct ServiceTableEntry SERVICE_TABLE_ENTRY |
Service table entry to return service type matched with service guid
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.
| [in] | Arg0 | In case of FF-A, address of FF-A boot information In case of SPM_MM, this parameter must be zero |
| [in] | Arg1 | In case of FF-A, this parameter must be zero In case of SPM_MM, Signature and register convention version |
| [in] | Arg2 | Must be zero |
| [in] | Arg3 | In case of FF-A, this parameter must be zero In case of SPM_MM, address of transfer list |
Definition at line 1109 of file ArmStandaloneMmCoreEntryPoint.c.
| 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 section information of the Standalone MM Core module to be able to change permissions of the individual sections later in the boot process.
| [in] | TeData | Pointer to PE/COFF image data |
| [in,out] | ImageContext | Pointer to PE/COFF image context |
| [out] | ImageBase | Pointer to ImageBase variable |
| [in,out] | SectionHeaderOffset | Offset of PE/COFF image section header |
| [in,out] | NumberOfSections | Number of Sections |
Definition at line 347 of file SetPermissions.c.
| EFI_STATUS EFIAPI LocateStandaloneMmCorePeCoffData | ( | IN EFI_FIRMWARE_VOLUME_HEADER * | BfvAddress, |
| IN OUT VOID ** | TeData, | ||
| IN OUT UINTN * | TeDataSize | ||
| ) |
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.
| [in] | BfvAddress | Base Address of Boot Firmware Volume |
| [in,out] | TeData | Pointer to address for allocating memory for PE/COFF image data |
| [in,out] | TeDataSize | Pointer to size of PE/COFF image data |
Definition at line 179 of file SetPermissions.c.
| VOID EFIAPI ProcessLibraryConstructorList | ( | IN EFI_HANDLE | ImageHandle, |
| IN EFI_MM_SYSTEM_TABLE * | MmSystemTable | ||
| ) |
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.
| ImageHandle | The image handle of the DXE Core. |
| SystemTable | A pointer to the EFI System Table. |
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.
| HobStart | Pointer to the beginning of the HOB List passed in from the PEI Phase. |
| 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 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.
| [in] | ImageContext | Pointer to PE/COFF image context |
| [in] | ImageBase | Base of image in memory |
| [in] | SectionHeaderOffset | Offset of PE/COFF image section header |
| [in] | NumberOfSections | Number of Sections |
| [in] | TextUpdater | Function to change code permissions |
| [in] | ReadOnlyUpdater | Function to change RO permissions |
| [in] | ReadWriteUpdater | Function to change RW permissions |
Definition at line 44 of file SetPermissions.c.