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
BaseMemoryLib\r
\r
[LibraryClasses.X64]\r
BaseMemoryLib\r
\r
[LibraryClasses.X64]\r
UefiLib\r
BaseMemoryLib\r
HobLib \r
UefiLib\r
BaseMemoryLib\r
HobLib \r
gEfiCapsuleVendorGuid\r
gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## GUID # FMP capsule GUID\r
\r
gEfiCapsuleVendorGuid\r
gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## GUID # FMP capsule GUID\r
\r
-[Guids.X64]\r
- gEfiAcpiVariableGuid ## SOMETIMES_CONSUMES ## GUID # RestoreLockBox\r
- gEfiAcpiS3ContextGuid ## SOMETIMES_CONSUMES ## GUID # RestoreLockBox\r
-\r
[Protocols]\r
gEfiCapsuleArchProtocolGuid ## PRODUCES\r
\r
[Protocols]\r
gEfiCapsuleArchProtocolGuid ## PRODUCES\r
\r
#include <Library/UefiRuntimeServicesTableLib.h>\r
#include <Library/UefiRuntimeLib.h>\r
#include <Library/BaseLib.h>\r
#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
#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
- This function allocates EfiACPIMemoryNVS below 4G memory address.\r
+ This function allocates EfiReservedMemoryType below 4G memory address.\r
- @param Size Size of memory to allocate.\r
+ @param Size Size of memory to allocate.\r
- @return Allocated address for output.\r
+ @return Allocated Address for output.\r
-AllocateAcpiNvsMemoryBelow4G (\r
+AllocateReservedMemoryBelow4G (\r
\r
Status = gBS->AllocatePages (\r
AllocateMaxAddress,\r
\r
Status = gBS->AllocatePages (\r
AllocateMaxAddress,\r
+ EfiReservedMemoryType,\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
TotalPagesNum = NumberOfPml4EntriesNeeded + 1;\r
}\r
\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
ASSERT (LongModeBuffer.PageTableAddress != 0);\r
PcdSet64 (PcdIdentifyMappingPageTablePtr, LongModeBuffer.PageTableAddress); \r
}\r
// Allocate stack\r
//\r
LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize);\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
ASSERT (LongModeBuffer.StackBaseAddress != 0); \r
\r
Status = gRT->SetVariable (\r