mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment
@ 2024-08-14 16:14 Ahmad Fatoum
  2024-08-14 16:14 ` [PATCH 2/3] openrisc: implement C debug_ll for NS16550 Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2024-08-14 16:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The functions were changed to take a base parameter, so they can be used
with PBL console instead of just DEBUG_LL. Update the comment to reflect
the current state of the code.

Fixes: e64990099c8f ("debug_ll ns16550: Add base address argument to register functions")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/debug_ll/ns16550.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/debug_ll/ns16550.h b/include/debug_ll/ns16550.h
index fce113574fd0..2bad7a43ca91 100644
--- a/include/debug_ll/ns16550.h
+++ b/include/debug_ll/ns16550.h
@@ -7,8 +7,8 @@
  * Early debugging functions for the NS16550
  * This file needs register access functions declared as:
  *
- * uint8_t debug_ll_read_reg(int reg);
- * void debug_ll_write_reg(int reg, uint8_t val);
+ * uint8_t debug_ll_read_reg(void __iomem *base, int reg);
+ * void debug_ll_write_reg(void __iomem *base, int reg, uint8_t val);
  */
 #define NS16550_THR	0x0
 #define NS16550_RBR	0x0
-- 
2.39.2




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

* [PATCH 2/3] openrisc: implement C debug_ll for NS16550
  2024-08-14 16:14 [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Ahmad Fatoum
@ 2024-08-14 16:14 ` Ahmad Fatoum
  2024-08-14 16:14 ` [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0 Ahmad Fatoum
  2024-08-15  8:50 ` (subset) [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Sascha Hauer
  2 siblings, 0 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2024-08-14 16:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The early startup code is written in assembly, so the C DEBUG_LL
implementation isn't as useful, but it can still come in handy as
debugging aid, so let's add it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/openrisc/Kconfig                |  1 +
 arch/openrisc/include/asm/debug_ll.h | 36 ++++++++++++++++++++++++++++
 arch/openrisc/lib/board.c            |  3 +++
 common/Kconfig.debug_ll              |  4 ++++
 4 files changed, 44 insertions(+)
 create mode 100644 arch/openrisc/include/asm/debug_ll.h

diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 4ae03b748c79..102071686e4f 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -7,6 +7,7 @@ config OPENRISC
 	select HAVE_CONFIGURABLE_MEMORY_LAYOUT
 	select GENERIC_FIND_NEXT_BIT
 	select ARCH_HAS_SJLJ
+	select HAS_DEBUG_LL
 	default y
 
 # not used
diff --git a/arch/openrisc/include/asm/debug_ll.h b/arch/openrisc/include/asm/debug_ll.h
new file mode 100644
index 000000000000..35d436094096
--- /dev/null
+++ b/arch/openrisc/include/asm/debug_ll.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ASM_DEBUG_LL__
+#define __ASM_DEBUG_LL__
+
+#include <io.h>
+
+#if defined CONFIG_DEBUG_OPENRISC_NS16550
+
+#define DEBUG_LL_UART_BASE	IOMEM(0x90000000)
+
+static inline uint8_t debug_ll_read_reg(void __iomem *base, int reg)
+{
+	return readb(base + reg);
+}
+
+static inline void debug_ll_write_reg(void __iomem *base, int reg, uint8_t val)
+{
+	writeb(val, base + reg);
+}
+
+#include <debug_ll/ns16550.h>
+
+static inline void debug_ll_init(void)
+{
+	/* already configured */
+}
+
+static inline void PUTC_LL(int c)
+{
+	debug_ll_ns16550_putc(DEBUG_LL_UART_BASE, c);
+}
+
+#endif
+
+#endif
diff --git a/arch/openrisc/lib/board.c b/arch/openrisc/lib/board.c
index 9591120fee4b..c6f34ed412d7 100644
--- a/arch/openrisc/lib/board.c
+++ b/arch/openrisc/lib/board.c
@@ -18,6 +18,7 @@
 #include <init.h>
 #include <memory.h>
 #include <asm-generic/memory_layout.h>
+#include <debug_ll.h>
 
 /* Called from assembly */
 void openrisc_start_barebox(void);
@@ -27,5 +28,7 @@ void __noreturn openrisc_start_barebox(void)
 	mem_malloc_init((void *)(OPENRISC_SOPC_TEXT_BASE - MALLOC_SIZE),
 			(void *)(OPENRISC_SOPC_TEXT_BASE - 1));
 
+	putc_ll('>');
+
 	start_barebox();
 }
