1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use core::option::{Option, Some, None};
use platform::{cpu, io, drivers};
use cpu::interrupt;
pub use cpu::interrupt::Table;
pub mod util;
pub mod mm;
pub mod heap;
mod process;
#[allow(dead_code)]
#[allow(non_camel_case_types)]
mod elf;
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
pub static mut int_table: Option<Table> = None;
#[lang="start"]
#[no_mangle]
pub fn main() {
heap::init();
mm::physical::init();
let table = interrupt::Table::new();
table.load();
unsafe {
int_table = Some(table);
drivers::keydown = Some(io::putc);
}
cpu::init();
drivers::init();
elf::exec(&_binary_initram_elf_start);
extern { static _binary_initram_elf_start: u8; }
}