1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-23 18:06:20 +04:00

Add gettime to syscalls

This commit is contained in:
Stephen Marz 2020-05-24 13:34:39 -04:00
parent 4535739f00
commit f5e647de0d

View File

@ -204,6 +204,11 @@ pub unsafe fn do_syscall(mepc: usize, frame: *mut TrapFrame) -> usize {
// println!("TX: {} {} {} {} {}", dev, x, y, width, height);
gpu::transfer(dev, x, y, width, height);
mepc + 4
},
1062 => {
// gettime
(*frame).regs[Registers::A0 as usize] = crate::cpu::get_mtime();
mepc + 4
}
_ => {