Update rustsbi; huge_write writes 1MiB

This commit is contained in:
Yifan Wu 2021-08-26 19:04:10 +08:00
parent a4d955f927
commit 5d2d508e25
5 changed files with 6 additions and 4 deletions

View file

@ -22,7 +22,7 @@ const VIRTIO0: usize = 0x10001000;
pub struct VirtIOBlock(UPSafeCell<VirtIOBlk<'static>>);
lazy_static! {
static ref QUEUE_FRAMES: UPSafeCell<Vec<FrameTracker>> = unsafe {
static ref QUEUE_FRAMES: UPSafeCell<Vec<FrameTracker>> = unsafe {
UPSafeCell::new(Vec::new())
};
}

View file

@ -116,7 +116,9 @@ pub fn trap_return() -> ! {
#[no_mangle]
pub fn trap_from_kernel() -> ! {
use riscv::register::sepc;
println!("stval = {:#x}, sepc = {:#x}", stval::read(), sepc::read());
panic!("a trap {:?} from kernel!", scause::read().cause());
}
pub use context::{TrapContext};
pub use context::TrapContext;