300 |
const char *initrd_filename, |
const char *initrd_filename, |
301 |
int is_heathrow) |
int is_heathrow) |
302 |
{ |
{ |
303 |
|
CPUState *env; |
304 |
char buf[1024]; |
char buf[1024]; |
305 |
SetIRQFunc *set_irq; |
SetIRQFunc *set_irq; |
306 |
void *pic; |
void *pic; |
316 |
|
|
317 |
linux_boot = (kernel_filename != NULL); |
linux_boot = (kernel_filename != NULL); |
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 |
|
|
349 |
/* allocate RAM */ |
/* allocate RAM */ |
350 |
cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); |
cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); |
351 |
|
|
412 |
initrd_base = 0; |
initrd_base = 0; |
413 |
initrd_size = 0; |
initrd_size = 0; |
414 |
} |
} |
|
/* Register CPU as a 74x/75x */ |
|
|
/* XXX: CPU model (or PVR) should be provided on command line */ |
|
|
// ppc_find_by_name("750gx", &def); // Linux boot OK |
|
|
// ppc_find_by_name("750fx", &def); // Linux boot OK |
|
|
/* Linux does not boot on 750cxe (and probably other 750cx based) |
|
|
* because it assumes it has 8 IBAT & DBAT pairs as it only have 4. |
|
|
*/ |
|
|
// ppc_find_by_name("750cxe", &def); |
|
|
// ppc_find_by_name("750p", &def); |
|
|
// ppc_find_by_name("740p", &def); |
|
|
ppc_find_by_name("750", &def); |
|
|
// ppc_find_by_name("740", &def); |
|
|
// ppc_find_by_name("G3", &def); |
|
|
// ppc_find_by_name("604r", &def); |
|
|
// ppc_find_by_name("604e", &def); |
|
|
// ppc_find_by_name("604", &def); |
|
|
if (def == NULL) { |
|
|
cpu_abort(cpu_single_env, "Unable to find PowerPC CPU definition\n"); |
|
|
} |
|
|
cpu_ppc_register(cpu_single_env, def); |
|
|
|
|
|
/* Set time-base frequency to 100 Mhz */ |
|
|
cpu_ppc_tb_init(cpu_single_env, 100UL * 1000UL * 1000UL); |
|
|
|
|
|
cpu_single_env->osi_call = vga_osi_call; |
|
415 |
|
|
416 |
if (is_heathrow) { |
if (is_heathrow) { |
417 |
isa_mem_base = 0x80000000; |
isa_mem_base = 0x80000000; |