On OpenBSD/i386 we only support Pentium compatible CPUs with an FPU.
The NexGen CPUs probably don't meet this requirement so remove the
small amount of support code to identify this brand of CPU.
The Nx586 "P" models did not include an FPU as they were expected
to be paired with an Nx587 FPU (which was never officially released).
The Nx586 "FP" models did include an FPU, but even these are allegedly
386 clones and not Pentium compatible. According to some websites,
486 instructions were emulated via hypercode. However the 486
instruction emulation was only enough to run applications and wasn't
good enough to run an OS that needs newer 486 and Pentium instructions.
Finally, while our current code references the "Processor Recognition
Application Note", we only implement the half of the documented
algorithm to detect NexGen CPUs. We don't implement the second half
of the algorithm to check for the vendor string "NexGenDriven" on NexGen
CPUs that support the CPUID instruction (like the Nx586-P120 and Nx586-P133).
ok jsg@
-/* $OpenBSD: locore0.S,v 1.5 2021/12/31 10:44:05 jsg Exp $ */
+/* $OpenBSD: locore0.S,v 1.6 2022/07/07 00:56:46 daniel Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
testl %eax,%eax
jnz .Ltry486
- /*
- * Try the test of a NexGen CPU -- ZF will not change on a DIV
- * instruction on a NexGen, it will on an i386. Documented in
- * Nx586 Processor Recognition Application Note, NexGen, Inc.
- */
- movl $0x5555,%eax
- xorl %edx,%edx
- movl $2,%ecx
- divl %ecx
- jnz .Lis386
-
-.Lisnx586:
- /*
- * Don't try cpuid, as Nx586s reportedly don't support the
- * PSL_ID bit.
- */
- movl $CPU_NX586,RELOC(_C_LABEL(cpu))
- jmp 2f
-
.Lis386:
movl $CPU_386,RELOC(_C_LABEL(cpu))
jmp 2f
-/* $OpenBSD: machdep.c,v 1.648 2022/02/01 20:29:55 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.649 2022/07/07 00:56:46 daniel Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
NULL}, /* CPU_486DLC */
{ CPUVENDOR_CYRIX, "Cyrix", "6x86", CPUCLASS_486,
cyrix6x86_cpu_setup}, /* CPU_6x86 */
- { CPUVENDOR_NEXGEN,"NexGen","586", CPUCLASS_386,
- NULL}, /* CPU_NX586 */
};
const char *classnames[] = {
-/* $OpenBSD: cputypes.h,v 1.10 2003/12/29 08:14:18 grange Exp $ */
+/* $OpenBSD: cputypes.h,v 1.11 2022/07/07 00:56:46 daniel Exp $ */
/* $NetBSD: cputypes.h,v 1.10 1997/10/18 04:51:03 mikel Exp $ */
/*
#define CPU_486 3 /* Intel 80486DX */
#define CPU_486DLC 4 /* Cyrix 486DLC */
#define CPU_6x86 5 /* Cyrix/IBM 6x86 */
-#define CPU_NX586 6 /* NexGen 586 */
#define CPU_586 7 /* Intel P.....m (I hate lawyers; it's TM) */
#define CPU_AM586 8 /* AMD Am486 and Am5x86 */
#define CPU_K5 9 /* AMD K5 */
-#define CPU_K6 10 /* NexGen 686 aka AMD K6 */
+#define CPU_K6 10 /* AMD K6 */
#define CPU_686 11 /* Intel P.....m Pro */
/*
#define CPUVENDOR_UNKNOWN -1
#define CPUVENDOR_INTEL 0
#define CPUVENDOR_CYRIX 1
-#define CPUVENDOR_NEXGEN 2
#define CPUVENDOR_AMD 3
#define CPUVENDOR_IDT 4
#define CPUVENDOR_RISE 5
-/* $OpenBSD: cpuprobe.c,v 1.2 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: cpuprobe.c,v 1.3 2022/07/07 00:56:46 daniel Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove <tom.cosgrove@arches-consulting.com>
* We try to toggle bit 21 (PSL_ID) in eflags. If it works, then
* cpuid is supported. If not, there's no cpuid, and we don't
* try it (don't want /boot to get an invalid opcode exception).
- *
- * XXX The NexGen Nx586 does not support this bit, so this is not
- * a good method to detect the presence of cpuid on this
- * processor. That's fine: the purpose here is to detect the
- * absence of cpuid. We don't mind if the instruction's not
- * there - this is not intended to determine exactly what
- * processor is there, just whether it's i386 or amd64.
- *
- * The only thing that would cause us grief is a processor which
- * does not support cpuid but which does allow the PSL_ID bit
- * in eflags to be toggled.
*/
__asm volatile(
"pushfl\n\t"
-/* $OpenBSD: exec_i386.c,v 1.51 2021/10/24 17:49:19 deraadt Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.52 2022/07/07 00:56:47 daniel Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
* We try to toggle bit 21 (PSL_ID) in eflags. If it works, then
* cpuid is supported. If not, there's no cpuid, and we don't
* try it (don't want /boot to get an invalid opcode exception).
- *
- * XXX The NexGen Nx586 does not support this bit, so this is not
- * a good method to detect the presence of cpuid on this
- * processor. That's fine: the purpose here is to detect the
- * absence of cpuid. We don't mind if the instruction's not
- * there - this is not intended to determine exactly what
- * processor is there, just whether it's i386 or amd64.
- *
- * The only thing that would cause us grief is a processor which
- * does not support cpuid but which does allow the PSL_ID bit
- * in eflags to be toggled.
*/
__asm volatile(
"pushfl\n\t"
-/* $OpenBSD: machdep.c,v 1.39 2018/07/11 18:08:05 mlarkin Exp $ */
+/* $OpenBSD: machdep.c,v 1.40 2022/07/07 00:56:47 daniel Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
* We try to toggle bit 21 (PSL_ID) in eflags. If it works, then
* cpuid is supported. If not, there's no cpuid, and we don't
* try it (don't want /boot to get an invalid opcode exception).
- *
- * XXX The NexGen Nx586 does not support this bit, so this is not
- * a good method to detect the presence of cpuid on this
- * processor. That's fine: the purpose here is to detect the
- * absence of cpuid. We don't mind if the instruction's not
- * there - this is not intended to determine exactly what
- * processor is there, just whether it's i386 or amd64.
- *
- * The only thing that would cause us grief is a processor which
- * does not support cpuid but which does allow the PSL_ID bit
- * in eflags to be toggled.
*/
__asm volatile(
"pushfl\n\t"