Revision aaed909a hw/ppc_prep.c
b/hw/ppc_prep.c | ||
---|---|---|
536 | 536 |
int linux_boot, i, nb_nics1, bios_size; |
537 | 537 |
unsigned long bios_offset; |
538 | 538 |
uint32_t kernel_base, kernel_size, initrd_base, initrd_size; |
539 |
ppc_def_t *def; |
|
540 | 539 |
PCIBus *pci_bus; |
541 | 540 |
qemu_irq *i8259; |
542 | 541 |
int ppc_boot_device = boot_device[0]; |
... | ... | |
548 | 547 |
linux_boot = (kernel_filename != NULL); |
549 | 548 |
|
550 | 549 |
/* init CPUs */ |
551 |
env = cpu_init(); |
|
552 | 550 |
if (cpu_model == NULL) |
553 | 551 |
cpu_model = "default"; |
554 |
ppc_find_by_name(cpu_model, &def); |
|
555 |
if (def == NULL) { |
|
556 |
cpu_abort(env, "Unable to find PowerPC CPU definition\n"); |
|
557 |
} |
|
558 | 552 |
for (i = 0; i < smp_cpus; i++) { |
559 |
cpu_ppc_register(env, def); |
|
560 |
cpu_ppc_reset(env); |
|
553 |
env = cpu_init(cpu_model); |
|
554 |
if (!env) { |
|
555 |
fprintf(stderr, "Unable to find PowerPC CPU definition\n"); |
|
556 |
exit(1); |
|
557 |
} |
|
561 | 558 |
/* Set time-base frequency to 100 Mhz */ |
562 | 559 |
cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); |
563 | 560 |
qemu_register_reset(&cpu_ppc_reset, env); |
Also available in: Unified diff