41,7 → 41,7 |
signed long long init_tsc; |
signed long long * ptr_init_tsc = &init_tsc; |
|
signed long long init_nsec; //Warp around 292 years !! |
signed long long init_nsec; //Wraparound 292 years |
signed long long * ptr_init_nsec = &init_nsec; |
|
signed long long clk_per_msec; |
164,8 → 164,8 |
outp(0x61, (inp(0x61) & ~0x02) | 0x01); |
|
outp(0x43,0xB0); /* binary, mode 0, LSB/MSB, Ch 2 */ |
outp(0x42,CALIBRATE_LATCH & 0xff); /* LSB of count */ |
outp(0x42,CALIBRATE_LATCH >> 8); /* MSB of count */ |
outp(0x42,0xFF); /* LSB of count */ |
outp(0x42,0xFF); /* MSB of count */ |
|
rdtscll(start); |
outp(0x43,0x00); |
185,6 → 185,28 |
end_8253 = inp(0x42); |
end_8253 |= inp(0x42) << 8; |
|
outp(0x43,0xB0); /* binary, mode 0, LSB/MSB, Ch 2 */ |
outp(0x42,0xFF); /* LSB of count */ |
outp(0x42,0xFF); /* MSB of count */ |
|
rdtscll(start); |
outp(0x43,0x00); |
start_8253 = inp(0x42); |
start_8253 |= inp(0x42) << 8; |
|
do { |
|
outp(0x43,0x00); |
end_8253 = inp(0x42); |
end_8253 |= inp(0x42) << 8; |
|
} while (end_8253 > COUNTER_END); |
|
rdtscll(end); |
outp(0x43,0x00); |
end_8253 = inp(0x42); |
end_8253 |= inp(0x42) << 8; |
|
//Delta TSC |
dtsc = end - start; |
|