diff options
| author | Scott Gasch <[email protected]> | 2016-06-01 19:37:09 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2016-06-01 19:37:09 -0700 |
| commit | 0a41dae5f406d498b5c9ab1542cb5660e0d982f6 (patch) | |
| tree | 67ade9fe31cfd0458cc485e95550f7aaf14abdd1 /kernel/hal/timestamp.asm | |
Diffstat (limited to 'kernel/hal/timestamp.asm')
| -rw-r--r-- | kernel/hal/timestamp.asm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/hal/timestamp.asm b/kernel/hal/timestamp.asm new file mode 100644 index 0000000..b56bedb --- /dev/null +++ b/kernel/hal/timestamp.asm @@ -0,0 +1,19 @@ + + [BITS 32] + +GLOBAL HalReadTimestampCounter +EXTERN g_ullTimeStampCounter + +[SECTION .text] +;;; +;;; ULONGLONG +;;; HalReadTimestampCounter(void) +;;; +;;; Function to read the processor's timestamp counter +;;; +HalReadTimestampCounter: + ALIGN 4 + rdtsc + mov [g_ullTimeStampCounter], edx + mov [g_ullTimeStampCounter+4], eax + ret |
