Initial RISC-V implementation

Has no IRQ handling yet
This commit is contained in:
Andrey Turkin
2024-10-20 12:15:09 +03:00
parent db32f5f7a3
commit 1921c6814b
36 changed files with 1999 additions and 57 deletions
+7 -5
View File
@@ -12,15 +12,13 @@ use alloc::{collections::BTreeMap, string::String, vec::Vec};
use spin::{Mutex, Once, RwLock};
use syscall::dirent::{DirEntry, DirentBuf, DirentKind};
use crate::{
arch::interrupt::{available_irqs_iter, bsp_apic_id, is_reserved, set_reserved},
context::file::InternalFlags,
};
use crate::context::file::InternalFlags;
use crate::arch::interrupt::{available_irqs_iter, bsp_apic_id, is_reserved, set_reserved};
use crate::{
cpu_set::LogicalCpuId,
event,
interrupt::irq::acknowledge,
syscall::{
data::Stat,
error::*,
@@ -29,6 +27,9 @@ use crate::{
},
};
#[cfg(not(target_arch = "riscv64"))]
use crate::interrupt::irq::acknowledge;
use super::{CallerCtx, GlobalSchemes, OpenResult};
/// IRQ queues
@@ -329,6 +330,7 @@ impl crate::scheme::KernelScheme for IrqScheme {
return Ok(0);
}
handle_ack.store(ack, Ordering::SeqCst);
#[cfg(not(target_arch = "riscv64"))]
unsafe {
acknowledge(handle_irq as usize);
}