Revision aaed909a hw/mips_mipssim.c

b/hw/mips_mipssim.c
94 94
{
95 95
    CPUState *env = opaque;
96 96
    cpu_reset(env);
97
    cpu_mips_register(env, NULL);
98 97

  
99 98
    if (loaderparams.kernel_filename)
100 99
        load_kernel (env);
......
120 119
        cpu_model = "24Kf";
121 120
#endif
122 121
    }
123
    if (mips_find_by_name(cpu_model, &def) != 0)
124
        def = NULL;
125
    env = cpu_init();
126
    cpu_mips_register(env, def);
122
    env = cpu_init(cpu_model);
123
    if (!env) {
124
        fprintf(stderr, "Unable to find CPU definition\n");
125
        exit(1);
126
    }
127 127
    register_savevm("cpu", 0, 3, cpu_save, cpu_load, env);
128 128
    qemu_register_reset(main_cpu_reset, env);
129 129

  

Also available in: Unified diff