Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 1e550744fdf02d897ef5f37c6963675da7d732e4
https://github.com/tianocore/edk2/commit/1e550744fdf02d897ef5f37c6963675da7d732e4
Author: Yeoreum Yun <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M ArmPkg/Drivers/StandaloneMmCpu/EventHandle.c
M ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c
M ArmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h
Log Message:
-----------
ArmPkg/Drivers: allocate mGuidedEventContext once
mGuidedEventContext does not need to be allocated and freed for every
request, as doing so introduces the possibility of failure due to an
out-of-memory condition.
Instead of allocating and freeing it in PiMmStandaloneMmCpuDriverEntry(),
allocate mGuidedEventContext once in the Standalone MM CPU driver's entry
point. If the allocation fails, fail the Standalone MM initialization.
Signed-off-by: Yeoreum Yun <[email protected]>
Commit: b5aea432d486ce457a77304882225b41f0aebe73
https://github.com/tianocore/edk2/commit/b5aea432d486ce457a77304882225b41f0aebe73
Author: Yeoreum Yun <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M
ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.c
Log Message:
-----------
ArmPkg/Library: remove FFA_ERROR() return for FFA_SEND_DIRECT_MSG_REQ(v2)
There is a known issue [0] where the SPMC repeatedly re-enters
Standalone MM with FFA_ERROR after Standalone MM returns FFA_ERROR
because it failed to locate an MMI handler for an MM communication
request.
Although the FF-A specification does not currently clarify this
behavior, it is expected to be updated. Once Standalone MM is entered
through FFA_MSG_SEND_DIRECT_REQ or FFA_MSG_SEND_DIRECT_REQ2, it must
return through FFA_MSG_SEND_DIRECT_RESP or FFA_MSG_SEND_DIRECT_RESP2,
respectively.
Therefore, do not return FFA_ERROR after Standalone MM has been entered
through a direct request.
Standalone MM handles two types of services received through direct
requests: ServiceTypeMmCommunication and ServiceTypeMisc.
For ServiceTypeMmCommunication, protocol errors are returned through
the communication buffer, so the handler itself should return
EFI_SUCCESS. However, failures may occur outside the handler, such as
when no matching MMI handler can be found. In these cases, construct the
direct response as follows:
- FFA_MSG_SEND_DIRECT_RESP:
x0 = ARM_FID_FFA_MSG_SEND_DIRECT_RESP
x1 = Source/destination partition IDs
x2 = 0x00
x3 = ARM_FID_SPM_MM_SP_EVENT_COMPLETE
x4 = ARM_SPM_MM_RET_*
- FFA_MSG_SEND_DIRECT_RESP2:
x0 = ARM_FID_FFA_MSG_SEND_DIRECT_RESP2
x1 = Source/destination partition IDs
x2 = 0x00 (SBZ)
x3 = 0x00 (SBZ)
x4 = ARM_FID_SPM_MM_SP_EVENT_COMPLETE
x5 = ARM_SPM_MM_RET_*
Although this convention is not formally documented, it has been used
since edk2 commit 388dfe02fb9a ("StandaloneMmPkg: Add option to use...").
For ServiceTypeMisc, the handler returns the complete response,
including any protocol-specific error code and arguments, directly
through FfaArgs. The handler is therefore responsible for constructing
FfaArgs and should return EFI_SUCCESS.
All ServiceTypeMisc handlers are registered during Standalone MM
initialization, and initialization fails if any handler cannot be
registered. A failure returned by a ServiceTypeMisc handler is therefore
unexpected.
There is no generic way to construct FfaArgs for a direct response in
this situation. Call CpuDeadLoop() instead of returning an invalid
response.
Closes: https://github.com/tianocore/edk2/issues/12646#issuecomment-5523596676
[0]
Signed-off-by: Yeoreum Yun <[email protected]>
Commit: 04c02feabade390383b616344ce8b6674727cd6b
https://github.com/tianocore/edk2/commit/04c02feabade390383b616344ce8b6674727cd6b
Author: Yeoreum Yun <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
M ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c
Log Message:
-----------
ArmPkg/Drivers: change to proper retval for mm-communication via FF-A
Since edk2 commit 388dfe02fb9a ("StandaloneMmPkg: Add option to use..."),
MM communication through FFA_MSG_SEND_DIRECT_REQ expects an
FFA_MSG_SEND_DIRECT_RESP with the following register values:
x0 = ARM_FID_FFA_MSG_SEND_DIRECT_RESP
x1 = Source/destination partition IDs
x2 = 0x00
x3 = ARM_FID_SPM_MM_SP_EVENT_COMPLETE
x4 = ARM_SPM_MM_RET_*
The value in x4, which is returned as Arg1, must therefore be checked to
determine whether the MM communication succeeded.
Update SendFfaMmCommunicate() to convert the value returned in Arg1 into
the corresponding EFI_STATUS and return it to the caller.
Signed-off-by: Yeoreum Yun <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/352b420a868b...04c02feabade
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits