platform: generic: andes: add Andes SBI call to probe Andes PMA feature

Add a new Andes SBI call to check whether PPMA is supported by hardware
or not.

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:26 +08:00
committed by Anup Patel
parent 17100394f9
commit 4a72abb5f4
4 changed files with 25 additions and 2 deletions

View File

@@ -47,4 +47,16 @@ struct andes_pma_region {
int andes_pma_setup_regions(const struct andes_pma_region *pma_regions,
unsigned int pma_regions_count);
/**
* Programmable PMA(PPMA) is a feature for Andes. PPMA allows dynamic adjustment
* of memory attributes in the runtime. It contains a configurable amount of PMA
* entries implemented as CSRs to control the attributes of memory locations.
*
* Check if hardware supports PPMA
*
* @return true if PPMA is supported
* @return false if PPMA is not supported
*/
bool andes_sbi_probe_pma(void);
#endif /* _ANDES_PMA_H_ */