Remove K210 support.

This commit is contained in:
Yifan Wu 2022-12-13 22:48:37 +08:00
parent 87a014df80
commit 6915bd2e63
5 changed files with 6 additions and 51 deletions

View file

@ -27,10 +27,6 @@ extern crate alloc;
#[macro_use]
extern crate bitflags;
#[cfg(feature = "board_k210")]
#[path = "boards/k210.rs"]
mod board;
#[cfg(not(any(feature = "board_k210")))]
#[path = "boards/qemu.rs"]
mod board;

View file

@ -5,14 +5,13 @@ use core::arch::asm;
const SBI_SET_TIMER: usize = 0;
const SBI_CONSOLE_PUTCHAR: usize = 1;
#[cfg(feature = "board_k210")]
const SBI_SHUTDOWN: usize = 8;
// const SBI_CONSOLE_GETCHAR: usize = 2;
// const SBI_CLEAR_IPI: usize = 3;
// const SBI_SEND_IPI: usize = 4;
// const SBI_REMOTE_FENCE_I: usize = 5;
// const SBI_REMOTE_SFENCE_VMA: usize = 6;
// const SBI_REMOTE_SFENCE_VMA_ASID: usize = 7;
// const SBI_SHUTDOWN: usize = 8;
#[inline(always)]
/// general sbi call
@ -46,16 +45,8 @@ pub fn console_putchar(c: usize) {
// sbi_call(SBI_CONSOLE_GETCHAR, 0, 0, 0)
// }
#[cfg(feature = "board_qemu")]
use crate::board::QEMUExit;
/// use sbi call to shutdown the kernel
pub fn shutdown() -> ! {
#[cfg(feature = "board_k210")]
sbi_call(SBI_SHUTDOWN, 0, 0, 0);
#[cfg(feature = "board_qemu")]
crate::board::QEMU_EXIT_HANDLE.exit_failure();
#[cfg(feature = "board_k210")]
panic!("It should shutdown!");
}

View file

@ -144,14 +144,8 @@ impl TaskManager {
// go back to user mode
} else {
println!("All applications completed!");
#[cfg(feature = "board_qemu")]
use crate::board::QEMUExit;
#[cfg(feature = "board_qemu")]
crate::board::QEMU_EXIT_HANDLE.exit_success();
#[cfg(feature = "board_k210")]
panic!("All applications completed!");
}
}
}