mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi_hart: Detect number of supported PMP regions
It is not mandatory for a RISC-V systems to implement all PMP regions so we have to check all PMPADDRx CSRs to determine excat number of supported PMP regions. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
@@ -38,6 +38,10 @@ static inline ulong sbi_hart_expected_trap_addr(void)
|
||||
}
|
||||
|
||||
void sbi_hart_delegation_dump(struct sbi_scratch *scratch);
|
||||
unsigned int sbi_hart_pmp_count(struct sbi_scratch *scratch);
|
||||
int sbi_hart_pmp_get(struct sbi_scratch *scratch, unsigned int n,
|
||||
unsigned long *prot_out, unsigned long *addr_out,
|
||||
unsigned long *size);
|
||||
void sbi_hart_pmp_dump(struct sbi_scratch *scratch);
|
||||
int sbi_hart_pmp_check_addr(struct sbi_scratch *scratch, unsigned long daddr,
|
||||
unsigned long attr);
|
||||
|
Reference in New Issue
Block a user