Support reset command for MIPS systems
PATCH 1/1 Support reset command for MIPS systems
Hello,
this patch adds support for MIPS system reset. I tried to copy as much code as possible from the other architectures like i386 which already supported reset.
If you have a working MIPS boot ROM at the reset address (0xbfc00000), it is now possible to reboot your system like a real one.
Regards
Stefan
Index: hw/mips_r4k.c
===================================================================
RCS file: /sources/qemu/qemu/hw/mips_r4k.c,v
retrieving revision 1.19
mips_r4k.c +7 -0
@@ -189,6 +189,12 @@ &io_readl, }; +static void main_cpu_reset (void *opaque) +{ +CPUState *env = opaque; +cpu_reset (env); +} + void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline,
@@ -204,6 +210,7 @@ env =cpu_init ();register_savevm ("cpu" ,0 ,3 , cpu_save, cpu_load, env); +qemu_register_reset (main_cpu_reset, env);/* allocate RAM */ cpu_register_physical_memory (0 , ram_size,IO_MEM_RAM );
Index: target-mips/helper.c
===================================================================
RCS file: /sources/qemu/qemu/target-mips/helper.c,v retrieving revision 1.15
helper.c +38 -20
90 lines not on this page · raw message