From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GpEfJ-00041r-Po for mharc-grub-devel@gnu.org; Tue, 28 Nov 2006 20:55:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpEfH-0003zn-CU for grub-devel@gnu.org; Tue, 28 Nov 2006 20:55:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpEfF-0003yq-Rk for grub-devel@gnu.org; Tue, 28 Nov 2006 20:55:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpEfF-0003yk-KI for grub-devel@gnu.org; Tue, 28 Nov 2006 20:55:09 -0500 Received: from [134.134.136.20] (helo=mga02.intel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GpEfF-0003o3-Lj for grub-devel@gnu.org; Tue, 28 Nov 2006 20:55:09 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by mga02.intel.com with ESMTP; 28 Nov 2006 17:55:08 -0800 Received: from bmao-mobl.ccr.corp.intel.com (HELO [10.239.36.173]) ([10.239.36.173]) by orsmga001.jf.intel.com with ESMTP; 28 Nov 2006 17:55:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,473,1157353200"; d="scan'208"; a="167645796:sNHT23700481" Message-ID: <456CE87A.4020601@intel.com> Date: Wed, 29 Nov 2006 09:55:06 +0800 From: "bibo,mao" User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: The development of GRUB 2 References: <200611281235.48809.okuji@enbug.org> <456C2F8C.1040709@intel.com> <200611290029.55561.okuji@enbug.org> In-Reply-To: <200611290029.55561.okuji@enbug.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: multiboot2: variable data size X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 01:55:12 -0000 Yoshinori K. Okuji wrote: > On Tuesday 28 November 2006 13:46, bibo,mao wrote: > > yes, x84_64EFI starts with 64-bit long mode and page enabled(virtual > > address equals physical address) if it is x86_64 efi bios, it is defined in > > section 2.3.4 of UEFI Specification Version 2.0. > > > > If kernel image is bzImage, x64 efi bootloader need switch to 32 bit > > protect mode(or real mode) from 64 bit long mode, and if kernel image is > > gzipped/plain format, efi bootloader can directly jump to 64-bit kernel > > entry address without mode switch. > > Thanks for your detailed information. So does it mean that GRUB needs to > provide a PE32+ application to EFI, if it is on x86_64? Or does it understand > PE32? More information is welcome. Now I tried on x86_64, it seems that x86_64 efi bios does not support PE32 format, PE32+ application should be provided. > > BTW, in the current implementation, GRUB skips real mode setup code in Linux > and directly jumps to a protected mode entry on EFI. Can we use the same > trick with bzImage on x86_64? Mode switching is not difficult, but if we can > omit it, that would be much easier to implement. On i386 efi platform, real mode setup code can be skipped with bzImage. But on x86_64 efi platform with bzImage format, it seems that it need switch to 32-bit protect mode at least. We can discard mode switching at beginning so that it can boot kernel image with gzipped format. Mode switching code is not difficult and very small, the problem is that x86_64 bootloader(pe32+) can be loaded at address beyond 4G, but mode switching code must be within 4G, also self-uncompressed bzimage code possibly flushes mode switching code. I do not know which address is safe to put switching code, how about 0x7c00? thanks bibo,mao > > Okuji > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel >