summaryrefslogtreecommitdiff
path: root/v/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'v/vm.c')
-rw-r--r--v/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/v/vm.c b/v/vm.c
index 5fd1b11..9fc2ea4 100644
--- a/v/vm.c
+++ b/v/vm.c
@@ -175,7 +175,7 @@ static void coherence_torture()
// cause coherence misses without affecting program semantics
uint64_t random = ENTROPY;
while (1) {
- uintptr_t paddr = (random % (2 * (MAX_TEST_PAGES + 1) * PGSIZE)) & -4;
+ uintptr_t paddr = DRAM_BASE + ((random % (2 * (MAX_TEST_PAGES + 1) * PGSIZE)) & -4);
#ifdef __riscv_atomic
if (random & 1) // perform a no-op write
asm volatile ("amoadd.w zero, zero, (%0)" :: "r"(paddr));