From: Mark Rutland mark.rutland@arm.com
When we set the GICD_IGROUPRn registers, we have a dangling post-increment at the end which is never useful, being overwritten in every path. As we're only writing to 3 registers, the offsets of which can be represented in immediates, use movs with immediate offsets to perform the writes.
Reported-by: Nigel Stephens nigel.stephens@arm.com Signed-off-by: Mark Rutland mark.rutland@arm.com --- boot.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot.S b/boot.S index 7c28e84..95dc41e 100644 --- a/boot.S +++ b/boot.S @@ -43,10 +43,10 @@ _start:
1: ldr x1, =GIC_DIST_BASE + 0x80 // GICD_IGROUPR mov w0, #~0 // Grp1 interrupts - str w0, [x1], #4 + str w0, [x1] b.ne 2f // Only local interrupts for secondary CPUs - str w0, [x1], #4 - str w0, [x1], #4 + str w0, [x1, #4] + str w0, [x1, #8]
2: ldr x1, =GIC_CPU_BASE // GICC_CTLR mov w0, #3 // EnableGrp0 | EnableGrp1