Remove K210 support.
This commit is contained in:
parent
a279615610
commit
82aff1d510
5 changed files with 6 additions and 95 deletions
|
@ -1,48 +0,0 @@
|
|||
OUTPUT_ARCH(riscv)
|
||||
ENTRY(_start)
|
||||
BASE_ADDRESS = 0x80020000;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = BASE_ADDRESS;
|
||||
skernel = .;
|
||||
|
||||
stext = .;
|
||||
.text : {
|
||||
*(.text.entry)
|
||||
*(.text .text.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
etext = .;
|
||||
srodata = .;
|
||||
.rodata : {
|
||||
*(.rodata .rodata.*)
|
||||
*(.srodata .srodata.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
erodata = .;
|
||||
sdata = .;
|
||||
.data : {
|
||||
*(.data .data.*)
|
||||
*(.sdata .sdata.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
edata = .;
|
||||
.bss : {
|
||||
*(.bss.stack)
|
||||
sbss = .;
|
||||
*(.bss .bss.*)
|
||||
*(.sbss .sbss.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
ebss = .;
|
||||
ekernel = .;
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
/// handle SBI call with `which` SBI_id and other arguments
|
||||
#[inline(always)]
|
||||
|
@ -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!");
|
||||
}
|
||||
|
|
|
@ -134,14 +134,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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue