From a79b134d14e8d79b0b05115991496f5c19d28a27 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 19 Jan 2024 23:23:28 +0800 Subject: [PATCH] add placeholder for v2p/PID mapping We need the V2P feature, but don't need the ability to swap PID spaces yet. Leave the alternate API as a todo!() item in the kernel for riscv targets. --- kernel/src/arch/riscv/mem.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/src/arch/riscv/mem.rs b/kernel/src/arch/riscv/mem.rs index bae5ca26c..7c319b792 100644 --- a/kernel/src/arch/riscv/mem.rs +++ b/kernel/src/arch/riscv/mem.rs @@ -870,6 +870,10 @@ pub fn virt_to_phys(virt: usize) -> Result { Ok((l0_pt.entries[vpn0] >> 10) << 12) } +pub fn virt_to_phys_pid(_pid: PID, _virt: usize) -> Result { + todo!("virt_to_phys_pid is not yet implemented for riscv"); +} + pub fn ensure_page_exists_inner(address: usize) -> Result { // Disallow mapping memory outside of user land if !MemoryMapping::current().is_kernel() && address >= USER_AREA_END {