[U-Boot] [PATCH v4 0/2] armv8: Support loading 32-bit OS in AArch32 execution state

Alison Wang b18965 at freescale.com
Wed Jun 8 07:14:00 CEST 2016


This series is to support loading a 32-bit OS, the execution state will
change from AArch64 to AArch32 when jumping to kernel. The architecture
information will be got through checking FIT image, then U-Boot will
load 32-bit OS or 64-bit OS automatically.

Spin-table method is used for secondary cores to load 32-bit OS. The
architecture information will be got through checking FIT image and
saved in the os_arch element of spin-table, then the secondary cores
will check os_arch and jump to 32-bit OS or 64-bit OS automatically.

---------------------------------------
Changes in v4:
- Correct config ARM64_SUPPORT_AARCH32.
- Omit arch and ftaddr arguments.
- Rename "xreg5" to "tmp".
- Use xxx_RES1 to combine all RES1 fields in xxx register.
- Use an immediate cmp directly.
- Use #ifdef for CONFIG_ARM64_SUPPORT_AARCH32.

Changes in v3:
- Comments the functions and the arguments.
- Rename the real parameters.
- Use the macros instead of the magic values.
- Remove the redundant codes.
- Clean up all of the mess in boot_jump_linux().
- Add CONFIG_ARM64_SUPPORT_AARCH32 to detect for some ARM64 system doesn't support AArch32 state.
- Adjust the arguments for armv8_switch_to_el2_m and armv8_switch_to_el1_m.

Changes in v2:
- armv8_switch_to_el2_aarch32() is removed. armv8_switch_to_el2_m is used
  to switch to AArch64 EL2 or AArch32 Hyp.
- armv8_switch_to_el1_aarch32() is removed. armv8_switch_to_el1_m is used
  to switch to AArch64 EL1 or AArch32 SVC.
- Support to call armv8_switch_to_el2_m and armv8_switch_to_el1_m.

Alison Wang (2):
      armv8: Support loading 32-bit OS in AArch32 execution state
      armv8: fsl-layerscape: SMP support for loading 32-bit OS

 arch/arm/Kconfig                              |   6 ++++
 arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S  |  35 +++++++++++++++++---
 arch/arm/cpu/armv8/fsl-layerscape/mp.c        |  10 ++++++
 arch/arm/cpu/armv8/start.S                    |   1 +
 arch/arm/cpu/armv8/transition.S               |   8 ++---
 arch/arm/include/asm/arch-fsl-layerscape/mp.h |   6 ++++
 arch/arm/include/asm/macro.h                  | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
 arch/arm/include/asm/system.h                 | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 arch/arm/lib/bootm.c                          |  24 +++++++++++---
 common/image-fit.c                            |  19 ++++++++++-
 10 files changed, 336 insertions(+), 56 deletions(-)




More information about the U-Boot mailing list