> On Aug 11, 2017, at 6:00 AM, Rafael Machado 
> <rafaelrodrigues.mach...@gmail.com> wrote:
> Hi everyone
> I have a question that probably some guys here can help.
> The scenario I have, is that I need to create a OS image that must be able
> to boot at a UEFI system (with no csm module), and at a legacy bios system.
> My fist thought is that this is not possible.


We designed EFI to co-exist with legacy BIOS  so you could make media that 
boots both ways. I think it is useful to step back and think about how booting 
1) EFI loads a relocatable PE/COFF image that is a file (pointed to by an NVRAM 
variable, or in a known path for removable media) on a FAT32 file system 
(Usually the EFI System Partition). 
2) For a legacy hard disk boot the the BIOS loads the 1st 0x200 (512) bytes of 
the disk (MBR) into 0x7C00 and jumps to it in real mode. The MBR code usually 
plays a similar trick and loads 1st 0x200 bytes of the boot partition into 
memory and jump to it, this is usually the start of the file system on the disk 

The 0x200 byte limit in MBR in combination with the 4 partition limit ended up 
with a lot of creative "grabbing of space" which worked great util different 
code broke each other. This grabbing "unused space" and the size limits is why 
we ended up adding GPT to the EFI spec as a next generation partitioning 

I think your problem is more about can you put a BIOS boot loader and a EFI 
Boot loader on the same disk and have them boot the same kernel. Seems like 
most of what the OS loader needs to do is a solved problem, it is just making 
everything coexist you have to figure out.


Andrew Fish

> The first thing I see that is different is the what the memory map is
> presented to the Bootloader/OS. At legacy bios the int15/0xE820 is used,
> and at a UEFI bios the GetMemoryMap() from the boot service is used. Is my
> understanding correct?
> Besides that. Is there any other change that could not make it possible to
> create a single BootloaderLoader/OS image able to boot on a UEFI BIOS(with
> no CSM) and on a Legacy Bios ?
> I would like to create a list or arguments to talk with my client that
> requested this, in case this is really not possible.
> The OS in this case is Linux, and the bootloader is Grub or Syslinux.
> Thanks and Regards
> Rafael R. Machado
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

edk2-devel mailing list

Reply via email to