Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: 62127dfbc72e3303c58bd05a5995feaf5d0fd91c https://github.com/tianocore/edk2/commit/62127dfbc72e3303c58bd05a5995feaf5d0fd91c Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025)
Changed paths: M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c Log Message: ----------- StandaloneMmPkg: Simplify returning event complete values Communication with Stmm can be via SPM using MM or FF-A. However, some return values differ between these communication models. This patch adds helper functions to covert the return values based on the communication model. It also fixes an issue when using the SPM using MM model, wherein an error code value of -7 was being returned when an unknown error occurred. The -7 value is not defined in SPM using MM. Therefore, return an UNSUPPORTED code instead. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 6087382c62686130a6cb8bd397afe23bad9c4e67 https://github.com/tianocore/edk2/commit/6087382c62686130a6cb8bd397afe23bad9c4e67 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c M StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c M StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf M StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h A StandaloneMmPkg/Include/Protocol/PiMmCpuDriverEp.h M StandaloneMmPkg/Include/StandaloneMmCpu.h M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf M StandaloneMmPkg/StandaloneMmPkg.dec Log Message: ----------- StandaloneMmPkg: Introduce PI_MM_CPU_DRIVER_EP protocol. This patch introduces a PI_MM_CPU_DRIVER_EP protocol to handle Mmcommunication request based on the CPU driver. Previously the CPU driver entry point was retrieved using the gEfiArmTfCpuDriverEntryPoint HOB. However, this practice is incorrect as StandaloneMM must be a HOB consumer and not a HOB producer. Therefore, remove the CPU entry HOB gEfiArmTfCpuDriverEntryPoint, and replace it with the CPU driver entry protocol EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL. The EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL installed in StandaloneMmCpuInitialize() will be used by the code in Arm/StandaloneMmCoreEntryPoint. This protocol is used like below: +=====+ |StandaloneMmCore| +=====+ | CEntryPoint() =================== | ProcessModuleEntryPointList() | +--> StandaloneMmMain() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | // Load StandaloneMmCpu driver which implements | // CpuDriverEntryPoint used by DelegatedEventLoop(). | // and install the gEdkiiPiMmCpuDriverEpProtocolGuid. -------------- | ... // Get CpuDriverEntryPoint implemented by // StandaloneMmCpu driver with gEdkiiPiMmCpuDriverEpProtocolGuid | DelegatedEventLoop() // Handle request by delegating it to // CpuDriverEntryPoint. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: fbeab84945b0100310713a584f8fecbf4621c11e https://github.com/tianocore/edk2/commit/fbeab84945b0100310713a584f8fecbf4621c11e Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dec M ArmPkg/ArmPkg.dsc A ArmPkg/Include/IndustryStandard/ArmTransferList.h A ArmPkg/Include/Library/ArmTransferListLib.h A ArmPkg/Library/ArmTransferListLib/ArmTransferListLib.c A ArmPkg/Library/ArmTransferListLib/ArmTransferListLib.inf Log Message: ----------- ArmPkg/Library: Introduce ArmTransferListLib ArmTransferList is used to pass boot information according to firmware handoff protocol specification [0]. When initializing StandaloneMm, it gets boot information from the PHIT HOB in the TransferList. [0] https://github.com/FirmwareHandoff/firmware_handoff Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 31fcaf1fc0dba3bc6494ef3e6acac78ee9c795b1 https://github.com/tianocore/edk2/commit/31fcaf1fc0dba3bc6494ef3e6acac78ee9c795b1 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: R StandaloneMmPkg/Library/StandaloneMmCoreHobLib/Arm/StandaloneMmCoreHobLib.c R StandaloneMmPkg/Library/StandaloneMmCoreHobLib/Arm/StandaloneMmCoreHobLibInternal.c A StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.c M StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf R StandaloneMmPkg/Library/StandaloneMmCoreHobLib/X64/StandaloneMmCoreHobLib.c Log Message: ----------- StandaloneMm/Library: Remove Hob creation on Arm CoreHob Library By using transfer list passed by TF-A, StandaloneMmCore is no more producer of HOBs, But it is consumer. So, the Arm-specific implementation of StandaloneMmCoreHobLib is no longer needed. This change removes the Arm-specific HOB creation code and integrates the necessary adjustments. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: c56856f068132dbc09cdf3c061941737c75699f3 https://github.com/tianocore/edk2/commit/c56856f068132dbc09cdf3c061941737c75699f3 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Include/IndustryStandard/ArmMmSvc.h M ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c Log Message: ----------- ArmPkg/IndustryStandard: Change naming convention in ArmMmSvc.h Change naming convention in ArmMmSvc.h with MM to SPM_MM This would make it clear to discern ABI protocol used to communicate with secure partition. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 54e394b4a20ea5ad0a1dee32e3ea498f5d7d3188 https://github.com/tianocore/edk2/commit/54e394b4a20ea5ad0a1dee32e3ea498f5d7d3188 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c Log Message: ----------- ArmPkg/StandaloneMmMmuLib: Introduce a SPM_MM status helper fucntion Introduce a new helper function SpmMmStatusToEfiStatus() to convert the SPM_MM status values to EFI_STATUS values. Signed-off-by: Levi yun <yeoreum....@arm.com> Commit: a5212d3db79312f65f0392f294e43193c148199f https://github.com/tianocore/edk2/commit/a5212d3db79312f65f0392f294e43193c148199f Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h R StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf M StandaloneMmPkg/StandaloneMmPkg.dsc Log Message: ----------- 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....@arm.com> Commit: 173af697ddd630ba8824700d88911f0b7e5525d1 https://github.com/tianocore/edk2/commit/173af697ddd630ba8824700d88911f0b7e5525d1 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Include/IndustryStandard/ArmFfaSvc.h Log Message: ----------- ArmPkg/IndustryStandard: Update ArmFfaSvc.h Update ArmFfaSvc.h defines & macros with FF-A v1.2 [0] and FF-A Memory Mangement Protocol [1]. This also changes naming convention used in it. Link: https://developer.arm.com/documentation/den0077/latest/ [0] Link: https://developer.arm.com/documentation/den0140/latest/ [1] Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: d1d690f3639e1daba29bf6e36a72a1a28df35263 https://github.com/tianocore/edk2/commit/d1d690f3639e1daba29bf6e36a72a1a28df35263 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: A ArmPkg/Include/IndustryStandard/ArmFfaBootInfo.h Log Message: ----------- 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....@arm.com> Commit: 79875fdde011735a8fe25823ef3f3b99cac49885 https://github.com/tianocore/edk2/commit/79875fdde011735a8fe25823ef3f3b99cac49885 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: A ArmPkg/Include/IndustryStandard/ArmFfaPartInfo.h Log Message: ----------- ArmPkg: Add FF-A partition information header Partition descriptor is used to get partition information via FFA_PARTITION_INFO_GET or FFA_PARTITION_INFO_GET_REGS FF-A ABI. Adds defines for partition descriptor and some macros used to call above ABIs. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 843f4fd60d0299412ac81900e09888ca2add70e7 https://github.com/tianocore/edk2/commit/843f4fd60d0299412ac81900e09888ca2add70e7 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dec Log Message: ----------- ArmPkg: Add FF-A related dynamic Pcd and Guid To communicate with spmc or spmd, UEFI needs to map the Rx/Tx buffer (which is a global resource in a partition) by getting the required information from the partition descriptor. for this, Define ArmFfaLib related Pcd and Guid. Pcd: - PcdFfaLibConduitSmc conudit to use ArmFfaLib. - PcdFfaTxBufeer address of Tx buffer. - PcdFfaRxBuffer: address of Rx buffer. - PcdTxRxPageCount: specify buffer size with EFI_PAGE_SIZE unit. - PcdFfaExitBootEventRegistered: check exit boot event registered to unmap rx/tx buffer. Guid: - gArmFfaRxTxBufferInfoGuid: This is used in Hob to get Rx/Tx buffer information to pass Rx/Tx buffer information via HobList if Rx/Tx Buffer mapped in PEI phase. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 30ecebe01564b96f4d6dfb845a99a70278d4f420 https://github.com/tianocore/edk2/commit/30ecebe01564b96f4d6dfb845a99a70278d4f420 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dec M ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf Log Message: ----------- ArmPkg: Remove PcdFfaEnabled PcdFfaEnabled is no more used because ArmFfaLib could find whether FF-A is supported dynamically. This patch removes usage of PcdFfaEnabled. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 18948c4a6a2a539d19b9c4fb081567c4d2eb4ab6 https://github.com/tianocore/edk2/commit/18948c4a6a2a539d19b9c4fb081567c4d2eb4ab6 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dec A ArmPkg/Include/Library/ArmFfaLib.h Log Message: ----------- ArmPkg: Add ArmFfaLib.h Add ArmFfaLib.h which defines interfaces correspond to FF-A ABIs. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 5d1b38dd07c40868b4415bbf7424e23ef165667b https://github.com/tianocore/edk2/commit/5d1b38dd07c40868b4415bbf7424e23ef165667b Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dsc A ArmPkg/Library/ArmFfaLib/ArmFfaCommon.c A ArmPkg/Library/ArmFfaLib/ArmFfaCommon.h A ArmPkg/Library/ArmFfaLib/ArmFfaDxeLib.c A ArmPkg/Library/ArmFfaLib/ArmFfaDxeLib.inf A ArmPkg/Library/ArmFfaLib/ArmFfaRxTxMap.c A ArmPkg/Library/ArmFfaLib/ArmFfaRxTxMap.h Log Message: ----------- ArmPkg: Add ArmFfaLib used in Dxe driver Add ArmFfaLib used in Dxe driver Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 166c3b2eb79b1bdfd74b582446d4c5fa2402d33d https://github.com/tianocore/edk2/commit/166c3b2eb79b1bdfd74b582446d4c5fa2402d33d Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dsc A ArmPkg/Library/ArmFfaLib/ArmFfaPeiLib.c A ArmPkg/Library/ArmFfaLib/ArmFfaPeiLib.inf Log Message: ----------- ArmPkg: Add ArmFfaLib used in PEIM Add ArmFfaLib used in PEIM. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 401699c3267a6fab120cdb5ee3887909728cd2de https://github.com/tianocore/edk2/commit/401699c3267a6fab120cdb5ee3887909728cd2de Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dsc A ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmCoreLib.inf A ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.c A ArmPkg/Library/ArmFfaLib/ArmFfaStandaloneMmLib.inf M StandaloneMmPkg/StandaloneMmPkg.dsc Log Message: ----------- ArmPkg: Add ArmFfaLib used in StandaloneMm Add ArmFfaLib used in StandaloneMmCore/StandaloneMm Driver. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 4ca452cf911311ceceebf7d259b67ee797db4433 https://github.com/tianocore/edk2/commit/4ca452cf911311ceceebf7d259b67ee797db4433 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c M ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf Log Message: ----------- ArmPkg/Library: Update StandaloneMmuLib with FF-A v1.2 with page granulirty The StandaloneMm implementation for Arm sets up the stack in the early startup code using the data section reserved in the assembly code. When TF-A loads the StandaloneMM binary in the DRAM it maps the entire StandaloneMM memory region as Read Only. Therefore, the initial startup assembly code updates the mem permissions of the stack region to Read Write. However, when the StandaloneMmCore is loaded the function UpdateMmFoundationPeCoffPermissions() starts applying the memory permissions based on the PE COFF sections as below: A. If the section is not executable, it first removes the executable permission of the section by calling TextUpdate(). TextUpdate() is the StandaloneMM MMU library function ArmSetMemoryRegionNoExec(). B. It then checks if the section is writable, and if it is it calls ReadWriteUpdater(), which invokes the StandaloneMM MMU library function ArmClearMemoryRegionReadOnly() to make the section writable. However, this results in the stack being made read-only between A and B. To understand this please see the following flow. 1. TF-A sets the entire StandaloneMM region as Read Only. 2. The stack is reserved in the data section by the early assembly entry point code. +--------------------+ <--- Start of Data Section | | | Data Section | | | | +----------------+ | <--- Stack region | | Stack | | | +----------------+ | | | +--------------------+ 3. The StanaloneMM early entry point code updates the attributes of the stack to Read Write. 4. When UpdateMmFoundationPeCoffPermissions() sets the permission of the data section to remove the Execute attribute, it calls ArmSetMemoryRegionNoExec(). 5. The ArmSetMemoryRegionNoExec() implementation gets the attributes of the first granule which is at the start of the data section, then clears the execute permission and applies the attribute for the entire data section. 6. Since TF-A has mapped the entire section as read only the first granule of the data section is read only and therefore the stack region attributes are changed to Read Only no execute. 7. Since the stack is read only after point A any updates to the stack result in an exception. To resolve this issue with update the library with FF-A v1.2, get/set memory permission per page unit. Links: https://developer.arm.com/documentation/den0140/latest/ [0] Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 1c963008e8d7ec8b676478ab42ff40b41cb32be0 https://github.com/tianocore/edk2/commit/1c963008e8d7ec8b676478ab42ff40b41cb32be0 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf M StandaloneMmPkg/StandaloneMmPkg.dsc Log Message: ----------- StandaloneMm/Library: Apply FF-A v1.2 in StandaloneMm To support the service other than Mmcommunication service, StandaloneMm should use FF-A v1.2 or later [0]. For this, StandaloneMm needs to change: 1. apply FF-A boot protocol - FF-A uses its own boot protocol and it can deliver phit hob. So, StandaloneMm should understand FF-A boot protocol and get phit hob from it to initialize. 2. Use DIRECT_REQ2 / DIRECT_RESP2 - To support the other service via FF-A protocol than MmCommunication, StandaloneMm should use DIRECT_REQ2 / DIRECT_RESP2. In case of service provided with MmCommunication protocol, register x2/x3 value is set as gEfiMmCommunication2ProtocolGuid and register x4 value is set with MmCommunication Buffer (ServiceTypeMmCommunication). In case of service with each speicifiation via FF-A, register x2/x3 value is set as each service guid and StandaloneMmCoreEntryPoint genreates Mm communication header with passed arguments to dispatch this service provided by StandaloneMm. i.e) Tpm service, Firmware update service and etc. (ServiceTypeMisc) Link: https://developer.arm.com/documentation/den0077/latest/ [0] Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 9f9a3de9e4c5595cd42d14c705570887630209d8 https://github.com/tianocore/edk2/commit/9f9a3de9e4c5595cd42d14c705570887630209d8 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c M ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf Log Message: ----------- ArmPkg/MmCommunicationDxe: Mmcommunication via FF-A Support Mmcommunication protocol via FF-A with StandaloneMm. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 73b2831879f35a707974cbafcd38c3dde49ae63c https://github.com/tianocore/edk2/commit/73b2831879f35a707974cbafcd38c3dde49ae63c Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c M ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.inf Log Message: ----------- ArmPkg/MmCommunicationPei: Mmcommunication via FF-A Support Mmcommunication protocol via FF-A with StandaloneMm. For this, FF-A v1.2 is required. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 8f3c157e04713c8aa84a930040bf75d52afb7c77 https://github.com/tianocore/edk2/commit/8f3c157e04713c8aa84a930040bf75d52afb7c77 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: R ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h M ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c M ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf M ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c A ArmPkg/Include/IndustryStandard/MmCommunicate.h Log Message: ----------- AmrPkg/MmCommunication: move Mmcommunicate.h to common include MmCommunication.h is used in MmCommunicationDxe/Pei both. Move this header file to common include. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 1bebc97b816ddedbaa0fbdf723c1d124d7fc84a3 https://github.com/tianocore/edk2/commit/1bebc97b816ddedbaa0fbdf723c1d124d7fc84a3 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c M ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c Log Message: ----------- ArmPkg/MmCommunication: add helper function converting smc return Add helper function converting smc return value to efi status. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 6016c522c6d6e7d6cce385379cfbe8f06cf8048e https://github.com/tianocore/edk2/commit/6016c522c6d6e7d6cce385379cfbe8f06cf8048e Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Core/StandaloneMmCore.c Log Message: ----------- StandaloneMmCore: Change log level when mCommunicationBuffer is NULL On Arm all requests are handled as Asynchronous events by the Root MMI handler. Since the communication data is conveyed using either the NS shared buffer or the Secure shared buffer, the Arm implementation does not setup the mCommunicationBuffer. Therefore, the mCommunicationBuffer being NULL is not an error case. Moreover, the existing code switches to Asynchronous event processing when the mCommunicationBuffer is NULL, which means that the log is an info log rather than an error. Therefore, change the log level from ERROR to INFO when the mCommunicationBuffer is NULL. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 697549465512b4a50d9e2d6f8d28d78b6c7c92e1 https://github.com/tianocore/edk2/commit/697549465512b4a50d9e2d6f8d28d78b6c7c92e1 Author: levi.yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.dec Log Message: ----------- ArmPkg: Add StandaloneMm stack size Pcd StandaloneMm Arm uses stack allocated in data section. This patch adds Pcd which specify the stack size of StandaloneMm. Signed-off-by: levi.yun <yeoreum....@arm.com> Commit: 7340a4b63a993151817faa0adabebfeb007d16c1 https://github.com/tianocore/edk2/commit/7340a4b63a993151817faa0adabebfeb007d16c1 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h A StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint32.S A StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint64.S M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf Log Message: ----------- StandaloneMmPkg: Apply embedded stack in StandaloneMmEntryPoint There are 2 communication interfaces between the SPMC and StandaloneMM 1. SpmMM 2. FF-A When SpmMM is enabled, TF-A acts as the SPMC at EL3 and the stack is setup by TF-A for use by StandaloneMm. However, when FF-A is enabled, the SPMC does not setup the stack for StandaloneMm and it is expected that the StandaloneMm code will setup its own stack. Therefore, reserve an area in the data region for use as the stack for StandaloneMM. This stack will be used in both the scenarios described above, i.e. when either SpmMM or FF-A is enabled. Although the stack is reserved from the data section which is expected to be Read-Write enabled, when TF-A maps the StandaloneMM binary into the DRAM it configures the entire StandaloneMM memory as Read-Only. Therefore, before the stack can be utilised, the PE Coff sections need to be scanned to change the the stack region from Read-Only to Read-Write. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 6c62f40df3f63732071dc97f23830b2e48c6cbc5 https://github.com/tianocore/edk2/commit/6c62f40df3f63732071dc97f23830b2e48c6cbc5 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c M StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c M StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h M StandaloneMmPkg/Include/StandaloneMmCpu.h M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c Log Message: ----------- StandaloneMmPkg: Move sanity check for comm buffer to entrypoint Arm has three types of communication buffer - Non secure communication buffer: shared buffer with NS partition - Secure communication buffer: shared buffer with Secure partition - Internal Misc service buffer: For misc service i.e. for services that do not use MmCommunication protocol, a buffer is created and populated internally. Since, internal Misc service buffer is allocated dynamically in StandaloneMm there is no additional check required for the Misc service buffer. This patch move sanity check of communication buffer from StandaloneMmCpu Driver to StandaloneMmEntryPoint. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: 6dd5375820f66cbae7e6beb19f12d50cda9a8370 https://github.com/tianocore/edk2/commit/6dd5375820f66cbae7e6beb19f12d50cda9a8370 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c M StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c M StandaloneMmPkg/Include/Protocol/PiMmCpuDriverEp.h M StandaloneMmPkg/Include/StandaloneMmCpu.h M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c Log Message: ----------- StandaloneMmPkg: remove per-cpu feature on StandaloneMm StandaloneMm in Arm is UP-migratable which means StandaloneMm cannot run concurrently. Therefore, remove per-cpu feature in StandaloneMm. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: b370eab8987d27fe9b679201d85312b06ac3b730 https://github.com/tianocore/edk2/commit/b370eab8987d27fe9b679201d85312b06ac3b730 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: A StandaloneMmPkg/Library/StandaloneMmExtractGuidedSectionLib/StandaloneMmExtractGuidedSectionLib.c A StandaloneMmPkg/Library/StandaloneMmExtractGuidedSectionLib/StandaloneMmExtractGuidedSectionLib.inf M StandaloneMmPkg/StandaloneMmPkg.dec M StandaloneMmPkg/StandaloneMmPkg.dsc Log Message: ----------- StandaloneMmPkg: introduce StandaloneMmExtractGuidedSectionLib The default ExtractGuidedSectionLib used by Standalone MM is the implementation in EmbeddedPkg. However, the ExtractGuidedSectionLib implementation in EmbeddedPkg builds HOBs to save the extract handler information. Since StandaloneMm is consumer of HOB, not a HOB producer, introduce a StandaloneMmExtraGuidedSectionLib implementation that saves the extract handler information in the ConfigurationTable. This StandaloneMmExtraGuidedSectionLib can be used by MM_STANDALONE and MM_CORE_STANDALONE modules. Signed-off-by: Levi Yun <yeoreum....@arm.com> Commit: f0c87b9ef421954ec0e7942d9e8d7d4d14b208b3 https://github.com/tianocore/edk2/commit/f0c87b9ef421954ec0e7942d9e8d7d4d14b208b3 Author: Levi Yun <yeoreum....@arm.com> Date: 2025-01-17 (Fri, 17 Jan 2025) Changed paths: M ArmPkg/ArmPkg.ci.yaml M ArmPkg/ArmPkg.dec M ArmPkg/ArmPkg.dsc A ArmPkg/Drivers/StandaloneMmCpu/EventHandle.c A ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c A ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h A ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf A ArmPkg/Include/Library/ArmStandaloneMmCoreEntryPoint.h A ArmPkg/Include/Protocol/PiMmCpuDriverEp.h A ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/AArch64/ModuleEntryPoint.S A ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint.S A ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.c A ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf A ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/SetPermissions.c R StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c R StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c R StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf R StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h R StandaloneMmPkg/Include/Protocol/PiMmCpuDriverEp.h R StandaloneMmPkg/Include/StandaloneMmCpu.h R StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint32.S R StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/ModuleEntryPoint64.S R StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c R StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c M StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf M StandaloneMmPkg/StandaloneMmPkg.dec M StandaloneMmPkg/StandaloneMmPkg.dsc Log Message: ----------- StandaloneMmPkg: move core entry point lib and cpu driver to ArmPkg StandaloneMmCpu driver is only used for Arm architecture and StandaloneMmCoreEntryPointLib for Arm has specific implementation with StandaloneMmCpu driver. Move StandaloneMmCpu Driver and StandaloneMmCoreEntryPointLib for Arm to ArmPkg. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Levi Yun <yeoreum....@arm.com> Compare: https://github.com/tianocore/edk2/compare/1301e0b47eb3...f0c87b9ef421 To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits