| Filename | Latest commit message | Latest commit date |
|---|---|---|
GOP instead of VBE, and the same reasoning. There are no mode numbers worth hardcoding here: the firmware publishes however many modes the hardware can do and which index means what varies by machine, so the menu is built by walking them. Press R within four seconds for a list, then either a mode number or Enter to type a size. 800x600 stays the floor. Fixes a header bug this is the first code to notice. The spec's order in EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE is MaxMode then Mode; efi.h had them swapped. Info, SizeOfInfo and FrameBufferBase sit at the same offsets either way because both fields are UINT32, so the framebuffer worked perfectly and nothing was wrong until something asked how many modes existed -- and was told the current mode number instead. Zero, on a machine reporting thirty. QueryMode and SetMode were void* padding and now have real prototypes; ConIn likewise, so the loader can read a key. Under OVMF the console includes the serial line, which is where `make qemu-uefi` puts it and where the person actually is -- the same mistake the BIOS menu made first time round. Verified over serial against OVMF: 30 modes enumerated; picking listed mode 14 gives 1280x1024; typing 1024x768 gives 1024x768; no key keeps the firmware's mode and boots. All reach schinit. bootcheck 108 [ok]. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
| .. | ||
| efi.h | ||
| main.c | ||
| README.md | ||
| startup.nsh | ||
UEFI loader
Not written yet. This directory exists so the BIOS path could be moved into
boot/bios/ without pretending the split was hypothetical.
See ../README.md for the hand-off contract a loader has to satisfy. The
short version: the kernel wants long mode with paging on, its ELF segments
placed, a 24-byte-entry E820-shaped memory map, and framebuffer geometry — and
it does not care which firmware produced them.
What this will need, in rough order:
- A PE/COFF target. clang can emit one directly
(
--target=x86_64-unknown-windows -fuse-ld=lld-link), so no new toolchain: the same LLVM install already builds every other target here. - The handful of UEFI structures actually used — the system table, boot
services,
LOADED_IMAGE,SIMPLE_FILE_SYSTEM,GRAPHICS_OUTPUT. Written from the specification rather than by importing gnu-efi or EDK II, which is both a licence question and a large dependency for something this small. GetMemoryMaptranslated into the same 24-byte entriese820.calready parses. Not a second format for the kernel to learn.ExitBootServicesbefore touching the memory it described.- Graphics Output Protocol for the framebuffer, filling the same
VBE_INFO_ADDRstructure the BIOS path fills.
The image goes at EFI/BOOT/BOOTX64.EFI on a FAT ESP, which also means the
ISO gains an El Torito EFI entry alongside the BIOS one it already has.