Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
Rust and UEFI version bump/updated
Browse files Browse the repository at this point in the history
Took 24 minutes
  • Loading branch information
memN0ps committed Jul 10, 2024
1 parent 2167f6c commit 438bb9e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ path = "src/main.rs"

[dependencies]
log = "0.4.20"
uefi = { version = "0.28.0", features = ["alloc"] }
uefi-services = { version = "0.25.0", default-features = true }
uefi = { version = "0.29.0", features = [ "panic_handler", "logger", "alloc", "global_allocator" ] } # https://crates.io/crates/uefi
3 changes: 1 addition & 2 deletions uefi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ name = "illusion"
path = "src/main.rs"

[dependencies]
uefi = { version = "0.28.0", features = ["alloc"] } # https://crates.io/crates/uefi
#uefi-services = { version = "0.25.0", default-features = false } # https://crates.io/crates/uefi-services
uefi = { version = "0.29.0", features = ["alloc"] } # https://crates.io/crates/uefi
log = { version = "0.4.20", default-features = false } # https://crates.io/crates/log
once_cell = "1.19.0" # https://crates.io/crates/once_cell
spin = "0.9" # https://crates.io/crates/spin
Expand Down
1 change: 0 additions & 1 deletion uefi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// early logging, and direct manipulation of loaded image properties for hypervisor initialization.

#![feature(new_uninit)]
#![feature(panic_info_message)]
#![no_main]
#![no_std]

Expand Down
7 changes: 5 additions & 2 deletions uefi/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub unsafe fn allocate_host_stack(layout: Layout) -> *mut u8 {
// space so that we can return an appropriately-aligned pointer
// within the allocation.
let full_alloc_ptr = if let Ok(ptr) = boot_services.allocate_pool(memory_type, size + align) {
ptr
ptr.as_ptr()
} else {
return ptr::null_mut();
};
Expand Down Expand Up @@ -83,7 +83,10 @@ pub unsafe fn allocate_host_stack(layout: Layout) -> *mut u8 {
// The requested alignment is less than or equal to eight, and
// `allocate_pool` always provides eight-byte alignment, so we can
// use `allocate_pool` directly.
boot_services.allocate_pool(memory_type, size).map(|ptr| ptr).unwrap_or(ptr::null_mut())
boot_services
.allocate_pool(memory_type, size)
.map(|ptr| ptr.as_ptr())
.unwrap_or(ptr::null_mut())
};

// Record the allocation without causing a deadlock.
Expand Down

0 comments on commit 438bb9e

Please sign in to comment.