sim: bfin: push down mmr address/size checks
authorMike Frysinger <vapier@gentoo.org>
Sun, 27 Dec 2015 00:02:07 +0000 (19:02 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 27 Dec 2015 00:09:43 +0000 (19:09 -0500)
commit466b619e95908dc073b78413f0d0d0b1cb97e4b5
tree2b3a47fc43dab9497495d232fd6769945db63aff
parentb72dd4c228d71b44e487ff2c53c0d2883653bce7
sim: bfin: push down mmr address/size checks

The bfin port is using the WITH_DEVICES framework for two reasons:
- get access to the cpu making the request (if available)
- check the alignment & size for core & system MMRs

We addressed the first part with commit dea10706e9159ba6e94eab4c25010f3,
and we handle the second part with this commit.  Arguably this is more
correct too because trying to do bad reads/writes directly (when devices
support is disabled) often results in bad memory accesses.

As part of this clean up, we also adjust all of the existing logic that
would reject invalid accesses: the code was relying on the checks never
returning, but that's not the case when things like gdb (via the user's
commands) are making the requests.  Thus we'd still end up with bad mem
accesses, or sometimes gdb being hung due to while(1) loops.

Now we can connect (most of) these models into any address and have them
work correctly.
33 files changed:
sim/bfin/ChangeLog
sim/bfin/devices.c
sim/bfin/devices.h
sim/bfin/dv-bfin_cec.c
sim/bfin/dv-bfin_ctimer.c
sim/bfin/dv-bfin_dma.c
sim/bfin/dv-bfin_ebiu_amc.c
sim/bfin/dv-bfin_ebiu_ddrc.c
sim/bfin/dv-bfin_ebiu_sdc.c
sim/bfin/dv-bfin_emac.c
sim/bfin/dv-bfin_eppi.c
sim/bfin/dv-bfin_evt.c
sim/bfin/dv-bfin_gpio.c
sim/bfin/dv-bfin_gpio2.c
sim/bfin/dv-bfin_gptimer.c
sim/bfin/dv-bfin_jtag.c
sim/bfin/dv-bfin_mmu.c
sim/bfin/dv-bfin_nfc.c
sim/bfin/dv-bfin_otp.c
sim/bfin/dv-bfin_pfmon.c
sim/bfin/dv-bfin_pint.c
sim/bfin/dv-bfin_pll.c
sim/bfin/dv-bfin_ppi.c
sim/bfin/dv-bfin_rtc.c
sim/bfin/dv-bfin_sic.c
sim/bfin/dv-bfin_spi.c
sim/bfin/dv-bfin_trace.c
sim/bfin/dv-bfin_twi.c
sim/bfin/dv-bfin_uart.c
sim/bfin/dv-bfin_uart2.c
sim/bfin/dv-bfin_wdog.c
sim/bfin/dv-bfin_wp.c
sim/bfin/tconfig.h [deleted file]