Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: riscv: Translate to PA when allocating PGT with MMU enabled
If MMU is enabled, core_mmu_pgt_alloc() returns virtual address of PGT instead of physical address. Thus, it leads to some errors when we invoke pa_to_ppn() with returned PGT which is actually the virtual address of that PGT. Fix it by checking whether MMU is enabled or not. If MMU is enabled, we translate the returned PGT to its physical address. Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
- Loading branch information