From a126886bfa4bd11a8b1595dab8246476741fc098 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Sun, 20 Sep 2020 10:09:32 +0530 Subject: lib: sbi: Configure PMP late in coldboot and warmboot path We factor-out PMP configuration from sbi_hart_init() as a separate sbi_hart_pmp_configure() function and do the PMP configuration very late in coldboot and warmboot path just before platform_final_init(). Eventually, this enable us to configure PMP totally based on OpenSBI domain where OpenSBI domains can be parsed from device-tree in any of the platform operations except platform_final_init(). Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Alistair Francis --- include/sbi/sbi_hart.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 0ba68f0..9207f4c 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -45,6 +45,7 @@ void sbi_hart_pmp_dump(struct sbi_scratch *scratch); int sbi_hart_pmp_check_addr(struct sbi_scratch *scratch, unsigned long daddr, unsigned long mode, unsigned long attr); +int sbi_hart_pmp_configure(struct sbi_scratch *scratch); bool sbi_hart_has_feature(struct sbi_scratch *scratch, unsigned long feature); void sbi_hart_get_features_str(struct sbi_scratch *scratch, char *features_str, int nfstr); -- cgit v1.2.3