mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Implement code for integration test post
This commit is contained in:
24
src/lib.rs
Normal file
24
src/lib.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
#![feature(const_fn)]
|
||||
#![no_std] // don't link the Rust standard library
|
||||
|
||||
extern crate spin;
|
||||
extern crate volatile;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate uart_16550;
|
||||
extern crate x86_64;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate array_init;
|
||||
#[cfg(test)]
|
||||
extern crate std;
|
||||
|
||||
pub mod vga_buffer;
|
||||
pub mod serial;
|
||||
|
||||
pub unsafe fn exit_qemu() {
|
||||
use x86_64::instructions::port::Port;
|
||||
|
||||
let mut port = Port::<u32>::new(0xf4);
|
||||
port.write(0);
|
||||
}
|
||||
Reference in New Issue
Block a user