-
Notifications
You must be signed in to change notification settings - Fork 220
Fix the bootloader hanging during uefi exit_boot_services #457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
b8e2b9b
e41c6c1
0075368
034ddb6
1ef3241
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,8 +95,11 @@ where | |
use std::{ | ||
io::Read, | ||
process::{Command, Stdio}, | ||
time::Duration, | ||
}; | ||
|
||
use wait_timeout::ChildExt; | ||
|
||
const QEMU_ARGS: &[&str] = &[ | ||
"-device", | ||
"isa-debug-exit,iobase=0xf4,iosize=0x04", | ||
|
@@ -105,6 +108,8 @@ where | |
"-display", | ||
"none", | ||
"--no-reboot", | ||
"-smp", | ||
"8", | ||
]; | ||
|
||
const SEPARATOR: &str = "\n____________________________________\n"; | ||
|
@@ -138,10 +143,15 @@ where | |
) | ||
}); | ||
|
||
let exit_status = child.wait().unwrap(); | ||
let Some(exit_status) = child.wait_timeout(Duration::new(120, 0)).unwrap() else { | ||
child | ||
.kill() | ||
.expect("Qemu could not be killed after timeout"); | ||
panic!("Test timed out after 2 minutes"); | ||
}; | ||
|
||
match exit_status.code() { | ||
Some(33) => {} // success | ||
Some(35) => panic!("Test failed"), // success | ||
Some(33) => {} // success | ||
Some(35) => panic!("Test failed"), | ||
other => panic!("Test failed with unexpected exit code `{other:?}`"), | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blog os at least doesn't support more than 1 core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why that matters here. This is just for the tests in this repo and has no impact on any kernel build with this bootloader. Also correct me if I am wrong but Blog Os should work fine on a multicore system. It will use just 1, but the other cores don't do anything unless specifically started by the kernel.