Message ID | e84e5883801a341c7d0c5b8504c27aefd4fad2d6.1507878496.git.michal.simek@xilinx.com |
---|---|
State | Rejected |
Delegated to: | Alexander Graf |
Headers | show |
Series | [U-Boot] arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64 | expand |
On 13.10.17 09:08, Michal Simek wrote: > AArch32 Linux should start in EL1 instead of EL2. Why? There is KVM on AArch32 as well. Alex > > Signed-off-by: Michal Simek <michal.simek@xilinx.com> > --- > > arch/arm/lib/bootm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c > index 5c62d9c14406..e83d13de6749 100644 > --- a/arch/arm/lib/bootm.c > +++ b/arch/arm/lib/bootm.c > @@ -339,7 +339,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) > #else > if ((IH_ARCH_DEFAULT == IH_ARCH_ARM64) && > (images->os.arch == IH_ARCH_ARM)) > - armv8_switch_to_el2(0, (u64)gd->bd->bi_arch_number, > + armv8_switch_to_el1(0, (u64)gd->bd->bi_arch_number, > (u64)images->ft_addr, 0, > (u64)images->ep, > ES_TO_AARCH32); >
On 13.10.2017 09:19, Alexander Graf wrote: > > > On 13.10.17 09:08, Michal Simek wrote: >> AArch32 Linux should start in EL1 instead of EL2. > > Why? There is KVM on AArch32 as well. Is AArch32 without KVM able to start from EL2? At least based on my tests this is not working. M
On 13.10.17 09:26, Michal Simek wrote: > On 13.10.2017 09:19, Alexander Graf wrote: >> >> >> On 13.10.17 09:08, Michal Simek wrote: >>> AArch32 Linux should start in EL1 instead of EL2. >> >> Why? There is KVM on AArch32 as well. > > Is AArch32 without KVM able to start from EL2? > At least based on my tests this is not working. I'll leave it to Marc to answer that. I'd say if it's unable to boot from EL2 that's a bug though. Alex
On 13/10/17 08:26, Michal Simek wrote: > On 13.10.2017 09:19, Alexander Graf wrote: >> >> >> On 13.10.17 09:08, Michal Simek wrote: >>> AArch32 Linux should start in EL1 instead of EL2. >> >> Why? There is KVM on AArch32 as well. > > Is AArch32 without KVM able to start from EL2? > At least based on my tests this is not working. Then someone broke it. Please report the bug on LAKML. Thanks, M.
On 13.10.2017 10:33, Marc Zyngier wrote: > On 13/10/17 08:26, Michal Simek wrote: >> On 13.10.2017 09:19, Alexander Graf wrote: >>> >>> >>> On 13.10.17 09:08, Michal Simek wrote: >>>> AArch32 Linux should start in EL1 instead of EL2. >>> >>> Why? There is KVM on AArch32 as well. >> >> Is AArch32 without KVM able to start from EL2? >> At least based on my tests this is not working. > > Then someone broke it. Please report the bug on LAKML. Do you have any kernel version which you are sure it should work? Or any kernel version which you know that it started to work? Thanks, Michal
On 13/10/17 09:37, Michal Simek wrote: > On 13.10.2017 10:33, Marc Zyngier wrote: >> On 13/10/17 08:26, Michal Simek wrote: >>> On 13.10.2017 09:19, Alexander Graf wrote: >>>> >>>> >>>> On 13.10.17 09:08, Michal Simek wrote: >>>>> AArch32 Linux should start in EL1 instead of EL2. >>>> >>>> Why? There is KVM on AArch32 as well. >>> >>> Is AArch32 without KVM able to start from EL2? >>> At least based on my tests this is not working. >> >> Then someone broke it. Please report the bug on LAKML. > > Do you have any kernel version which you are sure it should work? > Or any kernel version which you know that it started to work? It should have worked from the day 32bit KVM was merged (3.9), and still does as of 4.13. M.
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 5c62d9c14406..e83d13de6749 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -339,7 +339,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) #else if ((IH_ARCH_DEFAULT == IH_ARCH_ARM64) && (images->os.arch == IH_ARCH_ARM)) - armv8_switch_to_el2(0, (u64)gd->bd->bi_arch_number, + armv8_switch_to_el1(0, (u64)gd->bd->bi_arch_number, (u64)images->ft_addr, 0, (u64)images->ep, ES_TO_AARCH32);
AArch32 Linux should start in EL1 instead of EL2. Signed-off-by: Michal Simek <michal.simek@xilinx.com> --- arch/arm/lib/bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)