Skip to content

Commit

Permalink
hw/mips/loongson3_virt: Relax CPU restrictions for TCG
Browse files Browse the repository at this point in the history
After implemented CPUCFG and CSR, we are now able to boot Linux
kernel with Loongson-3A4000 CPU, so there is no point to restrict
CPU type to 3A1000 only, instead we just check for presence of
INSN_LOONGSON3A.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20230521214832.20145-3-jiaxun.yang@flygoat.com>
[JY: Check for cpu_type_supports_isa(INSN_LOONGSON3A)]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  • Loading branch information
FlyGoat authored and philmd committed Jul 10, 2023
1 parent 03afdc2 commit 99eff13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/mips/loongson3_virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ static void mips_loongson3_virt_init(MachineState *machine)
if (!machine->cpu_type) {
machine->cpu_type = MIPS_CPU_TYPE_NAME("Loongson-3A1000");
}
if (!strstr(machine->cpu_type, "Loongson-3A1000")) {
error_report("Loongson-3/TCG needs cpu type Loongson-3A1000");
if (!cpu_type_supports_isa(machine->cpu_type, INSN_LOONGSON3A)) {
error_report("Loongson-3/TCG needs a Loongson-3 series cpu");
exit(1);
}
} else {
Expand Down

0 comments on commit 99eff13

Please sign in to comment.