#include <Library/UefiRuntimeServicesTableLib.h>\r
#include <Library/UefiRuntimeLib.h>\r
#include <Library/BaseLib.h>\r
-#include <Library/LockBoxLib.h>\r
#include <Library/UefiLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/HobLib.h>\r
\r
/**\r
- Allocate EfiACPIMemoryNVS below 4G memory address.\r
+ Allocate EfiReservedMemoryType below 4G memory address.\r
\r
- This function allocates EfiACPIMemoryNVS below 4G memory address.\r
+ This function allocates EfiReservedMemoryType below 4G memory address.\r
\r
- @param Size Size of memory to allocate.\r
+ @param Size Size of memory to allocate.\r
\r
- @return Allocated address for output.\r
+ @return Allocated Address for output.\r
\r
**/\r
VOID*\r
-AllocateAcpiNvsMemoryBelow4G (\r
+AllocateReservedMemoryBelow4G (\r
IN UINTN Size\r
)\r
{\r
\r
Status = gBS->AllocatePages (\r
AllocateMaxAddress,\r
- EfiACPIMemoryNVS,\r
+ EfiReservedMemoryType,\r
Pages,\r
&Address\r
);\r
}\r
\r
/**\r
- 1. Allocate NVS memory for capsule PEIM to establish a 1:1 Virtual to Physical mapping.\r
- 2. Allocate NVS memroy as a stack for capsule PEIM to transfer from 32-bit mdoe to 64-bit mode.\r
+ 1. Allocate Reserved memory for capsule PEIM to establish a 1:1 Virtual to Physical mapping.\r
+ 2. Allocate Reserved memroy as a stack for capsule PEIM to transfer from 32-bit mdoe to 64-bit mode.\r
\r
**/\r
VOID\r
TotalPagesNum = NumberOfPml4EntriesNeeded + 1;\r
}\r
\r
- LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateAcpiNvsMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));\r
+ LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));\r
ASSERT (LongModeBuffer.PageTableAddress != 0);\r
PcdSet64 (PcdIdentifyMappingPageTablePtr, LongModeBuffer.PageTableAddress); \r
}\r
// Allocate stack\r
//\r
LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize);\r
- LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateAcpiNvsMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));\r
+ LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));\r
ASSERT (LongModeBuffer.StackBaseAddress != 0); \r
\r
Status = gRT->SetVariable (\r