Revision aaed909a hw/ppc_chrp.c
b/hw/ppc_chrp.c | ||
---|---|---|
56 | 56 |
const char *initrd_filename, |
57 | 57 |
const char *cpu_model) |
58 | 58 |
{ |
59 |
CPUState *env, *envs[MAX_CPUS]; |
|
59 |
CPUState *env = NULL, *envs[MAX_CPUS];
|
|
60 | 60 |
char buf[1024]; |
61 | 61 |
qemu_irq *pic, **openpic_irqs; |
62 | 62 |
int unin_memory; |
63 | 63 |
int linux_boot, i; |
64 | 64 |
unsigned long bios_offset, vga_bios_offset; |
65 | 65 |
uint32_t kernel_base, kernel_size, initrd_base, initrd_size; |
66 |
ppc_def_t *def; |
|
67 | 66 |
PCIBus *pci_bus; |
68 | 67 |
nvram_t nvram; |
69 | 68 |
#if 0 |
... | ... | |
80 | 79 |
linux_boot = (kernel_filename != NULL); |
81 | 80 |
|
82 | 81 |
/* init CPUs */ |
83 |
env = cpu_init(); |
|
84 | 82 |
if (cpu_model == NULL) |
85 | 83 |
cpu_model = "default"; |
86 |
ppc_find_by_name(cpu_model, &def); |
|
87 |
if (def == NULL) { |
|
88 |
cpu_abort(env, "Unable to find PowerPC CPU definition\n"); |
|
89 |
} |
|
90 | 84 |
for (i = 0; i < smp_cpus; i++) { |
91 |
cpu_ppc_register(env, def); |
|
92 |
cpu_ppc_reset(env); |
|
85 |
env = cpu_init(cpu_model); |
|
86 |
if (!env) { |
|
87 |
fprintf(stderr, "Unable to find PowerPC CPU definition\n"); |
|
88 |
exit(1); |
|
89 |
} |
|
93 | 90 |
/* Set time-base frequency to 100 Mhz */ |
94 | 91 |
cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); |
95 | 92 |
#if 0 |
Also available in: Unified diff