Skip to content

Commit

Permalink
riscv_addrenv: Fix static page table mapping (paddr instead of vaddr)
Browse files Browse the repository at this point in the history
Connecting the static page tables to each other was done with the page
table virtual address (riscv_pgvaddr) when the page table physical address
is needed.
  • Loading branch information
pussuw authored and xiaoxiang781216 committed Nov 2, 2023
1 parent aacdbf2 commit 3f3b30e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/risc-v/src/common/riscv_addrenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ static void map_spgtables(arch_addrenv_t *addrenv, uintptr_t vaddr)

for (i = 0; i < (ARCH_SPGTS - 1); i++)
{
uintptr_t next = riscv_pgvaddr(addrenv->spgtables[i + 1]);
uintptr_t next = addrenv->spgtables[i + 1];
mmu_ln_setentry(i + 1, prev, next, vaddr, MMU_UPGT_FLAGS);
prev = next;
prev = riscv_pgvaddr(next);
}
}

Expand Down

0 comments on commit 3f3b30e

Please sign in to comment.