X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fppc_chrp.c;h=f53c85b8559e9b6de2b212e4a291430c58bf9e10;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=9c6ac84a4f24dd36983fd08729453ae4b2b0ede0;hpb=00af685fc974e4941ef2d309a2e8818d311a370c;p=qemu diff --git a/hw/ppc_chrp.c b/hw/ppc_chrp.c index 9c6ac84..f53c85b 100644 --- a/hw/ppc_chrp.c +++ b/hw/ppc_chrp.c @@ -327,9 +327,6 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, /* init CPUs */ env = cpu_init(); - qemu_register_reset(&cpu_ppc_reset, env); - register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); - if (cpu_model == NULL) cpu_model = "default"; ppc_find_by_name(cpu_model, &def); @@ -338,9 +335,12 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, } for (i = 0; i < smp_cpus; i++) { cpu_ppc_register(env, def); + cpu_ppc_reset(env); /* Set time-base frequency to 100 Mhz */ cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); env->osi_call = vga_osi_call; + qemu_register_reset(&cpu_ppc_reset, env); + register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); envs[i] = env; } @@ -349,7 +349,9 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, /* allocate and load BIOS */ bios_offset = ram_size + vga_ram_size; - snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); + if (bios_name == NULL) + bios_name = BIOS_FILENAME; + snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); bios_size = load_image(buf, phys_ram_base + bios_offset); if (bios_size < 0 || bios_size > BIOS_SIZE) { cpu_abort(env, "qemu: could not load PowerPC bios '%s'\n", buf);