artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaa059b
)
Zero the instruction counter on Pentium's after detecting one if we have
author
tholo
<tholo@openbsd.org>
Mon, 6 May 1996 20:29:38 +0000
(20:29 +0000)
committer
tholo
<tholo@openbsd.org>
Mon, 6 May 1996 20:29:38 +0000
(20:29 +0000)
NTP code compiled in; prevents division errors in microtime()
sys/arch/i386/i386/locore.s
patch
|
blob
|
history
diff --git
a/sys/arch/i386/i386/locore.s
b/sys/arch/i386/i386/locore.s
index
9d6eb17
..
bd1ca34
100644
(file)
--- a/
sys/arch/i386/i386/locore.s
+++ b/
sys/arch/i386/i386/locore.s
@@
-437,6
+437,13
@@
try586: /* Use the `cpuid' instruction. */
jb is486 # less than a Pentium
movl $CPU_586,RELOC(_cpu)
+#ifdef NTP
+ xorl %eax,%eax
+ xorl %edx,%edx
+ movl $10,%ecx
+ .byte 0xf, 0x30 # wrmsr (or trap on non-pentium :-)
+#endif
+
2:
/*
* Finished with old stack; load new %esp now instead of later so we