summaryrefslogtreecommitdiff
path: root/bsp/coreip-e24-arty
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-04-11 21:40:27 +0000
committerGitHub <noreply@github.com>2019-04-11 21:40:27 +0000
commitb47459592db6ee7aef2a86b2010d05b8ced7eba9 (patch)
treed1c07a9437495210ae266766f6988c0e0bceba17 /bsp/coreip-e24-arty
parenta4d97b7aec6eb939eb1f61883591ba5cc58be258 (diff)
parent45a50ed76caa304ba112a312d8309a625be64b7a (diff)
Merge pull request #233 from sifive/7-series-pmp
Add PMP nodes to all targets except e20
Diffstat (limited to 'bsp/coreip-e24-arty')
-rw-r--r--bsp/coreip-e24-arty/design.dts4
-rw-r--r--bsp/coreip-e24-arty/metal.h11
2 files changed, 15 insertions, 0 deletions
diff --git a/bsp/coreip-e24-arty/design.dts b/bsp/coreip-e24-arty/design.dts
index 9d08297..f288b54 100644
--- a/bsp/coreip-e24-arty/design.dts
+++ b/bsp/coreip-e24-arty/design.dts
@@ -36,6 +36,10 @@
#size-cells = <1>;
compatible = "SiFive,FE240G-soc", "fe240-soc", "sifive-soc", "simple-bus";
ranges;
+ pmp: pmp@0 {
+ compatible = "riscv,pmp";
+ regions = <4>;
+ };
hfclk: clock@0 {
#clock-cells = <0>;
compatible = "fixed-clock";
diff --git a/bsp/coreip-e24-arty/metal.h b/bsp/coreip-e24-arty/metal.h
index 47e0f67..f04b38b 100644
--- a/bsp/coreip-e24-arty/metal.h
+++ b/bsp/coreip-e24-arty/metal.h
@@ -70,6 +70,9 @@ struct __metal_driver_cpu __metal_dt_cpu_0;
asm (".weak __metal_dt_interrupt_controller");
struct __metal_driver_riscv_cpu_intc __metal_dt_interrupt_controller;
+asm (".weak __metal_dt_pmp_0");
+struct metal_pmp __metal_dt_pmp_0;
+
/* From interrupt_controller@2000000 */
asm (".weak __metal_dt_interrupt_controller_2000000");
struct __metal_driver_sifive_clic0 __metal_dt_interrupt_controller_2000000;
@@ -166,6 +169,11 @@ struct __metal_driver_riscv_cpu_intc __metal_dt_interrupt_controller = {
.interrupt_controller = 1,
};
+/* From pmp@0 */
+struct metal_pmp __metal_dt_pmp_0 = {
+ .num_regions = 4UL,
+};
+
/* From interrupt_controller@2000000 */
struct __metal_driver_sifive_clic0 __metal_dt_interrupt_controller_2000000 = {
.vtable = &__metal_driver_vtable_sifive_clic0,
@@ -549,6 +557,9 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_INTERRUPT_CONTROLLER_HANDLE (&__metal_dt_interrupt_controller.controller)
+/* From pmp@0 */
+#define __METAL_DT_PMP_HANDLE (&__metal_dt_pmp_0)
+
/* From interrupt_controller@2000000 */
#define __METAL_DT_SIFIVE_CLIC0_HANDLE (&__metal_dt_interrupt_controller_2000000.controller)