2008-07-06 23:13:36     After relocating into to RAM ,how u-boot begin executing instruction from ram?

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2008-07-06 23:13:36     After relocating into to RAM ,how u-boot begin executing instruction from ram?

david zheng (CHINA)

Message: 58392   

 

 

 

Before the following code , blackfin dsp executes instruction from flash, but  after relocating into to RAM , how u-boot begin executing instruction from ram?

 

 

 

/* relocate into to RAM */

call get_pc;

offset:

r2.l = offset;

r2.h = offset;

r3.l = start;

r3.h = start;

r1 = r2 - r3;

 

r0 = r0 - r1;

p1 = r0;

 

p2.l = (CFG_MONITOR_BASE & 0xffff);

p2.h = (CFG_MONITOR_BASE >> 16);

 

p3 = 0x04;

p4.l = ((CFG_MONITOR_BASE + CFG_MONITOR_LEN) & 0xffff);

p4.h = ((CFG_MONITOR_BASE + CFG_MONITOR_LEN) >> 16);

loop1:

r1 = [p1 ++ p3];

[p2 ++ p3] = r1;

cc=p2==p4;

if !cc jump loop1;

QuoteReplyEditDelete

 

 

2008-07-14 22:02:15     Re: After relocating into to RAM ,how u-boot begin executing instruction from ram?

Mike Frysinger (UNITED STATES)

Message: 58776   

 

that only copies from flash to ram, it does not also jump to ram.  see the very end of the start function where u-boot lowers itself to ivg 15.

 

QuoteReplyEditDelete

 

 

2009-02-09 00:36:59     Re: After relocating into to RAM ,how u-boot begin executing instruction from ram?

yanjun sun (UNITED STATES)

Message: 69054   

 

Hi, Mike Frysinger

 

Can you tell me the address of _real_start?

 

Is _real_start is located in the SDRAM? How to caculate it? 

 

/* To keep ourselves in the supervisor mode */

p0.l = (EVT_IVG15_ADDR & 0xFFFF);

p0.h = (EVT_IVG15_ADDR >> 16);

 

p1.l = _real_start;

p1.h = _real_start;

[p0] = p1;

 

p0.l = (IMASK & 0xFFFF);

p0.h = (IMASK >> 16);

r0 = IVG15_POS;

[p0] = r0;

raise 15;

p0.l = WAIT_HERE;

p0.h = WAIT_HERE;

reti = p0;

rti;

 

WAIT_HERE:

jump WAIT_HERE;

 

.global _real_start;

_real_start:

[ -- sp ] = reti;

 

QuoteReplyEditDelete

 

 

2009-02-09 02:46:10     Re: After relocating into to RAM ,how u-boot begin executing instruction from ram?

Robin Getz (UNITED STATES)

Message: 69059   

 

Yanjun:

 

_real_start is a label which the linker resolves -

 

.global _real_start;

_real_start:

 

Mike isn't going to be able to tell you since there isn't anyway for him to know what the exact address will be in your build.

 

Also - what version of code are you looking at - that has pretty much been tossed/re-written in newer versions of U-Boot.

 

-Robin

QuoteReplyEditDelete

 

 

2009-02-09 03:21:28     Re: After relocating into to RAM ,how u-boot begin executing instruction from ram?

yanjun sun (UNITED STATES)

Message: 69062   

 

Hi, Robin

 

I want to know why the _real_start address is in the SDRAM?

 

I can not find the _real_start lable in the u-boot.lds.

 

Can you tell me the detail?

 

My uboot version is 1.1.3.

 

In the attachment, there are start.S and u-boot.lds.

 

start.S

u-boot.lds

QuoteReplyEditDelete

 

 

2009-02-09 07:49:26     Re: After relocating into to RAM ,how u-boot begin executing instruction from ram?

Robin Getz (UNITED STATES)

Message: 69121   

 

Yanjun:

 

I have the files -- it is not a matter of me not being able to understand how things work -- it is a matter of that old of a version is not supported.

 

Maybe you could describe the problem you are having/trying to solve - and we could point you in the right direction. Descriping how something that is obsolete works is pointless.

 

-Robin

Attachments

Outcomes