grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiboot2: variable data size


From: bibo,mao
Subject: Re: multiboot2: variable data size
Date: Wed, 29 Nov 2006 09:55:06 +0800
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

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
address@hidden
http://lists.gnu.org/mailman/listinfo/grub-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]