- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
- Written by Stephane Carrez (stcarrez@worldnet.fr)
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2007, 2008
+ Free Software Foundation, Inc.
+ Written by Stephane Carrez (stcarrez@nerim.fr)
(From a driver model Contributed by Cygnus Solutions.)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(From a driver model Contributed by Cygnus Solutions.)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ "set-port-c", SET_PORT_C, 0, input_port, },
{ "set-port-d", SET_PORT_D, 0, input_port, },
{ "set-port-c", SET_PORT_C, 0, input_port, },
{ "set-port-d", SET_PORT_D, 0, input_port, },
/* Events generated for connection to other devices. */
{ "cpu-reset", CPU_RESET_PORT, 0, output_port, },
/* Events generated for connection to other devices. */
{ "cpu-reset", CPU_RESET_PORT, 0, output_port, },
+ if (hw_find_property (me, "use_bank") != NULL)
+ hw_attach_address (hw_parent (me), 0,
+ exec_map,
+ cpu->bank_start,
+ cpu->bank_end - cpu->bank_start,
+ me);
+
cpu_mode = "expanded";
if (hw_find_property (me, "mode") != NULL)
cpu_mode = hw_find_string_property (me, "mode");
cpu_mode = "expanded";
if (hw_find_property (me, "mode") != NULL)
cpu_mode = hw_find_string_property (me, "mode");
m68hc11cpu_set_port (me, cpu, M6811_PORTD, level);
break;
m68hc11cpu_set_port (me, cpu, M6811_PORTD, level);
break;
+ if (base >= cpu->bank_start && base < cpu->bank_end)
+ {
+ 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,
/* Handle reads for the sub-devices. */
base -= controller->attach_address;
result = sim_core_read_buffer (sd, cpu,
+
+ if (base >= cpu->bank_start && base < cpu->bank_end)
+ {
+ 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);
base -= controller->attach_address;
result = sim_core_write_buffer (sd, cpu,
io_map, source, base, nr_bytes);
val = *((uint8*) source);
m68hc11cpu_io_write (me, cpu, base, val);
val = *((uint8*) source);
m68hc11cpu_io_write (me, cpu, base, val);