forked from koniifer/ableos
arch specific updates to the kernel
This commit is contained in:
parent
00a7a884d8
commit
236949682e
6
kernel/src/arch/mod.rs
Normal file
6
kernel/src/arch/mod.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
//! Architecture-specific code.
|
||||||
|
|
||||||
|
/// X86 specific code
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
#[path = "x86_64/mod.rs"]
|
||||||
|
pub mod arch;
|
9
kernel/src/arch/x86_64/mod.rs
Normal file
9
kernel/src/arch/x86_64/mod.rs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
///
|
||||||
|
|
||||||
|
pub fn sloop() {
|
||||||
|
loop {
|
||||||
|
unsafe {
|
||||||
|
core::arch::asm!("hlt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,7 @@
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
pub mod allocator;
|
pub mod allocator;
|
||||||
|
pub mod arch;
|
||||||
pub mod device_interface;
|
pub mod device_interface;
|
||||||
pub mod messaging;
|
pub mod messaging;
|
||||||
pub mod panic;
|
pub mod panic;
|
||||||
|
|
Loading…
Reference in a new issue