<div dir="ltr">Hi,<br><br>You are right! Sry, about that.<br>I checked both values for regions overlapping with iomem. Both doesn't<br>overlapped(because align) but etext = .; is right.<br>Otherwise (for example in arm) "barebox" region is placed a little bit<br>
in "barebox-data" region.<br><br>I draw a little graphics(some time ago) to demonstrate which variable from<br>which managment structure calc with 'inclusive' or 'exclusive' byte for<br>end-address. I attach them to this mail.<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/14 Sascha Hauer <span dir="ltr"><<a href="mailto:s.hauer@pengutronix.de" target="_blank">s.hauer@pengutronix.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, Jan 13, 2013 at 06:42:21PM +0100, Alexander Aring wrote:<br>
> Add barebox-data section in arm branch to get complete<br>
> barebox regions in sdram regions tree.<br>
><br>
> Signed-off-by: Alexander Aring <<a href="mailto:alex.aring@gmail.com">alex.aring@gmail.com</a>><br>
> ---<br>
>  arch/arm/lib/barebox.lds.S                       | 6 +++++-<br>
>  arch/blackfin/boards/ipe337/barebox.lds.S        | 6 +++++-<br>
>  arch/mips/lib/barebox.lds.S                      | 5 ++++-<br>
>  arch/nios2/cpu/barebox.lds.S                     | 5 +++--<br>
>  arch/ppc/boards/freescale-p2020rdb/barebox.lds.S | 6 ++++--<br>
>  arch/ppc/boards/pcm030/barebox.lds.S             | 5 +++--<br>
>  arch/x86/lib/barebox.lds.S                       | 5 ++++-<br>
>  common/memory.c                                  | 4 ++++<br>
>  include/asm-generic/sections.h                   | 1 +<br>
>  9 files changed, 33 insertions(+), 10 deletions(-)<br>
><br>
> diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S<br>
> index bac1a04..6cad804 100644<br>
> --- a/arch/arm/lib/barebox.lds.S<br>
> +++ b/arch/arm/lib/barebox.lds.S<br>
> @@ -65,7 +65,9 @@ SECTIONS<br>
>               __stop_unwind_tab = .;<br>
>       }<br>
>  #endif<br>
> -     _etext = .;                     /* End of text and rodata section */<br>
> +     _etext = . - 1;                 /* End of text and rodata section */<br>
<br>
</div>Is this correct? In 2/9 you explained that etext points to the next free<br>
memory location rather than to the last byte in the text segment. 2/9<br>
fixes the request_sdram_region call accordingly. Now it is changed to be<br>
the last byte of the text segment?<br>
<div class="im"><br>
> +<br>
> +     _sdata = .;<br>
><br>
>       . = ALIGN(4);<br>
>       .data : { *(.data*) }<br>
> @@ -87,6 +89,8 @@ SECTIONS<br>
>       __usymtab : { BAREBOX_SYMS }<br>
>       __usymtab_end = .;<br>
><br>
> +     _edata = . - 1;<br>
<br>
</div>Should probably also be _edata = .;<br>
<br>
Sascha<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Pengutronix e.K.                           |                             |<br>
Industrial Linux Solutions                 | <a href="http://www.pengutronix.de/" target="_blank">http://www.pengutronix.de/</a>  |<br>
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: <a href="tel:%2B49-5121-206917-0" value="+4951212069170">+49-5121-206917-0</a>    |<br>
Amtsgericht Hildesheim, HRA 2686           | Fax:   <a href="tel:%2B49-5121-206917-5555" value="+4951212069175555">+49-5121-206917-5555</a> |<br>
</font></span></blockquote></div><br></div></div>