Revision adbb0f75

b/hw/xtensa_lx60.c
164 164
    int be = 0;
165 165
#endif
166 166
    MemoryRegion *system_memory = get_system_memory();
167
    XtensaCPU *cpu = NULL;
167 168
    CPUXtensaState *env = NULL;
168 169
    MemoryRegion *ram, *rom, *system_io;
169 170
    DriveInfo *dinfo;
......
175 176
    }
176 177

  
177 178
    for (n = 0; n < smp_cpus; n++) {
178
        env = cpu_init(cpu_model);
179
        if (!env) {
179
        cpu = cpu_xtensa_init(cpu_model);
180
        if (cpu == NULL) {
180 181
            fprintf(stderr, "Unable to find CPU definition\n");
181 182
            exit(1);
182 183
        }
184
        env = &cpu->env;
185

  
183 186
        env->sregs[PRID] = n;
184 187
        qemu_register_reset(lx60_reset, env);
185 188
        /* Need MMU initialized prior to ELF loading,
186 189
         * so that ELF gets loaded into virtual addresses
187 190
         */
188
        cpu_state_reset(env);
191
        cpu_reset(CPU(cpu));
189 192
    }
190 193

  
191 194
    ram = g_malloc(sizeof(*ram));

Also available in: Unified diff