From 4a72abb5f490c01a5a4dd24930ccae9c42d15c74 Mon Sep 17 00:00:00 2001 From: Ben Zong-You Xie Date: Tue, 23 Jul 2024 15:57:26 +0800 Subject: 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 Reviewed-by: Anup Patel --- platform/generic/include/andes/andes_pma.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'platform/generic/include') diff --git a/platform/generic/include/andes/andes_pma.h b/platform/generic/include/andes/andes_pma.h index 5ea12475..147dca1e 100644 --- a/platform/generic/include/andes/andes_pma.h +++ b/platform/generic/include/andes/andes_pma.h @@ -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_ */ -- cgit v1.3.1