From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/2] armv8: Support loading 32-bit OS in AArch32 execution state
Date: Thu, 26 May 2016 09:54:17 -0700 [thread overview]
Message-ID: <57472A39.2050202@nxp.com> (raw)
In-Reply-To: <1464252083-32083-2-git-send-email-b18965@freescale.com>
On 05/26/2016 01:51 AM, Alison Wang wrote:
> 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.
>
> Signed-off-by: Ebony Zhu <ebony.zhu@nxp.com>
> Signed-off-by: Alison Wang <alison.wang@nxp.com>
> Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
> ---
> 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.
>
> 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.
>
> arch/arm/Kconfig | 6 ++
> arch/arm/cpu/armv8/transition.S | 8 +-
> arch/arm/include/asm/macro.h | 174 ++++++++++++++++++++++++++++++----------
> arch/arm/include/asm/system.h | 118 ++++++++++++++++++++++++++-
> arch/arm/lib/bootm.c | 19 ++++-
> common/image-fit.c | 14 +++-
> 6 files changed, 287 insertions(+), 52 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 729b181..794cb4f 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -77,6 +77,12 @@ config SYS_L2CACHE_OFF
> If SoC does not support L2CACHE or one do not want to enable
> L2CACHE, choose this option.
>
> +config ARM64_SUPPORT_AARCH32
> + bool "ARM64 system support AArch32 execution state"
> + default y if ARM64 && !CONFIG_THUNDERX
> + help
> + This ARM64 system supports AArch32 execution state.
> +
> choice
> prompt "Target select"
> default TARGET_HIKEY
> diff --git a/arch/arm/cpu/armv8/transition.S b/arch/arm/cpu/armv8/transition.S
> index 253a39b..417e8b4 100644
> --- a/arch/arm/cpu/armv8/transition.S
> +++ b/arch/arm/cpu/armv8/transition.S
> @@ -11,13 +11,13 @@
> #include <asm/macro.h>
>
> ENTRY(armv8_switch_to_el2)
> - switch_el x0, 1f, 0f, 0f
> + switch_el x4, 1f, 0f, 0f
> 0: ret
> -1: armv8_switch_to_el2_m x0
> +1: armv8_switch_to_el2_m x0, x1, x2, x3, x4
> ENDPROC(armv8_switch_to_el2)
Alison,
I see you are chaning macro armv8_switch_to_el2. You may have missed one in
start.S. This is the code you can't test with our ARMv8 chip.
York
next prev parent reply other threads:[~2016-05-26 16:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 8:41 [U-Boot] [PATCH v3 0/2] armv8: Support loading 32-bit OS in AArch32 execution state Alison Wang
2016-05-26 8:41 ` [U-Boot] [PATCH v3 1/2] " Alison Wang
2016-05-26 16:54 ` York Sun [this message]
2016-06-03 3:10 ` Huan Wang
2016-05-26 18:22 ` Alexander Graf
2016-06-03 3:11 ` Huan Wang
2016-06-03 7:26 ` Alexander Graf
2016-06-03 9:31 ` Huan Wang
2016-06-03 9:41 ` Alexander Graf
2016-05-26 8:41 ` [U-Boot] [PATCH v3 2/2] armv8: fsl-layerscape: SMP support for loading 32-bit OS Alison Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57472A39.2050202@nxp.com \
--to=york.sun@nxp.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.