aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-01-29 14:15:14 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-02-01 20:42:51 -0500
commit745de855bda3b922babff9781a96dd8dc1898f27 (patch)
treef2ed9fb9e0ce3f8a9150c628c9f183bc19f12c7e /src/util.h
parent9eb210023718c65a1300cb0b768ba478b0a2b211 (diff)
downloadseabios-hppa-745de855bda3b922babff9781a96dd8dc1898f27.zip
seabios-hppa-745de855bda3b922babff9781a96dd8dc1898f27.tar.gz
seabios-hppa-745de855bda3b922babff9781a96dd8dc1898f27.tar.bz2
Add TSC emulation layer for 386/486 CPUs.
Original patch from Rudolf Marek. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/util.h b/src/util.h
index 2c5f7eb..70d3c4c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -50,6 +50,7 @@ static inline void wbinvd(void)
asm volatile("wbinvd": : :"memory");
}
+#define CPUID_TSC (1 << 4)
#define CPUID_MSR (1 << 5)
#define CPUID_APIC (1 << 9)
#define CPUID_MTRR (1 << 12)
@@ -326,9 +327,7 @@ void lpt_setup(void);
// clock.c
#define PIT_TICK_RATE 1193180 // Underlying HZ of PIT
#define PIT_TICK_INTERVAL 65536 // Default interval for 18.2Hz timer
-static inline int check_tsc(u64 end) {
- return (s64)(rdtscll() - end) > 0;
-}
+int check_tsc(u64 end);
void timer_setup(void);
void ndelay(u32 count);
void udelay(u32 count);