From 77342e5ecc0d04f03bd7d8e48f2a1ce3a7ddbdd8 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Fri, 8 Aug 2003 20:42:21 +0000 Subject: * sim-main.h (phys_to_virt): Use memory bank parameters to translate the physical address in virtual address. (struct _sim_cpu): Add memory bank members. * m68hc11_sim.c (cpu_initialize): Clear memory bank parameters. * interp.c (sim_hw_configure): Create memory bank according to memory bank parameters. (sim_get_bank_parameters): New function to obtain memory bank config from the symbol table. (sim_prepare_for_program): Call it to obtain the memory bank parameters. (sim_open): Call sim_prepare_for_program. * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Use memory bank parameters to check if address is within bank window. (m68hc11cpu_io_read_buffer): Likewise. (attach_m68hc11_regs): Map the memory bank according to memory bank parameters. --- sim/m68hc11/m68hc11_sim.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sim/m68hc11/m68hc11_sim.c') diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c index 3e34598..1daa39c 100644 --- a/sim/m68hc11/m68hc11_sim.c +++ b/sim/m68hc11/m68hc11_sim.c @@ -464,6 +464,9 @@ cpu_initialize (SIM_DESC sd, sim_cpu *cpu) cpu->cpu_use_elf_start = 0; cpu->cpu_elf_start = 0; cpu->cpu_use_local_config = 0; + cpu->bank_start = 0; + cpu->bank_end = 0; + cpu->bank_shift = 0; cpu->cpu_config = M6811_NOSEC | M6811_NOCOP | M6811_ROMON | M6811_EEON; interrupts_initialize (sd, cpu); -- cgit v1.1