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>
Initialize Iommu Protocol.\r
\r
**/\r
-VOID\r
+EFI_STATUS\r
EFIAPI\r
AmdSevInstallIoMmuProtocol (\r
VOID\r
&gEdkiiIoMmuProtocolGuid, &mAmdSev,\r
NULL\r
);\r
- ASSERT_EFI_ERROR (Status);\r
+ return Status;\r
}\r
MemEncryptSevLib.\r
\r
**/\r
-VOID\r
+EFI_STATUS\r
EFIAPI\r
AmdSevInstallIoMmuProtocol (\r
VOID\r
EFI_STATUS Status;\r
EFI_HANDLE Handle;\r
\r
- Status = EFI_SUCCESS;\r
-\r
//\r
// When SEV is enabled, install IoMmu protocol otherwise install the\r
// placeholder protocol so that other dependent module can run.\r
//\r
if (MemEncryptSevIsEnabled ()) {\r
- AmdSevInstallIoMmuProtocol ();\r
+ Status = AmdSevInstallIoMmuProtocol ();\r
} else {\r
Handle = NULL;\r
\r