Remove interrupt setup from asm bootloader, add io module, memcpy functions, and serial driver
This commit is contained in:
parent
799b77d11a
commit
42c9ba12dc
1 changed files with 422 additions and 264 deletions
25
src/lib.rs
25
src/lib.rs
|
|
@ -66,10 +66,28 @@
|
|||
|
||||
#![feature(asm)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(naked_functions)]
|
||||
#![no_std]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
|
||||
/// Print to console
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => ({
|
||||
use $crate::core::fmt::Write;
|
||||
let _ = write!($crate::arch::serial::SerialConsole::new(), $($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
/// Print with new line to console
|
||||
macro_rules! println {
|
||||
($fmt:expr) => (print!(concat!($fmt, "\n")));
|
||||
($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
||||
}
|
||||
|
||||
/// Architecture specific items
|
||||
pub mod arch;
|
||||
|
||||
|
|
@ -81,3 +99,10 @@ extern "C" fn eh_personality() {}
|
|||
/// Required to handle panics
|
||||
#[lang = "panic_fmt"]
|
||||
extern "C" fn panic_fmt() -> ! {loop{}}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[no_mangle]
|
||||
/// Required to handle panics
|
||||
pub extern "C" fn _Unwind_Resume() -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue