All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] armv8: Support loading 32-bit OS in AArch32 execution state
Date: Fri, 20 May 2016 10:29:03 +0200	[thread overview]
Message-ID: <73bbaad4-e3df-40c0-4f59-78f8e8d532bd@suse.de> (raw)
In-Reply-To: <AM4PR04MB21454F63D45D71D17442031BF44B0@AM4PR04MB2145.eurprd04.prod.outlook.com>



On 20.05.16 10:26, Huan Wang wrote:
>> On 20.05.16 08:53, Huan Wang wrote:
>>>> On 05/19/2016 10:26 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>
>>>>> ---

[...]

>>>>> --- a/common/image-fit.c
>>>>> +++ b/common/image-fit.c
>>>>> @@ -1163,7 +1163,8 @@ int fit_image_check_arch(const void *fit, int
>>>> noffset, uint8_t arch)
>>>>>   	if (fit_image_get_arch(fit, noffset, &image_arch))
>>>>>   		return 0;
>>>>>   	return (arch == image_arch) ||
>>>>> -		(arch == IH_ARCH_I386 && image_arch == IH_ARCH_X86_64);
>>>>> +		(arch == IH_ARCH_I386 && image_arch == IH_ARCH_X86_64) ||
>>>>> +		(arch == IH_ARCH_ARM64 && image_arch == IH_ARCH_ARM);
>>>>
>>>> This should be a Kconfig option. ThunderX doesn't support AArch32
>>>> execution.
>>> [Alison Wang] I can't understand your meaning. Can you clarify it?
>>
>> U-Boot supports the ThunderX SoC which uses Cavium's own ARMv8 core
>> implementation. That core does not support running AArch32 code.
>>
> [Alison Wang] Oh, I think your concern is that this function will not
> detect FIT image is wrong when loading 32-bit kernel on ThunderX, right?
> 
> Then what is your suggestion to fix this issue?

My suggestion is to introduce a new Kconfig option that says "this arm64
system can execute aarch32 code" which is set as default y.
CONFIG_THUNDERX would then set it to n if that's possible - or you'd
just set it to n in the thunderx defconfig.


Alex

  reply	other threads:[~2016-05-20  8:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19  8:26 [U-Boot] [PATCH v2 0/2] armv8: Support loading 32-bit OS in AArch32 execution state Alison Wang
2016-05-19  8:26 ` [U-Boot] [PATCH v2 1/2] " Alison Wang
2016-05-19  8:58   ` Alexander Graf
2016-05-20  6:53     ` Huan Wang
2016-05-20  8:09       ` Alexander Graf
2016-05-20  8:26         ` Huan Wang
2016-05-20  8:29           ` Alexander Graf [this message]
2016-05-20  8:33             ` Huan Wang
2016-05-19  8:26 ` [U-Boot] [PATCH v2 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=73bbaad4-e3df-40c0-4f59-78f8e8d532bd@suse.de \
    --to=agraf@suse.de \
    --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.