platform: generic: andes: add a new Andes SBI call to free a PMA entry

Add a new Andes SBI call to free a PMA entry, and reset the memory
attributes for the corresponding NAPOT region.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Ben Zong-You Xie
2024-07-23 15:57:28 +08:00
committed by Anup Patel
parent aa56084c4d
commit 3d1f53b173
3 changed files with 67 additions and 17 deletions

View File

@@ -77,4 +77,13 @@ bool andes_sbi_probe_pma(void);
*/
int andes_sbi_set_pma(unsigned long pa, unsigned long size, u8 flags);
/**
* Reset the memory attribute of a NAPOT region
* @param pa Start address of the NAPOT region
*
* @return SBI_SUCCESS on success
* @return SBI_ERR_FAILED if the given region is not set before
*/
int andes_sbi_free_pma(unsigned long pa);
#endif /* _ANDES_PMA_H_ */