[U-Boot-Users] Re: Why exceptions are enabled before exception vector code is copied

Cedric VINCENT cedric.vincent at gmail.com
Wed Jul 6 11:52:10 CEST 2005

> Feel free to submit a patch.

OK, maybe the next week.

> But what would happen in your case of a Machine Check?  What  do  you
> suggest to recover from that?

When this spurious "Machine Check Exception" occured, the MSR didn't
contain any known causes. Maybe the function "MachineCheckException"
(from cpu/ppc4xx/traps.c)  may be modified with something like this :
      if (debugger_exception_handler && (*debugger_exception_handler)(regs))
+ #if defined(CONFIG_USE_XMD)
+     if( SPURIOUS_MCE == (regs->msr & 0x000F0000) )
+         return;
+ #endif

    printf("Machine check in kernel mode.\n");
    printf("Caused by (from msr): ");
    printf("regs %p ",regs);
    switch( regs->msr & 0x000F0000) {
where CONFIG_USE_XMD is a macro (to use with care !) defined by user
when he uses XMD (during debugging stage)  and SPURIOUS_MCE is the MSR
unknown cause.

This (ugly) stuff makes sense to enable exception after relocation. I
didn't test this, since I disable Machine Check Exception when
debugging my Virtex Board. Maybe it will not work (if this spurious
exception occured more than once). I will try to test next week.


More information about the U-Boot mailing list