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

Commit 50db739

Browse files
committed
Added spin crate and info! statement
1 parent da39986 commit 50db739

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

driver/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ uefi = {version = "0.26.0", features = ["global_allocator", "alloc"] } # https:/
1010
uefi-services = { version = "0.23.0", default-features = false } # https://crates.io/crates/uefi-services
1111
log = { version = "0.4.20", default-features = false } # https://crates.io/crates/log
1212
once_cell = "1.19.0" # https://crates.io/crates/once_cell
13+
spin = "0.9" # https://crates.io/crates/spin
1314

1415
hypervisor = { path = "../hypervisor" }

driver/src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ fn main(_image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
8888
mp_manager.set_virtualized();
8989

9090
if processor_count.enabled == 1 {
91+
info!("Found only one processor, virtualizing it");
9192
switch_stack_and_virtualize_core(&mut virtualize as *mut _ as *mut c_void);
9293
} else {
94+
info!("Found multiple processors, virtualizing all of them");
9395
match mp_manager.start_virtualization_on_all_processors(
9496
switch_stack_and_virtualize_core,
9597
&mut virtualize as *mut _ as *mut c_void,

0 commit comments

Comments
 (0)