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
|
||||
// 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
|
||||
|
||||
// ask for clock interrupts.
|
||||
|
@ -249,12 +250,12 @@ unsafe fn timer_init() {
|
|||
#[no_mangle]
|
||||
pub fn rust_main() -> ! {
|
||||
|
||||
//clear_bss();
|
||||
clear_bss();
|
||||
|
||||
//println!("KERN: begin");
|
||||
println!("KERN: begin");
|
||||
|
||||
mm::init();
|
||||
loop{};
|
||||
//loop{};
|
||||
//println!("KERN: init gpu");
|
||||
//let _gpu = GPU_DEVICE.clone();
|
||||
// println!("KERN: init keyboard");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue