diff --git a/kernel/src/syscall/fs.rs b/kernel/src/syscall/fs.rs index b16fe73..d94e8b5 100644 --- a/kernel/src/syscall/fs.rs +++ b/kernel/src/syscall/fs.rs @@ -1074,6 +1074,9 @@ pub struct IoVec { /// Starting address base: *mut u8, /// Number of bytes to transfer + #[cfg(target_arch = "mips")] + len: u32, + #[cfg(not(target_arch = "mips"))] len: u64, } diff --git a/kernel/src/syscall/mod.rs b/kernel/src/syscall/mod.rs index 11558d3..961f794 100644 --- a/kernel/src/syscall/mod.rs +++ b/kernel/src/syscall/mod.rs @@ -319,6 +319,9 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize { #[cfg(target_arch = "mips")] fn mips_syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> Option { let ret = match id { + SYS_OPEN => sys_open(args[0] as *const u8, args[1], args[2]), + SYS_DUP2 => sys_dup2(args[0], args[1]), + SYS_MMAP2 => sys_mmap(args[0], args[1], args[2], args[3], args[4], args[5] * 4096), SYS_SET_THREAD_AREA => { extern "C" { fn _cur_tls();