aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin/dv-bfin_evt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/bfin/dv-bfin_evt.c')
-rw-r--r--sim/bfin/dv-bfin_evt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/bfin/dv-bfin_evt.c b/sim/bfin/dv-bfin_evt.c
index 6f859b5..cb2d0df 100644
--- a/sim/bfin/dv-bfin_evt.c
+++ b/sim/bfin/dv-bfin_evt.c
@@ -50,6 +50,10 @@ bfin_evt_io_write_buffer (struct hw *me, const void *source,
bu32 mmr_off;
bu32 value;
+ /* Invalid access mode is higher priority than missing register. */
+ if (!dv_bfin_mmr_require_32 (me, addr, nr_bytes, true))
+ return 0;
+
value = dv_load_4 (source);
mmr_off = addr - evt->base;
@@ -68,6 +72,10 @@ bfin_evt_io_read_buffer (struct hw *me, void *dest,
bu32 mmr_off;
bu32 value;
+ /* Invalid access mode is higher priority than missing register. */
+ if (!dv_bfin_mmr_require_32 (me, addr, nr_bytes, false))
+ return 0;
+
mmr_off = addr - evt->base;
HW_TRACE_READ ();