diff options
author | Tim Newsome <tim@sifive.com> | 2020-01-09 15:42:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-09 15:42:05 -0800 |
commit | 6db6ab8680ea493bacbdd58adb2227894615afdc (patch) | |
tree | e03767f450ba2db4b4ea422fc6d19a7619a8c045 /debug/programs/multicore.c | |
parent | d081949d96d374949e3ac5b849608dda251825d0 (diff) | |
download | riscv-tests-6db6ab8680ea493bacbdd58adb2227894615afdc.zip riscv-tests-6db6ab8680ea493bacbdd58adb2227894615afdc.tar.gz riscv-tests-6db6ab8680ea493bacbdd58adb2227894615afdc.tar.bz2 |
Smoke test virtual address translation support. (#233)
* WIP
* Smoke test virtual address support.
Tests sv32, sv39, and sv48. Only explicitly tests 4K pages, but uses as
large as possible pages to 1:1 map the rest of RAM so those sizes do get
minimal coverage as well.
Diffstat (limited to 'debug/programs/multicore.c')
-rw-r--r-- | debug/programs/multicore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debug/programs/multicore.c b/debug/programs/multicore.c index 272baea..a51ee4a 100644 --- a/debug/programs/multicore.c +++ b/debug/programs/multicore.c @@ -1,6 +1,7 @@ #include <stdint.h> #include "init.h" +#include "encoding.h" typedef struct { int counter; @@ -51,7 +52,7 @@ void *increment_count(unsigned hartid, unsigned mcause, void *mepc, void *sp) int main() { - uint32_t hartid = csr_read(mhartid); + uint32_t hartid = read_csr(mhartid); hart_count[hartid] = 0; interrupt_count[hartid] = 0; |