From 4e7918753175dbd8fc38bc7c5b176517e1dbef2f Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 3 Jul 2024 18:30:51 +0200 Subject: Kernel/Time: Improve time keeping This makes use of TSC and now provides a file system interface for userland programs to change the system time. --- kernel/arch/i386/asm_tsc.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel/arch/i386/asm_tsc.s') diff --git a/kernel/arch/i386/asm_tsc.s b/kernel/arch/i386/asm_tsc.s index 963687e..5f9d858 100644 --- a/kernel/arch/i386/asm_tsc.s +++ b/kernel/arch/i386/asm_tsc.s @@ -1,17 +1,17 @@ .intel_syntax noprefix -.global get_tsc -.global get_hz +.global tsc_get +.global tsc_get_hz # 1.193182 MHz # So 0xFFFF is roughly 0.05492 seconds # So take the result times 18 and you got your Hz -get_tsc: +tsc_get: rdtsc ret -get_hz: +tsc_get_hz: cli # Disable the gate for channel 2 so the clock can be set. # This should only matter if the channel already has count -- cgit v1.2.3