mirror of https://github.com/acidanthera/audk.git
ArmPkg: ArmFfaStandaloneMmLib: Fix non-FFA path
ArmFfaLibCommonInit will return EFI_UNSUPPORTED when there is no FFA supported on the platform. This is expected behavior. However, the return of error code will incur program asserts. This change fixed the non-FFA path for the Standalone MM instance. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This commit is contained in:
parent
96cf70951f
commit
523dbb6d59
|
@ -68,5 +68,22 @@ ArmFfaStandaloneMmLibConstructor (
|
||||||
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
|
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ArmFfaLibCommonInit ();
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
Status = ArmFfaLibCommonInit ();
|
||||||
|
if (Status == EFI_UNSUPPORTED) {
|
||||||
|
/*
|
||||||
|
* EFI_UNSUPPORTED means FF-A interface isn't available.
|
||||||
|
* However, for Standalone MM modules, FF-A availability is not required.
|
||||||
|
* i.e. Standalone MM could use SpmMm as a legitimate protocol.
|
||||||
|
* Thus, returning EFI_SUCCESS here to avoid the entrypoint to assert.
|
||||||
|
*/
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "%a failed. Status = %r\n", __func__, Status));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue