arch/addrenv: Add utility function to wipe one page
up_addrenv_page_wipe can be used to wipe a single page of memory.
This commit is contained in:
parent
8562dd5796
commit
15f19c32ac
|
@ -147,6 +147,26 @@ bool up_addrenv_user_vaddr(uintptr_t vaddr)
|
|||
return riscv_uservaddr(vaddr);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_page_wipe
|
||||
*
|
||||
* Description:
|
||||
* Wipe a page of physical memory, first mapping it into kernel virtual
|
||||
* memory.
|
||||
*
|
||||
* Input Parameters:
|
||||
* page - The page physical address.
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_addrenv_page_wipe(uintptr_t page)
|
||||
{
|
||||
riscv_pgwipe(page);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MM_KMAP
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -1378,7 +1378,7 @@ uintptr_t up_addrenv_page_vaddr(uintptr_t page);
|
|||
* vaddr - The virtual address.
|
||||
*
|
||||
* Returned Value:
|
||||
* True if it is; false if it's not
|
||||
* True if it is; false if it's not.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -1386,6 +1386,25 @@ uintptr_t up_addrenv_page_vaddr(uintptr_t page);
|
|||
bool up_addrenv_user_vaddr(uintptr_t vaddr);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_page_wipe
|
||||
*
|
||||
* Description:
|
||||
* Wipe a page of physical memory, first mapping it into kernel virtual
|
||||
* memory.
|
||||
*
|
||||
* Input Parameters:
|
||||
* page - The page physical address.
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
void up_addrenv_page_wipe(uintptr_t page);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_kmap_init
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue