[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yay! for mvme5500



Peter Dufault wrote:


On Feb 24, 2005, at 12:10 PM, Peter Dufault wrote:



3. I get all my "Hello World" output, but the Motorola "MOTBoot" dramatically complains when it finishes up. I assume this is just my getting started.


It's actually Till Straumann's code in exceptionhandler.c being so dramatic. I think interrupt driven output from "hello world" is being mixed with the output from exceptionhandler.c. A quick check of exceptionhandler.c will show that Till has a flair for drama (e.g., Aieeh, Uhuuuh). Hopefully this isn't indicative of a real problem.

"dramatic" messages are printed if some sort of internal error (as opposed to an application
programming error) is discovered. These messages are indicative of a real problem.


In your case, a DSI exception was raised which by itself should not occur but could
be the result of a programming error (e.g., bogus pointer deref).


However, the system fails to identify the faulting task which is a severe internal error.

I traced it down to a bug in 'exceptionhandler.c' which I had long fixed in my BSP but
apparently the fix wasn't propagated to mvme5500.


Another example of the consequence of the lack of a good API for exception processing
at the libcpu level :-(


The attached patch fixes the bug that lead to the complaint about an 'unknown task'.
You still want to explore why you get the exception in the first place!


If you don't know how to do that you can send me your binary (exactly the
version that printed the register dump -- needs to be the final-link ELF object,
not a pure binary).


HTH
-- T.



------------------------------------------------------------------------

*** HELLO In BSP_exceptionHandler()
Uhuuuh, Exception 3 in unknown task???
        Next PC or Address of fault = 309C, Mvme5500 Saved MSR = B032
        R0  = 00000005 R1  = 1FDFC490 R2  = 00000000 R3  = 00000000
        R4  = 00000000 R5  = 00000000 R6  = 40000082 R7  = 00017220
        R8  = 0000B032 R9  = 00000001 R10 = 0000B032 R11 = 0000017C
        R12 = 000009BC R13 = 00034BB4 R14 = 00000000 R15 = 00000000
        R16 = 00000000 R17 = 00000000 R18 = 00000000 R19 = 00000000
        R20 = 00000000 R21 = 00000000 R22 = 00030000 R23 = 00000001
        R24 = 00000000 R25 = 0002EA2C R26 = 0002E9A4 R27 = 00000001
        R28 = 00000001 R29 = 0002EA28 R30 = 00034B10 R31 = 00000000
        CR  = 20000024
        CTR = 000284F0
        XER = 20000000
        LR  = 0000017C
        DAR = 00000000
Stack Trace:
 IP: 0x0000309C, LR: 0x0000017C
--^ 0x00028500--^ 0x0001E684--^ 0x00003370--^ 0x0001E364--^ 0x0001E2E0
unrecoverable exception!!! task 0A010001 suspended
WORLD TEST ***
Hello World
*** END OF HELLO WORLD TEST ***






------------------------------------------------------------------------



Peter Dufault
HD Associates, Inc.


Index: ../vectors/exceptionhandler.c
===================================================================
RCS file: /afs/slac/g/spear/cvsrep/rtems/bsp/svgm/vectors/exceptionhandler.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -c -r1.9 -r1.10
*** ../vectors/exceptionhandler.c	12 Jul 2003 05:32:22 -0000	1.9
--- ../vectors/exceptionhandler.c	30 Dec 2003 17:45:59 -0000	1.10
***************
*** 1,4 ****
! /* exceptionhandler.c,v 1.9 2003/07/12 05:32:22 till Exp */
  
  /* A slightly improved exception 'default' exception handler for RTEMS / SVGM */
  
--- 1,4 ----
! /* exceptionhandler.c,v 1.10 2003/12/30 17:45:59 till Exp */
  
  /* A slightly improved exception 'default' exception handler for RTEMS / SVGM */
  
***************
*** 57,75 ****
  		fmt="Aieeh, Exception %d in initialization code\n";
  	} else {
  		/* retrieve the notepad which possibly holds an extention pointer */
! 		if (RTEMS_SUCCESSFUL==rtems_task_ident(RTEMS_SELF,RTEMS_LOCAL,&id) &&
  #if 0
  /* Must not use a notepad due to unknown initial value (notepad memory is allocated from the
   * workspace)!
   */
! 		    RTEMS_SUCCESSFUL==rtems_task_get_note(id, BSP_EXCEPTION_NOTEPAD, &note)
  #else
! 			RTEMS_SUCCESSFUL==rtems_task_variable_get(id, (void*)&BSP_exceptionExtension, (void**)&note)
  #endif
  			) {
! 			ext = (BSP_ExceptionExtension)note;
! 			if (ext)
! 				quiet=ext->quiet;
  			if (!quiet) {
  				printk("Task (Id 0x%08x) got ",id);
  			}
--- 57,77 ----
  		fmt="Aieeh, Exception %d in initialization code\n";
  	} else {
  		/* retrieve the notepad which possibly holds an extention pointer */
! 		if (RTEMS_SUCCESSFUL==rtems_task_ident(RTEMS_SELF,RTEMS_LOCAL,&id)) {
! 			if (
  #if 0
  /* Must not use a notepad due to unknown initial value (notepad memory is allocated from the
   * workspace)!
   */
! 		    	RTEMS_SUCCESSFUL==rtems_task_get_note(id, BSP_EXCEPTION_NOTEPAD, &note)
  #else
! 				RTEMS_SUCCESSFUL==rtems_task_variable_get(id, (void*)&BSP_exceptionExtension, (void**)&note)
  #endif
  			) {
! 				ext = (BSP_ExceptionExtension)note;
! 				if (ext)
! 					quiet=ext->quiet;
! 			}
  			if (!quiet) {
  				printk("Task (Id 0x%08x) got ",id);
  			}