mirror of
https://github.com/Dasharo/edk2-upstream.git
synced 2026-06-13 19:16:19 -07:00
MdeModulePkg: consider UNSUPPORTED return as valid in ArmFfaStandaloneMmLib
commitb534cabbda("ArmFfaLib: Add Rx/Tx support for Stmm secure partition") makes ArmFfaStandlaoneMm(Core)Lib map Rx/Tx buffer in its constructor. This makes a failure of loading StandaloneMm in legacy platform which doesn't implements Rx/Tx buffer related API since it doesn't need to. StandaloneMm could be only service provider not cosumer in some platform where doesn't need to map RxTx buffer. Therefore, Considier EFI_UNSUPPORTED return in ArmFfaStandaloneMmLib's constructor. Fixes:b534cabbda("ArmFfaLib: Add Rx/Tx support for Stmm secure partition") Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
This commit is contained in:
@@ -67,6 +67,19 @@ ArmFfaStandaloneMmLibConstructor (
|
||||
* buffer again but it uses the mapped one.
|
||||
*/
|
||||
Status = EFI_SUCCESS;
|
||||
} else if (Status == EFI_UNSUPPORTED) {
|
||||
/*
|
||||
* StandaloneMm can only act as a service provider,
|
||||
* and its primary use case is the secure variable service.
|
||||
* In this case, it does not require Rx/Tx buffers,
|
||||
* so treating EFI_UNSUPPORTED as a valid return value is acceptable.
|
||||
*
|
||||
* Any service that requires Rx/Tx buffers
|
||||
* MUST first verify their availability by calling
|
||||
* ArmFfaLibGetRxTxBuffers().
|
||||
*/
|
||||
Status = EFI_SUCCESS;
|
||||
DEBUG ((DEBUG_WARN, "%a: Rx/Tx buffer doesn't support.\n", __func__));
|
||||
} else if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "%a failed. Status = %r\n", __func__, Status));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user