From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E86B6225E9659 for ; Tue, 20 Mar 2018 20:31:10 -0700 (PDT) Received: by mail-io0-x243.google.com with SMTP id e79so4919188ioi.7 for ; Tue, 20 Mar 2018 20:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=G1FTCBTIsqAN/nezv52516vd2HiRTjc/U119I7pzu38=; b=j654TF0PV9X5sx9FRlc24hxSVKhE0qhX+EMAzdvBNcL1rrtWnEk3oq1A100N3e/Z7s 6Sz9oBPn6lWOer/FCwUaWLUM+eqqTm6RH6WUynXtrf+zKB3LK8tX4BpsHeI915+54qqJ LcahZmmXZ2vzImoT23QpiGF3NQ7xM9lCpKG2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=G1FTCBTIsqAN/nezv52516vd2HiRTjc/U119I7pzu38=; b=Pd+8GH9NNFJc/n2n3RwOpFitFnmZNlrnqukJj8+hZsCEUlrlS4chu36d+kO5ZPUD0/ p/xbSwlC95L3sVY9oS630ZGcUsPwidiAi5L8mYveGlBsRciI8L3KRoQ7QFdr6hK79sEi B5JyY2SJrLYXehMkmZm6bHLC83KVTy21XExFXeOfeEGDaiIqdgRHBlEcegSELh7QT34X +uqMwpLbbMSgUJ1B8Wurg7R7VqdPZKnfamefnD9t8KeAQJ3nPUa++udtKEwx9aTVhLRW q7x7fBswcypwwolSb0oZg9RgeF3F3jjDp4GNIuNsS1yboCkjQ/iUu6UFoirUBDo1JS+D LZng== X-Gm-Message-State: AElRT7GcSoahvMKmxX50uSkg3br/ozlAYd7p/OwGbUWaGpWJGcJc8RcK o0wO5lbVZrZaDTb9kolu0lMVZc/5F8tFEeDtG8guBd4Txdk= X-Google-Smtp-Source: AG47ELtbT/lCTPYbY3zp6bXEuE+0o1ipj5a17bKEdgKjAVGZU7Ng7Rk2gPQYHQswtOj1Z0/LJkTVhuuOQjWYN99GkJ4= X-Received: by 10.107.164.17 with SMTP id n17mr18710466ioe.173.1521603460123; Tue, 20 Mar 2018 20:37:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Tue, 20 Mar 2018 20:37:39 -0700 (PDT) In-Reply-To: <20180320161823.54020-13-girish.pathak@arm.com> References: <20180320161823.54020-1-girish.pathak@arm.com> <20180320161823.54020-13-girish.pathak@arm.com> From: Ard Biesheuvel Date: Wed, 21 Mar 2018 11:37:39 +0800 Message-ID: To: Girish Pathak Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Matteo Carlini , Stephanie.Hughes-Fitt@arm.com, nd , Arvind Chauhan , Daniil Egranov , Thomas Panakamattam Abraham Subject: Re: [PATCH edk2-platforms v3 12/17] ARM/VExpressPkg: Allocate framebuffer using EfiRuntimeServicesData X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 03:31:11 -0000 Content-Type: text/plain; charset="UTF-8" On 21 March 2018 at 00:18, Girish Pathak wrote: > 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 is incorrect for > the framebuffer memory allocation. Change EfiBootServicesData with > EfiRuntimeServicesData flag so that allocated memory can be access > by the OS in the post boot phase. > EfiRuntimeServicesData is intended for allocations that the EFI runtime services need to access themselves at runtime, and will hence be virtually remapped by SetVirtualAddressMap(). This does not apply to the framebuffer. Even if it may be used at OS runtime, the firmware itself will never access it, so EfiRuntimeServicesData is not appropriate Please use EfiReservedMemory instead. > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Girish Pathak > Signed-off-by: Evan Lloyd > --- > 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..c0a25a18d3fcfe91a76ee985ee58145b97900fa0 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, > + EfiRuntimeServicesData, > 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..61ddf77e903e6c33a26b2aa8b76121e807195a9a 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, > + EfiRuntimeServicesData, > EFI_SIZE_TO_PAGES (((UINTN)LCD_VRAM_SIZE)), > VramBaseAddress > ); > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > >