mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
21 lines
351 B
Rust
21 lines
351 B
Rust
#![cfg_attr(not(test), no_std)]
|
|
#![feature(abi_x86_interrupt)]
|
|
|
|
pub mod gdt;
|
|
pub mod interrupts;
|
|
pub mod serial;
|
|
pub mod vga_buffer;
|
|
|
|
pub unsafe fn exit_qemu() {
|
|
use x86_64::instructions::port::Port;
|
|
|
|
let mut port = Port::<u32>::new(0xf4);
|
|
port.write(0);
|
|
}
|
|
|
|
pub fn hlt_loop() -> ! {
|
|
loop {
|
|
x86_64::instructions::hlt();
|
|
}
|
|
}
|