diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-04-10 10:52:43 -0700 |
---|---|---|
committer | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-04-11 14:38:48 -0700 |
commit | db80f993967d9fe27be362df1fa38e6ec3b411d5 (patch) | |
tree | 9bbc6392c3dd8baf1c0e3b5a47f81a7d405406ad /bsp/coreip-e24-arty | |
parent | a4b55a67c32b6ab7caefba27e53d9e109ef192b3 (diff) |
Add missing PMP nodes
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Diffstat (limited to 'bsp/coreip-e24-arty')
-rw-r--r-- | bsp/coreip-e24-arty/design.dts | 4 | ||||
-rw-r--r-- | bsp/coreip-e24-arty/metal.h | 11 |
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) |