arm11mpcore: initialize SCTLR reset value
PATCH 1/1 arm11mpcore: initialize SCTLR reset value
From: vpyr <[email protected]>
Initialize reset_sctlr to 0x00054078 in arm11mpcore_initfn.
Previously, the generic reset mechanism initialized SCTLR to zero because reset_sctlr was not set by the ARM11 MPCore CPU initialization function. The new value follows the fixed-bit requirements documented in ARM DDI 0360F, section 3.4.7, Table 3-20:
- Bits [21:16]: 000101, contributing 0x00050000
- Bit [14]: Should Be One / Read As One, contributing 0x00004000
- Bits [6:3]: Should Be One, contributing 0x00000078
V, U, and EE remain clear because their reset values depend on the VINITHI and CFGEND configuration signals.
After rebuilding, the test read SCTLR as 0x00054078 instead of zero, and the 0x00050078 mask check passed.
--- target/arm/tcg/cpu32.c | 1 + 1 file changed, 1 insertion(+)
target/arm/tcg/cpu32.c +1 -0
@@ -218,6 +218,7 @@ static void arm11mpcore_initfn(Object *obj) cpu->isar.mvfr0 =0x11111111 ; cpu->isar.mvfr1 =0x00000000 ; cpu->ctr =0x1d192992 ;/* 32K icache 32K dcache */ + cpu->reset_sctlr =0x00054078 ;SET_IDREG (isar,ID_PFR0 ,0x111 );SET_IDREG (isar,ID_PFR1 ,0x1 );SET_IDREG (isar,ID_DFR0 ,0 );
Signature · 1 line
2.55.0
Quoted 14 lines · vpyr
From: vpyr <[email protected]>
Initialize
reset_sctlrto0x00054078inarm11mpcore_initfn.Previously, the generic reset mechanism initialized SCTLR to zero because
reset_sctlrwas not set by the ARM11 MPCore CPU initialization function. The new value follows the fixed-bit requirements documented in ARM DDI 0360F, section 3.4.7, Table 3-20:- Bits [21:16]: 000101, contributing
0x00050000
- Bit [14]: Should Be One / Read As One, contributing0x00004000
- Bits [6:3]: Should Be One, contributing0x00000078
Quoted 5 lines
V, U, and EE remain clear because their reset values depend on the VINITHI and CFGEND configuration signals.
After rebuilding, the test read SCTLR as
0x00054078instead of zero, and the0x00050078mask check passed.
Thanks. This matches the reset value documented in the summary table 3.2 in the 11MPCore TRM.
Applied to target-arm.next, thanks. (I added the
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4454
line to the commit message which will cause the bug to be auto-closed when this is committed.)
-- PMM