]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/AmdSevDxe/AmdSevDxe.c
OvmfPkg/AmdSevDxe: refresh #includes and LibraryClasses
[mirror_edk2.git] / OvmfPkg / AmdSevDxe / AmdSevDxe.c
index e472096320ea737a0c1713cd506c6842dbbe9378..8f02d0627e02ff46e6cc12c9ce0e5aaad0d0fc2d 100644 (file)
@@ -1,30 +1,25 @@
 /** @file\r
 \r
   AMD Sev Dxe driver. This driver is dispatched early in DXE, due to being list\r
 /** @file\r
 \r
   AMD Sev Dxe driver. This driver is dispatched early in DXE, due to being list\r
-  in APRIORI. It clears C-bit from MMIO and NonExistent Memory space when SEV is\r
-  enabled.\r
+  in APRIORI. It clears C-bit from MMIO and NonExistent Memory space when SEV\r
+  is enabled.\r
 \r
   Copyright (c) 2017, AMD Inc. All rights reserved.<BR>\r
 \r
 \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
 \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
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#include <PiDxe.h>\r
-\r
-#include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/DxeServicesTableLib.h>\r
 #include <Library/MemEncryptSevLib.h>\r
 #include <Library/DxeServicesTableLib.h>\r
 #include <Library/MemEncryptSevLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 \r
 EFI_STATUS\r
 EFIAPI\r
@@ -47,8 +42,8 @@ AmdSevDxeEntryPoint (
 \r
   //\r
   // Iterate through the GCD map and clear the C-bit from MMIO and NonExistent\r
 \r
   //\r
   // Iterate through the GCD map and clear the C-bit from MMIO and NonExistent\r
-  // memory space. The NonExistent memory space will be used for mapping the MMIO\r
-  // space added later (eg PciRootBridge). By clearing both known MMIO and\r
+  // memory space. The NonExistent memory space will be used for mapping the\r
+  // MMIO space added later (eg PciRootBridge). By clearing both known MMIO and\r
   // NonExistent memory space can gurantee that current and furture MMIO adds\r
   // will have C-bit cleared.\r
   //\r
   // NonExistent memory space can gurantee that current and furture MMIO adds\r
   // will have C-bit cleared.\r
   //\r
@@ -60,10 +55,12 @@ AmdSevDxeEntryPoint (
       Desc = &AllDescMap[Index];\r
       if (Desc->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo ||\r
           Desc->GcdMemoryType == EfiGcdMemoryTypeNonExistent) {\r
       Desc = &AllDescMap[Index];\r
       if (Desc->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo ||\r
           Desc->GcdMemoryType == EfiGcdMemoryTypeNonExistent) {\r
-        Status = MemEncryptSevClearPageEncMask (0,\r
-                                                Desc->BaseAddress,\r
-                                                EFI_SIZE_TO_PAGES(Desc->Length),\r
-                                                FALSE);\r
+        Status = MemEncryptSevClearPageEncMask (\r
+                   0,\r
+                   Desc->BaseAddress,\r
+                   EFI_SIZE_TO_PAGES (Desc->Length),\r
+                   FALSE\r
+                   );\r
         ASSERT_EFI_ERROR (Status);\r
       }\r
     }\r
         ASSERT_EFI_ERROR (Status);\r
       }\r
     }\r