projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
sim
/
bfin
/
dv-bfin_wdog.c
diff --git
a/sim/bfin/dv-bfin_wdog.c
b/sim/bfin/dv-bfin_wdog.c
index b60a110d4cab69a2c7f42ba9fc18fd678c94560d..850ae0618df0ba4207841746c0986baa0aa75aa7 100644
(file)
--- a/
sim/bfin/dv-bfin_wdog.c
+++ b/
sim/bfin/dv-bfin_wdog.c
@@
-1,6
+1,6
@@
/* Blackfin Watchdog (WDOG) model.
/* Blackfin Watchdog (WDOG) model.
- Copyright (C) 2010-20
12
Free Software Foundation, Inc.
+ Copyright (C) 2010-20
21
Free Software Foundation, Inc.
Contributed by Analog Devices, Inc.
This file is part of simulators.
Contributed by Analog Devices, Inc.
This file is part of simulators.
@@
-18,7
+18,8
@@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "dv-sockser.h"
#include "sim-main.h"
#include "dv-sockser.h"
@@
-61,6
+62,10
@@
bfin_wdog_io_write_buffer (struct hw *me, const void *source,
bu32 *value32p;
void *valuep;
bu32 *value32p;
void *valuep;
+ /* Invalid access mode is higher priority than missing register. */
+ if (!dv_bfin_mmr_require_16_32 (me, addr, nr_bytes, true))
+ return 0;
+
if (nr_bytes == 4)
value = dv_load_4 (source);
else
if (nr_bytes == 4)
value = dv_load_4 (source);
else
@@
-111,6
+116,10
@@
bfin_wdog_io_read_buffer (struct hw *me, void *dest,
bu32 *value32p;
void *valuep;
bu32 *value32p;
void *valuep;
+ /* Invalid access mode is higher priority than missing register. */
+ if (!dv_bfin_mmr_require_16_32 (me, addr, nr_bytes, false))
+ return 0;
+
mmr_off = addr - wdog->base;
valuep = (void *)((unsigned long)wdog + mmr_base() + mmr_off);
value16p = valuep;
mmr_off = addr - wdog->base;
valuep = (void *)((unsigned long)wdog + mmr_base() + mmr_off);
value16p = valuep;
@@
-121,7
+130,8
@@
bfin_wdog_io_read_buffer (struct hw *me, void *dest,
switch (mmr_off)
{
case mmr_offset(ctl):
switch (mmr_off)
{
case mmr_offset(ctl):
- dv_bfin_mmr_require_16 (me, addr, nr_bytes, false);
+ if (!dv_bfin_mmr_require_16 (me, addr, nr_bytes, false))
+ return 0;
dv_store_2 (dest, *value16p);
break;
dv_store_2 (dest, *value16p);
break;
This page took
0.029767 seconds
and
4
git commands to generate.