linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* System crash on boot_e500.S
@ 2007-08-14 20:14 mike zheng
  2007-08-14 20:40 ` Jon Loeliger
  0 siblings, 1 reply; 11+ messages in thread
From: mike zheng @ 2007-08-14 20:14 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

 Hi All,

I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have problem in
the head_e500.S. The "mtspr SRR0, r7; mtspr SRR1 r6" does not work for me.
The content of R7 and R6 are not moved to SRR0 and SRR1.  I am using the
tool-chain from Freescale for 2.6 kernel.

Any idea on this issue?

Thanks,

Mike



Code of head_e500.S:


      slwi  r6,r6,5     /* setup new context with other address space */
      bl    1f          /* Find our address */
1:    mflr  r9
      rlwimi      r7,r9,0,20,31
      addi  r7,r7,24
      mtspr SRR0,r7           ........No change in SRR0
      mtspr SRR1,r6           ........No change in SRR1
      rfi                     ........System crash

/* 4. Clear out PIDs & Search info */      l
      li    r6,0
      mtspr SPRN_PID0,r6
      mtspr SPRN_PID1,r6
      mtspr SPRN_PID2,r6
      mtspr SPRN_MAS6,r6

[-- Attachment #2: Type: text/html, Size: 5428 bytes --]

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

* Re: System crash on boot_e500.S
  2007-08-14 20:14 System crash on boot_e500.S mike zheng
@ 2007-08-14 20:40 ` Jon Loeliger
  2007-08-15 13:57   ` mike zheng
  0 siblings, 1 reply; 11+ messages in thread
From: Jon Loeliger @ 2007-08-14 20:40 UTC (permalink / raw)
  To: mike zheng; +Cc: linuxppc-dev@ozlabs.org

On Tue, 2007-08-14 at 15:14, mike zheng wrote:
> Hi All,
>  
> I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have
> problem in the head

Ow, it hurts when I do this!

> _e500.S. The "mtspr SRR0, r7; mtspr SRR1 r6" does not work for me. The
> content of R7 and R6 are not moved to SRR0 and SRR1.  I am using the
> tool-chain from Freescale for 2.6 kernel. 
>  
> Any idea on this issue?

Maybe use current 2.6 code?

jdl

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

* Re: System crash on boot_e500.S
  2007-08-14 20:40 ` Jon Loeliger
@ 2007-08-15 13:57   ` mike zheng
  2007-08-15 16:02     ` Scott Wood
  0 siblings, 1 reply; 11+ messages in thread
From: mike zheng @ 2007-08-15 13:57 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

Did you done similar work before? Current 2.6 code need many other files,  I
have following errors when I try to use the head_e500.S from 2.6 code:


/kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/kernel/.entry.o.d
-nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux-gnuspe/3.4.3/include
-D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,-me500     -c
-o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
arch/ppc/kernel/entry.S: Assembler messages:

entry.S:819: Error: unsupported relocation against CSRR0
entry.S:820: Error: unsupported relocation against CSRR1
entry.S:888: Error: unsupported relocation against MCSRR0
entry.S:889: Error: unsupported relocation against MCSRR1
entry.S:909: Error: unsupported relocation against CSRR0
entry.S:911: Error: unsupported relocation against CSRR1



entry.S

819   mtspr CSRR0, r11
820   mtspr CSRR1, r12





On 8/14/07, Jon Loeliger <jdl@freescale.com> wrote:
>
> On Tue, 2007-08-14 at 15:14, mike zheng wrote:
> > Hi All,
> >
> > I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have
> > problem in the head
>
> Ow, it hurts when I do this!
>
> > _e500.S. The "mtspr SRR0, r7; mtspr SRR1 r6" does not work for me. The
> > content of R7 and R6 are not moved to SRR0 and SRR1.  I am using the
> > tool-chain from Freescale for 2.6 kernel.
> >
> > Any idea on this issue?
>
> Maybe use current 2.6 code?
>
> jdl
>
>
>

