From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-boot] monitor length question
Date: Fri, 5 Jul 2013 23:14:25 +0200 [thread overview]
Message-ID: <20130705231425.1c87f29a@lilith> (raw)
In-Reply-To: <FE7ADED5C2218B4786C09CD97DC4C49F94056F@exchbj02.viatech.com.bj>
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.
next prev parent reply other threads:[~2013-07-05 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 3:19 [U-Boot] [U-boot] monitor length question TigerLiu at viatech.com.cn
2013-07-05 21:14 ` Albert ARIBAUD [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-03 8:50 TigerLiu at viatech.com.cn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130705231425.1c87f29a@lilith \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.