\r
**/\r
\r
-#include <PiDxe.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/MemEncryptSevLib.h>\r
-\r
#include "AmdSevIoMmu.h"\r
\r
EFI_STATUS\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
- EFI_STATUS Status = EFI_SUCCESS;\r
- EFI_HANDLE Handle = NULL;\r
+ EFI_STATUS Status;\r
+ EFI_HANDLE Handle;\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
Status = gBS->InstallMultipleProtocolInterfaces (\r
&Handle,\r
&gIoMmuAbsentProtocolGuid,\r