603e Clock Issue -- Decrementer Problem

Joel Sherrill joel.sherrill at OARcorp.com
Fri Sep 19 16:46:14 UTC 2008


Jennifer has been fighting this for a few days and
we don't see it.  She is testing the score603e BSP
on the head and it appears that something strange
is going on with the decrementer.  We have no more
ideas and would appreciate some new insights. The
following is Jennifer's description.

I'm debugging the score603e bsp off the head of the tree and can't seem to
get the decrementer to set.  I modified clockOn as indicated below. I 
have tried
several modifications to the PPC_Get_decrementer and PPC_Set_decrementer 
looked at the assembly and I can't see whats wrong.  Any help would be 

void clockOn(void* unused)
  rtems_interrupt_level l;
  volatile uint32_t decValue;
  uint32_t msr_value;

   _CPU_MSR_GET( msr_value );
  printk("MSR: 0x%x\n", msr_value );
  PPC_Get_decrementer( decValue );
  printk("clockOn: Decrementer at 0x%x\n", decValue );
  PPC_Set_decrementer( Clock_Decrementer_value );
  printk("clockOn: Setting decrementer to 0x%x\n", 
Clock_Decrementer_value );
  PPC_Get_decrementer( decValue );
  printk("clockOn: Decrementer at 0x%x\n", decValue );

  if ( ppc_cpu_is_bookE() ) {


My Output looks like the following:

bsp_start (Top): Decrementer at 0xFFD4DAA1
bsp_start: Zero out lots of memory
Cpu: 0x7 Revision: 4609
Cpu MPC603ev
MSR: 0x2030
clockOn: Decrementer at 0xFFE5C5B7
clockOn: Setting decrementer to 0xA1220
clockOn: Decrementer at 0xFFFEF1AA

<<=== JOEL HERE: notice that the value read indicates that the set never
   occurred.  We have both looked at the assembly and don't see how this
   could happen.  There is a mtdec between the two prints. 

Below is the compilation options on  the file:


powerpc-rtems4.9-gcc --pipe -B../../../../.././lib/ 
-B../../../../.././score603e/lib/ -specs bsp_specs -qrtems 
-DPACKAGE_BUGREPORT=\"http://www.rtems.org/bugzilla\" -I. 
-isystem ../../../../.././score603e/lib/include -Wall 
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs 
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions -MT 
mpc6xx/clock/mpc6xx_clock_rel-c_clock.o -MD -MP -MF 
mpc6xx/clock/.deps/mpc6xx_clock_rel-c_clock.Tpo -c -o 
mpc6xx/clock/mpc6xx_clock_rel-c_clock.o `test -f 
'mpc6xx/clock/c_clock.c' || echo 


Thanks. (from joel and jennifer)

Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list