mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
Add pte getter to RISC-V MMU driver
Like the title says, a getter to read one PTE.
This commit is contained in:
@@ -246,9 +246,9 @@ static inline void mmu_enable(uintptr_t pgbase, uint16_t asid)
|
|||||||
* MMU implementation specific
|
* MMU implementation specific
|
||||||
* lnvaddr - The virtual address of the beginning of the page table at
|
* lnvaddr - The virtual address of the beginning of the page table at
|
||||||
* level n
|
* level n
|
||||||
* paddr - The physical address to be mapped. Must be aligned to a PPN
|
* paddr - The physical address to be mapped. Must be aligned to a PPN
|
||||||
* address boundary which is dependent on the level of the entry
|
* address boundary which is dependent on the level of the entry
|
||||||
* vaddr - Must be aligned to a PPN
|
* vaddr - The virtual address to be mapped. Must be aligned to a PPN
|
||||||
* address boundary which is dependent on the level of the entry
|
* address boundary which is dependent on the level of the entry
|
||||||
* mmuflags - The MMU flags to use in the mapping.
|
* mmuflags - The MMU flags to use in the mapping.
|
||||||
*
|
*
|
||||||
@@ -257,6 +257,24 @@ static inline void mmu_enable(uintptr_t pgbase, uint16_t asid)
|
|||||||
void mmu_ln_setentry(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr,
|
void mmu_ln_setentry(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr,
|
||||||
uintptr_t vaddr, uint32_t mmuflags);
|
uintptr_t vaddr, uint32_t mmuflags);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: mmu_ln_getentry
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Get a level n translation table entry.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* ptlevel - The translation table level, amount of levels is
|
||||||
|
* MMU implementation specific
|
||||||
|
* lnvaddr - The virtual address of the beginning of the page table at
|
||||||
|
* level n
|
||||||
|
* vaddr - The virtual address to get pte for. Must be aligned to a PPN
|
||||||
|
* address boundary which is dependent on the level of the entry
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
uintptr_t mmu_ln_getentry(uint32_t ptlevel, uintptr_t lnvaddr,
|
||||||
|
uintptr_t vaddr);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: mmu_ln_map_region
|
* Name: mmu_ln_map_region
|
||||||
*
|
*
|
||||||
@@ -268,9 +286,9 @@ void mmu_ln_setentry(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr,
|
|||||||
* MMU implementation specific
|
* MMU implementation specific
|
||||||
* lnvaddr - The virtual address of the beginning of the page table at
|
* lnvaddr - The virtual address of the beginning of the page table at
|
||||||
* level n
|
* level n
|
||||||
* paddr - The physical address to be mapped. Must be aligned to a PPN
|
* paddr - The physical address to be mapped. Must be aligned to a PPN
|
||||||
* address boundary which is dependent on the level of the entry
|
* address boundary which is dependent on the level of the entry
|
||||||
* vaddr - Must be aligned to a PPN
|
* vaddr - The virtual address to be mapped. Must be aligned to a PPN
|
||||||
* address boundary which is dependent on the level of the entry
|
* address boundary which is dependent on the level of the entry
|
||||||
* size - The size of the region in bytes
|
* size - The size of the region in bytes
|
||||||
* mmuflags - The MMU flags to use in the mapping.
|
* mmuflags - The MMU flags to use in the mapping.
|
||||||
|
|||||||
Reference in New Issue
Block a user