. let kernel use read_tsc() from sysutil library

. read_tsc() in sysutil library saves edx and eax now
 . added read_tsc_64() by Antonio Mancina to load tsc into
   a 64-bit data type directly
 . deleted read_tsc.h in favour of a prototype in <minix/syslib.h>
This commit is contained in:
Ben Gras
2007-03-08 15:39:14 +00:00
parent 4148c24393
commit 6d50591226
7 changed files with 28 additions and 29 deletions

View File

@@ -32,7 +32,6 @@
.define _reset ! reset the system
.define _idle_task ! task executed when there is no work
.define _level0 ! call a function at level 0
.define _read_tsc ! read the cycle counter (Pentium and up)
.define _read_cpu_flags ! read the cpu flags
.define _read_cr0 ! read cr0
.define _write_cr0 ! write a value in cr0
@@ -547,24 +546,6 @@ _level0:
ret
!*===========================================================================*
!* read_tsc *
!*===========================================================================*
! PUBLIC void read_tsc(unsigned long *high, unsigned long *low);
! Read the cycle counter of the CPU. Pentium and up.
! This function clobbers edx and eax.
.align 16
_read_tsc:
.data1 0x0f ! this is the RDTSC instruction
.data1 0x31 ! it places the TSC in EDX:EAX
push ebp
mov ebp, 8(esp)
mov (ebp), edx
mov ebp, 12(esp)
mov (ebp), eax
pop ebp
ret
!*===========================================================================*
!* read_flags *
!*===========================================================================*