From a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb Mon Sep 17 00:00:00 2001 From: stefan Date: Sun, 23 Apr 2023 17:00:14 -0400 Subject: memory detection --- sys/include/asm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/include/asm.h') diff --git a/sys/include/asm.h b/sys/include/asm.h index 0995f88..d345712 100644 --- a/sys/include/asm.h +++ b/sys/include/asm.h @@ -53,4 +53,10 @@ read_tp(void) return x; } +static inline void +csrw_satp(uint64_t x) +{ + asm volatile("csrw satp, %0" : : "r"(x)); +} + #endif /* _ASM_H */ -- cgit v1.2.3