[sq] add exceptions
This commit is contained in:
parent
53b967c826
commit
3e97a34223
10
src/main.rs
10
src/main.rs
|
@ -1,6 +1,7 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
|
#![feature(global_asm)]
|
||||||
#![feature(const_fn)]
|
#![feature(const_fn)]
|
||||||
#![feature(format_args_nl)]
|
#![feature(format_args_nl)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
|
@ -79,6 +80,15 @@ fn kmain() -> ! {
|
||||||
|
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
static __exception_vectors_start: u64;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsafe {
|
||||||
|
let exception_vectors_start: u64 = &__exception_vectors_start as *const _ as u64;
|
||||||
|
|
||||||
|
arch::traps::set_vbar_el1_checked(exception_vectors_start);
|
||||||
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
mmu::init();
|
mmu::init();
|
||||||
|
|
Loading…
Reference in New Issue