From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lVwxG-0004Uh-5E for mharc-grub-devel@gnu.org; Mon, 12 Apr 2021 09:50:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVwxD-0004OU-Iy for grub-devel@gnu.org; Mon, 12 Apr 2021 09:50:15 -0400 Received: from dibed.net-space.pl ([84.10.22.86]:37186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:192) (Exim 4.90_1) (envelope-from ) id 1lVwxB-0007BT-M8 for grub-devel@gnu.org; Mon, 12 Apr 2021 09:50:15 -0400 Received: from router-fw.i.net-space.pl ([192.168.52.1]:55902 "EHLO tomti.i.net-space.pl") by router-fw-old.i.net-space.pl with ESMTP id S2099608AbhDLNuJ (ORCPT ); Mon, 12 Apr 2021 15:50:09 +0200 X-Comment: RFC 2476 MSA function at dibed.net-space.pl logged sender identity as: dkiper Date: Mon, 12 Apr 2021 15:50:07 +0200 From: Daniel Kiper To: Vincent =?iso-8859-1?Q?Stehl=E9?= Cc: grub-devel@gnu.org, Leif Lindholm , Grant Likely , Peter Jones Subject: Re: [PATCH] arm/efi: fix ram base detection Message-ID: <20210412135007.fyzujtoetmwv5mni@tomti.i.net-space.pl> References: <20210312165455.22346-1-vincent.stehle@laposte.net> <20210322160015.sfpzc52twysubybe@tomti.i.net-space.pl> <20210322182851.GY1664@vanye> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Received-SPF: pass client-ip=84.10.22.86; envelope-from=dkiper@net-space.pl; helo=dibed.net-space.pl X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 13:50:15 -0000 On Tue, Mar 30, 2021 at 10:01:23PM +0200, Vincent Stehlé via Grub-devel wrote: > On Mon, Mar 22, 2021 at 06:28:51PM +0000, Leif Lindholm wrote: > .. > > > > diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c > > > > index 0cdb063bb..abf8772bc 100644 > > > > --- a/grub-core/kern/efi/mm.c > > > > +++ b/grub-core/kern/efi/mm.c > > > > @@ -677,7 +677,8 @@ grub_efi_get_ram_base(grub_addr_t *base_addr) > > > > for (desc = memory_map, *base_addr = GRUB_EFI_MAX_USABLE_ADDRESS; > > > > (grub_addr_t) desc < ((grub_addr_t) memory_map + memory_map_size); > > > > desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size)) > > > > - if (desc->attribute & GRUB_EFI_MEMORY_WB) > > > > + if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY && > > > > + desc->attribute & GRUB_EFI_MEMORY_WB) > > > > Can we safely assume we don't also need to check against > > GRUB_EFI_PERSISTENT_MEMORY? If so, this is fine. > > Hi Leif, > > Thanks for the review. > > This is a good question about persistent memory; I don't know if we should > check it or not. > > I am "fighting" with qemu to add an nvdimm above or below the first normal > memory region to see how this behaves. I will let you know when I have > succeeded. Any updates about this? Daniel