Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-03-01 Thread Po-Yu Chuang
Dear Wolfgang, On Fri, Feb 25, 2011 at 4:00 PM, Po-Yu Chuang ratbert.chu...@gmail.com wrote: Dear Wolfgang and Albert, On Fri, Feb 25, 2011 at 3:15 PM, Wolfgang Denk w...@denx.de wrote: Dear Albert ARIBAUD, In message 4d674d85.40...@free.fr you wrote: All this, of course, if Wolfgang

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-03-01 Thread Albert ARIBAUD
Le 01/03/2011 09:31, Po-Yu Chuang a écrit : Dear Wolfgang, On Fri, Feb 25, 2011 at 4:00 PM, Po-Yu Chuangratbert.chu...@gmail.com wrote: Dear Wolfgang and Albert, On Fri, Feb 25, 2011 at 3:15 PM, Wolfgang Denkw...@denx.de wrote: Dear Albert ARIBAUD, In message4d674d85.40...@free.fr

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-03-01 Thread Po-Yu Chuang
Dear Albert, On Tue, Mar 1, 2011 at 8:22 PM, Albert ARIBAUD albert.arib...@free.fr wrote: Le 01/03/2011 09:31, Po-Yu Chuang a écrit : On Fri, Feb 25, 2011 at 4:00 PM, Po-Yu Chuangratbert.chu...@gmail.com  wrote: I tried the following command and it seems work: for f in `find * -type f`; do

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-25 Thread Po-Yu Chuang
Dear Wolfgang and Albert, On Fri, Feb 25, 2011 at 3:15 PM, Wolfgang Denk w...@denx.de wrote: Dear Albert ARIBAUD, In message 4d674d85.40...@free.fr you wrote: All this, of course, if Wolfgang agrees to this suggestion. I fully agree. All right, but please give me some time. I need to

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Albert ARIBAUD
Le 24/02/2011 08:40, Po-Yu Chuang a écrit : Hi Heiko, On Thu, Feb 24, 2011 at 3:33 PM, Heiko Schocherh...@denx.de wrote: Albert ARIBAUD wrote: The bin length is calculated in arch/arm/lib/board.c, but it seems to me not correct ... :-( in board_init_f(): gd-mon_len = _bss_end_ofs;

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 4d6611a7.5050...@free.fr you wrote: In the U-Boot image itself, knowing the image size could be achieved in ARM by using a general _end symbol that would be set after the last image output section, so _end-_start would equal the image size. we have such

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Albert ARIBAUD
Le 24/02/2011 10:39, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4d6611a7.5050...@free.fr you wrote: In the U-Boot image itself, knowing the image size could be achieved in ARM by using a general _end symbol that would be set after the last image output section, so _end-_start

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Po-Yu Chuang
Hi Albert, On Thu, Feb 24, 2011 at 7:58 PM, Albert ARIBAUD albert.arib...@free.fr wrote: Le 24/02/2011 10:39, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4d6611a7.5050...@free.fr  you wrote: In the U-Boot image itself, knowing the image size could be achieved in ARM by using a

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Albert ARIBAUD
Le 24/02/2011 13:58, Po-Yu Chuang a écrit : Hi Albert, On Thu, Feb 24, 2011 at 7:58 PM, Albert ARIBAUDalbert.arib...@free.fr wrote: Le 24/02/2011 10:39, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4d6611a7.5050...@free.fryou wrote: In the U-Boot image itself, knowing

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 4d66596...@free.fr you wrote: Thanks for pointing this out: indeed, _end is actually used as BSS's end, not as the image's end -- I did not find any other use of it. However, not only ARM uses _end: how do we want to handle the change overall? Sounds as

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Albert ARIBAUD
Le 24/02/2011 14:41, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4d66596...@free.fr you wrote: Thanks for pointing this out: indeed, _end is actually used as BSS's end, not as the image's end -- I did not find any other use of it. However, not only ARM uses _end: how do we want

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 4d6680e4.1070...@free.fr you wrote: Do you mean a first commit to turn _end into _bss_end everywhere in U-Boot, then a second commit to reintroduce _end and fix the issue with monitor protection? Or even maybe a single commit for both? We should re-check if

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Albert ARIBAUD
Le 24/02/2011 19:38, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4d6680e4.1070...@free.fr you wrote: Do you mean a first commit to turn _end into _bss_end everywhere in U-Boot, then a second commit to reintroduce _end and fix the issue with monitor protection? Or even maybe a

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 4d66a7cd.9020...@free.fr you wrote: As far as I can tell, arch/powerpc/lib/board.c , arch/avr32/lib/board.c and examples/standalone/stubs.c actually all mean __bss_end, as well as all the start.S files, so this seems to be consistently used at least.

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Po-Yu Chuang
Dear Wolfgang and Albert, On Fri, Feb 25, 2011 at 4:17 AM, Wolfgang Denk w...@denx.de wrote: Dear Albert ARIBAUD, In message 4d66a7cd.9020...@free.fr you wrote: As far as I can tell, arch/powerpc/lib/board.c , arch/avr32/lib/board.c and examples/standalone/stubs.c actually all mean

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Albert ARIBAUD
Hi Po-Yu Chuang, Le 25/02/2011 03:41, Po-Yu Chuang a écrit : Dear Wolfgang and Albert, On Fri, Feb 25, 2011 at 4:17 AM, Wolfgang Denkw...@denx.de wrote: Dear Albert ARIBAUD, In message4d66a7cd.9020...@free.fr you wrote: As far as I can tell, arch/powerpc/lib/board.c ,

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-24 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 4d674d85.40...@free.fr you wrote: All this, of course, if Wolfgang agrees to this suggestion. I fully agree. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194

[U-Boot] ARM: Incorrect ROM protection range?

2011-02-23 Thread Po-Yu Chuang
Hi all, I am using relocation fixed a320evb (arm) u-boot. I noticed something weird about the output of command flinfo. The size of u-boot.bin is 129156 (0x1F884), but the protected range is only 0 ~ 0x1bfff. I guess that it is because u-boot protects _start ~ __bss_start, but there are some

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-23 Thread Albert ARIBAUD
Hi Po-Yu Chuang, Le 24/02/2011 07:06, Po-Yu Chuang a écrit : Hi all, I am using relocation fixed a320evb (arm) u-boot. I noticed something weird about the output of command flinfo. The size of u-boot.bin is 129156 (0x1F884), but the protected range is only 0 ~ 0x1bfff. I guess that it

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-23 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 4d660030@free.fr you wrote: You're right that U-Boot protection should cover the whole of U-Boot, including the relocation tables... True. This was overlooked during all thie relocation rework. ... I *think* protection

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-23 Thread Po-Yu Chuang
Hi Albert, On Thu, Feb 24, 2011 at 2:52 PM, Albert ARIBAUD albert.arib...@free.fr wrote: Hi Po-Yu Chuang, Le 24/02/2011 07:06, Po-Yu Chuang a écrit : That is quite strange. According to arch/arm/cpu/arm920t/u-boot.lds, .rel.dyn and .dynsym sections should be placed before __bss_start.

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-23 Thread Heiko Schocher
Hello Albert, Albert ARIBAUD wrote: Le 24/02/2011 07:06, Po-Yu Chuang a écrit : Hi all, I am using relocation fixed a320evb (arm) u-boot. I noticed something weird about the output of command flinfo. The size of u-boot.bin is 129156 (0x1F884), but the protected range is only 0 ~

Re: [U-Boot] ARM: Incorrect ROM protection range?

2011-02-23 Thread Po-Yu Chuang
Hi Heiko, On Thu, Feb 24, 2011 at 3:33 PM, Heiko Schocher h...@denx.de wrote: Albert ARIBAUD wrote: The bin length is calculated in arch/arm/lib/board.c, but it seems to me not correct ... :-( in board_init_f(): gd-mon_len = _bss_end_ofs; that seems correct to me, but later in