diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-04-23 09:22:30 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-04-27 11:27:27 +0300 |
commit | 1bb00ab3aeabde78579774eef8eadc7b7e765924 (patch) | |
tree | 119d29d80996c9db45105fa9f688ef8b1aef5265 /platform/qemu | |
parent | 9f1b72ce66d659e91013b358939e832fb27223f5 (diff) | |
download | opensbi-1bb00ab3aeabde78579774eef8eadc7b7e765924.tar.xz |
lib: No need to provide default PMP region using platform callbacks
The default (usually last) PMP region provides S-mode access to
complete memory range not covered by other PMP regions.
Currently, the default PMP region is described as platform specific
PMP region which is not appropriate because all platforms need it
and default PMP region should be part of generic library.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'platform/qemu')
-rw-r--r-- | platform/qemu/virt/platform.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/platform/qemu/virt/platform.c b/platform/qemu/virt/platform.c index 86d1bcc..5c12f53 100644 --- a/platform/qemu/virt/platform.c +++ b/platform/qemu/virt/platform.c @@ -52,30 +52,6 @@ static int virt_final_init(bool cold_boot) return 0; } -static u32 virt_pmp_region_count(u32 hartid) -{ - return 1; -} - -static int virt_pmp_region_info(u32 hartid, u32 index, ulong *prot, ulong *addr, - ulong *log2size) -{ - int ret = 0; - - switch (index) { - case 0: - *prot = PMP_R | PMP_W | PMP_X; - *addr = 0; - *log2size = __riscv_xlen; - break; - default: - ret = -1; - break; - }; - - return ret; -} - static int virt_console_init(void) { return uart8250_init(VIRT_UART16550_ADDR, VIRT_UART_SHIFTREG_ADDR, @@ -135,8 +111,6 @@ static int virt_system_down(u32 type) } const struct sbi_platform_operations platform_ops = { - .pmp_region_count = virt_pmp_region_count, - .pmp_region_info = virt_pmp_region_info, .final_init = virt_final_init, .console_putc = uart8250_putc, .console_getc = uart8250_getc, |