From bce3209969b33dc25ac4d91a2099b59b299b8065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 9 Apr 2024 14:56:39 +0200 Subject: [PATCH] feat(uefi): allow logging after exiting boot services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- Cargo.toml | 2 +- src/main.rs | 1 - src/os/uefi/mod.rs | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0085e1cb..a586c8e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ spinning_top = "0.3" [target.'cfg(target_os = "uefi")'.dependencies] uefi = { version = "0.27", features = ["alloc"] } -uefi-services = { version = "0.24", features = ["qemu"] } +uefi-services = { version = "0.24", default-features = false, features = ["panic_handler", "qemu"] } qemu-exit = "3" [target.'cfg(target_arch = "riscv64")'.dependencies] diff --git a/src/main.rs b/src/main.rs index 59575a1f..921b6713 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,6 @@ mod macros; #[cfg(target_os = "none")] mod allocator; mod arch; -#[cfg(target_os = "none")] mod log; mod os; diff --git a/src/os/uefi/mod.rs b/src/os/uefi/mod.rs index 87697040..dde9b5fe 100644 --- a/src/os/uefi/mod.rs +++ b/src/os/uefi/mod.rs @@ -30,6 +30,7 @@ fn read_app(bt: &BootServices) -> Vec { #[entry] fn loader_main(_handle: Handle, mut system_table: SystemTable) -> Status { uefi_services::init(&mut system_table).unwrap(); + crate::log::init(); let app = read_app(system_table.boot_services());