Hi,
I am working on Juno and I am using SCTLR_EL1 reset value based on A53 spec is = 0x00C50838
but If I look to ARMv8 spec it shows some reserved bits as 1 and considering that reset values = 0x30D50800.
I am seeing some MMU random behavior at EL1 based on reset value as the same code sometimes gives stage 1 fault and other times stage 2 fault.
Please let me know what should be the correct SCTLR_EL1 reset value ?
Thanks.
I must admit that I'd hadn't checked the reset value before, as the architecture describes the register as:
Some or all RW fields of this register have defined reset values. These apply only if the PE resets into EL1 using AArch64. Otherwise, RW fields in this register reset to IMPLEMENTATION DEFINED values that might be UNKNOWN.
Some or all RW fields of this register have defined reset values. These apply only if the PE resets
into EL1 using AArch64. Otherwise, RW fields in this register reset to IMPLEMENTATION DEFINED
values that might be UNKNOWN.
I would suggest working on the assumption that the register is UNKNOWN at reset, as that is more portable.
That aside.... When are you reading SCTLR_EL1? One answer would be that something earlier in the boot flow wrote to it already.
Hi Martin,
I need to set the SCTLR_EL1 value from EL2 so my Guest OS can work correctly.
I am confused if I should take SCTLR_EL1 reset value from A53 spec or I should calculate value based on ARMv8 spec ?
If you look into ARMv8 spec (section D7.2.81) for this register Bits[28:29, 22:23,11] are RES1 but if I look A53 spec (4.2.3) reset value is 0x00C50838 (so bits 28:29 are missing to be set).
I faced before issue while setting MMU at EL2 level where I was not resetting MMU properly and was getting "Bus error" so I would like to know correct value which I should set for EL1.
Partly it will depend on what kind of virtual world you're wanting to present to the guests.
I would probably go with emulating a world where EL2 and EL3 didn't exist. That is, for the bits the Architecture Reference Manual says have defined reset values when EL2/3 don't exist, use those values.