From a12d46a5e736b9eb582af9c43c876c6228bb4bda Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Thu, 17 Sep 2020 16:04:55 +0530 Subject: include: sbi: Remove pmp_region callbacks from sbi_platform_operations The pmp_region_xyz() callbacks are not required in sbi_platform_operations because we will be using OpenSBI domain memory regions to program the PMP CSRs. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Alistair Francis --- lib/sbi/sbi_hart.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'lib') diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 55a04da..edf79b7 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -226,10 +226,8 @@ int sbi_hart_pmp_check_addr(struct sbi_scratch *scratch, static int pmp_init(struct sbi_scratch *scratch, u32 hartid) { - u32 i, pmp_idx = 0, pmp_count, count; + u32 pmp_idx = 0; unsigned long fw_start, fw_size_log2; - ulong prot, addr, log2size; - const struct sbi_platform *plat = sbi_platform_ptr(scratch); if (!sbi_hart_pmp_count(scratch)) return 0; @@ -239,16 +237,6 @@ static int pmp_init(struct sbi_scratch *scratch, u32 hartid) fw_start = scratch->fw_start & ~((1UL << fw_size_log2) - 1UL); pmp_set(pmp_idx++, 0, fw_start, fw_size_log2); - /* Platform specific PMP regions */ - count = sbi_platform_pmp_region_count(plat, hartid); - pmp_count = sbi_hart_pmp_count(scratch); - for (i = 0; i < count && pmp_idx < (pmp_count - 1); i++) { - if (sbi_platform_pmp_region_info(plat, hartid, i, &prot, &addr, - &log2size)) - continue; - pmp_set(pmp_idx++, prot, addr, log2size); - } - /* * Default PMP region for allowing S-mode and U-mode access to * memory not covered by: -- cgit v1.2.3