Changeset b077dc4 in rtems


Ignore:
Timestamp:
Jan 18, 2002, 2:14:17 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
6d0a5c0
Parents:
4e91814b
Message:

2002-01-18 Till Straumann <strauman@…>

  • src/powerpc/excep_f.c: This patch addresses the following issues:
    • exception handler needs to enable MSR_FP if the interrupted thread is FP enabled.
    • printk message for MSR fixed and added stacktrace

NOTE: this requires the stacktrace patch to

lib/libbsp/powerpc/shared/vectors/vector_init.c
(#ifdef DDEBUG only, however)

Location:
c/src/librdbg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/librdbg/ChangeLog

    r4e91814b rb077dc4  
     12002-01-18      Till Straumann <strauman@slac.stanford.edu>
     2
     3        * src/powerpc/excep_f.c: This patch addresses the following issues:
     4            - exception handler needs to enable MSR_FP if the interrupted
     5              thread is FP enabled.
     6            - printk message for MSR fixed and added stacktrace
     7
     8        NOTE: this requires the stacktrace patch to
     9        lib/libbsp/powerpc/shared/vectors/vector_init.c
     10        (#ifdef DDEBUG only, however)
     11
    1122001-01-18      Joel Sherrill <joel@OARcorp.com>
    213
  • c/src/librdbg/src/powerpc/excep_f.c

    r4e91814b rb077dc4  
    5656  rtems_status_code status;
    5757  rtems_id continueSemId;
     58
     59  /* T. Straumann, 1/16/2002: we must re-enable the floating point engine
     60   *                          if the interrupted thread is FP. Otherwise,
     61   *                          the semaphore primitives may crash when they
     62   *                          try to save FP context while switching this
     63   *                          thread...
     64   */
     65  if (ctx->EXC_SRR1 & 0x2000) {
     66        register unsigned long msr;
     67        __asm__ __volatile__("mfmsr %0":"=r"(msr));
     68        __asm__ __volatile__("mtmsr %0"::"r"(msr|MSR_FP));
     69  }
    5870
    5971  if ( (justSaveContext) && (ctx->_EXC_number == ASM_SYS_VECTOR) ) {
     
    115127    printk("\t XER = %x\n", ctx->EXC_XER);
    116128    printk("\t LR = %x\n", ctx->EXC_LR);
    117     printk("\t MSR = %x\n", ctx->EXC_MSR);
     129    printk("\t MSR = %x\n", ctx->EXC_SRR1);
    118130#endif
    119131
     
    152164    default:
    153165      DPRINTF((" OTHER EXCEPTION !!!\n"));
     166#ifdef DDEBUG
     167        { extern void BSP_printStackTrace();
     168                BSP_printStackTrace(ctx);
     169        }
     170#endif
    154171      rtems_semaphore_release( wakeupEventSemId );
    155172      break;
Note: See TracChangeset for help on using the changeset viewer.