public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot]  Relocation issue on armv7 targets
@ 2012-06-19 15:36 jagan
  2012-06-19 19:55 ` Tom Rini
  2012-06-20  3:38 ` Aneesh V
  0 siblings, 2 replies; 5+ messages in thread
From: jagan @ 2012-06-19 15:36 UTC (permalink / raw)
  To: u-boot

Hi Albert,

I have observed an issue regarding u-boot relocation, it's working with
_TEXT_BASE address but
for other address in DDR it's not working. Stops at relocation offset.

I was trying this on both QEMU as well as real target.

Here are my findings:
-----------------------------
VExpress# tftp 0x8000 u-boot.bin
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
Using smc911x-0 device
TFTP from server 192.168.0.3; our IP address is 192.168.0.4
Filename 'u-boot.bin'.
Load address: 0x8000
Loading: ##########################
done
Bytes transferred = 128736 (1f6e0 hex)
VExpress# go 0x8000
## Starting application at 0x00008000 ...


U-Boot 2012.04.01-00004-gdd16cc2-dirty (Jun 19 2012 - 20:42:05)

U-Boot code: 60800000 -> 6081C200  BSS: -> 60851C88
monitor len: 00051C88
ramsize: 08000000
TLB table at: 67ff0000
Top of RAM usable for U-Boot at: 67ff0000
Reserving 327k for U-Boot at: 67f9e000
Reserving 144k for malloc() at: 67f7a000
Reserving 44 Bytes for Board Info at: 67f79fd4
Reserving 120 Bytes for Global Data at: 67f79f5c
New Stack Pointer is: 67f79f50
DRAM:  128 MiB
relocation Offset is: 0779e000
qemu: fatal: Trying to execute code outside RAM or ROM at 0x077a6a68

R00=67f79f5c R01=67f9e000 R02=00000000 R03=6081f610
R04=67f9e000 R05=67f79f5c R06=67f9e000 R07=00000002
R08=60000f80 R09=0779e000 R10=6081f610 R11=67f79ad9
R12=60000ff8 R13=67f79f50 R14=077a6a68 R15=077a6a68
PSR=600001d3 -ZC- A svc32
Aborted

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

* [U-Boot] Relocation issue on armv7 targets
  2012-06-19 15:36 [U-Boot] Relocation issue on armv7 targets jagan
@ 2012-06-19 19:55 ` Tom Rini
  2012-06-20  3:38 ` Aneesh V
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2012-06-19 19:55 UTC (permalink / raw)
  To: u-boot

On Tue, Jun 19, 2012 at 09:06:48PM +0530, jagan wrote:

> Hi Albert,
> 
> I have observed an issue regarding u-boot relocation, it's working with
> _TEXT_BASE address but
> for other address in DDR it's not working. Stops at relocation offset.
> 
> I was trying this on both QEMU as well as real target.
> 
> Here are my findings:
> -----------------------------
> VExpress# tftp 0x8000 u-boot.bin
> smc911x: detected LAN9118 controller
> smc911x: phy initialized
> smc911x: MAC 52:54:00:12:34:56
> Using smc911x-0 device
> TFTP from server 192.168.0.3; our IP address is 192.168.0.4
> Filename 'u-boot.bin'.
> Load address: 0x8000
> Loading: ##########################
> done
> Bytes transferred = 128736 (1f6e0 hex)
> VExpress# go 0x8000
> ## Starting application at 0x00008000 ...

Running U-Boot from within U-Boot isn't allowed / supported.

-- 
Tom

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

