Kim, Jeong-Hwan | 2 Apr 2001 05:03
Picon

[Ppcboot-users] Relocation scheme of PPCBoot

Hi,
Would you tell me the relocation scheme of PPCBoot?
In linker script, all sections are allocated to flash (rom) memory and all
sections are copied
to RAM in relocate_code(), right?
What is the use of GOT in relocation ?
Is "board_inir_r()" running on RAM or Flash ?

Kim
Wolfgang Denk | 2 Apr 2001 08:31
Picon
Picon
Favicon

Re: [Ppcboot-users] Relocation scheme of PPCBoot

Hi,

in message <003101c0bb24$45fe14b0$6c879696 <at> LocalHost> you wrote:
>
> Would you tell me the relocation scheme of PPCBoot?

It's simle: everything is copied to the end of RAM.

> In linker script, all sections are allocated to flash (rom) memory and all
> sections are copied
> to RAM in relocate_code(), right?

Right.

> What is the use of GOT in relocation ?

See the ABI and EABI documentation describing register usage and C
linkage conventions are available at:
http://www.esofta.com/softspecs.html

> Is "board_inir_r()" running on RAM or Flash ?

Functions with the name "*_f  ()"  are  running  from  flash  (before
relocation),  such  named  "*_r  ()"  are  running  from  RAM  (after
relocation).

Wolfgang Denk

--

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
(Continue reading)

Wolfgang Denk | 2 Apr 2001 08:31
Picon
Picon
Favicon

Re: [Ppcboot-users] Relocation scheme of PPCBoot

Hi,

in message <003101c0bb24$45fe14b0$6c879696 <at> LocalHost> you wrote:
>
> Would you tell me the relocation scheme of PPCBoot?

It's simle: everything is copied to the end of RAM.

> In linker script, all sections are allocated to flash (rom) memory and all
> sections are copied
> to RAM in relocate_code(), right?

Right.

> What is the use of GOT in relocation ?

See the ABI and EABI documentation describing register usage and C
linkage conventions are available at:
http://www.esofta.com/softspecs.html

> Is "board_inir_r()" running on RAM or Flash ?

Functions with the name "*_f  ()"  are  running  from  flash  (before
relocation),  such  named  "*_r  ()"  are  running  from  RAM  (after
relocation).

Wolfgang Denk

--

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
(Continue reading)

Liu HongXun-a16975 | 2 Apr 2001 09:55

Problems with download files to ppcboot???

Hi, Wolf and all,
I use minicom to download examples/hello_world.srec to target board based on ppc823.
But after give some dump info about the S-Record file, it goes into a long cycle. I can use Ctrl-C to cancel
such downloading process.
The baudrate is set to 9600 bps.
below is the dump info( I set the load-echo to 1 ):

## Ready for S-Record download ...
S013000068656C6C

This is just the header record, not the real content for executive code.
Per your knowledge, what is the problem?
BRs
Rolf Liu 

Wolfgang Denk | 2 Apr 2001 10:12
Picon
Picon
Favicon

Re: Problems with download files to ppcboot???

Hi,

in message <01139FC052A0D411900B00508B9535FC014A8B30 <at> ZCH07EXM04.corp.mot.com> you wrote:
>
> I use minicom to download examples/hello_world.srec to target board based on ppc823.
> But after give some dump info about the S-Record file, it goes into a long cycle. I can use Ctrl-C to cancel
such downloading process.

I have answered the very same questions less than a week ago.

You are expected to search the mailing list archive.

Is there any volunteer for a PPCBoot FAQ ? 

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
Only two things are infinite,  the universe and human stupidity,  and
I'm not sure about the former.                     -- Albert Einstein
Wolfgang Denk | 2 Apr 2001 10:12
Picon
Picon
Favicon

[Ppcboot-users] Re: Problems with download files to ppcboot???

Hi,

