Revision 94fc95cd hw/ppc_chrp.c
b/hw/ppc_chrp.c | ||
---|---|---|
292 | 292 |
} |
293 | 293 |
|
294 | 294 |
/* PowerPC CHRP hardware initialisation */ |
295 |
static void ppc_chrp_init(int ram_size, int vga_ram_size, int boot_device, |
|
296 |
DisplayState *ds, const char **fd_filename, |
|
297 |
int snapshot, |
|
298 |
const char *kernel_filename, |
|
299 |
const char *kernel_cmdline, |
|
300 |
const char *initrd_filename, |
|
301 |
int is_heathrow) |
|
295 |
static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, |
|
296 |
DisplayState *ds, const char **fd_filename, |
|
297 |
int snapshot, |
|
298 |
const char *kernel_filename, |
|
299 |
const char *kernel_cmdline, |
|
300 |
const char *initrd_filename, |
|
301 |
const char *cpu_model, |
|
302 |
int is_heathrow) |
|
302 | 303 |
{ |
303 | 304 |
CPUState *env; |
304 | 305 |
char buf[1024]; |
... | ... | |
320 | 321 |
env = cpu_init(); |
321 | 322 |
register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
322 | 323 |
|
323 |
/* Register CPU as a 74x/75x */ |
|
324 |
/* Default CPU is a generic 74x/75x */ |
|
325 |
if (cpu_model == NULL) |
|
326 |
cpu_model = "750"; |
|
324 | 327 |
/* XXX: CPU model (or PVR) should be provided on command line */ |
325 | 328 |
// ppc_find_by_name("750gx", &def); // Linux boot OK |
326 | 329 |
// ppc_find_by_name("750fx", &def); // Linux boot OK |
327 | 330 |
/* Linux does not boot on 750cxe (and probably other 750cx based) |
328 | 331 |
* because it assumes it has 8 IBAT & DBAT pairs as it only have 4. |
329 | 332 |
*/ |
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); |
|
333 |
ppc_find_by_name(cpu_model, &def); |
|
339 | 334 |
if (def == NULL) { |
340 | 335 |
cpu_abort(env, "Unable to find PowerPC CPU definition\n"); |
341 | 336 |
} |
... | ... | |
525 | 520 |
register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL); |
526 | 521 |
} |
527 | 522 |
|
528 |
static void ppc_core99_init(int ram_size, int vga_ram_size, int boot_device, |
|
529 |
DisplayState *ds, const char **fd_filename, |
|
530 |
int snapshot, |
|
531 |
const char *kernel_filename, |
|
532 |
const char *kernel_cmdline, |
|
533 |
const char *initrd_filename) |
|
523 |
static void ppc_core99_init (int ram_size, int vga_ram_size, int boot_device, |
|
524 |
DisplayState *ds, const char **fd_filename, |
|
525 |
int snapshot, |
|
526 |
const char *kernel_filename, |
|
527 |
const char *kernel_cmdline, |
|
528 |
const char *initrd_filename, |
|
529 |
const char *cpu_model) |
|
534 | 530 |
{ |
535 | 531 |
ppc_chrp_init(ram_size, vga_ram_size, boot_device, |
536 | 532 |
ds, fd_filename, snapshot, |
537 | 533 |
kernel_filename, kernel_cmdline, |
538 |
initrd_filename, 0); |
|
534 |
initrd_filename, cpu_model, 0);
|
|
539 | 535 |
} |
540 | 536 |
|
541 |
static void ppc_heathrow_init(int ram_size, int vga_ram_size, int boot_device, |
|
542 |
DisplayState *ds, const char **fd_filename, |
|
543 |
int snapshot, |
|
544 |
const char *kernel_filename, |
|
545 |
const char *kernel_cmdline, |
|
546 |
const char *initrd_filename) |
|
537 |
static void ppc_heathrow_init (int ram_size, int vga_ram_size, int boot_device, |
|
538 |
DisplayState *ds, const char **fd_filename, |
|
539 |
int snapshot, |
|
540 |
const char *kernel_filename, |
|
541 |
const char *kernel_cmdline, |
|
542 |
const char *initrd_filename, |
|
543 |
const char *cpu_model) |
|
547 | 544 |
{ |
548 | 545 |
ppc_chrp_init(ram_size, vga_ram_size, boot_device, |
549 | 546 |
ds, fd_filename, snapshot, |
550 | 547 |
kernel_filename, kernel_cmdline, |
551 |
initrd_filename, 1); |
|
548 |
initrd_filename, cpu_model, 1);
|
|
552 | 549 |
} |
553 | 550 |
|
554 | 551 |
QEMUMachine core99_machine = { |
Also available in: Unified diff