Skip to content

Commit

Permalink
Merge pull request #351 from hermit-os/dependabot/cargo/uefi-0.29.0
Browse files Browse the repository at this point in the history
build(deps): bump uefi from 0.28.0 to 0.29.0
  • Loading branch information
mkroening authored Jul 9, 2024
2 parents d7ba0e4 + ba52b37 commit 261f5f7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ hermit-dtb = { version = "0.1" }
goblin = { version = "0.8", default-features = false, features = ["elf64"] }

[target.'cfg(target_os = "uefi")'.dependencies]
uefi = { version = "0.28", features = ["alloc", "panic_handler", "qemu"] }
uefi = { version = "0.29", features = ["alloc", "panic_handler", "qemu"] }
qemu-exit = "3"

[target.'cfg(target_arch = "riscv64")'.dependencies]
Expand Down
8 changes: 6 additions & 2 deletions src/os/uefi/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ impl Console {
fn init(&mut self) {
assert!(matches!(self, Console::None));
unsafe {
uefi::helpers::system_table()
uefi::table::system_table_boot()
.unwrap()
.boot_services()
.create_event(
EventType::SIGNAL_EXIT_BOOT_SERVICES,
Expand All @@ -50,7 +51,10 @@ impl fmt::Write for Console {
self.init();
self.write_str(s)?;
}
Console::BootServices => uefi::helpers::system_table().stdout().write_str(s)?,
Console::BootServices => uefi::table::system_table_boot()
.unwrap()
.stdout()
.write_str(s)?,
Console::Native { console } => console.write_bytes(s.as_bytes()),
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/os/uefi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn loader_main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {

allocator::exit_boot_services();
let (_runtime_system_table, _memory_map) =
system_table.exit_boot_services(MemoryType::LOADER_DATA);
unsafe { system_table.exit_boot_services(MemoryType::LOADER_DATA) };

println!("Exited boot services!");
println!("Allocations still {}!", String::from("work"));
Expand Down

0 comments on commit 261f5f7

Please sign in to comment.