riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
570 stars 304 forks source link

Fix syscall gettimeofday in 32-bit emulator #294

Closed qwe661234 closed 1 year ago

qwe661234 commented 1 year ago

When running the 32-bit emulator, we've discovered that the proxy kernel generates inaccurate time results when the 'gettimeofday' system call is made. However, the 64-bit emulator doesn't seem to be impacted by this issue. To address this problem, we've made a modification to the system by forwarding the 'gettimeofday' system call to the Spike front-end server. This allows us to receive the correct time results and resolve the problem. The modification includes both the proxy kernel and Spike.

Issue reproduction