diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-09-02 17:44:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-09-02 17:44:32 -0700 |
commit | 75d4dec2f651c9f25fa95d6b6960db7c4dcfd7a0 (patch) | |
tree | 1fc477d5f43577a31eaaff7c5a17f719c4e69e1d /core/init.inc | |
parent | 94a6e382a7a253fdab67a3bff981844dd5f6d4cb (diff) | |
download | syslinux-75d4dec2f651c9f25fa95d6b6960db7c4dcfd7a0.tar.gz |
core: hook INT 1Ch for a simple monotonic timer
The BIOS_timer variable at 4C6h is somewhat unreliable... it is
documented to wrap at "midnight", norminally after 1627419 ticks
(0x18d51b), which is a rather awkward number to deal with modulo.
Instead, hook the INT 1Ch secondary timer interrupt and just count a
simple incrementing variable.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/init.inc')
-rw-r--r-- | core/init.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/init.inc b/core/init.inc index 8e393b67..a3fe3041 100644 --- a/core/init.inc +++ b/core/init.inc @@ -29,6 +29,11 @@ common_init: jne kaboom ; +; Initialize timer +; + call timer_init + +; ; Initialize configuration information ; call reset_config |