uefi update

This commit is contained in:
2025-07-02 00:51:00 +02:00
parent a59b723f4b
commit f6ebf675bc
9 changed files with 98 additions and 159 deletions

View File

@ -2,8 +2,7 @@
use linux::start_linux;
use pe::get_loader_sections;
use uefi::table::{Boot, SystemTable};
use uefi::{Handle, Status};
use uefi::{boot, Handle, Status};
mod initrd;
mod linux;
@ -17,11 +16,10 @@ pub fn panic(_: &core::panic::PanicInfo) -> ! {
loop {}
}
pub fn bootloader(image_handle: Handle, system_table: SystemTable<Boot>) -> Status {
let boot_services = system_table.boot_services();
let sections = get_loader_sections(boot_services).unwrap();
start_linux(image_handle, boot_services, sections).unwrap();
pub fn bootloader(image_handle: Handle) -> Status {
let sections = get_loader_sections(image_handle).unwrap();
start_linux(image_handle, sections).unwrap();
boot_services.stall(1_000_000_000);
boot::stall(1_000_000_000);
Status::SUCCESS
}