Revision c68ea704 hw/ppc_chrp.c
b/hw/ppc_chrp.c | ||
---|---|---|
300 | 300 |
const char *initrd_filename, |
301 | 301 |
int is_heathrow) |
302 | 302 |
{ |
303 |
CPUState *env; |
|
303 | 304 |
char buf[1024]; |
304 | 305 |
SetIRQFunc *set_irq; |
305 | 306 |
void *pic; |
... | ... | |
315 | 316 |
|
316 | 317 |
linux_boot = (kernel_filename != NULL); |
317 | 318 |
|
319 |
/* init CPUs */ |
|
320 |
env = cpu_init(); |
|
321 |
register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
|
322 |
|
|
323 |
/* Register CPU as a 74x/75x */ |
|
324 |
/* XXX: CPU model (or PVR) should be provided on command line */ |
|
325 |
// ppc_find_by_name("750gx", &def); // Linux boot OK |
|
326 |
// ppc_find_by_name("750fx", &def); // Linux boot OK |
|
327 |
/* Linux does not boot on 750cxe (and probably other 750cx based) |
|
328 |
* because it assumes it has 8 IBAT & DBAT pairs as it only have 4. |
|
329 |
*/ |
|
330 |
// ppc_find_by_name("750cxe", &def); |
|
331 |
// ppc_find_by_name("750p", &def); |
|
332 |
// ppc_find_by_name("740p", &def); |
|
333 |
ppc_find_by_name("750", &def); |
|
334 |
// ppc_find_by_name("740", &def); |
|
335 |
// ppc_find_by_name("G3", &def); |
|
336 |
// ppc_find_by_name("604r", &def); |
|
337 |
// ppc_find_by_name("604e", &def); |
|
338 |
// ppc_find_by_name("604", &def); |
|
339 |
if (def == NULL) { |
|
340 |
cpu_abort(env, "Unable to find PowerPC CPU definition\n"); |
|
341 |
} |
|
342 |
cpu_ppc_register(env, def); |
|
343 |
|
|
344 |
/* Set time-base frequency to 100 Mhz */ |
|
345 |
cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); |
|
346 |
|
|
347 |
env->osi_call = vga_osi_call; |
|
348 |
|
|
318 | 349 |
/* allocate RAM */ |
319 | 350 |
cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); |
320 | 351 |
|
... | ... | |
381 | 412 |
initrd_base = 0; |
382 | 413 |
initrd_size = 0; |
383 | 414 |
} |
384 |
/* Register CPU as a 74x/75x */ |
|
385 |
/* XXX: CPU model (or PVR) should be provided on command line */ |
|
386 |
// ppc_find_by_name("750gx", &def); // Linux boot OK |
|
387 |
// ppc_find_by_name("750fx", &def); // Linux boot OK |
|
388 |
/* Linux does not boot on 750cxe (and probably other 750cx based) |
|
389 |
* because it assumes it has 8 IBAT & DBAT pairs as it only have 4. |
|
390 |
*/ |
|
391 |
// ppc_find_by_name("750cxe", &def); |
|
392 |
// ppc_find_by_name("750p", &def); |
|
393 |
// ppc_find_by_name("740p", &def); |
|
394 |
ppc_find_by_name("750", &def); |
|
395 |
// ppc_find_by_name("740", &def); |
|
396 |
// ppc_find_by_name("G3", &def); |
|
397 |
// ppc_find_by_name("604r", &def); |
|
398 |
// ppc_find_by_name("604e", &def); |
|
399 |
// ppc_find_by_name("604", &def); |
|
400 |
if (def == NULL) { |
|
401 |
cpu_abort(cpu_single_env, "Unable to find PowerPC CPU definition\n"); |
|
402 |
} |
|
403 |
cpu_ppc_register(cpu_single_env, def); |
|
404 |
|
|
405 |
/* Set time-base frequency to 100 Mhz */ |
|
406 |
cpu_ppc_tb_init(cpu_single_env, 100UL * 1000UL * 1000UL); |
|
407 |
|
|
408 |
cpu_single_env->osi_call = vga_osi_call; |
|
409 | 415 |
|
410 | 416 |
if (is_heathrow) { |
411 | 417 |
isa_mem_base = 0x80000000; |
Also available in: Unified diff