]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiVariableThunkPlatform.c
Just reserve memory space for page table, but not create it, and allocate the memory...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / Acpi / AcpiS3SaveDxe / AcpiVariableThunkPlatform.c
index 883b79035f0d472038db378fba085d2aad4dd5a3..e2cfdbcb610bc6024f473116dd7a57d366fde755 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This is an implementation of the AcpiVariable platform field for ECP platform.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -47,18 +47,20 @@ GLOBAL_REMOVE_IF_UNREFERENCED
 ACPI_VARIABLE_SET_COMPATIBILITY               *mAcpiVariableSetCompatibility = NULL;\r
 \r
 /**\r
-  Allocate EfiACPIMemoryNVS below 4G memory address.\r
+  Allocate memory below 4G memory address.\r
 \r
-  This function allocates EfiACPIMemoryNVS below 4G memory address.\r
+  This function allocates memory below 4G memory address.\r
 \r
+  @param  MemoryType   Memory type of memory to allocate.\r
   @param  Size         Size of memory to allocate.\r
   \r
   @return Allocated address for output.\r
 \r
 **/\r
 VOID*\r
-AllocateAcpiNvsMemoryBelow4G (\r
-  IN   UINTN   Size\r
+AllocateMemoryBelow4G (\r
+  IN UINTN      MemoryType,\r
+  IN UINTN      Size\r
   );\r
 \r
 /**\r
@@ -81,7 +83,7 @@ S3ReadyThunkPlatform (
   //\r
   // Allocate ACPI reserved memory under 4G\r
   //\r
-  AcpiMemoryBase = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateAcpiNvsMemoryBelow4G (PcdGet32 (PcdS3AcpiReservedMemorySize));\r
+  AcpiMemoryBase = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateMemoryBelow4G (EfiReservedMemoryType, PcdGet32 (PcdS3AcpiReservedMemorySize));\r
   ASSERT (AcpiMemoryBase != 0);\r
   AcpiMemorySize = PcdGet32 (PcdS3AcpiReservedMemorySize);\r
 \r
@@ -151,7 +153,7 @@ InstallAcpiS3SaveThunk (
     // Allocate/initialize the compatible version of Acpi Variable Set since Framework chipset/platform \r
     // driver need this variable\r
     //\r
-    mAcpiVariableSetCompatibility = AllocateAcpiNvsMemoryBelow4G (sizeof(ACPI_VARIABLE_SET_COMPATIBILITY));\r
+    mAcpiVariableSetCompatibility = AllocateMemoryBelow4G (EfiACPIMemoryNVS, sizeof(ACPI_VARIABLE_SET_COMPATIBILITY));\r
     Status = gRT->SetVariable (\r
                     ACPI_GLOBAL_VARIABLE,\r
                     &gEfiAcpiVariableCompatiblityGuid,\r