aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2023-10-20 16:49:23 +0800
committerSong Gao <gaosong@loongson.cn>2023-11-03 14:12:55 +0800
commitd6f077321ae3f9508d3e066455ae1278ab3213e5 (patch)
treec272b731a403fd2902447be527e2357a50994a1f
parentd762bf97931b58839316b68a570eecc6143c9e3e (diff)
downloadqemu-d6f077321ae3f9508d3e066455ae1278ab3213e5.zip
qemu-d6f077321ae3f9508d3e066455ae1278ab3213e5.tar.gz
qemu-d6f077321ae3f9508d3e066455ae1278ab3213e5.tar.bz2
target/loongarch: Add cpu model 'max'
We use cpu la464 for the 'max' cpu. Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231020084925.3457084-2-gaosong@loongson.cn>
-rw-r--r--target/loongarch/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index ef1bf89..ef6922e 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -474,6 +474,12 @@ static void loongarch_la132_initfn(Object *obj)
env->cpucfg[1] = data;
}
+static void loongarch_max_initfn(Object *obj)
+{
+ /* '-cpu max' for TCG: we use cpu la464. */
+ loongarch_la464_initfn(obj);
+}
+
static void loongarch_cpu_list_entry(gpointer data, gpointer user_data)
{
const char *typename = object_class_get_name(OBJECT_CLASS(data));
@@ -829,6 +835,7 @@ static const TypeInfo loongarch_cpu_type_infos[] = {
},
DEFINE_LOONGARCH_CPU_TYPE(64, "la464", loongarch_la464_initfn),
DEFINE_LOONGARCH_CPU_TYPE(32, "la132", loongarch_la132_initfn),
+ DEFINE_LOONGARCH_CPU_TYPE(64, "max", loongarch_max_initfn),
};
DEFINE_TYPES(loongarch_cpu_type_infos)