mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
2a244a5d9f
commit
4e50241273
|
@ -6,6 +6,7 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>
|
# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>
|
||||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
|
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -276,6 +277,9 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
|
||||||
|
|
||||||
[PcdsDynamicDefault.Ia32]
|
[PcdsDynamicDefault.Ia32]
|
||||||
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFileSystem|L".!..\..\..\..\EdkShellBinPkg\Bin\Ia32\Apps"|VOID*|106
|
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFileSystem|L".!..\..\..\..\EdkShellBinPkg\Bin\Ia32\Apps"|VOID*|106
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -809,7 +810,7 @@ Returns:
|
||||||
// Align buffer on section boundry
|
// Align buffer on section boundry
|
||||||
//
|
//
|
||||||
ImageContext.ImageAddress += ImageContext.SectionAlignment - 1;
|
ImageContext.ImageAddress += ImageContext.SectionAlignment - 1;
|
||||||
ImageContext.ImageAddress &= ~(ImageContext.SectionAlignment - 1);
|
ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1);
|
||||||
|
|
||||||
Status = PeCoffLoaderLoadImage (&ImageContext);
|
Status = PeCoffLoaderLoadImage (&ImageContext);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -176,9 +177,9 @@ Returns:
|
||||||
} while (!EFI_ERROR (Status));
|
} while (!EFI_ERROR (Status));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Build the CPU hob with 36-bit addressing and 16-bits of IO space.
|
// Build the CPU hob with 52-bit addressing and 16-bits of IO space.
|
||||||
//
|
//
|
||||||
BuildCpuHob (36, 16);
|
BuildCpuHob (52, 16);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Build GUIDed Hob that contains the Memory Type Information array
|
// Build GUIDed Hob that contains the Memory Type Information array
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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
|
// Relocate the base of FV region
|
||||||
//
|
//
|
||||||
|
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 (PcdFlashNvStorageVariableBase, PcdGet32 (PcdWinNtFlashNvStorageVariableBase) + (UINT32) FdBase);
|
||||||
PcdSet32 (PcdFlashNvStorageFtwWorkingBase, PcdGet32 (PcdWinNtFlashNvStorageFtwWorkingBase) + (UINT32) FdBase);
|
PcdSet32 (PcdFlashNvStorageFtwWorkingBase, PcdGet32 (PcdWinNtFlashNvStorageFtwWorkingBase) + (UINT32) FdBase);
|
||||||
PcdSet32 (PcdFlashNvStorageFtwSpareBase, PcdGet32 (PcdWinNtFlashNvStorageFtwSpareBase) + (UINT32) FdBase);
|
PcdSet32 (PcdFlashNvStorageFtwSpareBase, PcdGet32 (PcdWinNtFlashNvStorageFtwSpareBase) + (UINT32) FdBase);
|
||||||
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#
|
#
|
||||||
# This module installs FlashMap PPI which is used to get flash layout information.
|
# This module installs FlashMap PPI which is used to get flash layout information.
|
||||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
# 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
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -49,10 +50,13 @@
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64
|
||||||
|
|
||||||
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageFtwWorkingBase
|
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageFtwWorkingBase
|
||||||
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageFtwSpareBase
|
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageFtwSpareBase
|
||||||
|
|
Loading…
Reference in New Issue