|
|
@ -455,6 +455,7 @@ static void ppc_prep_init (ram_addr_t ram_size, |
|
|
const char *cpu_model) |
|
|
const char *cpu_model) |
|
|
{ |
|
|
{ |
|
|
MemoryRegion *sysmem = get_system_memory(); |
|
|
MemoryRegion *sysmem = get_system_memory(); |
|
|
|
|
|
PowerPCCPU *cpu = NULL; |
|
|
CPUPPCState *env = NULL; |
|
|
CPUPPCState *env = NULL; |
|
|
char *filename; |
|
|
char *filename; |
|
|
nvram_t nvram; |
|
|
nvram_t nvram; |
|
|
@ -487,11 +488,13 @@ static void ppc_prep_init (ram_addr_t ram_size, |
|
|
if (cpu_model == NULL) |
|
|
if (cpu_model == NULL) |
|
|
cpu_model = "602"; |
|
|
cpu_model = "602"; |
|
|
for (i = 0; i < smp_cpus; i++) { |
|
|
for (i = 0; i < smp_cpus; i++) { |
|
|
env = cpu_init(cpu_model); |
|
|
cpu = cpu_ppc_init(cpu_model); |
|
|
if (!env) { |
|
|
if (cpu == NULL) { |
|
|
fprintf(stderr, "Unable to find PowerPC CPU definition\n"); |
|
|
fprintf(stderr, "Unable to find PowerPC CPU definition\n"); |
|
|
exit(1); |
|
|
exit(1); |
|
|
} |
|
|
} |
|
|
|
|
|
env = &cpu->env; |
|
|
|
|
|
|
|
|
if (env->flags & POWERPC_FLAG_RTC_CLK) { |
|
|
if (env->flags & POWERPC_FLAG_RTC_CLK) { |
|
|
/* POWER / PowerPC 601 RTC clock frequency is 7.8125 MHz */ |
|
|
/* POWER / PowerPC 601 RTC clock frequency is 7.8125 MHz */ |
|
|
cpu_ppc_tb_init(env, 7812500UL); |
|
|
cpu_ppc_tb_init(env, 7812500UL); |
|
|
|