fix bug in the routine, which calculates the apic timer frequecy

This commit is contained in:
Stefan Lankes 2011-04-01 00:24:03 -07:00
parent fb215aca47
commit f14c693e10

View file

@ -310,10 +310,10 @@ int apic_calibration(void)
/* wait 3 time slices to determine a ICR */
start = rdtsc();
do {
//flush_pipeline();
flush_pipeline();
end = rdtsc();
ticks = end > start ? end - start : start - end;
} while(ticks < 3*RC_REFCLOCKMHZ / TIMER_FREQ);
} while(ticks*TIMER_FREQ < 3*RC_REFCLOCKMHZ*1000000);
diff = 0xFFFFFFFF - lapic_read(APIC_CCR);