Implement code for integration test post

This commit is contained in:
Philipp Oppermann
2018-06-12 19:25:53 +02:00
parent 40eb19b613
commit 8b5be6ebc0
7 changed files with 125 additions and 12 deletions

24
src/lib.rs Normal file
View 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);
}