mirror of https://github.com/xemu-project/xemu.git
hw/mips/boston: Check 64-bit support with cpu_type_is_64bit()
Directly check if the CPU supports 64-bit with the recently added cpu_type_is_64bit() helper (inlined). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210104221154.3127610-6-f4bug@amsat.org>
This commit is contained in:
parent
b0586b38cb
commit
ce49581feb
|
@ -444,7 +444,6 @@ static void boston_mach_init(MachineState *machine)
|
||||||
DriveInfo *hd[6];
|
DriveInfo *hd[6];
|
||||||
Chardev *chr;
|
Chardev *chr;
|
||||||
int fw_size, fit_err;
|
int fw_size, fit_err;
|
||||||
bool is_64b;
|
|
||||||
|
|
||||||
if ((machine->ram_size % GiB) ||
|
if ((machine->ram_size % GiB) ||
|
||||||
(machine->ram_size > (2 * GiB))) {
|
(machine->ram_size > (2 * GiB))) {
|
||||||
|
@ -463,8 +462,6 @@ static void boston_mach_init(MachineState *machine)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
is_64b = cpu_type_supports_isa(machine->cpu_type, ISA_MIPS64);
|
|
||||||
|
|
||||||
object_initialize_child(OBJECT(machine), "cps", &s->cps, TYPE_MIPS_CPS);
|
object_initialize_child(OBJECT(machine), "cps", &s->cps, TYPE_MIPS_CPS);
|
||||||
object_property_set_str(OBJECT(&s->cps), "cpu-type", machine->cpu_type,
|
object_property_set_str(OBJECT(&s->cps), "cpu-type", machine->cpu_type,
|
||||||
&error_fatal);
|
&error_fatal);
|
||||||
|
@ -545,7 +542,8 @@ static void boston_mach_init(MachineState *machine)
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_firmware(memory_region_get_ram_ptr(flash) + 0x7c00000,
|
gen_firmware(memory_region_get_ram_ptr(flash) + 0x7c00000,
|
||||||
s->kernel_entry, s->fdt_base, is_64b);
|
s->kernel_entry, s->fdt_base,
|
||||||
|
cpu_type_is_64bit(machine->cpu_type));
|
||||||
} else if (!qtest_enabled()) {
|
} else if (!qtest_enabled()) {
|
||||||
error_report("Please provide either a -kernel or -bios argument");
|
error_report("Please provide either a -kernel or -bios argument");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue