All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix SPL_EARLY_BSS applying to normal build
@ 2020-07-19 23:26 Brian Moyer
  2020-07-19 23:26 ` [PATCH 1/1] arm: Add SPL build check to SPL early bss clear Brian Moyer
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Moyer @ 2020-07-19 23:26 UTC (permalink / raw)
  To: u-boot


SPL_CLEAR_BSS is called regardless of build type if
CONFIG_SPL_EARLY_BSS is defined. This seems to break u-boot proper
and doesn't seem like the correct behavior.


Brian Moyer (1):
  arm: Add SPL build check to SPL early bss clear

 arch/arm/lib/crt0.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

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

* [PATCH 1/1] arm: Add SPL build check to SPL early bss clear
  2020-07-19 23:26 [PATCH 0/1] Fix SPL_EARLY_BSS applying to normal build Brian Moyer
@ 2020-07-19 23:26 ` Brian Moyer
  2020-07-24  6:54   ` Brian Moyer
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Moyer @ 2020-07-19 23:26 UTC (permalink / raw)
  To: u-boot

SPL_CLEAR_BSS is called regardless of build type if
CONFIG_SPL_EARLY_BSS is defined. Add a guard for CONFIG_SPL_BUILD
to fix.

Signed-off-by: Brian Moyer <bdm310@gmail.com>
---

 arch/arm/lib/crt0.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index df9dd83e40..fd6c4874f8 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -109,7 +109,7 @@ ENTRY(_main)
 	mov	r9, r0
 	bl	board_init_f_init_reserve
 
-#if defined(CONFIG_SPL_EARLY_BSS)
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_EARLY_BSS)
 	SPL_CLEAR_BSS
 #endif
 
-- 
2.17.1

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

* [PATCH 1/1] arm: Add SPL build check to SPL early bss clear
  2020-07-19 23:26 ` [PATCH 1/1] arm: Add SPL build check to SPL early bss clear Brian Moyer
@ 2020-07-24  6:54   ` Brian Moyer
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Moyer @ 2020-07-24  6:54 UTC (permalink / raw)
  To: u-boot

This felt like a sparsely used feature that I found a bug in and could
easily fix as a first contribution to the project. Through more
testing on my end, it seems that something is not as it appeared at
first glance. Switching branches to build this patch and then back to
my main development branch resulted in the same strange malloc
behavior that I thought I was fixing here, which only resolved after
reverting this patch.

I'd like to understand why SPL_CLEAR_BSS needs to be called in both
SPL and u-boot, if someone better versed in what's going on here can
take the time.

On Sun, Jul 19, 2020 at 4:26 PM Brian Moyer <bdm310@gmail.com> wrote:
>
> SPL_CLEAR_BSS is called regardless of build type if
> CONFIG_SPL_EARLY_BSS is defined. Add a guard for CONFIG_SPL_BUILD
> to fix.
>
> Signed-off-by: Brian Moyer <bdm310@gmail.com>
> ---
>
>  arch/arm/lib/crt0.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
> index df9dd83e40..fd6c4874f8 100644
> --- a/arch/arm/lib/crt0.S
> +++ b/arch/arm/lib/crt0.S
> @@ -109,7 +109,7 @@ ENTRY(_main)
>         mov     r9, r0
>         bl      board_init_f_init_reserve
>
> -#if defined(CONFIG_SPL_EARLY_BSS)
> +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_EARLY_BSS)
>         SPL_CLEAR_BSS
>  #endif
>
> --
> 2.17.1
>

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

end of thread, other threads:[~2020-07-24  6:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 23:26 [PATCH 0/1] Fix SPL_EARLY_BSS applying to normal build Brian Moyer
2020-07-19 23:26 ` [PATCH 1/1] arm: Add SPL build check to SPL early bss clear Brian Moyer
2020-07-24  6:54   ` Brian Moyer

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.