All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] board_f: Show only .text location in display_text_info()
@ 2018-02-01 17:33 Alexey Brodkin
  2018-02-01 19:32 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Brodkin @ 2018-02-01 17:33 UTC (permalink / raw)
  To: u-boot

For some reason we used to print not only location of .text
section [before relocation] but also .bss start and end.

Moreover how that was printed was obviously misleading:
--------------------------------->8---------------------------
U-Boot code: 20001000 -> 30008C00  BSS: -> 3000C58E
--------------------------------->8---------------------------

I would interpret it like this:
  U-Boot's code is situated in memory starting from 0x20001000
  till 0x30008000.. and BTW there's .bss section starting from 0x3000C58E.

Which is wrong. But anyways why bother about .bss here so let's
drop .bss part in that pure debug output.

Note even though this change has logically nothing in common with [1]
they both touch the same function display_text_info() which makes [1]
a prerequisite for this one. Otherwise trivial modifications will be
required in both if they happen to be reordered.

[1] http://patchwork.ozlabs.org/patch/868299/

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 common/board_f.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index de3907cd11fc..cfb4cfc52133 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -124,15 +124,7 @@ static int init_baud_rate(void)
 static int display_text_info(void)
 {
 #if !defined(CONFIG_SANDBOX) && !defined(CONFIG_EFI_APP)
-	ulong bss_start, bss_end, text_base;
-
-	bss_start = (ulong)&__bss_start;
-	bss_end = (ulong)&__bss_end;
-
-	text_base = CONFIG_SYS_TEXT_BASE;
-
-	debug("U-Boot code: %08lX -> %08lX  BSS: -> %08lX\n",
-		text_base, bss_start, bss_end);
+	debug("U-Boot code: %08x\n", CONFIG_SYS_TEXT_BASE);
 #endif
 
 	return 0;
-- 
2.14.3

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

* [U-Boot] [PATCH] board_f: Show only .text location in display_text_info()
  2018-02-01 17:33 [U-Boot] [PATCH] board_f: Show only .text location in display_text_info() Alexey Brodkin
@ 2018-02-01 19:32 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2018-02-01 19:32 UTC (permalink / raw)
  To: u-boot

Hi Alexey,

On 1 February 2018 at 10:33, Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:
>
> For some reason we used to print not only location of .text
> section [before relocation] but also .bss start and end.
>
> Moreover how that was printed was obviously misleading:
> --------------------------------->8---------------------------
> U-Boot code: 20001000 -> 30008C00  BSS: -> 3000C58E
> --------------------------------->8---------------------------
>
> I would interpret it like this:
>   U-Boot's code is situated in memory starting from 0x20001000
>   till 0x30008000.. and BTW there's .bss section starting from 0x3000C58E.
>
> Which is wrong. But anyways why bother about .bss here so let's
> drop .bss part in that pure debug output.
>
> Note even though this change has logically nothing in common with [1]
> they both touch the same function display_text_info() which makes [1]
> a prerequisite for this one. Otherwise trivial modifications will be
> required in both if they happen to be reordered.
>
> [1] http://patchwork.ozlabs.org/patch/868299/
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  common/board_f.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)

I think it is sometimes useful to print BSS. I have had problems with
it overlapping (e.g.) the DT. Can you just fix the output?

Regards,
Simon

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

end of thread, other threads:[~2018-02-01 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-01 17:33 [U-Boot] [PATCH] board_f: Show only .text location in display_text_info() Alexey Brodkin
2018-02-01 19:32 ` Simon Glass

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.