From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=girish.pathak@arm.com; receiver=edk2-devel@lists.01.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 39E2E2210D9ED for ; Thu, 5 Apr 2018 11:08:12 -0700 (PDT) Received: from E107875.Emea.Arm.com (e107875.emea.arm.com [10.10.1.104]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w35I88qo027787; Thu, 5 Apr 2018 19:08:10 +0100 From: Girish Pathak To: edk2-devel@lists.01.org Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com, Arvind.Chauhan@arm.com, Daniil.Egranov@arm.com, thomas.abraham@arm.com Date: Thu, 5 Apr 2018 19:07:58 +0100 Message-Id: <20180405180803.33684-13-girish.pathak@arm.com> X-Mailer: git-send-email 2.13.3.windows.1 In-Reply-To: <20180405180803.33684-1-girish.pathak@arm.com> References: <20180405180803.33684-1-girish.pathak@arm.com> Subject: [PATCH edk2-platforms v4 12/17] ARM/VExpressPkg: Allocate framebuffer using EfiReservedMemoryType X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 18:08:13 -0000 As per the UEFI specification(2.7) section 12.9, the GOP framebuffer memory can be accessed in the pre-boot and the post boot phase (by OS) Therefore the memory type EfiBootServicesData which may no longer exist after ExitBootServices is incorrect for the framebuffer memory allocation. Change EfiBootServicesData with EfiReservedMemoryType so that allocated memory can be accessed in the post boot phase. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak Signed-off-by: Evan Lloyd --- Notes: v4: - Use EfiReservedMemory [Ard] - Done [Girish] Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 2 +- Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c b/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c index f7cae39c9cc9954ba4cad1bd597ebfc8baf10f11..f1c497f4b3474e32626bcfce0398432319eae72f 100644 --- a/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c +++ b/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c @@ -176,7 +176,7 @@ LcdPlatformGetVram ( } Status = gBS->AllocatePages ( AllocationType, - EfiBootServicesData, + EfiReservedMemoryType, EFI_SIZE_TO_PAGES (((UINTN)LCD_VRAM_SIZE)), VramBaseAddress ); diff --git a/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c index 2f4814a2adbf01517ba14d75ce579ff35c362379..50a53d3fff5065b0fcec5a5332dcc63e344328c3 100644 --- a/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c +++ b/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c @@ -232,7 +232,7 @@ LcdPlatformGetVram ( // Allocate the VRAM from the DRAM so that nobody else uses it. Status = gBS->AllocatePages ( AllocateAddress, - EfiBootServicesData, + EfiReservedMemoryType, EFI_SIZE_TO_PAGES (((UINTN)LCD_VRAM_SIZE)), VramBaseAddress ); -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'