]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/UnixFlashMapPei/FlashMap.c
EmulatorPkg: Use FaultTolerantWritePei driver.
[mirror_edk2.git] / UnixPkg / UnixFlashMapPei / FlashMap.c
index d3a15cb814f4700b9a4baa27dcdc7840d2596009..786fdd0bdc8361433528872f38db559966137409 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2008, 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
@@ -23,7 +23,6 @@ Abstract:
 #include "PiPei.h"\r
 \r
 #include <Guid/SystemNvDataGuid.h>\r
-#include <Guid/FirmwareFileSystem.h>\r
 #include <Ppi/UnixFwh.h>\r
 #include <Protocol/FirmwareVolumeBlock.h>\r
 \r
@@ -57,12 +56,13 @@ Returns:
 // TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   EFI_STATUS              Status;\r
-  UNIX_FWH_PPI           *UnixFwhPpi;\r
+  UNIX_FWH_PPI            *UnixFwhPpi;\r
   EFI_PEI_PPI_DESCRIPTOR  *PpiDescriptor;\r
   EFI_PHYSICAL_ADDRESS    FdBase;\r
+  EFI_PHYSICAL_ADDRESS    FdFixUp;\r
   UINT64                  FdSize;\r
 \r
-  DEBUG ((EFI_D_ERROR, "NT 32 Flash Map PEIM Loaded\n"));\r
+  DEBUG ((EFI_D_ERROR, "UnixPkg Flash Map PEIM Loaded\n"));\r
 \r
   //\r
   // Get the Fwh Information PPI\r
@@ -78,14 +78,14 @@ Returns:
   //\r
   // Assume that FD0 contains the Flash map.\r
   //\r
-  Status = UnixFwhPpi->UnixFwh (0, &FdBase, &FdSize);\r
+  Status = UnixFwhPpi->UnixFwh (0, &FdBase, &FdSize, &FdFixUp);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   \r
-  PcdSet32 (PcdFlashNvStorageVariableBase, PcdGet32 (PcdUnixFlashNvStorageVariableBase) + (UINT32) FdBase);\r
-  PcdSet32 (PcdFlashNvStorageFtwWorkingBase, PcdGet32 (PcdUnixFlashNvStorageFtwWorkingBase) + (UINT32) FdBase);\r
-  PcdSet32 (PcdFlashNvStorageFtwSpareBase, PcdGet32 (PcdUnixFlashNvStorageFtwSpareBase) + (UINT32) FdBase);\r
+  PcdSet64 (PcdFlashNvStorageVariableBase64, PcdGet64 (PcdUnixFlashNvStorageVariableBase) + FdFixUp);\r
+  PcdSet64 (PcdFlashNvStorageFtwWorkingBase64, PcdGet64 (PcdUnixFlashNvStorageFtwWorkingBase) + FdFixUp);\r
+  PcdSet64 (PcdFlashNvStorageFtwSpareBase64, PcdGet64 (PcdUnixFlashNvStorageFtwSpareBase) + FdFixUp);\r
 \r
   return EFI_SUCCESS;\r
 }\r