diff --git a/common/Kconfig.debug_ll b/common/Kconfig.debug_ll
index 3f6f3e7c3bdb..1f9255b1a45b 100644
--- a/common/Kconfig.debug_ll
+++ b/common/Kconfig.debug_ll
@@ -350,6 +350,10 @@ config DEBUG_SEMIHOSTING
 	  Say Y here if you want low-level debugging support
 	  using semihosting writec.
 
+config DEBUG_OPENRISC_NS16550
+	bool "OpenRISC NS16550 console"
+	depends on OPENRISC
+
 endchoice
 
 config DEBUG_LL_NS16550
-- 
2.39.2




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

* [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
  2024-08-14 16:14 [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Ahmad Fatoum
  2024-08-14 16:14 ` [PATCH 2/3] openrisc: implement C debug_ll for NS16550 Ahmad Fatoum
@ 2024-08-14 16:14 ` Ahmad Fatoum
  2024-08-15  8:49   ` (subset) " Sascha Hauer
  2024-08-18  7:14   ` Stafford Horne
  2024-08-15  8:50 ` (subset) [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Sascha Hauer
  2 siblings, 2 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2024-08-14 16:14 UTC (permalink / raw)
  To: barebox; +Cc: Stafford Horne, Ahmad Fatoum

The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is
now completely silent. Steps to reproduce the hang:

  CONTAINER_GCC13=bdfdd5effcc169ebf8a9df2f1a5956ef34549682f78b450a97aceea2afd76f7a
  CONTAINER_GCC14=fa35adeae1ab49b4dc09fc3bf4d68f92541a0d1f41e0df91a4879fd331e4b592
  CONTAINER_BASE=ghcr.io/barebox/barebox/barebox-ci@sha256:fa35adeae1a

  export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC14}
  export LG_BUILDDIR=build-openrisc
  ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
  ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
	--interactive

Running the same steps, but with the older toolchain boots successfully:

  export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC13}
  export LG_BUILDDIR=build-openrisc
  git checkout v2024.08.0
  ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
  ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
	--interactive

The hang happens somewhere before the jump to _start in arch/openrisc/cpu/start.S.
Until that's fixed, let's pin the OpenRISC GCC version to the old v13.1.0.

Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
@Stafford, do you have an idea what could cause this?
---
 test/Containerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/Containerfile b/test/Containerfile
index fe3e3a6186b0..aca2c5fcde81 100644
--- a/test/Containerfile
+++ b/test/Containerfile
@@ -56,7 +56,7 @@ RUN korg_crosstool_dl() { wget -nv -O - https://mirrors.edge.kernel.org/pub/tool
     korg_crosstool_dl x86_64 ${GCC_VERSION} arm-linux-gnueabi && \
     korg_crosstool_dl x86_64 ${GCC_VERSION} aarch64-linux     && \
     korg_crosstool_dl x86_64 ${GCC_VERSION} mips-linux        && \
-    korg_crosstool_dl x86_64 ${GCC_VERSION} or1k-linux        && \
+    korg_crosstool_dl x86_64 13.1.0         or1k-linux        && \
     korg_crosstool_dl x86_64 ${GCC_VERSION} powerpc-linux     && \
     korg_crosstool_dl x86_64 ${GCC_VERSION} riscv64-linux
 
-- 
2.39.2




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

* Re: (subset) [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
  2024-08-14 16:14 ` [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0 Ahmad Fatoum
@ 2024-08-15  8:49   ` Sascha Hauer
  2024-08-18  7:14   ` Stafford Horne
  1 sibling, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2024-08-15  8:49 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum; +Cc: Stafford Horne


On Wed, 14 Aug 2024 18:14:35 +0200, Ahmad Fatoum wrote:
> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is
> now completely silent. Steps to reproduce the hang:
> 
>   CONTAINER_GCC13=bdfdd5effcc169ebf8a9df2f1a5956ef34549682f78b450a97aceea2afd76f7a
>   CONTAINER_GCC14=fa35adeae1ab49b4dc09fc3bf4d68f92541a0d1f41e0df91a4879fd331e4b592
>   CONTAINER_BASE=ghcr.io/barebox/barebox/barebox-ci@sha256:fa35adeae1a
> 
> [...]

Applied, thanks!

[3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
      https://git.pengutronix.de/cgit/barebox/commit/?id=6d4c6b01f4c4 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

* Re: (subset) [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment
  2024-08-14 16:14 [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Ahmad Fatoum
  2024-08-14 16:14 ` [PATCH 2/3] openrisc: implement C debug_ll for NS16550 Ahmad Fatoum
  2024-08-14 16:14 ` [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0 Ahmad Fatoum
@ 2024-08-15  8:50 ` Sascha Hauer
  2 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2024-08-15  8:50 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Wed, 14 Aug 2024 18:14:33 +0200, Ahmad Fatoum wrote:
> The functions were changed to take a base parameter, so they can be used
> with PBL console instead of just DEBUG_LL. Update the comment to reflect
> the current state of the code.
> 
> 

Applied, thanks!

[1/3] debug_ll: ns16550: fix prototype in documentation comment
      https://git.pengutronix.de/cgit/barebox/commit/?id=a64d49c422fa (link may not be stable)
[2/3] openrisc: implement C debug_ll for NS16550
      https://git.pengutronix.de/cgit/barebox/commit/?id=fb3e9040a77f (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

* Re: [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
  2024-08-14 16:14 ` [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0 Ahmad Fatoum
  2024-08-15  8:49   ` (subset) " Sascha Hauer
@ 2024-08-18  7:14   ` Stafford Horne
  2024-08-18 17:09     ` Ahmad Fatoum
  1 sibling, 1 reply; 9+ messages in thread
From: Stafford Horne @ 2024-08-18  7:14 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Wed, Aug 14, 2024 at 06:14:35PM +0200, Ahmad Fatoum wrote:
> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is
> now completely silent. Steps to reproduce the hang:
> 
>   CONTAINER_GCC13=bdfdd5effcc169ebf8a9df2f1a5956ef34549682f78b450a97aceea2afd76f7a
>   CONTAINER_GCC14=fa35adeae1ab49b4dc09fc3bf4d68f92541a0d1f41e0df91a4879fd331e4b592
>   CONTAINER_BASE=ghcr.io/barebox/barebox/barebox-ci@sha256:fa35adeae1a
> 
>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC14}
>   export LG_BUILDDIR=build-openrisc
>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
> 	--interactive
> 
> Running the same steps, but with the older toolchain boots successfully:
> 
>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC13}
>   export LG_BUILDDIR=build-openrisc
>   git checkout v2024.08.0
>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
> 	--interactive
> 
> The hang happens somewhere before the jump to _start in arch/openrisc/cpu/start.S.
> Until that's fixed, let's pin the OpenRISC GCC version to the old v13.1.0.
> 
> Cc: Stafford Horne <shorne@gmail.com>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> @Stafford, do you have an idea what could cause this?

Hi I am not sure about this, no new changes in the or1k-linux toolchain that I
know about.  I will try to reproduce and see what is going wrong.

-Stafford 



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

* Re: [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
  2024-08-18  7:14   ` Stafford Horne
@ 2024-08-18 17:09     ` Ahmad Fatoum
  2024-08-22 16:43       ` Ahmad Fatoum
  0 siblings, 1 reply; 9+ messages in thread
From: Ahmad Fatoum @ 2024-08-18 17:09 UTC (permalink / raw)
  To: Stafford Horne; +Cc: barebox

Hello Stafford,

On 18.08.24 09:14, Stafford Horne wrote:
> On Wed, Aug 14, 2024 at 06:14:35PM +0200, Ahmad Fatoum wrote:
>> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is
>> now completely silent. Steps to reproduce the hang:
>>
>>   CONTAINER_GCC13=bdfdd5effcc169ebf8a9df2f1a5956ef34549682f78b450a97aceea2afd76f7a
>>   CONTAINER_GCC14=fa35adeae1ab49b4dc09fc3bf4d68f92541a0d1f41e0df91a4879fd331e4b592
>>   CONTAINER_BASE=ghcr.io/barebox/barebox/barebox-ci@sha256:fa35adeae1a
>>
>>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC14}
>>   export LG_BUILDDIR=build-openrisc
>>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
>>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
>> 	--interactive
>>
>> Running the same steps, but with the older toolchain boots successfully:
>>
>>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC13}
>>   export LG_BUILDDIR=build-openrisc
>>   git checkout v2024.08.0
>>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
>>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
>> 	--interactive
>>
>> The hang happens somewhere before the jump to _start in arch/openrisc/cpu/start.S.
>> Until that's fixed, let's pin the OpenRISC GCC version to the old v13.1.0.
>>
>> Cc: Stafford Horne <shorne@gmail.com>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> @Stafford, do you have an idea what could cause this?
> 
> Hi I am not sure about this, no new changes in the or1k-linux toolchain that I
> know about.  I will try to reproduce and see what is going wrong.

That would be great, thanks! I had a typo in the instructions above,
CONTAINER_BASE is not supposed to have @sha256:fa35adeae1a at the end.

I tried to debug this by importing _emergency_putc from the kernel and
seeing where it's getting stuck. I tried on the working case (GCC13) and
calling _emergency_putc before _start doesn't work. Unfortunately, that's
where it hangs (or maybe, code isn't executed at all?) for GCC14 so that
didn't help me narrow down the issue.

Cheers,
Ahmad

> 
> -Stafford 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
  2024-08-18 17:09     ` Ahmad Fatoum
@ 2024-08-22 16:43       ` Ahmad Fatoum
  2024-08-23  6:21         ` Stafford Horne
  0 siblings, 1 reply; 9+ messages in thread
From: Ahmad Fatoum @ 2024-08-22 16:43 UTC (permalink / raw)
  To: Stafford Horne; +Cc: barebox

Hello,

On 18.08.24 19:09, Ahmad Fatoum wrote:
> Hello Stafford,
> 
> On 18.08.24 09:14, Stafford Horne wrote:
>> On Wed, Aug 14, 2024 at 06:14:35PM +0200, Ahmad Fatoum wrote:
>>> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is
>>> now completely silent. Steps to reproduce the hang:

Turns out the toolchain update was not to blame, but the Debian container bump
that accompanied it. It moved the default console as part of adding three
more consoles to the platform. I am not sure that move was intended, so I submitted
a QEMU patch for that[1].

For barebox, I think we'l just break compatibility with older QEMU, describe
all 4 UARTs and use CONFIG_CONSOLE_ACTIVATE_ALL.

[1]: https://lore.kernel.org/qemu-devel/20240822163838.3722764-1-a.fatoum@pengutronix.de/
     Should show it once lore has indexed the mail

Cheers,
Ahmad

>>>
>>>   CONTAINER_GCC13=bdfdd5effcc169ebf8a9df2f1a5956ef34549682f78b450a97aceea2afd76f7a
>>>   CONTAINER_GCC14=fa35adeae1ab49b4dc09fc3bf4d68f92541a0d1f41e0df91a4879fd331e4b592
>>>   CONTAINER_BASE=ghcr.io/barebox/barebox/barebox-ci@sha256:fa35adeae1a
>>>
>>>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC14}
>>>   export LG_BUILDDIR=build-openrisc
>>>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
>>>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
>>> 	--interactive
>>>
>>> Running the same steps, but with the older toolchain boots successfully:
>>>
>>>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC13}
>>>   export LG_BUILDDIR=build-openrisc
>>>   git checkout v2024.08.0
>>>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
>>>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
>>> 	--interactive
>>>
>>> The hang happens somewhere before the jump to _start in arch/openrisc/cpu/start.S.
>>> Until that's fixed, let's pin the OpenRISC GCC version to the old v13.1.0.
>>>
>>> Cc: Stafford Horne <shorne@gmail.com>
>>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> ---
>>> @Stafford, do you have an idea what could cause this?
>>
>> Hi I am not sure about this, no new changes in the or1k-linux toolchain that I
>> know about.  I will try to reproduce and see what is going wrong.
> 
> That would be great, thanks! I had a typo in the instructions above,
> CONTAINER_BASE is not supposed to have @sha256:fa35adeae1a at the end.
> 
> I tried to debug this by importing _emergency_putc from the kernel and
> seeing where it's getting stuck. I tried on the working case (GCC13) and
> calling _emergency_putc before _start doesn't work. Unfortunately, that's
> where it hangs (or maybe, code isn't executed at all?) for GCC14 so that
> didn't help me narrow down the issue.
> 
> Cheers,
> Ahmad
> 
>>
>> -Stafford 
>>
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0
  2024-08-22 16:43       ` Ahmad Fatoum
@ 2024-08-23  6:21         ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2024-08-23  6:21 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Thu, Aug 22, 2024 at 06:43:23PM +0200, Ahmad Fatoum wrote:
> Hello,
> 
> On 18.08.24 19:09, Ahmad Fatoum wrote:
> > Hello Stafford,
> > 
> > On 18.08.24 09:14, Stafford Horne wrote:
> >> On Wed, Aug 14, 2024 at 06:14:35PM +0200, Ahmad Fatoum wrote:
> >>> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is
> >>> now completely silent. Steps to reproduce the hang:
> 
> Turns out the toolchain update was not to blame, but the Debian container bump
> that accompanied it. It moved the default console as part of adding three
> more consoles to the platform. I am not sure that move was intended, so I submitted
> a QEMU patch for that[1].
> 
> For barebox, I think we'l just break compatibility with older QEMU, describe
> all 4 UARTs and use CONFIG_CONSOLE_ACTIVATE_ALL.
> 
> [1]: https://lore.kernel.org/qemu-devel/20240822163838.3722764-1-a.fatoum@pengutronix.de/
>      Should show it once lore has indexed the mail

Thanks,

I didnt get a chance to look into it yet, thats for sorting it out.  I see the
patches and will reply.  I am not sure why the uarts were done in that order.

Maybe Jason know's why.

-Stafford

> >>>
> >>>   CONTAINER_GCC13=bdfdd5effcc169ebf8a9df2f1a5956ef34549682f78b450a97aceea2afd76f7a
> >>>   CONTAINER_GCC14=fa35adeae1ab49b4dc09fc3bf4d68f92541a0d1f41e0df91a4879fd331e4b592
> >>>   CONTAINER_BASE=ghcr.io/barebox/barebox/barebox-ci@sha256:fa35adeae1a
> >>>
> >>>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC14}
> >>>   export LG_BUILDDIR=build-openrisc
> >>>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
> >>>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
> >>> 	--interactive
> >>>
> >>> Running the same steps, but with the older toolchain boots successfully:
> >>>
> >>>   export CONTAINER=${CONTAINER_BASE}@sha256:${CONTAINER_GCC13}
> >>>   export LG_BUILDDIR=build-openrisc
> >>>   git checkout v2024.08.0
> >>>   ./scripts/container.sh ./MAKEALL -a openrisc -O $LG_BUILDDIR
> >>>   ./scripts/container.sh pytest --lg-env test/openrisc/generic_defconfig.yaml \
> >>> 	--interactive
> >>>
> >>> The hang happens somewhere before the jump to _start in arch/openrisc/cpu/start.S.
> >>> Until that's fixed, let's pin the OpenRISC GCC version to the old v13.1.0.
> >>>
> >>> Cc: Stafford Horne <shorne@gmail.com>
> >>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >>> ---
> >>> @Stafford, do you have an idea what could cause this?
> >>
> >> Hi I am not sure about this, no new changes in the or1k-linux toolchain that I
> >> know about.  I will try to reproduce and see what is going wrong.
> > 
> > That would be great, thanks! I had a typo in the instructions above,
> > CONTAINER_BASE is not supposed to have @sha256:fa35adeae1a at the end.
> > 
> > I tried to debug this by importing _emergency_putc from the kernel and
> > seeing where it's getting stuck. I tried on the working case (GCC13) and
> > calling _emergency_putc before _start doesn't work. Unfortunately, that's
> > where it hangs (or maybe, code isn't executed at all?) for GCC14 so that
> > didn't help me narrow down the issue.
> > 
> > Cheers,
> > Ahmad
> > 
> >>
> >> -Stafford 
> >>
> > 
> > 
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2024-08-23  6:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14 16:14 [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Ahmad Fatoum
2024-08-14 16:14 ` [PATCH 2/3] openrisc: implement C debug_ll for NS16550 Ahmad Fatoum
2024-08-14 16:14 ` [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0 Ahmad Fatoum
2024-08-15  8:49   ` (subset) " Sascha Hauer
2024-08-18  7:14   ` Stafford Horne
2024-08-18 17:09     ` Ahmad Fatoum
2024-08-22 16:43       ` Ahmad Fatoum
2024-08-23  6:21         ` Stafford Horne
2024-08-15  8:50 ` (subset) [PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox