From e394afc1657ea9b9af8147a3ebd412bd4df7683f Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 3 Jan 2019 09:37:54 -0800 Subject: Add PMPs to coreip DTSs Signed-off-by: Nathaniel Graff --- bsp/coreip-e31/design.dts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bsp/coreip-e31') diff --git a/bsp/coreip-e31/design.dts b/bsp/coreip-e31/design.dts index 3411ccf..f7e9868 100644 --- a/bsp/coreip-e31/design.dts +++ b/bsp/coreip-e31/design.dts @@ -33,6 +33,10 @@ #size-cells = <1>; compatible = "SiFive,FE310G-soc", "fe310-soc", "sifive-soc", "simple-bus"; ranges; + pmp: pmp@0 { + compatible = "riscv,pmp"; + regions = <8>; + }; L12: ahb-periph-port@20000000 { #address-cells = <1>; #size-cells = <1>; -- cgit v1.2.3 From 4326dada61ff5d48550b5cf0bff29e370bc7257c Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 3 Jan 2019 09:38:12 -0800 Subject: Update BSPs for PMPs Signed-off-by: Nathaniel Graff --- bsp/coreip-e31/mee.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bsp/coreip-e31') diff --git a/bsp/coreip-e31/mee.h b/bsp/coreip-e31/mee.h index a520854..068af63 100644 --- a/bsp/coreip-e31/mee.h +++ b/bsp/coreip-e31/mee.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -45,6 +46,9 @@ struct __mee_driver_sifive_local_external_interrupts0 __mee_dt_local_external_in asm (".weak __mee_dt_global_external_interrupts"); struct __mee_driver_sifive_global_external_interrupts0 __mee_dt_global_external_interrupts; +asm (".weak __mee_dt_pmp_0"); +struct mee_pmp __mee_dt_pmp_0; + /* From teststatus@4000 */ asm (".weak __mee_dt_teststatus_4000"); struct __mee_driver_sifive_test0 __mee_dt_teststatus_4000; @@ -286,6 +290,13 @@ struct __mee_driver_sifive_global_external_interrupts0 __mee_dt_global_external_ #define __MEE_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__mee_dt_global_external_interrupts.irc) +/* From pmp@0 */ +struct mee_pmp __mee_dt_pmp_0 = { + .num_regions = 8UL, +}; + +#define __MEE_DT_PMP_HANDLE (&__mee_dt_pmp_0) + /* From teststatus@4000 */ struct __mee_driver_sifive_test0 __mee_dt_teststatus_4000 = { .vtable = &__mee_driver_vtable_sifive_test0, -- cgit v1.2.3