OvmfPkg/IoMmuDxe: propagate errors from AmdSevInstallIoMmuProtocol()
If we cannot install the IOMMU protocol for whatever reason, exit the driver with an error. The same is already done for the IOMMU Absent protocol. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
This commit is contained in:
@@ -499,7 +499,7 @@ EDKII_IOMMU_PROTOCOL mAmdSev = {
|
||||
Initialize Iommu Protocol.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmdSevInstallIoMmuProtocol (
|
||||
VOID
|
||||
@@ -514,5 +514,5 @@ AmdSevInstallIoMmuProtocol (
|
||||
&gEdkiiIoMmuProtocolGuid, &mAmdSev,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
MemEncryptSevLib.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmdSevInstallIoMmuProtocol (
|
||||
VOID
|
||||
|
@@ -36,14 +36,12 @@ IoMmuDxeEntryPoint (
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE Handle;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
//
|
||||
// When SEV is enabled, install IoMmu protocol otherwise install the
|
||||
// placeholder protocol so that other dependent module can run.
|
||||
//
|
||||
if (MemEncryptSevIsEnabled ()) {
|
||||
AmdSevInstallIoMmuProtocol ();
|
||||
Status = AmdSevInstallIoMmuProtocol ();
|
||||
} else {
|
||||
Handle = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user