All of lore.kernel.org
 help / color / mirror / Atom feed
From: "bibo,mao" <bibo.mao@intel.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: multiboot2: variable data size
Date: Wed, 29 Nov 2006 09:55:06 +0800	[thread overview]
Message-ID: <456CE87A.4020601@intel.com> (raw)
In-Reply-To: <200611290029.55561.okuji@enbug.org>

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
> 



  reply	other threads:[~2006-11-29  1:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <iss.8f960c3c.4ebf.45648480.44026.78@relay0i.sun.com>
2006-11-22 20:55 ` Grub-devel Digest, Vol 33, Issue 19 Joe Bonasera
2006-11-25  2:09   ` multiboot2: variable data size Hollis Blanchard
2006-11-25  3:10     ` Yoshinori K. Okuji
2006-11-25  3:33       ` Hollis Blanchard
2006-11-25  3:46         ` Yoshinori K. Okuji
2006-11-25  4:08           ` Hollis Blanchard
2006-11-25  4:36             ` Yoshinori K. Okuji
2006-11-25  5:01               ` Hollis Blanchard
2006-11-28  9:29           ` Johan Rydberg
2006-11-28 11:35             ` Yoshinori K. Okuji
2006-11-28 12:46               ` bibo,mao
2006-11-28 23:29                 ` Yoshinori K. Okuji
2006-11-29  1:55                   ` bibo,mao [this message]
2006-11-29  2:37                     ` Andrei E. Warkentin
2006-11-29  0:22                 ` Johan Rydberg
2006-11-29  2:13                   ` bibo,mao
2006-11-28 12:50               ` tgingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=456CE87A.4020601@intel.com \
    --to=bibo.mao@intel.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.