Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Reserved instruction in kernel code
@ 2009-12-02 11:15 Ales Mulej
  2009-12-02 11:15 ` Ales Mulej
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ales Mulej @ 2009-12-02 11:15 UTC (permalink / raw)
  To: linux-mips

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

Hi,

 

I'm porting linux(2.6.31.6) to the Wintegra WINHDP2 refrence board.

As a refrence I already have an old BSP from Wintegra based on kernel
2.6.10.

 

During the kernel start up process I receive following error:

 

Reserved instruction in kernel code[#1]:

Cpu 0

$ 0   : 00000000 1000fc00 802be630 00000001

$ 4   : 802be670 802be674 ffffffff 802f4d4c

$ 8   : 1000fc01 1000001f 00000001 0000002b

$12   : 00000000 000001f5 07a0d380 00000000

$16   : 00000000 00000000 00000000 1000fc00

$20   : 802e9674 bd030f04 3e490000 00000a72

$24   : 00000008 8000167c                  

$28   : 802ba000 802bbd30 ffffffff 802f4d4c

Hi    : 000000fb

Lo    : 00000001

epc   : 801013a0 handle_ri_int+0x18/0x38

    Not tainted

ra    : 802f4d4c __log_buf+0x0/0x20000

Status: 1000fc03    KERNEL EXL IE 

Cause : 50808000

PrId  : 00019365 (MIPS 24Kc)

Modules linked in:

Process swapper (pid: 0, threadinfo=802ba000, task=802bc000,
tls=00000000)

Stack : 1000fc00 1000001f 00000001 0000002b 00000000 000001f5 00000000
1000fc00

        802be630 00000001 802be670 802be674 ffffffff 802f4d4c 1000fc00
1000001f

        00000001 0000002b 00000000 000001f5 07a0d380 00000000 00000000
00000000

        00000000 1000fc00 802e9674 bd030f04 3e490000 00000a72 00000008
8000167c

        802bbe94 802a2954 802ba000 802bbde0 ffffffff 802f4d4c 1000fc02
000000fb

        ...

Call Trace:

[<801013a0>] handle_ri_int+0x18/0x38

 

 

Code: 01094025  3908001e  40886000 <00000040> 00000040  00000040
000000c0  03a02021  3c1f8010 

Disabling lock debugging due to kernel taint

Kernel panic - not syncing: Attempted to kill the idle task!

 

 

Does anybody know where is the problem?

I suspect, that the problem is in my interrupt routine, because I
receive this error as soon as the tick timer start's up.

 

Regards,

Ales

 

 

 


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

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

* Reserved instruction in kernel code
  2009-12-02 11:15 Reserved instruction in kernel code Ales Mulej
@ 2009-12-02 11:15 ` Ales Mulej
  2009-12-02 17:19 ` Ralf Baechle
  2009-12-02 17:45 ` David Daney
  2 siblings, 0 replies; 5+ messages in thread
From: Ales Mulej @ 2009-12-02 11:15 UTC (permalink / raw)
  To: linux-mips

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

Hi,

 

I'm porting linux(2.6.31.6) to the Wintegra WINHDP2 refrence board.

As a refrence I already have an old BSP from Wintegra based on kernel
2.6.10.

 

During the kernel start up process I receive following error:

 

