Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GpFHy-00036h-7N for mharc-grub-devel@gnu.org; Tue, 28 Nov 2006 21:35:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpFHw-00036E-LW for grub-devel@gnu.org; Tue, 28 Nov 2006 21:35:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpFHu-00035L-Up for grub-devel@gnu.org; Tue, 28 Nov 2006 21:35:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpFHu-00035G-P8 for grub-devel@gnu.org; Tue, 28 Nov 2006 21:35:06 -0500 Received: from [66.249.82.226] (helo=wx-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GpFHt-0006Rx-DP for grub-devel@gnu.org; Tue, 28 Nov 2006 21:35:05 -0500 Received: by wx-out-0506.google.com with SMTP id s17so2328051wxc for ; Tue, 28 Nov 2006 18:35:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=fQgPplYNVBmycEGhN/uyZSMA+ofwzFBfotgMlRiXYcm7iDG+2SzA4KdBwhNG3bCVzXlWyw92T0PTXaI3RzkhHfy/ZYmkKXoJmv8s/U6LgQ5kTKU1I6KlVGdZEkWOcCimxMWhydeZNmjJw6AwsLFgCNLL96/wg/oJg1TAWg7H5Pw= Received: by 10.70.129.5 with SMTP id b5mr2927270wxd.1164767703889; Tue, 28 Nov 2006 18:35:03 -0800 (PST) Received: from ?10.0.0.5? ( [64.135.199.23]) by mx.google.com with ESMTP id h10sm4484054wxd.2006.11.28.18.35.02; Tue, 28 Nov 2006 18:35:03 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <456CE87A.4020601@intel.com> References: <200611281235.48809.okuji@enbug.org> <456C2F8C.1040709@intel.com> <200611290029.55561.okuji@enbug.org> <456CE87A.4020601@intel.com> Content-Type: text/plain; charset=WINDOWS-1251; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: "Andrei E. Warkentin" Date: Tue, 28 Nov 2006 20:37:10 -0600 To: The development of GRUB 2 X-Mailer: Apple Mail (2.752.2) 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 02:35:08 -0000 Inlined. On 28.11.2006, at 19:55, bibo,mao wrote: > 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=20 >> (virtual >> > address equals physical address) if it is x86_64 efi bios, it =20 >> is defined in >> > section 2.3.4 of UEFI Specification Version 2.0. >> > >> > If kernel image is bzImage, x64 efi bootloader need switch to =20 >> 32 bit >> > protect mode(or real mode) from 64 bit long mode, and if kernel =20= >> image is >> > gzipped/plain format, efi bootloader can directly jump to 64-=20 >> bit kernel >> > entry address without mode switch. >> Thanks for your detailed information. So does it mean that GRUB =20 >> needs to >> provide a PE32+ application to EFI, if it is on x86_64? Or does it =20= >> understand >> PE32? More information is welcome. > Now I tried on x86_64, it seems that x86_64 efi bios does not =20 > support PE32 > format, PE32+ application should be provided. Yes. Grub for x64 EFI should be a PE32+ image. >> BTW, in the current implementation, GRUB skips real mode setup =20 >> code in Linux >> and directly jumps to a protected mode entry on EFI. Can we use =20 >> the same >> trick with bzImage on x86_64? Mode switching is not difficult, but =20= >> if we can >> omit it, that would be much easier to implement. > On i386 efi platform, real mode setup code can be skipped with =20 > bzImage. But on > x86_64 efi platform with bzImage format, it seems that it need =20 > switch to 32-bit > protect mode at least. > We can discard mode switching at beginning so that it can boot =20 > kernel image with > gzipped format. Mode switching code is not difficult and very =20 > small, the problem > is that x86_64 bootloader(pe32+) can be loaded at address beyond =20 > 4G, but mode > switching code must be within 4G, also self-uncompressed bzimage =20 > code possibly > flushes mode switching code. I do not know which address is safe to =20= > put switching code, how about 0x7c00? > That is not a problem. AllocatePages() in the UEFI runtime services =20 can be told to allocate memory below a certain address by passing =20 AllocateMaxAddress as the EFI_ALLOCATE_TYPE. The UEFI specification =20 is your friend :) =96 http://www.uefi.org/ > thanks > bibo,mao > > >> Okuji >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> http://lists.gnu.org/mailman/listinfo/grub-devel > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel