]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update BGRT image buffer to be stored in EfiBootSerivesData according to ACPI5.0...
authorChao Zhang <chao.b.zhang@intel.com>
Thu, 12 Sep 2013 03:27:00 +0000 (03:27 +0000)
committerczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Sep 2013 03:27:00 +0000 (03:27 +0000)
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14659 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c

index 207abf7809e591b9ab93644a7d1746af33d0b7b4..906c3f58b747b529da3c80a663a1e4690d1d4a9b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This module install ACPI Boot Graphics Resource Table (BGRT).\r
 \r
-  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -235,9 +235,9 @@ BgrtAcpiTableChecksum (
 }\r
 \r
 /**\r
-  Allocate EfiReservedMemoryType below 4G memory address.\r
+  Allocate EfiBootServicesData below 4G memory address.\r
 \r
-  This function allocates EfiReservedMemoryType below 4G memory address.\r
+  This function allocates EfiBootServicesData below 4G memory address.\r
 \r
   @param[in]  Size   Size of memory to allocate.\r
 \r
@@ -245,7 +245,7 @@ BgrtAcpiTableChecksum (
 \r
 **/\r
 VOID *\r
-BgrtAllocateReservedMemoryBelow4G (\r
+BgrtAllocateBsDataMemoryBelow4G (\r
   IN UINTN       Size\r
   )\r
 {\r
@@ -259,7 +259,7 @@ BgrtAllocateReservedMemoryBelow4G (
 \r
   Status = gBS->AllocatePages (\r
                   AllocateMaxAddress,\r
-                  EfiReservedMemoryType,\r
+                  EfiBootServicesData,\r
                   Pages,\r
                   &Address\r
                   );\r
@@ -361,9 +361,12 @@ InstallBootGraphicsResourceTable (
     if (mLogoHeight > (((UINT32) ~0) - sizeof (BMP_IMAGE_HEADER)) / (mLogoWidth * 3 + PaddingSize)) {\r
       return EFI_UNSUPPORTED;\r
     }\r
-    \r
+\r
+    //\r
+    // The image should be stored in EfiBootServicesData, allowing the system to reclaim the memory\r
+    //\r
     BmpSize = (mLogoWidth * 3 + PaddingSize) * mLogoHeight + sizeof (BMP_IMAGE_HEADER);\r
-    ImageBuffer = BgrtAllocateReservedMemoryBelow4G (BmpSize);\r
+    ImageBuffer = BgrtAllocateBsDataMemoryBelow4G (BmpSize);\r
     if (ImageBuffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r