* [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL
@ 2025-04-22 7:55 Ahmad Fatoum
2025-04-22 7:55 ` [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046 Ahmad Fatoum
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 7:55 UTC (permalink / raw)
To: barebox
From: Ahmad Fatoum <a.fatoum@barebox.org>
With CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_ALL_ZERO,
the compiler emits calls to memset to initialize variables on the stack.
With kasan enabled, this would end up calling KASAN memset, which can
lead to access of global variables prior to relocation.
Brace ourselves for this situation by sidestepping KASAN prior to
relocation.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
lib/kasan/generic.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lib/kasan/generic.c b/lib/kasan/generic.c
index 66eebac15600..dda80f790151 100644
--- a/lib/kasan/generic.c
+++ b/lib/kasan/generic.c
@@ -17,6 +17,7 @@
#define pr_fmt(fmt) "kasan: generic: " fmt
#include <common.h>
+#include <asm/reloc.h>
#include "kasan.h"
@@ -160,6 +161,16 @@ static __always_inline bool check_memory_region_inline(unsigned long addr,
size_t size, bool write,
unsigned long ret_ip)
{
+ /*
+ * Hardening options like -ftrivial-auto-var-init=zero can end up
+ * emitting memset calls to initialize stack variables.
+ * This can lead to this function reached before relocation.
+ *
+ * Play it safe by ensuring we are relocated before proceeding.
+ */
+ if (global_variable_offset() != 0)
+ return true;
+
if (!kasan_initialized)
return true;
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046
2025-04-22 7:55 [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Ahmad Fatoum
@ 2025-04-22 7:55 ` Ahmad Fatoum
2025-04-22 14:14 ` Sascha Hauer
2025-04-22 7:55 ` [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y Ahmad Fatoum
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 7:55 UTC (permalink / raw)
To: barebox
From: Ahmad Fatoum <a.fatoum@barebox.org>
Definitions inside icid.c are needed for both LS1046 and LS1028, so make
sure it's compiled unconditionally.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
arch/arm/mach-layerscape/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
index 10e1c031b953..095d3e4eae57 100644
--- a/arch/arm/mach-layerscape/Makefile
+++ b/arch/arm/mach-layerscape/Makefile
@@ -3,7 +3,7 @@
obj- := __dummy__.o
lwl-y += errata.o
lwl-$(CONFIG_ARCH_LS1046) += lowlevel.o lowlevel-ls1046a.o
-obj-$(CONFIG_ARCH_LS1046) += icid.o
+obj-y += icid.o
obj-pbl-y += boot.o soc.o
pbl-y += xload-qspi.o xload.o
pbl-$(CONFIG_ARCH_LS1028) += tzc400.o
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y
2025-04-22 7:55 [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Ahmad Fatoum
2025-04-22 7:55 ` [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046 Ahmad Fatoum
@ 2025-04-22 7:55 ` Ahmad Fatoum
2025-04-22 14:23 ` Sascha Hauer
2025-04-22 7:55 ` [PATCH master 4/4] memory: correct return value in request_barebox_region stub Ahmad Fatoum
2025-04-22 9:29 ` [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Sascha Hauer
3 siblings, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 7:55 UTC (permalink / raw)
To: barebox
From: Ahmad Fatoum <a.fatoum@barebox.org>
Defining debug_ll_read_reg unconditionally for K3 can clash with other
debug_ll implementations, so move it into the include guard.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
include/mach/k3/debug_ll.h | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/include/mach/k3/debug_ll.h b/include/mach/k3/debug_ll.h
index 13321c61346f..0e479d2e7f2b 100644
--- a/include/mach/k3/debug_ll.h
+++ b/include/mach/k3/debug_ll.h
@@ -2,6 +2,20 @@
#define __MACH_K3_DEBUG_LL_H__
#include <io.h>
+#define AM62X_UART_UART0_BASE 0x02800000
+#define AM62X_UART_UART1_BASE 0x02810000
+#define AM62X_UART_UART2_BASE 0x02820000
+#define AM62X_UART_UART3_BASE 0x02830000
+#define AM62X_UART_UART4_BASE 0x02840000
+#define AM62X_UART_UART5_BASE 0x02850000
+#define AM62X_UART_UART6_BASE 0x02860000
+
+#if defined CONFIG_DEBUG_AM62X_UART
+#define K3_DEBUG_SOC AM62X_UART
+
+#define __K3_UART_BASE(soc, num) soc##_UART##num##_BASE
+#define K3_UART_BASE(soc, num) __K3_UART_BASE(soc, num)
+
static inline uint8_t debug_ll_read_reg(void __iomem *base, int reg)
{
return readb(base + (reg << 2));
@@ -22,25 +36,6 @@ static inline void k3_debug_ll_init(void __iomem *base)
debug_ll_write_reg(base, 8, 0x00);
}
-#define AM62X_UART_UART0_BASE 0x02800000
-#define AM62X_UART_UART1_BASE 0x02810000
-#define AM62X_UART_UART2_BASE 0x02820000
-#define AM62X_UART_UART3_BASE 0x02830000
-#define AM62X_UART_UART4_BASE 0x02840000
-#define AM62X_UART_UART5_BASE 0x02850000
-#define AM62X_UART_UART6_BASE 0x02860000
-
-#if defined CONFIG_DEBUG_AM62X_UART
-#define K3_DEBUG_SOC AM62X_UART
-
-#define __K3_UART_BASE(soc, num) soc##_UART##num##_BASE
-#define K3_UART_BASE(soc, num) __K3_UART_BASE(soc, num)
-
-static inline void debug_ll_init(void)
-{
- /* already configured */
-}
-
static inline void PUTC_LL(int c)
{
void __iomem *base = (void *)K3_UART_BASE(K3_DEBUG_SOC,
@@ -49,6 +44,10 @@ static inline void PUTC_LL(int c)
debug_ll_ns16550_putc(base, c);
}
+#else
+static inline void k3_debug_ll_init(void __iomem *base)
+{
+}
#endif
#endif /* __MACH_K3_DEBUG_LL_H__ */
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH master 4/4] memory: correct return value in request_barebox_region stub
2025-04-22 7:55 [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Ahmad Fatoum
2025-04-22 7:55 ` [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046 Ahmad Fatoum
2025-04-22 7:55 ` [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y Ahmad Fatoum
@ 2025-04-22 7:55 ` Ahmad Fatoum
2025-04-22 9:29 ` [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Sascha Hauer
3 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 7:55 UTC (permalink / raw)
To: barebox
From: Ahmad Fatoum <a.fatoum@barebox.org>
request_barebox_region is only meaningful in barebox proper and its PBL
stub returns an error pointer currently. The proper implementation
returns a NULL pointer on error though, so follow suit in the stub.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
include/memory.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/memory.h b/include/memory.h
index 8c330e65c012..09c10b773fac 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -73,7 +73,7 @@ static inline struct resource *request_barebox_region(const char *name,
resource_size_t size)
{
- return ERR_PTR(-ENOSYS);
+ return NULL;
}
#endif
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL
2025-04-22 7:55 [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Ahmad Fatoum
` (2 preceding siblings ...)
2025-04-22 7:55 ` [PATCH master 4/4] memory: correct return value in request_barebox_region stub Ahmad Fatoum
@ 2025-04-22 9:29 ` Sascha Hauer
3 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2025-04-22 9:29 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Tue, 22 Apr 2025 09:55:16 +0200, Ahmad Fatoum wrote:
> With CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_ALL_ZERO,
> the compiler emits calls to memset to initialize variables on the stack.
>
> With kasan enabled, this would end up calling KASAN memset, which can
> lead to access of global variables prior to relocation.
>
> Brace ourselves for this situation by sidestepping KASAN prior to
> relocation.
>
> [...]
Applied, thanks!
[1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL
https://git.pengutronix.de/cgit/barebox/commit/?id=68aba118f469 (link may not be stable)
[2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046
https://git.pengutronix.de/cgit/barebox/commit/?id=7458e41a4c98 (link may not be stable)
[3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y
https://git.pengutronix.de/cgit/barebox/commit/?id=6b749354d11a (link may not be stable)
[4/4] memory: correct return value in request_barebox_region stub
https://git.pengutronix.de/cgit/barebox/commit/?id=1d7b03c94e3c (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046
2025-04-22 7:55 ` [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046 Ahmad Fatoum
@ 2025-04-22 14:14 ` Sascha Hauer
2025-04-22 14:18 ` Ahmad Fatoum
0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2025-04-22 14:14 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, Apr 22, 2025 at 09:55:17AM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <a.fatoum@barebox.org>
>
> Definitions inside icid.c are needed for both LS1046 and LS1028, so make
> sure it's compiled unconditionally.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> ---
> arch/arm/mach-layerscape/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
> index 10e1c031b953..095d3e4eae57 100644
> --- a/arch/arm/mach-layerscape/Makefile
> +++ b/arch/arm/mach-layerscape/Makefile
> @@ -3,7 +3,7 @@
> obj- := __dummy__.o
> lwl-y += errata.o
> lwl-$(CONFIG_ARCH_LS1046) += lowlevel.o lowlevel-ls1046a.o
> -obj-$(CONFIG_ARCH_LS1046) += icid.o
> +obj-y += icid.o
This breaks compilation of layerscape_v7_defconfig. icic.c must not be
compiled for LS1021. I fixed this with the following.
Sascha
-------------------------------8<------------------------------
>From bb416fc27329e04935dc45b76a5e853583272783 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Tue, 22 Apr 2025 16:00:56 +0200
Subject: [PATCH] ARM: Layerscape: fix icid compilation for 32bit layerscape
icid.c has to be compiled for LS1028 and LS1046a, but not for LS1021.
Introduce an extra Kconfig symbol selected from the SoCs that need it.
Fixes: 7458e41a4c98 ("ARM: Layerscape: fix compilation of LS1028 without LS1046")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-layerscape/Kconfig | 5 +++++
arch/arm/mach-layerscape/Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig
index 0f559863ec..c24f948c1d 100644
--- a/arch/arm/mach-layerscape/Kconfig
+++ b/arch/arm/mach-layerscape/Kconfig
@@ -2,18 +2,23 @@
if ARCH_LAYERSCAPE
+config ARCH_LAYERSCAPE_ICID
+ bool
+
config ARCH_LS1028
bool
select CPU_V8
select SYS_SUPPORTS_64BIT_KERNEL
select ARM_ATF
select FIRMWARE_LS1028A_ATF
+ select ARCH_LAYERSCAPE_ICID
config ARCH_LS1046
bool
select CPU_V8
select ARM_ATF
select SYS_SUPPORTS_64BIT_KERNEL
+ select ARCH_LAYERSCAPE_ICID
if 64BIT
diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
index 095d3e4eae..e49701bf18 100644
--- a/arch/arm/mach-layerscape/Makefile
+++ b/arch/arm/mach-layerscape/Makefile
@@ -3,7 +3,7 @@
obj- := __dummy__.o
lwl-y += errata.o
lwl-$(CONFIG_ARCH_LS1046) += lowlevel.o lowlevel-ls1046a.o
-obj-y += icid.o
+obj-$(CONFIG_ARCH_LAYERSCAPE_ICID) += icid.o
obj-pbl-y += boot.o soc.o
pbl-y += xload-qspi.o xload.o
pbl-$(CONFIG_ARCH_LS1028) += tzc400.o
--
2.39.5
--
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] 10+ messages in thread
* Re: [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046
2025-04-22 14:14 ` Sascha Hauer
@ 2025-04-22 14:18 ` Ahmad Fatoum
0 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 14:18 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hello Sascha,
On 4/22/25 16:14, Sascha Hauer wrote:
> On Tue, Apr 22, 2025 at 09:55:17AM +0200, Ahmad Fatoum wrote:
>> From: Ahmad Fatoum <a.fatoum@barebox.org>
>>
>> Definitions inside icid.c are needed for both LS1046 and LS1028, so make
>> sure it's compiled unconditionally.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
>> ---
>> arch/arm/mach-layerscape/Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
>> index 10e1c031b953..095d3e4eae57 100644
>> --- a/arch/arm/mach-layerscape/Makefile
>> +++ b/arch/arm/mach-layerscape/Makefile
>> @@ -3,7 +3,7 @@
>> obj- := __dummy__.o
>> lwl-y += errata.o
>> lwl-$(CONFIG_ARCH_LS1046) += lowlevel.o lowlevel-ls1046a.o
>> -obj-$(CONFIG_ARCH_LS1046) += icid.o
>> +obj-y += icid.o
>
> This breaks compilation of layerscape_v7_defconfig. icic.c must not be
> compiled for LS1021. I fixed this with the following.
Thanks. I briefly thought ls1028 was the 32-bit platform, but of course
that doesn't make sense, because I was compiling for 64-bit when I ran
into the error...
I see now that there are a couple other issues reported by CI.
Should I look into all of them? Just want to ensure that we don't do the
work twice.
Cheers,
Ahmad
>
> Sascha
>
> -------------------------------8<------------------------------
>
> From bb416fc27329e04935dc45b76a5e853583272783 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Tue, 22 Apr 2025 16:00:56 +0200
> Subject: [PATCH] ARM: Layerscape: fix icid compilation for 32bit layerscape
>
> icid.c has to be compiled for LS1028 and LS1046a, but not for LS1021.
> Introduce an extra Kconfig symbol selected from the SoCs that need it.
>
> Fixes: 7458e41a4c98 ("ARM: Layerscape: fix compilation of LS1028 without LS1046")
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/mach-layerscape/Kconfig | 5 +++++
> arch/arm/mach-layerscape/Makefile | 2 +-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig
> index 0f559863ec..c24f948c1d 100644
> --- a/arch/arm/mach-layerscape/Kconfig
> +++ b/arch/arm/mach-layerscape/Kconfig
> @@ -2,18 +2,23 @@
>
> if ARCH_LAYERSCAPE
>
> +config ARCH_LAYERSCAPE_ICID
> + bool
> +
> config ARCH_LS1028
> bool
> select CPU_V8
> select SYS_SUPPORTS_64BIT_KERNEL
> select ARM_ATF
> select FIRMWARE_LS1028A_ATF
> + select ARCH_LAYERSCAPE_ICID
>
> config ARCH_LS1046
> bool
> select CPU_V8
> select ARM_ATF
> select SYS_SUPPORTS_64BIT_KERNEL
> + select ARCH_LAYERSCAPE_ICID
>
> if 64BIT
>
> diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
> index 095d3e4eae..e49701bf18 100644
> --- a/arch/arm/mach-layerscape/Makefile
> +++ b/arch/arm/mach-layerscape/Makefile
> @@ -3,7 +3,7 @@
> obj- := __dummy__.o
> lwl-y += errata.o
> lwl-$(CONFIG_ARCH_LS1046) += lowlevel.o lowlevel-ls1046a.o
> -obj-y += icid.o
> +obj-$(CONFIG_ARCH_LAYERSCAPE_ICID) += icid.o
> obj-pbl-y += boot.o soc.o
> pbl-y += xload-qspi.o xload.o
> pbl-$(CONFIG_ARCH_LS1028) += tzc400.o
--
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] 10+ messages in thread
* Re: [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y
2025-04-22 7:55 ` [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y Ahmad Fatoum
@ 2025-04-22 14:23 ` Sascha Hauer
2025-04-22 14:29 ` Ahmad Fatoum
0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2025-04-22 14:23 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, Apr 22, 2025 at 09:55:18AM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <a.fatoum@barebox.org>
>
> Defining debug_ll_read_reg unconditionally for K3 can clash with other
> debug_ll implementations, so move it into the include guard.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> ---
> include/mach/k3/debug_ll.h | 37 ++++++++++++++++++-------------------
> 1 file changed, 18 insertions(+), 19 deletions(-)
This breaks compilation of multi_v8_defconfig:
arch/arm/boards/beagleplay/lowlevel.c:44:30: error: debug_ll_ns16550_putc' undeclared (first use in this function)
44 | pbl_set_putc((void *)debug_ll_ns16550_putc, (void *)AM62X_UART_UART0_BASE);
debug_ll_ns16550_putc() is used as the pbl putc function. This might
have been wrong from the start, but it is like it is.
Not sure what we should do about it. We would need some ns16550 putc
function that is independent of the debug_ll infrastructure.
Sascha
--
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] 10+ messages in thread
* Re: [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y
2025-04-22 14:23 ` Sascha Hauer
@ 2025-04-22 14:29 ` Ahmad Fatoum
2025-04-22 14:34 ` Sascha Hauer
0 siblings, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 14:29 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hello Sascha,
On 4/22/25 16:23, Sascha Hauer wrote:
> On Tue, Apr 22, 2025 at 09:55:18AM +0200, Ahmad Fatoum wrote:
>> From: Ahmad Fatoum <a.fatoum@barebox.org>
>>
>> Defining debug_ll_read_reg unconditionally for K3 can clash with other
>> debug_ll implementations, so move it into the include guard.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
>> ---
>> include/mach/k3/debug_ll.h | 37 ++++++++++++++++++-------------------
>> 1 file changed, 18 insertions(+), 19 deletions(-)
>
> This breaks compilation of multi_v8_defconfig:
>
> arch/arm/boards/beagleplay/lowlevel.c:44:30: error: debug_ll_ns16550_putc' undeclared (first use in this function)
> 44 | pbl_set_putc((void *)debug_ll_ns16550_putc, (void *)AM62X_UART_UART0_BASE);
>
> debug_ll_ns16550_putc() is used as the pbl putc function. This might
> have been wrong from the start, but it is like it is.
>
> Not sure what we should do about it. We would need some ns16550 putc
> function that is independent of the debug_ll infrastructure.
Meh. This patch was a side product of Mediatek MT8186 support, which
also has a NS16550. Please drop it for now and I'll revisit it later.
Cheers,
Ahmad
>
> Sascha
>
--
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] 10+ messages in thread
* Re: [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y
2025-04-22 14:29 ` Ahmad Fatoum
@ 2025-04-22 14:34 ` Sascha Hauer
0 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2025-04-22 14:34 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, Apr 22, 2025 at 04:29:17PM +0200, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 4/22/25 16:23, Sascha Hauer wrote:
> > On Tue, Apr 22, 2025 at 09:55:18AM +0200, Ahmad Fatoum wrote:
> >> From: Ahmad Fatoum <a.fatoum@barebox.org>
> >>
> >> Defining debug_ll_read_reg unconditionally for K3 can clash with other
> >> debug_ll implementations, so move it into the include guard.
> >>
> >> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> >> ---
> >> include/mach/k3/debug_ll.h | 37 ++++++++++++++++++-------------------
> >> 1 file changed, 18 insertions(+), 19 deletions(-)
> >
> > This breaks compilation of multi_v8_defconfig:
> >
> > arch/arm/boards/beagleplay/lowlevel.c:44:30: error: debug_ll_ns16550_putc' undeclared (first use in this function)
> > 44 | pbl_set_putc((void *)debug_ll_ns16550_putc, (void *)AM62X_UART_UART0_BASE);
> >
> > debug_ll_ns16550_putc() is used as the pbl putc function. This might
> > have been wrong from the start, but it is like it is.
> >
> > Not sure what we should do about it. We would need some ns16550 putc
> > function that is independent of the debug_ll infrastructure.
>
> Meh. This patch was a side product of Mediatek MT8186 support, which
> also has a NS16550. Please drop it for now and I'll revisit it later.
Yes, will do, but we have a problem even with existing code. Right now
we will run into the same issue when building a multi_v8_defconfig with
debug output configured for Layerscape or Rockchip.
Sascha
--
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] 10+ messages in thread
end of thread, other threads:[~2025-04-22 15:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22 7:55 [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Ahmad Fatoum
2025-04-22 7:55 ` [PATCH master 2/4] ARM: Layerscape: fix compilation of LS1028 without LS1046 Ahmad Fatoum
2025-04-22 14:14 ` Sascha Hauer
2025-04-22 14:18 ` Ahmad Fatoum
2025-04-22 7:55 ` [PATCH master 3/4] ARM: k3: define debug_ll_write_reg only on CONFIG_DEBUG_AM62X_UART=y Ahmad Fatoum
2025-04-22 14:23 ` Sascha Hauer
2025-04-22 14:29 ` Ahmad Fatoum
2025-04-22 14:34 ` Sascha Hauer
2025-04-22 7:55 ` [PATCH master 4/4] memory: correct return value in request_barebox_region stub Ahmad Fatoum
2025-04-22 9:29 ` [PATCH master 1/4] KASan: fix possible breakage with CONFIG_INIT_STACK_ALL Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox