diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-01-30 19:37:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 19:37:59 +0000 |
commit | 89d973abd94faf74d7486a6c5e044935f5d63e9d (patch) | |
tree | c7188e2bfad20a2750a4155ff623a16541abfb74 /bsp/coreip-s51-arty | |
parent | b629a19514606cb5dd19e0cd433b60922343f6a8 (diff) | |
parent | c615e937538d438c46efd46f9254a2a74b591205 (diff) |
Merge pull request #157 from sifive/mee-pmp-no-vtable
Add PMP example
Diffstat (limited to 'bsp/coreip-s51-arty')
-rw-r--r-- | bsp/coreip-s51-arty/design.dts | 4 | ||||
-rw-r--r-- | bsp/coreip-s51-arty/mee.h | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bsp/coreip-s51-arty/design.dts b/bsp/coreip-s51-arty/design.dts index 71b9ea6..ea349bb 100644 --- a/bsp/coreip-s51-arty/design.dts +++ b/bsp/coreip-s51-arty/design.dts @@ -45,6 +45,10 @@ compatible = "fixed-clock"; clock-frequency = <32500000>; }; + pmp: pmp@0 { + compatible = "riscv,pmp"; + regions = <8>; + }; L1: clint@2000000 { compatible = "riscv,clint0"; interrupts-extended = <&L3 3 &L3 7>; diff --git a/bsp/coreip-s51-arty/mee.h b/bsp/coreip-s51-arty/mee.h index 0e9cc9c..d8a3ebb 100644 --- a/bsp/coreip-s51-arty/mee.h +++ b/bsp/coreip-s51-arty/mee.h @@ -27,6 +27,7 @@ #include <mee/drivers/fixed-clock.h> #include <mee/drivers/sifive,gpio0.h> #include <mee/drivers/sifive,uart0.h> +#include <mee/pmp.h> #include <mee/drivers/sifive,local-external-interrupts0.h> #include <mee/drivers/sifive,global-external-interrupts0.h> #include <mee/drivers/sifive,gpio-leds.h> @@ -69,6 +70,9 @@ struct __mee_driver_sifive_gpio0 __mee_dt_gpio_20002000; asm (".weak __mee_dt_serial_20000000"); struct __mee_driver_sifive_uart0 __mee_dt_serial_20000000; +asm (".weak __mee_dt_pmp_0"); +struct mee_pmp __mee_dt_pmp_0; + /* From led@0red */ asm (".weak __mee_dt_led_0red"); struct __mee_driver_sifive_gpio_led __mee_dt_led_0red; @@ -401,6 +405,13 @@ struct __mee_driver_sifive_gpio_switch __mee_dt_switch_3 = { .label = "SW3", }; +/* 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, |