Reserved instruction in kernel code[#1]:

Cpu 0

$ 0   : 00000000 1000fc00 802be630 00000001

$ 4   : 802be670 802be674 ffffffff 802f4d4c

$ 8   : 1000fc01 1000001f 00000001 0000002b

$12   : 00000000 000001f5 07a0d380 00000000

$16   : 00000000 00000000 00000000 1000fc00

$20   : 802e9674 bd030f04 3e490000 00000a72

$24   : 00000008 8000167c                  

$28   : 802ba000 802bbd30 ffffffff 802f4d4c

Hi    : 000000fb

Lo    : 00000001

epc   : 801013a0 handle_ri_int+0x18/0x38

    Not tainted

ra    : 802f4d4c __log_buf+0x0/0x20000

Status: 1000fc03    KERNEL EXL IE 

Cause : 50808000

PrId  : 00019365 (MIPS 24Kc)

Modules linked in:

Process swapper (pid: 0, threadinfo=802ba000, task=802bc000,
tls=00000000)

Stack : 1000fc00 1000001f 00000001 0000002b 00000000 000001f5 00000000
1000fc00

        802be630 00000001 802be670 802be674 ffffffff 802f4d4c 1000fc00
1000001f

        00000001 0000002b 00000000 000001f5 07a0d380 00000000 00000000
00000000

        00000000 1000fc00 802e9674 bd030f04 3e490000 00000a72 00000008
8000167c

        802bbe94 802a2954 802ba000 802bbde0 ffffffff 802f4d4c 1000fc02
000000fb

        ...

Call Trace:

[<801013a0>] handle_ri_int+0x18/0x38

 

 

Code: 01094025  3908001e  40886000 <00000040> 00000040  00000040
000000c0  03a02021  3c1f8010 

Disabling lock debugging due to kernel taint

Kernel panic - not syncing: Attempted to kill the idle task!

 

 

Does anybody know where is the problem?

I suspect, that the problem is in my interrupt routine, because I
receive this error as soon as the tick timer start's up.

 

Regards,

Ales

 

 

 


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

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

* Re: Reserved instruction in kernel code
  2009-12-02 11:15 Reserved instruction in kernel code Ales Mulej
  2009-12-02 11:15 ` Ales Mulej
@ 2009-12-02 17:19 ` Ralf Baechle
  2009-12-02 17:45 ` David Daney
  2 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2009-12-02 17:19 UTC (permalink / raw)
  To: Ales Mulej; +Cc: linux-mips

On Wed, Dec 02, 2009 at 11:15:06AM -0000, Ales Mulej wrote:

> 
> I'm porting linux(2.6.31.6) to the Wintegra WINHDP2 refrence board.
> 
> As a refrence I already have an old BSP from Wintegra based on kernel
> 2.6.10.
> 
>  
> 
> During the kernel start up process I receive following error:
> 
>  
> 
> Reserved instruction in kernel code[#1]:

The CPU is taking an exception because of an instruction it doesn't know.
One reason for this might be an incorrect CPU type setting in the kernel
configuration resulting in the generation of such code.

  Ralf

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

* Re: Reserved instruction in kernel code
  2009-12-02 11:15 Reserved instruction in kernel code Ales Mulej
  2009-12-02 11:15 ` Ales Mulej
  2009-12-02 17:19 ` Ralf Baechle
@ 2009-12-02 17:45 ` David Daney
  2009-12-02 18:52   ` Maciej W. Rozycki
  2 siblings, 1 reply; 5+ messages in thread
From: David Daney @ 2009-12-02 17:45 UTC (permalink / raw)
  To: Ales Mulej; +Cc: linux-mips

Ales Mulej wrote:
> Hi,
> 
>  
> 
> I'm porting linux(2.6.31.6) to the Wintegra WINHDP2 refrence board.
> 
> As a refrence I already have an old BSP from Wintegra based on kernel 
> 2.6.10.
> 
>  
> 
> During the kernel start up process I receive following error:
> 
>  
> 
> Reserved instruction in kernel code[#1]:
> 
> Cpu 0
> 
> $ 0   : 00000000 1000fc00 802be630 00000001
> 
> $ 4   : 802be670 802be674 ffffffff 802f4d4c
> 
> $ 8   : 1000fc01 1000001f 00000001 0000002b
> 
> $12   : 00000000 000001f5 07a0d380 00000000
> 
> $16   : 00000000 00000000 00000000 1000fc00
> 
> $20   : 802e9674 bd030f04 3e490000 00000a72
> 
> $24   : 00000008 8000167c                 
> 
> $28   : 802ba000 802bbd30 ffffffff 802f4d4c
> 
> Hi    : 000000fb
> 
> Lo    : 00000001
> 
> epc   : 801013a0 handle_ri_int+0x18/0x38
> 
>     Not tainted
> 
> ra    : 802f4d4c __log_buf+0x0/0x20000
> 
> Status: 1000fc03    KERNEL EXL IE
> 
> Cause : 50808000
> 
> PrId  : 00019365 (MIPS 24Kc)
> 
> Modules linked in:
> 
> Process swapper (pid: 0, threadinfo=802ba000, task=802bc000, tls=00000000)
> 
> Stack : 1000fc00 1000001f 00000001 0000002b 00000000 000001f5 00000000 
> 1000fc00
> 
>         802be630 00000001 802be670 802be674 ffffffff 802f4d4c 1000fc00 
> 1000001f
> 
>         00000001 0000002b 00000000 000001f5 07a0d380 00000000 00000000 
> 00000000
> 
>         00000000 1000fc00 802e9674 bd030f04 3e490000 00000a72 00000008 
> 8000167c
> 
>         802bbe94 802a2954 802ba000 802bbde0 ffffffff 802f4d4c 1000fc02 
> 000000fb
> 
>         ...
> 
> Call Trace:
> 
> [<801013a0>] handle_ri_int+0x18/0x38
> 
>  
> 
>  
> 
> Code: 01094025  3908001e  40886000 <00000040> 00000040  00000040  

       ...   ssnop ssnop ssnop ...

One would think a 'PrId  : 00019365 (MIPS 24Kc)' would execute those.

The cause value indicates an 'Interrupt' but you are somehow executing 
in handle_ri_int, so it could be that multiple exceptions are messing up 
the OOPS output...



> 
> Disabling lock debugging due to kernel taint
> 
> Kernel panic - not syncing: Attempted to kill the idle task!
> 
>  
> 
>  
> 
> Does anybody know where is the problem?
> 
> I suspect, that the problem is in my interrupt routine, because I 
> receive this error as soon as the tick timer start's up.
> 
>  
> 
> Regards,
> 
> Ales
> 
>  
> 
>  
> 
>  
> 

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

* Re: Reserved instruction in kernel code
  2009-12-02 17:45 ` David Daney
@ 2009-12-02 18:52   ` Maciej W. Rozycki
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2009-12-02 18:52 UTC (permalink / raw)
  To: David Daney; +Cc: Ales Mulej, linux-mips

On Wed, 2 Dec 2009, David Daney wrote:

> > Reserved instruction in kernel code[#1]:
> > 
> > Cpu 0
> > 
> > $ 0   : 00000000 1000fc00 802be630 00000001
> > 
> > $ 4   : 802be670 802be674 ffffffff 802f4d4c
> > 
> > $ 8   : 1000fc01 1000001f 00000001 0000002b
> > 
> > $12   : 00000000 000001f5 07a0d380 00000000
> > 
> > $16   : 00000000 00000000 00000000 1000fc00
> > 
> > $20   : 802e9674 bd030f04 3e490000 00000a72
> > 
> > $24   : 00000008 8000167c                 
> > $28   : 802ba000 802bbd30 ffffffff 802f4d4c
> > 
> > Hi    : 000000fb
> > 
> > Lo    : 00000001
> > 
> > epc   : 801013a0 handle_ri_int+0x18/0x38
> > 
> >     Not tainted
> > 
> > ra    : 802f4d4c __log_buf+0x0/0x20000
> > 
> > Status: 1000fc03    KERNEL EXL IE
> > 
> > Cause : 50808000
> > 
> > PrId  : 00019365 (MIPS 24Kc)
> > 
> > Modules linked in:
> > 
> > Process swapper (pid: 0, threadinfo=802ba000, task=802bc000, tls=00000000)
> > 
> > Stack : 1000fc00 1000001f 00000001 0000002b 00000000 000001f5 00000000
> > 1000fc00
> > 
> >         802be630 00000001 802be670 802be674 ffffffff 802f4d4c 1000fc00
> > 1000001f
> > 
> >         00000001 0000002b 00000000 000001f5 07a0d380 00000000 00000000
> > 00000000
> > 
> >         00000000 1000fc00 802e9674 bd030f04 3e490000 00000a72 00000008
> > 8000167c
> > 
> >         802bbe94 802a2954 802ba000 802bbde0 ffffffff 802f4d4c 1000fc02
> > 000000fb
> > 
> >         ...
> > 
> > Call Trace:
> > 
> > [<801013a0>] handle_ri_int+0x18/0x38
> > 
> >  
> >  
> > Code: 01094025  3908001e  40886000 <00000040> 00000040  00000040  
> 
>       ...   ssnop ssnop ssnop ...
> 
> One would think a 'PrId  : 00019365 (MIPS 24Kc)' would execute those.
> 
> The cause value indicates an 'Interrupt' but you are somehow executing in
> handle_ri_int, so it could be that multiple exceptions are messing up the OOPS
> output...

 Look at the preceding code -- the EXL bit has just been cleared (while 
executing handle_ri_int()) and the interrupt exception has been 
immediately taken, overwriting the EPC and Cause registers with what you 
can see above.  So either the original RI exception happened earlier 
elsewhere, or there is something completely broken somewhere resulting in 
this misleading dump (like stack corruption resulting in a jump to 
handle_ri() or whatever).

 To figure out which is the case I'd suggest running the RI handler with 
interrupts disabled for debugging and see if the correct values from EPC 
and Cause are reported.  If this runs correctly, then obviously the 
causing place of the RI exception has to be fixed, but also the interrupt 
exception handler has to be investigated to see why the values from EPC 
and Cause stored on the stack get corrupted.  Otherwise the new symptoms 
will (hopefully) suggest what to do next.

  Maciej

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

end of thread, other threads:[~2009-12-02 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 11:15 Reserved instruction in kernel code Ales Mulej
2009-12-02 11:15 ` Ales Mulej
2009-12-02 17:19 ` Ralf Baechle
2009-12-02 17:45 ` David Daney
2009-12-02 18:52   ` Maciej W. Rozycki

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