* [U-Boot] Relocation issue on armv7 targets
  2012-06-19 15:36 [U-Boot] Relocation issue on armv7 targets jagan
  2012-06-19 19:55 ` Tom Rini
@ 2012-06-20  3:38 ` Aneesh V
  2012-06-29 15:46   ` JagannadhaSutradharudu Teki
  1 sibling, 1 reply; 5+ messages in thread
From: Aneesh V @ 2012-06-20  3:38 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

On 06/19/2012 08:36 AM, jagan wrote:
> Hi Albert,
>
> I have observed an issue regarding u-boot relocation, it's working with
> _TEXT_BASE address but
> for other address in DDR it's not working. Stops at relocation offset.

This is not quite clear to me. What's working and what's not working.
Please note that according to the new relocation scheme, u-boot should
start at CONFIG_SYS_TEXT_BASE. u-boot then relocates itself to the
end of available SDRAM. U-Boot will not work if it starts from any
other location.

Contrast this with the earlier scheme where U-boot could start from a
location other than CONFIG_SYS_TEXT_BASE and then it relocates itself
to CONFIG_SYS_TEXT_BASE

The following thread has some discussion on this topic.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/95967/

br,
Aneesh


>
> I was trying this on both QEMU as well as real target.
>
> Here are my findings:
> -----------------------------
> VExpress# tftp 0x8000 u-boot.bin
> smc911x: detected LAN9118 controller
> smc911x: phy initialized
> smc911x: MAC 52:54:00:12:34:56
> Using smc911x-0 device
> TFTP from server 192.168.0.3; our IP address is 192.168.0.4
> Filename 'u-boot.bin'.
> Load address: 0x8000
> Loading: ##########################
> done
> Bytes transferred = 128736 (1f6e0 hex)
> VExpress# go 0x8000
> ## Starting application at 0x00008000 ...
>
>
> U-Boot 2012.04.01-00004-gdd16cc2-dirty (Jun 19 2012 - 20:42:05)
>
> U-Boot code: 60800000 ->  6081C200  BSS: ->  60851C88
> monitor len: 00051C88
> ramsize: 08000000
> TLB table at: 67ff0000
> Top of RAM usable for U-Boot at: 67ff0000
> Reserving 327k for U-Boot at: 67f9e000
> Reserving 144k for malloc() at: 67f7a000
> Reserving 44 Bytes for Board Info at: 67f79fd4
> Reserving 120 Bytes for Global Data at: 67f79f5c
> New Stack Pointer is: 67f79f50
> DRAM:  128 MiB
> relocation Offset is: 0779e000
> qemu: fatal: Trying to execute code outside RAM or ROM at 0x077a6a68
>
> R00=67f79f5c R01=67f9e000 R02=00000000 R03=6081f610
> R04=67f9e000 R05=67f79f5c R06=67f9e000 R07=00000002
> R08=60000f80 R09=0779e000 R10=6081f610 R11=67f79ad9
> R12=60000ff8 R13=67f79f50 R14=077a6a68 R15=077a6a68
> PSR=600001d3 -ZC- A svc32
> Aborted
>
>  From the logs, it's unable to get the exact lr value a/f relocation
> happens, due to
> that board_init_r not been called.
>
> Could you please help me, Do I need to change any TEXT_BASE or liker script
> for this.?
>
> I have analyzed and understood the code and seems to be some wired thing on
> start code.
> I found some hack for this, but does it a valid issue or did I make any
> mistake.
>
> Request for your help.
>
> Regards,
> Jagan.
>
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] Relocation issue on armv7 targets
  2012-06-20  3:38 ` Aneesh V
@ 2012-06-29 15:46   ` JagannadhaSutradharudu Teki
  2012-06-29 19:14     ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: JagannadhaSutradharudu Teki @ 2012-06-29 15:46 UTC (permalink / raw)
  To: u-boot

Does anyone having any idea about this issue. [u-boot
XIP is not working because of this relocation issue]
I have still debugging able to find some solution but needs
some to clarify.

Could you please send your response.

Regards,
Jagan.

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

* [U-Boot] Relocation issue on armv7 targets
  2012-06-29 15:46   ` JagannadhaSutradharudu Teki
@ 2012-06-29 19:14     ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2012-06-29 19:14 UTC (permalink / raw)
  To: u-boot

Dear JagannadhaSutradharudu Teki,

In message <loom.20120629T174245-557@post.gmane.org> you wrote:
> Does anyone having any idea about this issue. [u-boot
> XIP is not working because of this relocation issue]
> I have still debugging able to find some solution but needs
> some to clarify.

Please read http://www.catb.org/~esr/faqs/smart-questions.html
especially section
http://www.catb.org/~esr/faqs/smart-questions.html#beprecise

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You get a wonderful view from the point of no return.
                                    - Terry Pratchett, _Making_Money_

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

end of thread, other threads:[~2012-06-29 19:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 15:36 [U-Boot] Relocation issue on armv7 targets jagan
2012-06-19 19:55 ` Tom Rini
2012-06-20  3:38 ` Aneesh V
2012-06-29 15:46   ` JagannadhaSutradharudu Teki
2012-06-29 19:14     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox