powerpc mvme5500 clock off by factor of 150
Peter Dufault
dufault at hda.com
Tue Mar 8 12:07:35 UTC 2005
Can someone explain the code in many powerpc irq.c's for
BSP_DECREMENTER?
We see:
if (excNum == ASM_DEC_VECTOR) {
_CPU_MSR_GET(msr);
new_msr = msr | MSR_EE;
_CPU_MSR_SET(new_msr);
rtems_hdl_tbl[BSP_DECREMENTER].hdl();
_CPU_MSR_SET(msr);
return;
}
It looks to me as if we save the exception enable state, enable
exceptions, call the handler, and then restore the exception state.
What's the logic here? If exceptions are disabled, we enable them, the
exception fires, we re-enter, call the handler once with exceptions
enabled, return, call the handler a second time with exceptions still
enabled, then disable exceptions? If exceptions are already enabled we
call it once, and saving/restoring exception state is probably a NOP.
I don't follow the logic, it at least needs a comment.
Peter
Peter Dufault
HD Associates, Inc.
More information about the users
mailing list