Legacy OS in class 3 UEFI machines
Posted: Thu Jan 26, 2023 1:00 pm
Is it theoretically possible to boot the following (ordered by how difficult I imagine it is) in a UEFI class 3 machine:
- 64-bit Linux kernel (with EFI stub)?
I hope so!
- 32-bit Linux kernel?
I imagine it is possible and that a UEFI application could:
- Possibly use the UEFI framework to gather information later needed for the linux x86 boot protocol.
- Read the kernel and copy to its desired load address.
- Drop from long mode to protected mode and jump to the kernel's protected mode entry point.
- 16-bit helloworld bootloader that only uses the BIOS functions to print to screen and halts?
- Use UEFI framework to find out which graphics mode the hardware supports.
- Copy 16-bit code that implements the BIOS print character routine somewhere in low memory and point the IVT 0x10 entry to it.
- Maybe other BIOS interrupts also need to be implemented?
- Copy the helloworld bootloader to 0000:7c00.
- Drop to real mode and jump to the bootloader.
- A 32-bit OS that goes to protected mode as fast as possible and never goes back to real mode?
- Same as before, but also implement other BIOS services, like disk access?
- Real mode code that writes to memory hardware mapped stuff like, idk, VGA screen memory?