diff options
author | Cinnamon Shia <cinnamon.shia@hpe.com> | 2016-01-25 04:45:55 +0000 |
---|---|---|
committer | lgao4 <lgao4@Edk2> | 2016-01-25 04:45:55 +0000 |
commit | 4e50241273b7e01cf2d7eb22ebf9f6a9d045b00b (patch) | |
tree | 5a510b825240ccb1fcbf29ebfcf7ad129f504a15 /Nt32Pkg/WinNtFlashMapPei | |
parent | 2a244a5d9f1b16517caf92114ec3e09bdb9c37a5 (diff) | |
download | edk2-platforms-4e50241273b7e01cf2d7eb22ebf9f6a9d045b00b.tar.xz |
Nt32Pkg: Fix asserts from running Nt32 64-bit on Win8
On Windows 8, 64-bit NT32 images are loaded above 4GB.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19736 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/WinNtFlashMapPei')
-rw-r--r-- | Nt32Pkg/WinNtFlashMapPei/FlashMap.c | 13 | ||||
-rw-r--r-- | Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf | 4 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Nt32Pkg/WinNtFlashMapPei/FlashMap.c b/Nt32Pkg/WinNtFlashMapPei/FlashMap.c index 36457bdf25..0a1b325666 100644 --- a/Nt32Pkg/WinNtFlashMapPei/FlashMap.c +++ b/Nt32Pkg/WinNtFlashMapPei/FlashMap.c @@ -1,6 +1,7 @@ /**@file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -85,9 +86,15 @@ Returns: //
// Relocate the base of FV region
//
- PcdSet32 (PcdFlashNvStorageVariableBase, PcdGet32 (PcdWinNtFlashNvStorageVariableBase) + (UINT32) FdBase);
- PcdSet32 (PcdFlashNvStorageFtwWorkingBase, PcdGet32 (PcdWinNtFlashNvStorageFtwWorkingBase) + (UINT32) FdBase);
- PcdSet32 (PcdFlashNvStorageFtwSpareBase, PcdGet32 (PcdWinNtFlashNvStorageFtwSpareBase) + (UINT32) FdBase);
+ if (FdBase >= BASE_4GB) {
+ PcdSet64 (PcdFlashNvStorageVariableBase64, PcdGet32 (PcdWinNtFlashNvStorageVariableBase) + (UINT64) FdBase);
+ PcdSet64 (PcdFlashNvStorageFtwWorkingBase64, PcdGet32 (PcdWinNtFlashNvStorageFtwWorkingBase) + (UINT64) FdBase);
+ PcdSet64 (PcdFlashNvStorageFtwSpareBase64, PcdGet32 (PcdWinNtFlashNvStorageFtwSpareBase) + (UINT64) FdBase);
+ } else {
+ PcdSet32 (PcdFlashNvStorageVariableBase, PcdGet32 (PcdWinNtFlashNvStorageVariableBase) + (UINT32) FdBase);
+ PcdSet32 (PcdFlashNvStorageFtwWorkingBase, PcdGet32 (PcdWinNtFlashNvStorageFtwWorkingBase) + (UINT32) FdBase);
+ PcdSet32 (PcdFlashNvStorageFtwSpareBase, PcdGet32 (PcdWinNtFlashNvStorageFtwSpareBase) + (UINT32) FdBase);
+ }
return EFI_SUCCESS;
}
diff --git a/Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf b/Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf index 5334fb9198..f5a14af519 100644 --- a/Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf +++ b/Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf @@ -3,6 +3,7 @@ #
# This module installs FlashMap PPI which is used to get flash layout information.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -49,10 +50,13 @@ [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageFtwWorkingBase
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageFtwSpareBase
|