aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/malta.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-09-27 09:24:06 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-10-15 12:21:06 -0300
commit805659a895b8afeeb50088c44bd60641d60963ff (patch)
tree6f6965e61da2fe8bd1b363f536a3cdc1825ab330 /hw/mips/malta.c
parentd70e58958da3165bb35d33a69c9d1937674dd6ce (diff)
downloadqemu-805659a895b8afeeb50088c44bd60641d60963ff.zip
qemu-805659a895b8afeeb50088c44bd60641d60963ff.tar.gz
qemu-805659a895b8afeeb50088c44bd60641d60963ff.tar.bz2
hw/mips/cps: Set the vCPU 'cpu-big-endian' property
Have the CPS expose a 'cpu-big-endian' property so it can set it to the vCPUs it creates. Note, since the number of vCPUs created is dynamic, we can not use QOM aliases. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20241010215015.44326-16-philmd@linaro.org>
Diffstat (limited to 'hw/mips/malta.c')
-rw-r--r--hw/mips/malta.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 1df00c4..964d359 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1054,6 +1054,8 @@ static void create_cps(MachineState *ms, MaltaState *s,
object_initialize_child(OBJECT(s), "cps", &s->cps, TYPE_MIPS_CPS);
object_property_set_str(OBJECT(&s->cps), "cpu-type", ms->cpu_type,
&error_fatal);
+ object_property_set_bool(OBJECT(&s->cps), "cpu-big-endian",
+ TARGET_BIG_ENDIAN, &error_abort);
object_property_set_uint(OBJECT(&s->cps), "num-vp", ms->smp.cpus,
&error_fatal);
qdev_connect_clock_in(DEVICE(&s->cps), "clk-in", s->cpuclk);