diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-11-17 14:55:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-11-17 14:55:59 +0000 |
commit | 80bb912df8e6e6f488a2f88c503b929d18809151 (patch) | |
tree | 6bc420c1f852b0a4886d4ba2855036e534b9fae4 /sys | |
parent | 18877783902aa916a5ca036cb70a99b16dcf6fd0 (diff) |
Be sure to not use the cpuid instruction on processors which do not support it;
repairs 80386 support.
Spotted and tested nick@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 6a650c6d633..3951db7a75f 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.74 2003/11/15 19:27:50 henning Exp $ */ +/* $OpenBSD: locore.s,v 1.75 2003/11/17 14:55:58 miod Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -381,13 +381,13 @@ try586: /* Use the `cpuid' instruction. */ movl $RELOC(_C_LABEL(cpuid_level)),%eax cmp $2,%eax - jl 2f + jl 1f movl $2,%eax cpuid /* cmp $1,%al - jne 2f + jne 1f */ movl %eax,RELOC(_C_LABEL(cpu_cache_eax)) @@ -395,12 +395,12 @@ try586: /* Use the `cpuid' instruction. */ movl %ecx,RELOC(_C_LABEL(cpu_cache_ecx)) movl %edx,RELOC(_C_LABEL(cpu_cache_edx)) -2: +1: /* Check if brand identification string is supported */ movl $0x80000000,%eax cpuid cmpl $0x80000000,%eax - jbe 3f + jbe 2f movl $0x80000002,%eax cpuid movl %eax,RELOC(_C_LABEL(cpu_brandstr)) @@ -421,7 +421,7 @@ try586: /* Use the `cpuid' instruction. */ andl $0x00ffffff,%edx /* Shouldn't be necessary */ movl %edx,RELOC(_C_LABEL(cpu_brandstr))+44 -3: +2: /* * Finished with old stack; load new %esp now instead of later so we * can trace this code without having to worry about the trace trap |