[PATCH] target/arm: Correct reset value of SCTLR for arm926
Peter Maydell <[email protected]>
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
For the arm926 CPU we reset the SCTLR to 0x00090078. This is not the value specified in the ARM926EJ-S TRM (ARM DDI 0198E), which states that bits 16 and 18 are SBO, bit 17 is SBZ, and bits [31:19] are SBZ. It's also not the value seen on real hardware. This has been wrong in QEMU since 2007 when we first started actively resetting the SCTLR to some fixed value rather than zero. This wrong value didn't affect any of QEMU's behaviour, because we don't implement any handling of the old pre-v6 meanings of these bits (which were IMPDEF), and their v8 reuse is guarded by appropriate version checks. Correct the reset value to 0x00050078 (i.e set bit 18 and not 19). (We use the same reset value for the arm1020; this might also be wrong, but as the ARM1020 TRM doesn't seem to be available we can't check, so leave it as-is.) Cc: [email protected] Fixes: 610c3c8afd99f4f11 ("Reset ARM cp15.c1_sys to default values. Fix XScale cp15 accesses.") Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4202 Signed-off-by: Peter Maydell <[email protected]> --- target/arm/tcg/cpu32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c index 8220d785f5..8d85333f4b 100644 --- a/target/arm/tcg/cpu32.c +++ b/target/arm/tcg/cpu32.c @@ -33,7 +33,7 @@ static void arm926_initfn(Object *obj) cpu->midr = 0x41069265; cpu->reset_fpsid = 0x41011090; cpu->ctr = 0x1dd20d2; - cpu->reset_sctlr = 0x00090078; + cpu->reset_sctlr = 0x00050078; /* * ARMv5 does not have the ID_ISAR registers, but we can still -- 2.43.0