temp stage2:add pmpaddr0/pmpcfg0 setup
This commit is contained in:
parent
2e57ec432a
commit
b1c5751546
1 changed files with 5 additions and 4 deletions
|
@ -121,7 +121,8 @@ pub unsafe fn rust_start() -> ! {
|
||||||
|
|
||||||
// configure Physical Memory Protection to give supervisor mode
|
// configure Physical Memory Protection to give supervisor mode
|
||||||
// access to all of physical memory.
|
// access to all of physical memory.
|
||||||
//pmpaddr0::write(0x3fffffffffffff);
|
pmpaddr0::write(0x3fffffffffffff);
|
||||||
|
pmpcfg0::write(0xf);
|
||||||
//pmpcfg0::set_pmp(0, Range::TOR, Permission::RWX, false); // 0 < addr < pmpaddr0
|
//pmpcfg0::set_pmp(0, Range::TOR, Permission::RWX, false); // 0 < addr < pmpaddr0
|
||||||
|
|
||||||
// ask for clock interrupts.
|
// ask for clock interrupts.
|
||||||
|
@ -249,12 +250,12 @@ unsafe fn timer_init() {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn rust_main() -> ! {
|
pub fn rust_main() -> ! {
|
||||||
|
|
||||||
//clear_bss();
|
clear_bss();
|
||||||
|
|
||||||
//println!("KERN: begin");
|
println!("KERN: begin");
|
||||||
|
|
||||||
mm::init();
|
mm::init();
|
||||||
loop{};
|
//loop{};
|
||||||
//println!("KERN: init gpu");
|
//println!("KERN: init gpu");
|
||||||
//let _gpu = GPU_DEVICE.clone();
|
//let _gpu = GPU_DEVICE.clone();
|
||||||
// println!("KERN: init keyboard");
|
// println!("KERN: init keyboard");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue