]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/UnixFlashMapPei/FlashMap.c
Not maintained.
[mirror_edk2.git] / UnixPkg / UnixFlashMapPei / FlashMap.c
index d3a15cb814f4700b9a4baa27dcdc7840d2596009..f37355d7a14027e5e49c3daad248861213fb27ae 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2010, Intel Corporation                                                         \r
 All rights reserved. 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
@@ -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,9 +56,10 @@ 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
@@ -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
+  PcdSet32 (PcdFlashNvStorageVariableBase, PcdGet32 (PcdUnixFlashNvStorageVariableBase) + (UINT32)FdFixUp);\r
+  PcdSet32 (PcdFlashNvStorageFtwWorkingBase, PcdGet32 (PcdUnixFlashNvStorageFtwWorkingBase) + (UINT32)FdFixUp);\r
+  PcdSet32 (PcdFlashNvStorageFtwSpareBase, PcdGet32 (PcdUnixFlashNvStorageFtwSpareBase) + (UINT32)FdFixUp);\r
 \r
   return EFI_SUCCESS;\r
 }\r