* [U-Boot] [U-boot] monitor length question
@ 2013-07-03 3:19 TigerLiu at viatech.com.cn
2013-07-05 21:14 ` Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-03 3:19 UTC (permalink / raw)
To: u-boot
Hi, experts:
I am studying u-boot latest code now.
I have a question about monitor length.
1. in board_init_f() function in arch\arm\lib\board.c
Gd->mon_len = _bss_end_ofs;
2. in board_init_r() function in arch\arm\lib\board.c
??Monitor_flash_len = _end_ofs;
Because _end_ofs < _bss_end_ofs, so it confused me!
Why need to discard some data when re-calculating monitor_in board_init_r() function.
Best wishes,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [U-boot] monitor length question
@ 2013-07-03 8:50 TigerLiu at viatech.com.cn
0 siblings, 0 replies; 3+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-03 8:50 UTC (permalink / raw)
To: u-boot
Hi, experts:
I am studying u-boot latest code now.
I have a question about monitor length.
1. in board_init_f() function in arch\arm\lib\board.c
Gd->mon_len = _bss_end_ofs;
2. in board_init_r() function in arch\arm\lib\board.c
??Monitor_flash_len = _end_ofs;
Because _end_ofs < _bss_end_ofs, so it confused me!
Why need to discard some data when re-calculating monitor_in board_init_r() function.
Best wishes,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [U-boot] monitor length question
2013-07-03 3:19 [U-Boot] [U-boot] monitor length question TigerLiu at viatech.com.cn
@ 2013-07-05 21:14 ` Albert ARIBAUD
0 siblings, 0 replies; 3+ messages in thread
From: Albert ARIBAUD @ 2013-07-05 21:14 UTC (permalink / raw)
To: u-boot
Hi TigerLiu at viatech.com.cn,
On Wed, 3 Jul 2013 11:19:13 +0800, <TigerLiu@viatech.com.cn> wrote:
> Hi, experts:
> I am studying u-boot latest code now.
> I have a question about monitor length.
> 1. in board_init_f() function in arch\arm\lib\board.c
> Gd->mon_len = _bss_end_ofs;
> 2. in board_init_r() function in arch\arm\lib\board.c
> ??Monitor_flash_len = _end_ofs;
>
> Because _end_ofs < _bss_end_ofs, so it confused me!
> Why need to discard some data when re-calculating monitor_in board_init_r() function.
Both functions don't compute the same thing.
GD->mon_len computes the monitor length including BSS, because it is
the length in RAM at run time, which matters e.g. for relocating the
monitor -- relocation copies the text and data but not the BSS.
Monitor_flash_len, as the name implies, computes the monitor length
excluding BSS, because this is the length in FLASH, and BSS does not
exist in the flashed image; even if we know its size at build time,
BSS will only exist after relocation, just before entering board_init_r.
> Best wishes,
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-05 21:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 3:19 [U-Boot] [U-boot] monitor length question TigerLiu at viatech.com.cn
2013-07-05 21:14 ` Albert ARIBAUD
-- strict thread matches above, loose matches on Subject: below --
2013-07-03 8:50 TigerLiu at viatech.com.cn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox