]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/Fv.c
OvmfPkg: Add NullMemoryTestDxe driver
[mirror_edk2.git] / OvmfPkg / PlatformPei / Fv.c
index 7ae35237b272ed0fe2c5409b0c41c83e0ec4d269..c812b3a9ac4077d856b096d64ea9ee946f92f974 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Build FV related hobs for platform.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
 \r
 #include "PiPei.h"\r
 #include <Library/DebugLib.h>\r
-#include <Library/PeimEntryPoint.h>\r
 #include <Library/HobLib.h>\r
 #include <Library/PeiServicesLib.h>\r
-#include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
 \r
@@ -35,25 +33,27 @@ PeiFvInitialization (
   VOID\r
   )\r
 {\r
-  EFI_PHYSICAL_ADDRESS FdBase;\r
+  EFI_PHYSICAL_ADDRESS        FdBase;\r
 \r
   DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n"));\r
 \r
   DEBUG (\r
     (EFI_D_ERROR, "Firmware Volume HOB: 0x%x 0x%x\n",\r
-      PcdGet32 (PcdOvmfFlashFvRecoveryBase),\r
-      PcdGet32 (PcdOvmfFlashFvRecoverySize)\r
+      PcdGet32 (PcdOvmfMemFvBase),\r
+      PcdGet32 (PcdOvmfMemFvSize)\r
       )\r
     );\r
 \r
-  FdBase = PcdGet32 (PcdOvmfFlashFvRecoveryBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize);\r
-  BuildFvHob (PcdGet32 (PcdOvmfFlashFvRecoveryBase), PcdGet32 (PcdOvmfFlashFvRecoverySize));\r
+  FdBase = PcdGet32 (PcdOvmfMemFvBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize);\r
+  BuildFvHob (PcdGet32 (PcdOvmfMemFvBase), PcdGet32 (PcdOvmfMemFvSize));\r
 \r
-  BuildResourceDescriptorHob (\r
-    EFI_RESOURCE_FIRMWARE_DEVICE,\r
-    (EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),\r
-    FdBase,\r
-    PcdGet32 (PcdOvmfFirmwareFdSize)\r
+  //\r
+  // Create a memory allocation HOB.\r
+  //\r
+  BuildMemoryAllocationHob (\r
+    PcdGet32 (PcdOvmfMemFvBase),\r
+    PcdGet32 (PcdOvmfMemFvSize),\r
+    EfiBootServicesData\r
     );\r
 \r
   return EFI_SUCCESS;\r