Unexpected trap(0 x4) ... fp disabled

Jiri Gaisler jiri at gaisler.com
Wed Jun 23 22:20:42 UTC 2010


The trace shows a normal exit by trapping to a system call
(ta 0) with %g1 = 1. This is how SPARC/RTEMS programs normally
exits:

>     4290658  4006d2ac  mov  1, %g1                 [00000001]
>     4290659  4006d2b0  ta  0x0                     [trapped]  <= sys call
>     4290665  40000800  mov  %psr, %l0              [f3400fc6]
>     4290666  40000804  sethi  %hi(0x4006fc00), %l4 [4006fc00]
>     4290667  40000808  jmp  %l4 + 0x2e4            [40000808]
>     4290668  4000080c  mov  128, %l3               [00000080]
>     4290671  4006fee4  cmp  %g1, 2                 [ffffffff]
>     4290691  4006fee8  bne  0x4006fefc             [00000000]
>     4290692  4006feec  or  %l0, 0xf00, %l4         [f3400fc6]
>     4290693  4006fefc  cmp  %g1, 3                 [fffffffe]
>     4290706  4006ff00  bne  0x4006ff18             [00000000]
>     4290707  4006ff04  and  %i0, 0xf00, %l4        [00000900]
>     4290714  4006ff18  ta  0x0                     [trapped]  <= HALT


Did you get the FPU exception message on the screen
during this run too? If so, put a breakpoint on 0x40000040
which is where the FPU-disabled trap handler lives. If the
breakpoint is hit, then post the instruction trace from that
location.

> grlib> stack
> stack pointer: 0x4ffffff0
>  
> I didn’t see a way to check the stack size to see if it had been overrun.

The grmon stack pointer just indicates how much memory grmon thinks
your system has. In RTEMS, each task has an allocated stack, typically
4 - 8 Kbyte. This applies also for the INIT task, in which context
you are probably executing. If your autocode uses more (most likely),
then you must allocate more stack when the task is created. RTEMS is
not unix where an infinite amount of stack can be added automatically ... :-)

Refer to the RTEMS docs or to this forum on how to define stack space
in RTEMS...

Jiri.

>  
>  
> Michael T. Gardner
> Sandia National Labs
> mtgardn at sandia.gov
> 505-844-1299
>  
>  
>  
> 
> 
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users



More information about the users mailing list