I need to allocate some mem for the cpu regs.

This commit is contained in:
Mariano Alvira 2009-04-10 18:57:59 -04:00
parent 383cae0386
commit 493d1e33b4

View file

@ -32,13 +32,13 @@ struct mc1322x_state_s *mc1322x_init(void)
s->env);
/* SDRAM & Internal Memory Storage */
/* should probably allocate memory for all the cpu registers... I think that is where the emulation might be bombing */
cpu_register_physical_memory(MC1322X_ROMBASE, MC1322X_ROMSIZE,
qemu_ram_alloc(MC1322X_ROMSIZE) | IO_MEM_RAM);
cpu_register_physical_memory(MC1322X_RAMBASE, MC1322X_RAMSIZE,
qemu_ram_alloc(MC1322X_RAMSIZE) | IO_MEM_RAM);
index = drive_get_index(IF_MTD, 0, 0);
cpu_register_physical_memory(MC1322X_ROMBASE, MC1322X_ROMSIZE,0);
if(0<bdrv_read(drives_table[index].bdrv,0,phys_ram_base+MC1322X_ROMBASE,MC1322X_ROMSIZE/512)) {
fprintf(stderr, "qemu: Error registering rom memory.\n");
}