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

Commit

Permalink
Added spin crate and info! statement
Browse files Browse the repository at this point in the history
  • Loading branch information
memN0ps committed Feb 18, 2024
1 parent da39986 commit 50db739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ uefi = {version = "0.26.0", features = ["global_allocator", "alloc"] } # https:/
uefi-services = { version = "0.23.0", default-features = false } # https://crates.io/crates/uefi-services
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

hypervisor = { path = "../hypervisor" }
2 changes: 2 additions & 0 deletions driver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ fn main(_image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
mp_manager.set_virtualized();

if processor_count.enabled == 1 {
info!("Found only one processor, virtualizing it");
switch_stack_and_virtualize_core(&mut virtualize as *mut _ as *mut c_void);
} else {
info!("Found multiple processors, virtualizing all of them");
match mp_manager.start_virtualization_on_all_processors(
switch_stack_and_virtualize_core,
&mut virtualize as *mut _ as *mut c_void,
Expand Down

0 comments on commit 50db739

Please sign in to comment.