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::232; helo=mail-io0-x232.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (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 3C31822146722 for ; Wed, 21 Mar 2018 11:20:07 -0700 (PDT) Received: by mail-io0-x232.google.com with SMTP id 141so7777329iou.12 for ; Wed, 21 Mar 2018 11:26:38 -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=e5xucG+LU4Z9Fw/a2wWBhtxF1Bt+BWSmvMf4byyUOEM=; b=AVmIG2cCKDgCu4ZwL0FdrE2qqn6N9qLME4M+l8UxA96AIuxzdYDO6KhyJiS+O1soqO 6nms0xsXFdJI2XGs1vICWNYx5KV/6psxCn8Ha68vEWQW9WfU6LIGoF3aBUMMDD0iE94C KLKSDtrC0zkLmrkx/fYtn7eND1QYuHkKcU4K8= 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=e5xucG+LU4Z9Fw/a2wWBhtxF1Bt+BWSmvMf4byyUOEM=; b=aebRURHVJqPdIXdBS017xy+UowXYx7n+BW0PmGaKTQtgqMRJvwG+QbeN317hFvlH/6 lxMUMgWrYqvoq8QBTT8NZBZIZU6JhfpjzTWeNu+ztfbr8V7GZm78HcJAue+LVy9QckUZ na/MsvSDPf75BmitTXv1YlJYUOje2N4STIlGCYaQJYhhS52ZOpHNgRWHYrzfszk/mNC8 FvLyJ6Tr83gW8RzxPtsCoT0DfgwT8YmsXKwhHnSKy//xXf28KkPNGRw9g1nMsAQHJDs7 fu5Obe+Yw/FihzuK4ONuuwOWUG897W8qGhj0QjAAtfO0o2xuOqeVTAPqS76BtJO0TkwM PZ3Q== X-Gm-Message-State: AElRT7FzNcyH3jPabUdJTqz1S93h6yGvLmFbc+OwELbO97JyYweSrJ95 8vvOTMvFMMwZNjvHmUuor4FtT7bNGbY9rbZrpFlq1g== X-Google-Smtp-Source: AG47ELsWGOekdGHihtmXB6xXtSQ6PexNWltrhveiptG5D4TXo2oYv9foizclmZ58dx41AarifC8rW4O3cSQsHG1RLj4= X-Received: by 10.107.16.230 with SMTP id 99mr11255059ioq.60.1521656797693; Wed, 21 Mar 2018 11:26:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Wed, 21 Mar 2018 11:26:37 -0700 (PDT) In-Reply-To: References: <20180320161823.54020-1-girish.pathak@arm.com> <20180320161823.54020-13-girish.pathak@arm.com> From: Ard Biesheuvel Date: Thu, 22 Mar 2018 02:26:37 +0800 Message-ID: To: Girish Pathak Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Matteo Carlini , Stephanie Hughes-Fitt , nd , Arvind Chauhan , Daniil Egranov , Thomas 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 18:20:08 -0000 Content-Type: text/plain; charset="UTF-8" On 21 March 2018 at 19:07, Girish Pathak wrote: > > >> -----Original Message----- >> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >> Sent: 21 March 2018 03:38 >> To: Girish Pathak >> Cc: edk2-devel@lists.01.org; Leif Lindholm ; >> Matteo Carlini ; Stephanie Hughes-Fitt >> ; nd ; Arvind Chauhan >> ; Daniil Egranov ; >> Thomas Abraham >> Subject: Re: [PATCH edk2-platforms v3 12/17] ARM/VExpressPkg: Allocate >> framebuffer using EfiRuntimeServicesData >> >> 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. > > Specification (UEFI Spec 2_7_A Sept 6.pdf) describes EfiReservedMemoryType as Not usable before and after ExitBootServices, See Table 28 & 29 > Hence EfiReservedMemoryType is not suitable in this case. Agree? > It is not usable as ordinary memory, given that you turn it into 'special' memory (with side effects) by turning it into a framebuffer. So EfiReservedMemory is perfectly appropriate here.