]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Allocate EfiReservedMemoryType of memory.
authorElvin Li <elvin.li@intel.com>
Fri, 29 Aug 2014 09:01:52 +0000 (09:01 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 29 Aug 2014 09:01:52 +0000 (09:01 +0000)
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

MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c

index 491eba378d93b65d84291209fc720f688b402afa..fc4863f15a448df2ab54715df3379f6499ec6ab0 100644 (file)
@@ -56,7 +56,6 @@
   BaseMemoryLib\r
 \r
 [LibraryClasses.X64]\r
-  LockBoxLib\r
   UefiLib\r
   BaseMemoryLib\r
   HobLib  \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
index a5c7c48eeefe4e4c09550a20337f2170f1943b7b..79615c9755398b938463f3e5964bc2a429ce91b5 100644 (file)
@@ -28,23 +28,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
@@ -58,7 +57,7 @@ AllocateAcpiNvsMemoryBelow4G (
 \r
   Status  = gBS->AllocatePages (\r
                    AllocateMaxAddress,\r
-                   EfiACPIMemoryNVS,\r
+                   EfiReservedMemoryType,\r
                    Pages,\r
                    &Address\r
                    );\r
@@ -97,8 +96,8 @@ VariableLockCapsuleLongModeBufferVariable (
 }\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
@@ -177,7 +176,7 @@ PrepareContextForCapsulePei (
       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
@@ -186,7 +185,7 @@ PrepareContextForCapsulePei (
   // 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