diff options
| author | stefan <stefan@s00.xyz> | 2023-04-23 17:00:14 -0400 |
|---|---|---|
| committer | stefan <stefan@s00.xyz> | 2023-04-23 17:00:14 -0400 |
| commit | a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb (patch) | |
| tree | bad1c1d9026e7de550a1e69863acdf9a8213b2b7 /sys/include/asm.h | |
| parent | 386ad4f82955d389ae347bc50f7efca5edb9d9a8 (diff) | |
| download | sv-a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb.tar.gz | |
memory detection
Diffstat (limited to 'sys/include/asm.h')
| -rw-r--r-- | sys/include/asm.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |