RISC-V MMU: Add missing implementation for PTE getter
For some reason this was (mistakenly) left out from the patch that was supposed to have it.
This commit is contained in:
parent
644c2be3aa
commit
4bd1bd177b
@ -100,6 +100,19 @@ void mmu_ln_setentry(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr,
|
||||
mmu_invalidate_tlb_by_vaddr(vaddr);
|
||||
}
|
||||
|
||||
uintptr_t mmu_ln_getentry(uint32_t ptlevel, uintptr_t lnvaddr,
|
||||
uintptr_t vaddr)
|
||||
{
|
||||
uintptr_t *lntable = (uintptr_t *)lnvaddr;
|
||||
uint32_t index;
|
||||
|
||||
DEBUGASSERT(ptlevel > 0 && ptlevel <= RV_MMU_PT_LEVELS);
|
||||
|
||||
index = (vaddr >> RV_MMU_VADDR_SHIFT(ptlevel)) & RV_MMU_VPN_MASK;
|
||||
|
||||
return lntable[index];
|
||||
}
|
||||
|
||||
void mmu_ln_map_region(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr,
|
||||
uintptr_t vaddr, size_t size, uint32_t mmuflags)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user