Refactor ACPI, implement poweroff correctly using the DSDT in ACPI

This commit is contained in:
Jeremy Soller
2017-03-19 16:45:19 -06:00
parent e726234bc6
commit 228cd79cd4
5 changed files with 156 additions and 70 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
//! The Redox OS Kernel is a hybrid kernel that supports X86_64 systems and
//! provides Unix-like syscalls for primarily Rust applications
#![deny(warnings)]
//#![deny(warnings)]
#![feature(alloc)]
#![feature(asm)]
#![feature(collections)]
+10
View File
@@ -855,6 +855,16 @@ pub fn exit(status: usize) -> ! {
println!("{:?} not found for exit vfork unblock", ppid);
}
}
if pid == ContextId::from(1) {
println!("Main kernel thread exited with status {:X}, calling kstop", status);
extern {
fn kstop() -> !;
}
unsafe { kstop(); }
}
}
unsafe { context::switch(); }