aboutsummaryrefslogtreecommitdiffstats
path: root/src/clock.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-12-28 21:37:27 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-12-28 21:37:27 -0500
commit4a754b38ee5f8fa9539e49033063b1854d32ae3e (patch)
tree9ef3bd7318e17dfee2d0d80e608873ce7c4b769e /src/clock.c
parent4d7c37e12ef4ceb6903dd76ee700beb99fbf5f8e (diff)
downloadseabios-4a754b38ee5f8fa9539e49033063b1854d32ae3e.tar.gz
Add linker magic to ensure 16bit variables aren't repeated in 32bit code.
Add VAR16 macro to enable a variable to be available in both 32bit and 16bit code. This reduces the occurrences of "#if MODE16". Also add ASM16 macro to reduce occurrences of "#if MODE16".
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/clock.c b/src/clock.c
index 43b8379a..4590adc7 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -51,10 +51,7 @@
#define PIT_TICK_RATE 1193182 // Underlying HZ of PIT
#define CALIBRATE_COUNT 0x800 // Approx 1.7ms
-extern u32 cpu_khz;
-#if MODE16
-u32 cpu_khz VISIBLE16;
-#endif
+u32 cpu_khz VAR16;
static void
calibrate_tsc()