vexriscv: use upstream package

Use this package rather than the local xous-riscv package.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
2020-01-09 10:45:22 +08:00
parent 3a6c4f9a1c
commit fd7bbc463d
8 changed files with 25 additions and 34 deletions

View File

@ -1,7 +1,7 @@
#![no_std]
#![no_main]
extern crate xous_riscv;
extern crate vexriscv;
mod definitions;
mod irq;
mod macros;
@ -13,7 +13,7 @@ pub use irq::sys_interrupt_claim;
use core::panic::PanicInfo;
use xous_kernel_riscv_rt::xous_kernel_entry;
use xous_riscv::register::{mcause, mstatus, mie, vmim, vmip};
use vexriscv::register::{mcause, mstatus, mie, vmim, vmip};
use mem::MemoryManager;
use processtable::ProcessTable;
@ -39,6 +39,7 @@ fn xous_main() -> ! {
}
let mut mm = MemoryManager::new();
let mut pt = ProcessTable::new(&mut mm);
sys_interrupt_claim(2, |_| {
let uart_ptr = 0xE000_1800 as *mut usize;
print_str(uart_ptr, "hello, world!\r\n");
@ -59,7 +60,7 @@ fn xous_main() -> ! {
print_str(uart_ptr, "greetings!\r\n");
loop {
unsafe { xous_riscv::asm::wfi() };
unsafe { vexriscv::asm::wfi() };
}
}