]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/IoMmuDxe/IoMmuDxe.c
MdeModulePkg: Add DisplayUpdateProgressLib class
[mirror_edk2.git] / OvmfPkg / IoMmuDxe / IoMmuDxe.c
index 101157e228b3b6840646eb9f3a8a1a5404586741..70d30ea916278907d6d0947b2f3dfdbf0310f7b3 100644 (file)
@@ -5,25 +5,16 @@
 \r
   Copyright (c) 2017, AMD Inc. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD\r
-  License which accompanies this distribution.  The full text of the license may\r
-  be found at http://opensource.org/licenses/bsd-license.php\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \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
@@ -33,16 +24,18 @@ IoMmuDxeEntryPoint (
   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