public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] relocate_code
@ 2003-01-03 16:22 YanMin Qiao
  2003-01-04  2:22 ` Murray Jensen
  0 siblings, 1 reply; 10+ messages in thread
From: YanMin Qiao @ 2003-01-03 16:22 UTC (permalink / raw)
  To: u-boot

<u-boot>/cpu/mpc8xx/start.S

....
....
    .globl    relocate_code
relocate_code:
    mr    r1,  r3        /* Set new stack pointer        */
    mr    r9,  r4        /* Save copy of Global Data pointer    */
    mr    r10, r5        /* Save copy of Destination Address    */
....
    cmplw    cr1,r3,r4
    addi    r0,r5,3
    srwi.    r0,r0,2
    beq    cr1,4f        /* In place copy is not necessary    */
    beq    7f        /* Protect against 0 count        */
    mtctr    r0
    bge    cr1,2f
    ^^^^^^^^^^ why we need to differeciate the two situation, 
addr>CFG_MONITOR_BASE
                         and addr<=CFG_MONITOR_BASE

    la    r8,-4(r4)
    la    r7,-4(r3)
1:    lwzu    r0,4(r8)
    stwu    r0,4(r7)
    bdnz    1b
    b    4f

2:    slwi    r0,r0,2        <<----------------- i think above code will 
be enough for the two        
    add    r8,r4,r0                                      situation
    add    r7,r3,r0
3:    lwzu    r0,-4(r8)
    stwu    r0,-4(r7)
    bdnz    3b
....
....


thnx
best regards

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [U-Boot-Users] PPC405GP - uboot - can't get past stackloop
@ 2003-01-06 15:18 Wolfgang Denk
  2003-01-20 20:12 ` [U-Boot-Users] relocate code Jerry Walden
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2003-01-06 15:18 UTC (permalink / raw)
  To: u-boot

In message <EGEGIJHKDKJGAJMGIDPNCEBDCEAA.jwalden@digitalatlantic.com> you wrote:
> >Be careful! The initial memory is NOT in  RAM!!!  It  used  the  data
> >cache  or OCM - don't know the design of your board. If in doubt, use
> >the data cache.

Actually you must  be  using  the  data  cache  for  initial  data  -
otherwise you would not enter "stackloop" at all.

> So if I read correctly, the OCM for the 405GP is not a function of how the
> board is "wired", but how I set it up programmatically.  However it seems
> that you are indicating that it depends on the design of my board.  Can
> you please help provide clarification.

Sorry for not being clear - for me the design  of  a  board  inclused
hardware  and software issues - for example the memory map, which may
be dictated by hardware (address decoders  etc.),  but  often  is  at
least partially adjustable by software.

Did you verify that your stack space (in data cache) can be read  and
written?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
An Elephant is a mouse with an Operating System.              - Knuth

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [U-Boot-Users] Relocate code
@ 2004-10-04  6:26 raju rediff
  0 siblings, 0 replies; 10+ messages in thread
From: raju rediff @ 2004-10-04  6:26 UTC (permalink / raw)
  To: u-boot

An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041004/db9af5c9/attachment.htm 
-------------- next part --------------
Hi,
  
Can any of you tell what exactly "relocate_code" function does when
a. u-boot code is fused into the prom
b. u-boot code is loaded into RAM using emulator

It will be grateful if you can tell taking sbc board as reference. 

With Best Regards,
Raju

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [U-Boot-Users] Relocate code
@ 2004-10-04  6:52 Holger L. Bille
  0 siblings, 0 replies; 10+ messages in thread
From: Holger L. Bille @ 2004-10-04  6:52 UTC (permalink / raw)
  To: u-boot

Hi Raju

Sending HTML to this list is inconsiderate. Please don't!

> <A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=0 VSPACE=0 HSPACE=0></a>

Sending tracking HTLM is downright rude! Don't do that! Not to this list - don't do it at all!

Holger Bille


-----Original Message-----
From:	u-boot-users-admin at lists.sourceforge.net on behalf of raju rediff
Sent:	Mon 2004-10-04 8:26
To:	u-boot-users at lists.sourceforge.net
Cc:	
Subject:	[U-Boot-Users] Relocate code
Hi,
  
Can any of you tell what exactly "relocate_code" function does when
a. u-boot code is fused into the prom
b. u-boot code is loaded into RAM using emulator

It will be grateful if you can tell taking sbc board as reference. 

With Best Regards,
Raju

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

end of thread, other threads:[~2004-10-04  6:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-03 16:22 [U-Boot-Users] relocate_code YanMin Qiao
2003-01-04  2:22 ` Murray Jensen
2003-01-04  2:45   ` YanMin Qiao
2003-01-04  8:08     ` Wolfgang Denk
2003-01-04 12:50     ` Murray Jensen
2003-01-04 13:28       ` YanMin Qiao
  -- strict thread matches above, loose matches on Subject: below --
2003-01-06 15:18 [U-Boot-Users] PPC405GP - uboot - can't get past stackloop Wolfgang Denk
2003-01-20 20:12 ` [U-Boot-Users] relocate code Jerry Walden
2003-01-20 21:23   ` Wolfgang Denk
2004-10-04  6:26 [U-Boot-Users] Relocate code raju rediff
2004-10-04  6:52 Holger L. Bille

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