Hello
I am working on puting my ixp4xx board on kernelCI.
But it no longer boot since 4.14.
It only prints "Starting kernelUncompressing Linux... done, booting the kernel." then nothing.
I bisected the break to 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
With this patch reverted on top of 4.14, 5.15-rc3 and next-20210927, the board boot successfully.
Regards
Hello Corentin,
Corentin Labbe <[email protected]> writes:
> I am working on puting my ixp4xx board on kernelCI.
> But it no longer boot since 4.14.
> It only prints "Starting kernelUncompressing Linux... done, booting the kernel." then nothing.
>
> I bisected the break to 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
I guess you build your kernel as big-endian.
These parts seem suspicious to me:
- str r8, [r5] @ Save physical start of kernel
+#ifdef CONFIG_CPU_ENDIAN_BE8
+ str r8, [r5, #4] @ Save physical start of kernel (BE)
+#else
+ str r8, [r5] @ Save physical start of kernel (LE)
+#endif
and
- str r3, [r5] @ Save physical end of kernel
+#ifdef CONFIG_CPU_ENDIAN_BE8
+ str r3, [r5, #4] @ Save physical end of kernel (BE)
+#else
+ str r3, [r5] @ Save physical end of kernel (LE)
+#endif
IXP4xx, being ARMv5, uses CONFIG_CPU_ENDIAN_BE32 (when configured as
BE), but it needs the ", #4" as well.
I'd test with: #if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32
--
Krzysztof "Chris" Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
Le Tue, Sep 28, 2021 at 12:32:13PM +0200, Krzysztof Hałasa a écrit :
> Hello Corentin,
>
> Corentin Labbe <[email protected]> writes:
>
> > I am working on puting my ixp4xx board on kernelCI.
> > But it no longer boot since 4.14.
> > It only prints "Starting kernelUncompressing Linux... done, booting the kernel." then nothing.
> >
> > I bisected the break to 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
>
> I guess you build your kernel as big-endian.
Hello
Yes, IXP4XX is by default BE.
>
> These parts seem suspicious to me:
>
> - str r8, [r5] @ Save physical start of kernel
> +#ifdef CONFIG_CPU_ENDIAN_BE8
> + str r8, [r5, #4] @ Save physical start of kernel (BE)
> +#else
> + str r8, [r5] @ Save physical start of kernel (LE)
> +#endif
>
> and
>
> - str r3, [r5] @ Save physical end of kernel
> +#ifdef CONFIG_CPU_ENDIAN_BE8
> + str r3, [r5, #4] @ Save physical end of kernel (BE)
> +#else
> + str r3, [r5] @ Save physical end of kernel (LE)
> +#endif
>
> IXP4xx, being ARMv5, uses CONFIG_CPU_ENDIAN_BE32 (when configured as
> BE), but it needs the ", #4" as well.
>
> I'd test with: #if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32
Thanks, with the following patch, my boards boots
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 29070eb8df7d..3fc7f9750ce4 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -253,7 +253,7 @@ __create_page_tables:
add r0, r4, #KERNEL_OFFSET >> (SECTION_SHIFT - PMD_ORDER)
ldr r6, =(_end - 1)
adr_l r5, kernel_sec_start @ _pa(kernel_sec_start)
-#ifdef CONFIG_CPU_ENDIAN_BE8
+#if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32
str r8, [r5, #4] @ Save physical start of kernel (BE)
#else
str r8, [r5] @ Save physical start of kernel (LE)
@@ -266,7 +266,7 @@ __create_page_tables:
bls 1b
eor r3, r3, r7 @ Remove the MMU flags
adr_l r5, kernel_sec_end @ _pa(kernel_sec_end)
-#ifdef CONFIG_CPU_ENDIAN_BE8
+#if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32
str r3, [r5, #4] @ Save physical end of kernel (BE)
#else
str r3, [r5] @ Save physical end of kernel (LE)
Regards