diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2002-08-13 08:38:09 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2002-08-13 08:38:09 +0000 |
commit | 7230d80931209c515783b9b5bebaf7dde2c6362e (patch) | |
tree | 57097a6dc3ebb52fca8aef7dd727b98356f17d31 /sim/m68hc11/dv-m68hc11.c | |
parent | dcceded28ac77cfef16492bf4b3fb3c0e19c0524 (diff) | |
download | gdb-7230d80931209c515783b9b5bebaf7dde2c6362e.zip gdb-7230d80931209c515783b9b5bebaf7dde2c6362e.tar.gz gdb-7230d80931209c515783b9b5bebaf7dde2c6362e.tar.bz2 |
* dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
bank window to some virtual address to read from extended memory.
(m68hc11cpu_io_write_buffer): Likewise for writing.
(attach_m68hc11_regs): When use_bank property is defined, attached
to the 68HC12 16K memory bank window.
* interp.c (sim_hw_configure): Create memory region for banked
memory.
Diffstat (limited to 'sim/m68hc11/dv-m68hc11.c')
-rw-r--r-- | sim/m68hc11/dv-m68hc11.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sim/m68hc11/dv-m68hc11.c b/sim/m68hc11/dv-m68hc11.c index 49c33e3..669a045 100644 --- a/sim/m68hc11/dv-m68hc11.c +++ b/sim/m68hc11/dv-m68hc11.c @@ -321,6 +321,13 @@ attach_m68hc11_regs (struct hw *me, cpu->cpu_frequency = 8*1000*1000; } + if (hw_find_property (me, "use_bank") != NULL) + hw_attach_address (hw_parent (me), 0, + exec_map, + 0x08000, + 0x04000, + me); + cpu_mode = "expanded"; if (hw_find_property (me, "mode") != NULL) cpu_mode = hw_find_string_property (me, "mode"); @@ -836,6 +843,14 @@ m68hc11cpu_io_read_buffer (struct hw *me, sd = hw_system (me); cpu = STATE_CPU (sd, 0); + if (base >= 0x8000 && base < 0xc000) + { + address_word virt_addr = phys_to_virt (cpu, base); + if (virt_addr != base) + return sim_core_read_buffer (sd, cpu, space, dest, + virt_addr, nr_bytes); + } + /* Handle reads for the sub-devices. */ base -= controller->attach_address; result = sim_core_read_buffer (sd, cpu, @@ -1075,6 +1090,14 @@ m68hc11cpu_io_write_buffer (struct hw *me, sd = hw_system (me); cpu = STATE_CPU (sd, 0); + + if (base >= 0x8000 && base < 0xc000) + { + address_word virt_addr = phys_to_virt (cpu, base); + if (virt_addr != base) + return sim_core_write_buffer (sd, cpu, space, source, + virt_addr, nr_bytes); + } base -= controller->attach_address; result = sim_core_write_buffer (sd, cpu, io_map, source, base, nr_bytes); |