Depending on how flexible you would like this port, all the configuration details could be moved to a newly created header file (things like where the CLINT is mapped, etc).
Changes:
Trap handler must be 4 byte aligned
Removed excess code for defunct 'config string' mechanism
Special registers mtime and mtimecmp are now memory-mapped
[bug?] commented out code in syscall.c responsible for communicating with the host (did not work)
Regarding the last bullet, the function would block when executing a system call. From reading I found that Spike apparently looked for the the symbols "tohost" and "fromhost" for use in a communication mechanism between the guest and host. However, I was not able to get this working properly. Perhaps it is now deprecated? It appeared to work without spinning on those symbols as it was previously implemented.
It might also be useful to maintain tags for each specification release. In this way, others may use this port at variously stages of RISC-V development.
Depending on how flexible you would like this port, all the configuration details could be moved to a newly created header file (things like where the CLINT is mapped, etc).
Changes:
Regarding the last bullet, the function would block when executing a system call. From reading I found that Spike apparently looked for the the symbols "tohost" and "fromhost" for use in a communication mechanism between the guest and host. However, I was not able to get this working properly. Perhaps it is now deprecated? It appeared to work without spinning on those symbols as it was previously implemented.
It might also be useful to maintain tags for each specification release. In this way, others may use this port at variously stages of RISC-V development.