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

@@ -14,6 +14,7 @@ enum sbi_ext_andes_fid {
SBI_EXT_ANDES_IOCP_SW_WORKAROUND,
SBI_EXT_ANDES_PMA_PROBE,
SBI_EXT_ANDES_PMA_SET,
SBI_EXT_ANDES_PMA_FREE,
};
static bool andes_cache_controllable(void)
@@ -52,6 +53,9 @@ int andes_sbi_vendor_ext_provider(long funcid,
case SBI_EXT_ANDES_PMA_SET:
ret = andes_sbi_set_pma(regs->a0, regs->a1, regs->a2);
break;
case SBI_EXT_ANDES_PMA_FREE:
ret = andes_sbi_free_pma(regs->a0);
break;
default:
ret = SBI_ENOTSUPP;
}