Skip to content

armv8: layerscape: spin table relocation fixes and cleanups

Michael Walle u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 0 repliesNew
  2. v11 patch 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13armv8: layerscape: fix spin-table supportarch/arm/cpu/armv8/fsl-layerscape/lowlevel.S arch/arm/cpu/armv8/fsl-layerscape/mp.c+5 -110 replies
2/13armv8: layerscape: pretty print info about SMP coresarch/arm/cpu/armv8/fsl-layerscape/mp.c+5 -40 replies
3/13armv8: layerscape: properly use CPU_RELEASE_ADDRarch/arm/cpu/armv8/fsl-layerscape/lowlevel.S arch/arm/include/asm/arch-fsl-layerscape/mp.h include/configs/kontron_sl28.h +6 more+19 -100 replies
4/13armv8: layerscape: move spin table into own modulearch/arm/cpu/armv8/fsl-layerscape/Makefile arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S arch/arm/cpu/armv8/fsl-layerscape/spintable.S+161 -1500 replies
5/13armv8: layerscape: load function pointer using ADRarch/arm/cpu/armv8/fsl-layerscape/spintable.S+3 -30 replies
6/13armv8: layerscape: fix alignment for spin tablearch/arm/cpu/armv8/fsl-layerscape/spintable.S+2 -20 replies
7/13armv8: layerscape: remove determine_mp_bootpg()arch/arm/cpu/armv8/fsl-layerscape/mp.c arch/arm/include/asm/arch-fsl-layerscape/mp.h+0 -60 replies
8/13armv8: layerscape: simplify get_spin_tbl_addr() callsarch/arm/cpu/armv8/fsl-layerscape/mp.c+7 -80 replies
9/13armv8: layerscape: make wake_secondary_core_n() staticarch/arm/cpu/armv8/fsl-layerscape/mp.c+1 -10 replies
10/13armv8: layerscape: drop first .ltorg directive in spintable.Sarch/arm/cpu/armv8/fsl-layerscape/spintable.S+0 -20 replies
11/13armv8: layerscape: clean exported symbols in spintable.Sarch/arm/cpu/armv8/fsl-layerscape/fdt.c arch/arm/cpu/armv8/fsl-layerscape/mp.c arch/arm/cpu/armv8/fsl-layerscape/spintable.S +1 more+24 -210 replies
12/13armv8: layerscape: relocate spin table if EFI_LOADER is enabledarch/arm/cpu/armv8/fsl-layerscape/mp.c+36 -01 reply
12/13armv8: layerscape: relocate spin table if EFI_LOADER is enabled+0 -00 replies
13/13armv8: layerscape: rework spin tablearch/arm/cpu/armv8/fsl-layerscape/spintable.S+23 -600 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 00/13] armv8: layerscape: spin table relocation fixes and cleanups

Fix bootefi on layerscape boards which use spin table for secondary cores bringup. There two main issues here:
(1) bootefi doesn't kick the secondary cores
(2) bootefi reserves a 64kb region for runtime services code on ARM64 which overlaps the spin table code.

We will fix (1) by removing the need to kick the secondary cores. For (2), we will make the spin table code relocatable and if the efi_loader support is enabled we will dynamically allocate a page for the spin table code and relocate it there. While we are at it, clean up the whole spin table code for layerscape.

Please note, no current board in u-boot should be using spin tables, because NXP officially only supports TF-A, which uses PSCI for secondary cores booting. Only the pending Kontron SMARC-sAL28 board will be using this method. U-Boot support is still pending, see:
https://patchwork.ozlabs.org/project/uboot/list/?series=175926

This was tested on said board, both with CONFIG_ARMV8_SWITCH_TO_EL1 defined and undefined.

Michael Walle (13):
armv8: layerscape: fix spin-table support
armv8: layerscape: pretty print info about SMP cores
armv8: layerscape: properly use CPU_RELEASE_ADDR
armv8: layerscape: move spin table into own module
armv8: layerscape: load function pointer using ADR
armv8: layerscape: fix alignment for spin table
armv8: layerscape: remove determine_mp_bootpg()
armv8: layerscape: simplify get_spin_tbl_addr() calls
armv8: layerscape: make wake_secondary_core_n() static
armv8: freescale: drop first .ltorg directive in spintable.S
armv8: layerscape: clean exported symbols in spintable.S
armv8: layerscape: relocate spin table if EFI_LOADER is enabled
armv8: layerscape: rework spin table

 arch/arm/cpu/armv8/fsl-layerscape/Makefile    |   2 +-
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c       |   9 +-
 arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S  | 165 ++----------------
 arch/arm/cpu/armv8/fsl-layerscape/mp.c        |  79 ++++++---
 arch/arm/cpu/armv8/fsl-layerscape/spintable.S | 118 +++++++++++++
 arch/arm/include/asm/arch-fsl-layerscape/mp.h |   8 +-
 include/configs/kontron_sl28.h                |   2 +-
 include/configs/ls1028a_common.h              |   2 +-
 include/configs/ls1043a_common.h              |   2 +-
 include/configs/ls1046a_common.h              |   2 +-
 include/configs/ls1088a_common.h              |   2 +-
 include/configs/ls2080a_common.h              |   2 +-
 include/configs/lx2160a_common.h              |   2 +-
 13 files changed, 201 insertions(+), 194 deletions(-)
 create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/spintable.S
Signature · 1 line
2.20.1