Code at: https://github.com/EvanLloyd/tianocore/commit/
From: Sami Mujawar <sami.muja...@arm.com>
Date: Thu, 25 Feb 2016 15:07:40 +0000
Subject: [PATCH] ArmPlatformPkg: Allocate VRAM as RuntimeServicesData

The UEFI specification allows the operating system (OS) to use the
Graphics Output Protocol (GOP) in the following scenarios:
 a. as part of the startup process and
 b. prior to loading of a high performance OS graphics driver

If the VRAM is allocated as BootServicesData, then it is unmapped on
exit boot services. This prevents GOP usage by the OS post exit boot
services (the second scenario); as it results in a crash when the VRAM
is accessed.

This patch fixes the issue by allocating VRAM as RuntimeServicesData.

Code at: 
https://github.com/EvanLloyd/tianocore/commit/18fab16a63c59c84c71cd81089a55a4081ebe253

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Alexei Fedorov <alexei.fedo...@arm.com>
Signed-off-by: Girish Pathak <girish.pat...@arm.com>
Signed-off-by: Sami Mujawar <sami.muja...@arm.com>
Signed-off-by: Evan Lloyd <evan.ll...@arm.com>
---
 ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 
2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c 
b/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
index a578467..4ab8862 100644
--- 
a/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
+++ 
b/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
@@ -133,7 +133,7 @@ LcdPlatformGetVram (
   } else {
     AllocationType = AllocateAddress;
   }
-  Status = gBS->AllocatePages (AllocationType, EfiBootServicesData, 
EFI_SIZE_TO_PAGES(((UINTN)LCD_VRAM_SIZE)), VramBaseAddress);
+  Status = gBS->AllocatePages (AllocationType, EfiRuntimeServicesData, 
EFI_SIZE_TO_PAGES(((UINTN)LCD_VRAM_SIZE)), VramBaseAddress);
   if (EFI_ERROR(Status)) {
     return Status;
   }
-- 
2.7.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to