[arch][riscv] more work on riscv MMU code

Use a callback based shared walker to implement the
same page table walking code for different operations.

Add SBI hooks for TLB flushing.
This commit is contained in:
Travis Geiselbrecht
2021-03-05 02:21:00 -08:00
parent c6d8476adb
commit 45a27cbf14
6 changed files with 308 additions and 96 deletions

View File

@@ -53,8 +53,8 @@ static inline void hexdump8(const void *ptr, size_t len) {
/* systemwide halts */
void panic(const char *fmt, ...) __PRINTFLIKE(1, 2) __NO_RETURN;
#define PANIC_UNIMPLEMENTED panic("%s unimplemented\n", __PRETTY_FUNCTION__)
#define PANIC_UNIMPLEMENTED_MSG(x...) panic("%s unimplemented: %s\n", __PRETTY_FUNCTION__, x)
#define PANIC_UNIMPLEMENTED panic("%s:%d unimplemented\n", __PRETTY_FUNCTION__, __LINE__)
#define PANIC_UNIMPLEMENTED_MSG(x...) panic("%s:%d unimplemented: %s\n", __PRETTY_FUNCTION__, __LINE__, x)
/* spin the cpu for a period of (short) time */
void spin(uint32_t usecs);