-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EFI Prekernel (6/N): Kernel: Preparations for booting with the EFIPrekernel #25668
Conversation
`load_kernel_symbols_from_data` modifies the contents of this segment, so it needs to be writable.
Setting the boot method to Multiboot1 is no longer necessary because we don't use a hard-coded multiboot memory map anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks alright, but I don't know this area well.
Does booting via EFI have any noticeable effect in baremetal arm boots? (Faster? Slower? More capable? Less?)
faa226c
to
395ab9a
Compare
The bootup speed depends on the firmware. Booting with EDK2 will definitely be slower, but booting using U-Boot as the "UEFI firmware" should be just as fast. UEFI support will give us a framebuffer for free, if the firmware supports the UEFI Graphics Output Protocol (GOP). We currently use the linux boot protocol for aarch64 and riscv64, which I think isn't very clean tbh (but I think we should keep the current pre_init code even with the EFIPrekernel completely functional). UEFI is (sadly) the only widespread OS-agnostic boot protocol that works on all our supported architectures. |
Oh no, not this panic
But I don't see how that could be caused by this PR? |
395ab9a
to
85c23ac
Compare
Oh duh - MUST(StaticParsing::find_rsdp_in_platform_specific_memory_locations());
+ rsdp = MUST(StaticParsing::find_rsdp_in_platform_specific_memory_locations()); |
The EFIPrekernel will identity map one page to set up virtual memory, instead of identity mapping its entire memory like the current multiboot prekernel.
This also required making the aarch64 pre_init code pass the boot_info to init.
This will be necessary when booting with the EFIPrekernel. x86-64 also loads the IDT in Processor::initialize.
The EFIPrekernel will set `acpi_rsdp_paddr` to the RSDP address found in the configuration table.
85c23ac
to
874e1cd
Compare
This PR includes all kernel changes necessary for making the kernel bootable with the EFIPrekernel.