diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-29 11:51:08 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-29 11:51:08 +0000 |
commit | d12f4c38226f6f029fb55cb9ec0ed4d2054a9851 (patch) | |
tree | 5817574669635423b71887bedaca9136f2926594 | |
parent | 418d7c7169818bce67a570fdc86ffb613f53263a (diff) |
Change POWERPC_PPC_GENERIC to POWERPC_DEFAULT.
Use it as default for workstation targets.
Fix PowerPC 750fl and 750gl definitions.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3256 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | hw/ppc_chrp.c | 9 | ||||
-rw-r--r-- | hw/ppc_prep.c | 3 | ||||
-rw-r--r-- | target-ppc/translate_init.c | 39 |
3 files changed, 22 insertions, 29 deletions
diff --git a/hw/ppc_chrp.c b/hw/ppc_chrp.c index dc115949f5..64746159ba 100644 --- a/hw/ppc_chrp.c +++ b/hw/ppc_chrp.c @@ -330,15 +330,8 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, qemu_register_reset(&cpu_ppc_reset, env); register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); - /* Default CPU is a generic 74x/75x */ if (cpu_model == NULL) - cpu_model = "750"; - /* 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. - */ + cpu_model = "default"; ppc_find_by_name(cpu_model, &def); if (def == NULL) { cpu_abort(env, "Unable to find PowerPC CPU definition\n"); diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index de0e9f098e..504ca33a9c 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -544,9 +544,8 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device, qemu_register_reset(&cpu_ppc_reset, env); register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); - /* Default CPU is a 604 */ if (cpu_model == NULL) - cpu_model = "604"; + cpu_model = "default"; ppc_find_by_name(cpu_model, &def); if (def == NULL) { cpu_abort(env, "Unable to find PowerPC CPU definition\n"); diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index cc8333f928..dbdbb6c05d 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -3539,21 +3539,21 @@ static void init_proc_620 (CPUPPCState *env) /* Default PowerPC target will be PowerPC 32 */ #if defined (TARGET_PPC64) && 0 // XXX: TODO -#define CPU_POWERPC_PPC CPU_POWERPC_PPC64 -#define POWERPC_INSNS_PPC_GENERIC POWERPC_INSNS_PPC64 -#define POWERPC_MSRM_PPC_GENERIC POWERPC_MSRM_PPC64 -#define POWERPC_MMU_PPC_GENERIC POWERPC_MMU_PPC64 -#define POWERPC_EXCP_PPC_GENERIC POWERPC_EXCP_PPC64 -#define POWERPC_INPUT_PPC_GENERIC POWERPC_INPUT_PPC64 -#define init_proc_PPC_GENERIC init_proc_PPC64 +#define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC64 +#define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC64 +#define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC64 +#define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC64 +#define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC64 +#define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC64 +#define init_proc_DEFAULT init_proc_PPC64 #else -#define CPU_POWERPC_PPC CPU_POWERPC_PPC32 -#define POWERPC_INSNS_PPC_GENERIC POWERPC_INSNS_PPC32 -#define POWERPC_MSRM_PPC_GENERIC POWERPC_MSRM_PPC32 -#define POWERPC_MMU_PPC_GENERIC POWERPC_MMU_PPC32 -#define POWERPC_EXCP_PPC_GENERIC POWERPC_EXCP_PPC32 -#define POWERPC_INPUT_PPC_GENERIC POWERPC_INPUT_PPC32 -#define init_proc_PPC_GENERIC init_proc_PPC32 +#define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC32 +#define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC32 +#define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC32 +#define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC32 +#define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC32 +#define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC32 +#define init_proc_DEFAULT init_proc_PPC32 #endif /*****************************************************************************/ @@ -4607,7 +4607,7 @@ static ppc_def_t ppc_defs[] = { /* PowerPC 750E (G3) */ POWERPC_DEF("750e", CPU_POWERPC_750E, 0xFFFFFFFF, 7x0), /* PowerPC 750FL (G3 embedded) */ - POWERPC_DEF("750fl", CPU_POWERPC_750FL, 0xFFFFFFFF, 7x0), + POWERPC_DEF("750fl", CPU_POWERPC_750FL, 0xFFFFFFFF, 750fx), /* PowerPC 750FX (G3 embedded) */ POWERPC_DEF("750fx", CPU_POWERPC_750FX, 0xFFFFFFFF, 750fx), /* PowerPC 750FX v1.0 (G3 embedded) */ @@ -4621,7 +4621,7 @@ static ppc_def_t ppc_defs[] = { /* PowerPC 750FX v2.3 (G3 embedded) */ POWERPC_DEF("750fx2.3", CPU_POWERPC_750FX_v23, 0xFFFFFFFF, 750fx), /* PowerPC 750GL (G3 embedded) */ - POWERPC_DEF("750gl", CPU_POWERPC_750GL, 0xFFFFFFFF, 7x0), + POWERPC_DEF("750gl", CPU_POWERPC_750GL, 0xFFFFFFFF, 750fx), /* PowerPC 750GX (G3 embedded) */ POWERPC_DEF("750gx", CPU_POWERPC_750GX, 0xFFFFFFFF, 750fx), /* PowerPC 750GX v1.0 (G3 embedded) */ @@ -4993,8 +4993,9 @@ static ppc_def_t ppc_defs[] = { #endif #endif POWERPC_DEF("ppc32", CPU_POWERPC_PPC32, 0xFFFFFFFF, PPC32), + POWERPC_DEF("ppc", CPU_POWERPC_DEFAULT, 0xFFFFFFFF, DEFAULT), /* Fallback */ - POWERPC_DEF("ppc", CPU_POWERPC_PPC, 0xFFFFFFFF, PPC_GENERIC), + POWERPC_DEF("default", CPU_POWERPC_DEFAULT, 0xFFFFFFFF, DEFAULT), }; /*****************************************************************************/ @@ -5463,7 +5464,7 @@ int ppc_find_by_name (const unsigned char *name, ppc_def_t **def) ret = -1; *def = NULL; - for (i = 0; strcmp(ppc_defs[i].name, "ppc") != 0; i++) { + for (i = 0; strcmp(ppc_defs[i].name, "default") != 0; i++) { if (strcasecmp(name, ppc_defs[i].name) == 0) { *def = &ppc_defs[i]; ret = 0; @@ -5499,7 +5500,7 @@ void ppc_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) for (i = 0; ; i++) { (*cpu_fprintf)(f, "PowerPC %-16s PVR %08x\n", ppc_defs[i].name, ppc_defs[i].pvr); - if (strcmp(ppc_defs[i].name, "ppc") == 0) + if (strcmp(ppc_defs[i].name, "default") == 0) break; } } |