in message <01139FC052A0D411900B00508B9535FC014A8B30 <at> ZCH07EXM04.corp.mot.com> you wrote:
>
> I use minicom to download examples/hello_world.srec to target board based on ppc823.
> But after give some dump info about the S-Record file, it goes into a long cycle. I can use Ctrl-C to cancel
such downloading process.

I have answered the very same questions less than a week ago.

You are expected to search the mailing list archive.

Is there any volunteer for a PPCBoot FAQ ? 

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
Only two things are infinite,  the universe and human stupidity,  and
I'm not sure about the former.                     -- Albert Einstein
Subodh Nijsure | 3 Apr 2001 00:16

RE: [Ppcboot-users] Re: Problems with download files to ppcboot?? ?


If there is nobody I will do it.

/Subodh Nijsure

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd <at> denx.de]
> Sent: Monday, April 02, 2001 1:13 AM
> To: Liu HongXun-a16975
> Cc: Ppcboot-users <at> lists. sourceforge. net (E-mail)
> Subject: [Ppcboot-users] Re: Problems with download files to 
> ppcboot???
> 
> 
> Hi,
> 
> in message 
> <01139FC052A0D411900B00508B9535FC014A8B30 <at> ZCH07EXM04.corp.mot.
> com> you wrote:
> >
> > I use minicom to download examples/hello_world.srec to 
> target board based on ppc823.
> > But after give some dump info about the S-Record file, it 
> goes into a long cycle. I can use Ctrl-C to cancel such 
> downloading process.
> 
> I have answered the very same questions less than a week ago.
> 
> You are expected to search the mailing list archive.
> 
(Continue reading)

Kim, Jeong-Hwan | 3 Apr 2001 03:01

[Ppcboot-users] PPCBoot relocation

Hi,
First of all, I'm sorry for my silly questions.

In start.S, board_init_f() is called and after relocation of code,
board_init_r() is called.
I was told that the value of symbol "board_init_f" is in flash area range
and the value of symbol "board_init_r" is
in ram area range. They are called  using "bl".
If they are in same .text section, how can they have address of separate
area?
Aren't both the symbol values set fixed by Linker to absolute addresses when
linked?

I understand the code is copied to end of RAM from Flash.
However, I cannot understand the symbol value is changed after code is
copied to RAM.

Kim.
Kim, Jeong-Hwan | 3 Apr 2001 07:45

[Ppcboot-users] got2

Could anyone explain the operation and purpose of code below for me??

in_ram:

 /*
  * Relocation Function, r14 point to got2+0x8000
  *
         * Adjust got2 pointers, no need to check for 0, this code
         * already puts a few entries in the table.
  */
 li r0,__got2_entries <at> sectoff <at> l
 la r3,GOT(_GOT2_TABLE_)
 lwz r11,GOT(_GOT2_TABLE_)
 mtctr r0
 sub r11,r3,r11
 addi r3,r3,-4
1: lwzu r0,4(r3)
 add r0,r0,r11
 stw r0,0(r3)
 bdnz 1b

 /*
         * Now adjust the fixups and the pointers to the fixups
  * in case we need to move ourselves again.
  */
2: li r0,__fixup_entries <at> sectoff <at> l
 lwz r3,GOT(_FIXUP_TABLE_)
 cmpwi r0,0
 mtctr r0
 addi r3,r3,-4
(Continue reading)

Chris Hallinan | 3 Apr 2001 13:49

RE: [Ppcboot-users] Re: Problems with download files to ppcboot???


...
>
> You are expected to search the mailing list archive.
>
> Is there any volunteer for a PPCBoot FAQ ?
>

Having seen noone jump in and volunteer, I'll give it a go.
I'm just coming up the PPCBoot learning curve, and have many
of the same questions.  That makes me a good candidate!  I
only ask for two things 1) some volunteers to review it
before it is published and 2) a couple weeks for the first
draft!

-Chris Hallinan
DS4.COM, Inc.


Gmane