[-- Attachment #2: Type: text/html, Size: 2369 bytes --]

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

* Re: System crash on boot_e500.S
  2007-08-15 13:57   ` mike zheng
@ 2007-08-15 16:02     ` Scott Wood
  2007-08-15 16:28       ` Kumar Gala
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Wood @ 2007-08-15 16:02 UTC (permalink / raw)
  To: mike zheng; +Cc: linuxppc-dev@ozlabs.org

On Wed, Aug 15, 2007 at 09:57:59AM -0400, mike zheng wrote:
> Did you done similar work before? Current 2.6 code need many other files,  I
> have following errors when I try to use the head_e500.S from 2.6 code:
> 
> 
> /kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/kernel/.entry.o.d
> -nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
> e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux-gnuspe/3.4.3/include
> -D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,-me500     -c
> -o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
> arch/ppc/kernel/entry.S: Assembler messages:
> 
> entry.S:819: Error: unsupported relocation against CSRR0
> entry.S:820: Error: unsupported relocation against CSRR1
> entry.S:888: Error: unsupported relocation against MCSRR0
> entry.S:889: Error: unsupported relocation against MCSRR1
> entry.S:909: Error: unsupported relocation against CSRR0
> entry.S:911: Error: unsupported relocation against CSRR1

Try arch/powerpc; arch/ppc is deprecated.

-Scott

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

* Re: System crash on boot_e500.S
  2007-08-15 16:02     ` Scott Wood
@ 2007-08-15 16:28       ` Kumar Gala
  2007-08-15 16:30         ` Scott Wood
  2007-08-15 16:41         ` Becky Bruce
  0 siblings, 2 replies; 11+ messages in thread
From: Kumar Gala @ 2007-08-15 16:28 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org


On Aug 15, 2007, at 11:02 AM, Scott Wood wrote:

> On Wed, Aug 15, 2007 at 09:57:59AM -0400, mike zheng wrote:
>> Did you done similar work before? Current 2.6 code need many other  
>> files,  I
>> have following errors when I try to use the head_e500.S from 2.6  
>> code:
>>
>>
>> /kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/ 
>> kernel/.entry.o.d
>> -nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
>> e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux- 
>> gnuspe/3.4.3/include
>> -D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,- 
>> me500     -c
>> -o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
>> arch/ppc/kernel/entry.S: Assembler messages:
>>
>> entry.S:819: Error: unsupported relocation against CSRR0
>> entry.S:820: Error: unsupported relocation against CSRR1
>> entry.S:888: Error: unsupported relocation against MCSRR0
>> entry.S:889: Error: unsupported relocation against MCSRR1
>> entry.S:909: Error: unsupported relocation against CSRR0
>> entry.S:911: Error: unsupported relocation against CSRR1
>
> Try arch/powerpc; arch/ppc is deprecated.

He's trying a 2.4 kernel.

- k

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

* Re: System crash on boot_e500.S
  2007-08-15 16:28       ` Kumar Gala
@ 2007-08-15 16:30         ` Scott Wood
  2007-08-15 16:41         ` Becky Bruce
  1 sibling, 0 replies; 11+ messages in thread
From: Scott Wood @ 2007-08-15 16:30 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org

Kumar Gala wrote:
> 
> On Aug 15, 2007, at 11:02 AM, Scott Wood wrote:
> 
>> On Wed, Aug 15, 2007 at 09:57:59AM -0400, mike zheng wrote:
>>
>>> Did you done similar work before? Current 2.6 code need many other  
>>> files,  I
>>> have following errors when I try to use the head_e500.S from 2.6  code:
>>>
>>>
>>> /kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/ 
>>> kernel/.entry.o.d
>>> -nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
>>> e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux- 
>>> gnuspe/3.4.3/include
>>> -D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,- 
>>> me500     -c
>>> -o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
>>> arch/ppc/kernel/entry.S: Assembler messages:
>>>
>>> entry.S:819: Error: unsupported relocation against CSRR0
>>> entry.S:820: Error: unsupported relocation against CSRR1
>>> entry.S:888: Error: unsupported relocation against MCSRR0
>>> entry.S:889: Error: unsupported relocation against MCSRR1
>>> entry.S:909: Error: unsupported relocation against CSRR0
>>> entry.S:911: Error: unsupported relocation against CSRR1
>>
>>
>> Try arch/powerpc; arch/ppc is deprecated.
> 
> 
> He's trying a 2.4 kernel.

Sorry, I read the above as "I tried 2.6 and head_e500.S gave me these 
errors", not "I copied head_e500.S from 2.6 and for some reason expected 
it to work".

-Scott

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

* Re: System crash on boot_e500.S
  2007-08-15 16:28       ` Kumar Gala
  2007-08-15 16:30         ` Scott Wood
@ 2007-08-15 16:41         ` Becky Bruce
  2007-08-15 20:53           ` mike zheng
  1 sibling, 1 reply; 11+ messages in thread
From: Becky Bruce @ 2007-08-15 16:41 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org


On Aug 15, 2007, at 11:28 AM, Kumar Gala wrote:

>
> On Aug 15, 2007, at 11:02 AM, Scott Wood wrote:
>
>> On Wed, Aug 15, 2007 at 09:57:59AM -0400, mike zheng wrote:
>>> Did you done similar work before? Current 2.6 code need many other
>>> files,  I
>>> have following errors when I try to use the head_e500.S from 2.6
>>> code:
>>>
>>>
>>> /kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/
>>> kernel/.entry.o.d
>>> -nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
>>> e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux-
>>> gnuspe/3.4.3/include
>>> -D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,-
>>> me500     -c
>>> -o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
>>> arch/ppc/kernel/entry.S: Assembler messages:
>>>
>>> entry.S:819: Error: unsupported relocation against CSRR0
>>> entry.S:820: Error: unsupported relocation against CSRR1
>>> entry.S:888: Error: unsupported relocation against MCSRR0
>>> entry.S:889: Error: unsupported relocation against MCSRR1
>>> entry.S:909: Error: unsupported relocation against CSRR0
>>> entry.S:911: Error: unsupported relocation against CSRR1
>>
>> Try arch/powerpc; arch/ppc is deprecated.
>
> He's trying a 2.4 kernel.

I think maybe he misunderstood Jon's advive to "use 2.6" as using  
just some files from 2.6.  I think the above is probably some strange  
mix of 2.4 and 2.6, which, of course, won't work.

Jon's real advice was "use 2.6", as in, the whole thing.

-B

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

* Re: System crash on boot_e500.S
  2007-08-15 16:41         ` Becky Bruce
@ 2007-08-15 20:53           ` mike zheng
  2007-08-15 20:57             ` Scott Wood
  0 siblings, 1 reply; 11+ messages in thread
From: mike zheng @ 2007-08-15 20:53 UTC (permalink / raw)
  To: Becky Bruce; +Cc: linuxppc-dev@ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 2434 bytes --]

Unfortunately, all the applications are running on 2.4 kernel. I can not
just throw the 2.4 kernel. I took the some core specific code from
ppc.bkbits.net, such as head_e500.S and mpc85xx_cds_common.c. I assume the
image should work on the 8548 CDS board, or at least for the bootup. I shall
able to have the serial port working in platform_init(). However , the
code stops in the head_e500.S. This does not make any sense. Please correct
me if I am wrong.

BTW, I am using the tool-chain gcc-3_4-e5000glibc-2.3.4-dp, which is from
Freescale for the 8548 CDS BSP of 2.6 kernel.

Any suggest or comment is welcome, I am struggling with this issue for
almost one week...... :-(


On 8/15/07, Becky Bruce <becky.bruce@freescale.com> wrote:
>
>
> On Aug 15, 2007, at 11:28 AM, Kumar Gala wrote:
>
> >
> > On Aug 15, 2007, at 11:02 AM, Scott Wood wrote:
> >
> >> On Wed, Aug 15, 2007 at 09:57:59AM -0400, mike zheng wrote:
> >>> Did you done similar work before? Current 2.6 code need many other
> >>> files,  I
> >>> have following errors when I try to use the head_e500.S from 2.6
> >>> code:
> >>>
> >>>
> >>> /kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/
> >>> kernel/.entry.o.d
> >>> -nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
> >>> e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux-
> >>> gnuspe/3.4.3/include
> >>> -D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,-
> >>> me500     -c
> >>> -o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
> >>> arch/ppc/kernel/entry.S: Assembler messages:
> >>>
> >>> entry.S:819: Error: unsupported relocation against CSRR0
> >>> entry.S:820: Error: unsupported relocation against CSRR1
> >>> entry.S:888: Error: unsupported relocation against MCSRR0
> >>> entry.S:889: Error: unsupported relocation against MCSRR1
> >>> entry.S:909: Error: unsupported relocation against CSRR0
> >>> entry.S:911: Error: unsupported relocation against CSRR1
> >>
> >> Try arch/powerpc; arch/ppc is deprecated.
> >
> > He's trying a 2.4 kernel.
>
> I think maybe he misunderstood Jon's advive to "use 2.6" as using
> just some files from 2.6.  I think the above is probably some strange
> mix of 2.4 and 2.6, which, of course, won't work.
>
> Jon's real advice was "use 2.6", as in, the whole thing.
>
> -B
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>

[-- Attachment #2: Type: text/html, Size: 3310 bytes --]

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

* Re: System crash on boot_e500.S
  2007-08-15 20:53           ` mike zheng
@ 2007-08-15 20:57             ` Scott Wood
  2007-08-15 21:23               ` mike zheng
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Wood @ 2007-08-15 20:57 UTC (permalink / raw)
  To: mike zheng; +Cc: linuxppc-dev@ozlabs.org

mike zheng wrote:
> Unfortunately, all the applications are running on 2.4 kernel. I can not
> just throw the 2.4 kernel.

And in what way does 2.6 break these applications?

> I took the some core specific code from
> ppc.bkbits.net, such as head_e500.S and mpc85xx_cds_common.c. I assume the
> image should work on the 8548 CDS board, or at least for the bootup. I shall
> able to have the serial port working in platform_init(). However , the
> code stops in the head_e500.S. This does not make any sense. Please correct
> me if I am wrong.

Of course it makes sense -- you can't just go around ripping random 
files from a codebase, sticking them in a version from several years 
earlier, and expecting it to "just work".

> Any suggest or comment is welcome, I am struggling with this issue for
> almost one week...... :-(

How long would you have struggled with getting your applications running 
on a more recent kernel instead?

-Scott

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

* Re: System crash on boot_e500.S
  2007-08-15 20:57             ` Scott Wood
@ 2007-08-15 21:23               ` mike zheng
  2007-08-16  7:15                 ` Geert Uytterhoeven
  0 siblings, 1 reply; 11+ messages in thread
From: mike zheng @ 2007-08-15 21:23 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]

On 8/15/07, Scott Wood <scottwood@freescale.com> wrote:
>
> mike zheng wrote:
> > Unfortunately, all the applications are running on 2.4 kernel. I can not
> > just throw the 2.4 kernel.
>
> And in what way does 2.6 break these applications?


All the device drivers are based on 2.4 kernel. We plan to upgrade to 2.6 in
the middle of next year.

> I took the some core specific code from
> > ppc.bkbits.net, such as head_e500.S and mpc85xx_cds_common.c. I assume
> the
> > image should work on the 8548 CDS board, or at least for the bootup. I
> shall
> > able to have the serial port working in platform_init(). However , the
> > code stops in the head_e500.S. This does not make any sense. Please
> correct
> > me if I am wrong.
>
> Of course it makes sense -- you can't just go around ripping random
> files from a codebase, sticking them in a version from several years
> earlier, and expecting it to "just work".


All those files are e500 core specific. When we use bootm from Uboot to
start the kernel, head_e500.S is first file being called, and then the
mpc85xx_cds_common.c. I also merged some BOOKE related include files into
our source tree as well.

Our 2.4 kernel version is different from ppc.bkbits.net. I did not expect it
"just work". However the serial console should come out when platform_init()
called. Everything before that is the same for any processor with e500 core.




> Any suggest or comment is welcome, I am struggling with this issue for
> > almost one week...... :-(
>
> How long would you have struggled with getting your applications running
> on a more recent kernel instead?


Don't know, maybe 16 weeks. That is out of my control. I only deal with the
kernel.....:-)

-Scott
>

[-- Attachment #2: Type: text/html, Size: 2666 bytes --]

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

* Re: System crash on boot_e500.S
  2007-08-15 21:23               ` mike zheng
@ 2007-08-16  7:15                 ` Geert Uytterhoeven
  0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2007-08-16  7:15 UTC (permalink / raw)
  To: mike zheng; +Cc: linuxppc-dev@ozlabs.org

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1496 bytes --]

On Wed, 15 Aug 2007, mike zheng wrote:
> On 8/15/07, Scott Wood <scottwood@freescale.com> wrote:
> > mike zheng wrote:
> > > Unfortunately, all the applications are running on 2.4 kernel. I can not
> > > just throw the 2.4 kernel.
> >
> > And in what way does 2.6 break these applications?
> 
> All the device drivers are based on 2.4 kernel. We plan to upgrade to 2.6 in
                             ^^^^^^^^
derived from?

> the middle of next year.

> > Any suggest or comment is welcome, I am struggling with this issue for
> > > almost one week...... :-(
> >
> > How long would you have struggled with getting your applications running
> > on a more recent kernel instead?
> 
> 
> Don't know, maybe 16 weeks. That is out of my control. I only deal with the
> kernel.....:-)

Ah, good, so the device drivers are in user space.
What in user space has changed completely between 2.4 and 2.6?

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

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

end of thread, other threads:[~2007-08-16  7:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-14 20:14 System crash on boot_e500.S mike zheng
2007-08-14 20:40 ` Jon Loeliger
2007-08-15 13:57   ` mike zheng
2007-08-15 16:02     ` Scott Wood
2007-08-15 16:28       ` Kumar Gala
2007-08-15 16:30         ` Scott Wood
2007-08-15 16:41         ` Becky Bruce
2007-08-15 20:53           ` mike zheng
2007-08-15 20:57             ` Scott Wood
2007-08-15 21:23               ` mike zheng
2007-08-16  7:15                 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).