Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cBeOk-0003Je-Ba for mharc-grub-devel@gnu.org; Tue, 29 Nov 2016 04:08:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBeOh-0003JW-He for grub-devel@gnu.org; Tue, 29 Nov 2016 04:08:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBeOd-0004P3-9E for grub-devel@gnu.org; Tue, 29 Nov 2016 04:08:19 -0500 Received: from boksu.net-space.pl ([185.15.1.105]:36034) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1cBeOc-0004OV-TO for grub-devel@gnu.org; Tue, 29 Nov 2016 04:08:15 -0500 Received: (from localhost user: 'dkiper' uid#4000 fake: STDIN (dkiper@boksu.net-space.pl)) by router-fw-old.local.net-space.pl id S1678542AbcK2JIG (ORCPT ); Tue, 29 Nov 2016 10:08:06 +0100 Date: Tue, 29 Nov 2016 10:08:06 +0100 From: Daniel Kiper To: arvidjaar@gmail.com, grub-devel@gnu.org Cc: daniel.kiper@oracle.com, xen-devel@lists.xenproject.org, jgross@suse.com, eric.snowberg@oracle.com, andrew.cooper3@citrix.com, seth.goldberg@oracle.com, phcoder@gmail.com Subject: Re: [MULTIBOOT2 DOC PATCH v2 05/11] multiboot2: Add description of support for EFI boot services Message-ID: <20161129090806.GC1485@router-fw-old.local.net-space.pl> References: <1480020010-18421-1-git-send-email-daniel.kiper@oracle.com> <1480020010-18421-6-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.15.1.105 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 09:08:20 -0000 On Mon, Nov 28, 2016 at 08:53:51PM +0300, Andrei Borzenkov wrote: > 24.11.2016 23:40, Daniel Kiper ?????: > > Signed-off-by: Daniel Kiper > > --- > > v2 - suggestions/fixes: > > - clarify physical address meaning for EFI amd64 > > mode with boot services enabled > > (suggested by Andrew Cooper). > > --- > > doc/multiboot.texi | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++- > > doc/multiboot2.h | 2 + > > 2 files changed, 115 insertions(+), 2 deletions(-) > > > > diff --git a/doc/multiboot.texi b/doc/multiboot.texi > > index f0f167e..cc1edab 100644 > > --- a/doc/multiboot.texi > > +++ b/doc/multiboot.texi > > @@ -534,6 +534,66 @@ The physical address to which the boot loader should jump in order to > > start running the operating system. > > @end table > > > > +@subsection EFI i386 entry address tag of Multiboot2 header > > + > > +@example > > +@group > > + +-------------------+ > > +u16 | type = 8 | > > +u16 | flags | > > +u32 | size | > > +u_virt | entry_addr | > > + +-------------------+ > > +@end group > > +@end example > > + > > +All of the address fields in this tag are physical addresses. > > Should not entry_addr be u_phys then? Otherwise what is exact difference Please look at my earlier email to Toomas. > between u_phys and u_virt? Also for type == 3? Short excerpt from multiboot.texi: @item u_phys The type of unsigned data of the same size as target architecture physical address size. @item u_virt The type of unsigned data of the same size as target architecture virtual address size. Anyway, I agree that entry_addr type should be changed here. > > +The meaning of each is as follows: > > + > > +@table @code > > + > > +@item entry_addr > > +The physical address to which the boot loader should jump in order to > > +start running EFI i386 compatible operating system code. > > +@end table > > + > > +This tag is taken into account only on EFI i386 platforms > > +when Multiboot2 image header contains EFI boot services tag. > > +Then entry point specified in ELF header and the entry address > > +tag of Multiboot2 header are ignored. > > + > > +@subsection EFI amd64 entry address tag of Multiboot2 header > > + > > +@example > > +@group > > + +-------------------+ > > +u16 | type = 9 | > > +u16 | flags | > > +u32 | size | > > +u_virt | entry_addr | > > + +-------------------+ > > +@end group > > +@end example > > + > > +All of the address fields in this tag are physical addresses (paging > > +mode is enabled and any memory space defined by the UEFI memory map > > +is identity mapped, hence, virtual address equals physical address; > > Same here; it is confusing marking field as u_virt and describing it > immediately as "physical address". Ditto. > > +Unified Extensible Firmware Interface Specification, Version 2.6, > > +section 2.3.4, x64 Platforms, boot services). The meaning of each > > +is as follows: > > + > > +@table @code > > + > > +@item entry_addr > > +The physical address to which the boot loader should jump in order to > > +start running EFI amd64 compatible operating system code. > > +@end table > > + > > +This tag is taken into account only on EFI amd64 platforms > > +when Multiboot2 image header contains EFI boot services tag. > > +Then entry point specified in ELF header and the entry address > > +tag of Multiboot2 header are ignored. > > + > > Why do we have two different tags for what is effectively the same Because x86 32-bit and 64-bit are similar but different things. So, we should have both. > purpose? Is it possible for the same image to have both of them? Just > for my understanding. Yes, it is possible, however, I have not seen any real life usage yet. Daniel