Skip to content

Commit

Permalink
Printing
Browse files Browse the repository at this point in the history
  • Loading branch information
toku-sa-n committed Nov 27, 2023
1 parent d5978b2 commit d2c72e0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@
#![no_main]

use qemu_exit::QEMUExit;
use qemu_print::qemu_println;
use uefi::table::boot::MemoryType;

#[uefi::entry]
fn main(image: uefi::Handle, st: uefi::table::SystemTable<uefi::table::Boot>) -> uefi::Status {
let handler = qemu_exit::X86::new(0xf4, 33);
let (_, memory_map) = st.exit_boot_services(MemoryType::LOADER_DATA);

for descriptor in memory_map.entries() {
qemu_println!("{:?}", descriptor);
}

let handler = qemu_exit::X86::new(0xf4, 33);
handler.exit_success();
}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
let handler = qemu_exit::X86::new(0xf4, 33);

qemu_println!("panic: {:?}", _info);

handler.exit_failure();
}

0 comments on commit d2c72e0

Please sign in to comment.