diff options
author | Elvin Li <elvin.li@intel.com> | 2014-08-29 09:01:52 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-29 09:01:52 +0000 |
commit | fd9abd045e41387ef8e5cfbb4588220cf7a1261d (patch) | |
tree | 25b3bf0969aa33f00e7c4230121d20971188076b | |
parent | d7325a8c4913360fd736025d498193162d0ac58d (diff) | |
download | edk2-fd9abd045e41387ef8e5cfbb4588220cf7a1261d.tar.gz edk2-fd9abd045e41387ef8e5cfbb4588220cf7a1261d.tar.bz2 edk2-fd9abd045e41387ef8e5cfbb4588220cf7a1261d.zip |
Allocate EfiReservedMemoryType of memory.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Signed-off-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15977 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 5 | ||||
-rw-r--r-- | MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c | 21 |
2 files changed, 10 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf index 491eba378d..fc4863f15a 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf @@ -56,7 +56,6 @@ BaseMemoryLib
[LibraryClasses.X64]
- LockBoxLib
UefiLib
BaseMemoryLib
HobLib
@@ -67,10 +66,6 @@ gEfiCapsuleVendorGuid
gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## GUID # FMP capsule GUID
-[Guids.X64]
- gEfiAcpiVariableGuid ## SOMETIMES_CONSUMES ## GUID # RestoreLockBox
- gEfiAcpiS3ContextGuid ## SOMETIMES_CONSUMES ## GUID # RestoreLockBox
-
[Protocols]
gEfiCapsuleArchProtocolGuid ## PRODUCES
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c index a5c7c48eee..79615c9755 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c @@ -28,23 +28,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiRuntimeLib.h>
#include <Library/BaseLib.h>
-#include <Library/LockBoxLib.h>
#include <Library/UefiLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/HobLib.h>
/**
- Allocate EfiACPIMemoryNVS below 4G memory address.
+ Allocate EfiReservedMemoryType below 4G memory address.
- This function allocates EfiACPIMemoryNVS below 4G memory address.
+ This function allocates EfiReservedMemoryType below 4G memory address.
- @param Size Size of memory to allocate.
+ @param Size Size of memory to allocate.
- @return Allocated address for output.
+ @return Allocated Address for output.
**/
VOID*
-AllocateAcpiNvsMemoryBelow4G (
+AllocateReservedMemoryBelow4G (
IN UINTN Size
)
{
@@ -58,7 +57,7 @@ AllocateAcpiNvsMemoryBelow4G ( Status = gBS->AllocatePages (
AllocateMaxAddress,
- EfiACPIMemoryNVS,
+ EfiReservedMemoryType,
Pages,
&Address
);
@@ -97,8 +96,8 @@ VariableLockCapsuleLongModeBufferVariable ( }
/**
- 1. Allocate NVS memory for capsule PEIM to establish a 1:1 Virtual to Physical mapping.
- 2. Allocate NVS memroy as a stack for capsule PEIM to transfer from 32-bit mdoe to 64-bit mode.
+ 1. Allocate Reserved memory for capsule PEIM to establish a 1:1 Virtual to Physical mapping.
+ 2. Allocate Reserved memroy as a stack for capsule PEIM to transfer from 32-bit mdoe to 64-bit mode.
**/
VOID
@@ -177,7 +176,7 @@ PrepareContextForCapsulePei ( TotalPagesNum = NumberOfPml4EntriesNeeded + 1;
}
- LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateAcpiNvsMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
+ LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
ASSERT (LongModeBuffer.PageTableAddress != 0);
PcdSet64 (PcdIdentifyMappingPageTablePtr, LongModeBuffer.PageTableAddress);
}
@@ -186,7 +185,7 @@ PrepareContextForCapsulePei ( // Allocate stack
//
LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize);
- LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateAcpiNvsMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));
+ LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));
ASSERT (LongModeBuffer.StackBaseAddress != 0);
Status = gRT->SetVariable (
|