All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v8 0/3] armv8: Support loading 32-bit OS in AArch32 execution state
@ 2016-11-10  2:49 Alison Wang
  2016-11-10  2:49 ` [U-Boot] [PATCH v8 1/3] " Alison Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Alison Wang @ 2016-11-10  2:49 UTC (permalink / raw)
  To: u-boot

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.

PSCI method can also be used for secondary cores to load 32-bit OS.
As PSCI and secure monitor firmware framework are enabled, loading 32-bit OS is supported in such case. The default target exception level returned to U-Boot is EL2, so the corresponding work to switch to AArch32 EL2 and jump to 32-bit OS are done in U-Boot and secure firmware together.

---------------------------------------
Changes in v8:
- Fix the issue when U-Boot is running in EL2 or EL1.
- Support loading 32-bit OS with PSCI enabled.

Changes in v7:
- Move the call for armv8_switch_to_el2_m into the first patch.

Changes in v6:
- Modified armv8_switch_to_el1(). It will always jump to ep when switching to AArch64 or AArch32 modes.
- Make other platforms compatible with the new armv8_switch_to_el2() and armv8_switch_to_el1().
- Make secondary_switch_to_el1() always jump to ep when switching to AArch64 or AArch32 modes.

Changes in v5:
- Modified armv8_switch_to_el2(). It will always jump to ep when switching to AArch64 or AArch32 modes.
- Make secondary_switch_to_el2() always jump to ep when switching to AArch64 or AArch32 modes.

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 (3):
      armv8: Support loading 32-bit OS in AArch32 execution state
      armv8: fsl-layerscape: SMP support for loading 32-bit OS
      armv8: fsl-layerscape: Support loading 32-bit OS with PSCI enabled

 arch/arm/Kconfig                              |   6 ++++
 arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S  |  61 +++++++++++++++++++++++++------
 arch/arm/cpu/armv8/fsl-layerscape/mp.c        |  10 ++++++
 arch/arm/cpu/armv8/sec_firmware_asm.S         |  23 ++++++++++++
 arch/arm/cpu/armv8/start.S                    |   8 +++++
 arch/arm/cpu/armv8/transition.S               |  35 ++++++++++++++----
 arch/arm/include/asm/arch-fsl-layerscape/mp.h |   6 ++++
 arch/arm/include/asm/macro.h                  | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
 arch/arm/include/asm/system.h                 | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 arch/arm/lib/bootm.c                          |  45 ++++++++++++++++++++---
 arch/arm/mach-rmobile/lowlevel_init_gen3.S    |   9 ++++-
 common/image-fit.c                            |  19 +++++++++-
 12 files changed, 451 insertions(+), 68 deletions(-)

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-01-12  5:55 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10  2:49 [U-Boot] [PATCH v8 0/3] armv8: Support loading 32-bit OS in AArch32 execution state Alison Wang
2016-11-10  2:49 ` [U-Boot] [PATCH v8 1/3] " Alison Wang
2016-11-21 20:23   ` york sun
2016-11-21 20:39     ` Alexander Graf
2016-11-21 20:45       ` york sun
2016-11-21 21:07         ` Alexander Graf
2016-11-21 21:48           ` york sun
2016-11-22  5:05             ` Alison Wang
2016-11-22 17:02             ` Alexander Graf
2016-11-22 17:07               ` york sun
2016-11-22 17:09                 ` Alexander Graf
2016-11-22 17:32             ` Alexander Graf
2016-11-22 17:36               ` york sun
2017-01-11  8:59   ` Ryan Harkin
2017-01-12  5:55     ` Alison Wang
2016-11-10  2:49 ` [U-Boot] [PATCH v8 2/3] armv8: fsl-layerscape: SMP support for loading 32-bit OS Alison Wang
2016-11-10  2:49 ` [U-Boot] [PATCH v8 3/3] armv8: fsl-layerscape: Support loading 32-bit OS with PSCI enabled Alison Wang
2016-11-11 13:58 ` [U-Boot] [PATCH v8 0/3] armv8: Support loading 32-bit OS in AArch32 execution state Ryan Harkin
2016-11-11 16:00   ` york sun
2016-11-14  1:17   ` Alison Wang
2016-11-23  0:59 ` york sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.