-
Notifications
You must be signed in to change notification settings - Fork 860
Closed
Description
Currently the arm bootstub for AArch64 does not set the system register ACTLR_EL3. This register (which on reset is zero) enables access from lower exception levels to other system registers which are needed to apply fixes for errata affecting the processor. I hit this problem while working on a certain OS port to the Pi 3, however it also affects other codebases such as u-boot: https://github.com/u-boot/u-boot/blob/master/arch/arm/cpu/armv8/start.S#L208-L240
I've tested locally the following change to the armstub, and verified it working:
@@ -63,10 +63,13 @@
#define SCR_RES1_4 BIT(4)
#define SCR_NS BIT(0)
#define SCR_VAL \
(SCR_RW | SCR_HCE | SCR_SMD | SCR_RES1_5 | SCR_RES1_4 | SCR_NS)
+#define ACTLR_VAL \
+ (BIT(0) | BIT(1) | BIT(4) | BIT(5) | BIT(6))
+
#define CPUECTLR_EL1 S3_1_C15_C2_1
#define CPUECTLR_EL1_SMPEN BIT(6)
#define SPSR_EL3_D BIT(9)
#define SPSR_EL3_A BIT(8)
@@ -118,10 +121,14 @@ _start:
/* Set up SCR */
mov x0, #SCR_VAL
msr SCR_EL3, x0
+ /* Set up ACTLR */
+ mov x0, #ACTLR_VAL
+ msr ACTLR_EL3, x0
+
/* Set SMPEN */
mov x0, #CPUECTLR_EL1_SMPEN
msr CPUECTLR_EL1, x0
#ifdef GICIt would be very much appreciated if this change could make it upstream, or if an alternative solution was suggested.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels