Skip to content

armv8: fixes and cleanups

Andre Przywara u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 6 repliesIn review
  2. v16 patches 14 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6cmd: exception: arm64: fix undefined, add faultscmd/arm/exception64.c+60 -41 reply
2/6armv8: Always unmask SErrorsarch/arm/cpu/armv8/fsl-layerscape/lowlevel.S arch/arm/cpu/armv8/start.S arch/arm/include/asm/system.h+4 -91 reply
3/6armv8: Force SP_ELx stack pointer usagearch/arm/cpu/armv8/start.S+1 -01 reply
4/6arm: Clean up asm/io.harch/arm/include/asm/io.h+2 -961 reply
5/6armv8: Simplify switch_el macroarch/arm/include/asm/macro.h+3 -51 reply
6/6armv8: Fix and simplify branch_if_master/branch_if_slavearch/arm/cpu/armv8/fsl-layerscape/lowlevel.S arch/arm/cpu/armv8/start.S arch/arm/include/asm/macro.h +3 more+15 -281 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] armv8: fixes and cleanups

Hi,

revamping this small series, just small changes:
- rebasing on top of origin/master, there was a trivial conflict
- checking for FEAT_LSE2 before trying unaligned accesses (patch 1/6)

Michael Walle tested the whole of v1 successfully, and the changes should not affect this result.
Mark Kettenis tested this on the Apple M1, but patch 1/6 has changed, so I don't dare to carry over his tag.
-------------

I was looking into the arm64 boot code lately and stumbled upon some issues. Also Nishanth brought back memories of a lengthy debug session, which was caused due to U-Boot keeping SErrors masked. As the resulting patches are all somewhat related, I gathered this series here to address those problems.

Patches 1 to 3 address exception handling issues, with the SError enablement being the most prominent fix here.
Patch 4 cleans up asm/io.h. This was on the list before[1], but was somehow lost when it was intercepted by a shorter version of itself. Patches 5 and 6 clean up some unnecessarily complicated AArch64 assembly code.

I did only some light testing, as some code paths do not apply to boards I have (ARMV8_MULTIENTRY). However v1 was tested by Michael Walle in both EL3 and EL2.

Cheers,
Andre

[1] https://lists.denx.de/pipermail/u-boot/2019-January/354296.html

Andre Przywara (6):
cmd: exception: arm64: fix undefined, add faults
armv8: Always unmask SErrors
armv8: Force SP_ELx stack pointer usage
arm: Clean up asm/io.h
armv8: Simplify switch_el macro
armv8: Fix and simplify branch_if_master/branch_if_slave

 arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S | 11 +--
 arch/arm/cpu/armv8/start.S                   | 10 +-
 arch/arm/include/asm/io.h                    | 98 +-------------------
 arch/arm/include/asm/macro.h                 | 37 +++-----
 arch/arm/include/asm/system.h                |  1 +
 arch/arm/mach-rmobile/lowlevel_init_gen3.S   |  2 +-
 arch/arm/mach-socfpga/lowlevel_init_soc64.S  |  2 +-
 board/cortina/presidio-asic/lowlevel_init.S  |  2 +-
 cmd/arm/exception64.c                        | 64 ++++++++++++-
 9 files changed, 85 insertions(+), 142 deletions(-)
Signature · 1 line
2.25.1