riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
587 stars 308 forks source link

Implement syscall readlinkat and readv #318

Closed mylai-mtk closed 6 months ago

mylai-mtk commented 6 months ago

I implemented them since they're used in my libc testsuite, and think they may be useful others using spike, so I'm contributing them.

readv is implemented by sequential read, since forwarding the syscall requires kernel-space dynamic memory management, which is not practically usable in pk, so the readv syscall is spilt into many reads instead.

The frontend of readlinkat is at riscv-software-src/riscv-isa-sim#1631 .