first atttempt at SPARC64 fixes, no longer SEGV's, set CPU model to: Sun UltraSparc IV

This commit is contained in:
mothran
2015-09-15 23:12:03 -07:00
parent fe807952d0
commit 893e6abcbd
3 changed files with 44 additions and 7 deletions

View File

@ -33,19 +33,23 @@
static void sun4u_init(struct uc_struct *uc, MachineState *machine)
{
const char *cpu_model = machine->cpu_model;
SPARCCPU *cpu;
if (cpu_model == NULL)
cpu_model = "sun4uv";
cpu_model = "Sun UltraSparc IV";
if (cpu_sparc_init(uc, cpu_model) == NULL) {
cpu = cpu_sparc_init(uc, cpu_model);
if (cpu == NULL) {
fprintf(stderr, "Unable to find Sparc CPU definition\n");
exit(1);
}
cpu_sparc_set_id(&cpu->env, 0);
}
void sun4u_machine_init(struct uc_struct *uc)
{
QEMUMachine sun4u_machine = {
static QEMUMachine sun4u_machine = {
.name = "sun4u",
.init = sun4u_init,
.max_cpus = 1, // XXX for now