初始化riscv-sbi-timer (#716)

This commit is contained in:
LoGin
2024-04-12 14:46:47 +08:00
committed by GitHub
parent 3959e94df3
commit f049d1af01
13 changed files with 340 additions and 41 deletions

View File

@ -5,7 +5,10 @@ use core::hint::spin_loop;
use system_error::SystemError;
use crate::{arch::syscall::syscall_handler, kdebug, kerror};
use crate::{
arch::syscall::syscall_handler, driver::irqchip::riscv_intc::riscv_intc_irq,
exception::HardwareIrqNumber, kdebug, kerror,
};
use super::TrapFrame;
@ -40,11 +43,8 @@ unsafe extern "C" fn riscv64_do_irq(trap_frame: &mut TrapFrame) {
}
/// 处理中断
fn riscv64_do_interrupt(_trap_frame: &mut TrapFrame) {
kdebug!("todo: riscv64_do_irq: interrupt");
loop {
spin_loop();
}
fn riscv64_do_interrupt(trap_frame: &mut TrapFrame) {
riscv_intc_irq(trap_frame);
}
/// 处理异常