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,6 +1,6 @@
use crate::definitions::XousError;
use crate::filled_array;
use xous_riscv::register::{mstatus, vmim};
use vexriscv::register::{mstatus, vmim};
static mut IRQ_HANDLERS: [Option<fn(usize)>; 32] = filled_array![None; 32];

View File

@ -1,12 +0,0 @@
#![no_std]
extern crate xous_riscv;
// use core::panic::PanicInfo;
// #[panic_handler]
// fn handle_panic(_arg: &PanicInfo) -> ! {
// loop {}
// }
// Allow consumers of this library to make syscalls
// pub mod syscalls;

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() };
}
}

View File

@ -1,6 +1,6 @@
use crate::definitions::{XousError, XousPid, MemoryAddress};
use core::num::NonZeroUsize;
use xous_riscv::register::mstatus;
use vexriscv::register::mstatus;
const FLASH_START: usize = 0x20000000;
const FLASH_SIZE: usize = 16_777_216;