pcc = rpcc(nil) & 0xFFFFFFFF;
if(m->cpuhz == 0){
/*
* pcclast is needed to detect wraparound of
* the cycle timer which is only 32-bits.
* m->cpuhz is set from the info passed from
* the firmware.
* This could be in clockinit if can
* guarantee no wraparound between then and now.
*
* All the clock stuff needs work.
*/
m->cpuhz = hwrpb->cfreq;
m->pcclast = pcc;
}
delta = pcc - m->pcclast;
if(delta < 0)
delta += 0x100000000LL;
m->pcclast = pcc;
m->fastclock += delta;
return MACHP(0)->fastclock;
}
uvlong
fastticks(uvlong* hz)
{
uvlong ticks;
int x;