From 46470994c7dc8496b068a11e502c2abe8c8a0954 Mon Sep 17 00:00:00 2001 From: dm Date: Thu, 5 Dec 1996 18:08:05 +0000 Subject: [PATCH] NetBSD PR#2910: Recognize Pentium Pro machines --- sys/arch/i386/i386/locore.s | 3 +++ sys/arch/i386/i386/machdep.c | 9 +++++++-- sys/arch/i386/include/cputypes.h | 2 ++ sys/dev/pci/pcidevs | 7 ++++++- sys/dev/pci/pcidevs.h | 7 ++++++- sys/dev/pci/pcidevs_data.h | 32 +++++++++++++++++++++++++++++++- 6 files changed, 55 insertions(+), 5 deletions(-) diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index a452254f62b..752c612d51b 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -445,6 +445,9 @@ try586: /* Use the `cpuid' instruction. */ cmpl $5,%eax jb is486 # less than a Pentium movl $CPU_586,RELOC(_cpu) + je 3f # Pentium + movl $CPU_686,RELOC(_cpu) # else Pentium Pro +3: xorl %eax,%eax xorl %edx,%edx diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 7907d06aedc..0743c49c7ae 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.28 1996/11/28 23:37:36 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.29 1996/12/05 18:08:06 dm Exp $ */ /* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */ /*- @@ -408,6 +408,7 @@ struct cpu_nameclass i386_cpus[] = { { "i486DX", CPUCLASS_486 }, /* CPU_486 */ { "Pentium", CPUCLASS_586 }, /* CPU_586 */ { "Cx486DLC", CPUCLASS_486 }, /* CPU_486DLC (Cyrix) */ + { "Pentium Pro",CPUCLASS_686 }, /* CPU_686 */ }; void @@ -437,6 +438,9 @@ identifycpu() case CPUCLASS_586: strcat(cpu_model, "586"); break; + case CPUCLASS_686: + strcat(cpu_model, "686"); + break; default: strcat(cpu_model, "unknown"); /* will panic below... */ break; @@ -444,7 +448,7 @@ identifycpu() strcat(cpu_model, "-class CPU)"); printf("%s", cpu_model); #if defined(I586_CPU) - if (cpu_class == CPUCLASS_586) { + if (cpu_class >= CPUCLASS_586) { calibrate_cyclecounter(); printf(" %d MHz", pentium_mhz); } @@ -460,6 +464,7 @@ identifycpu() #error No CPU classes configured. #endif #ifndef I586_CPU + case CPUCLASS_686: case CPUCLASS_586: printf("NOTICE: this kernel does not support Pentium CPU class\n"); #ifdef I486_CPU diff --git a/sys/arch/i386/include/cputypes.h b/sys/arch/i386/include/cputypes.h index ae439c0c57e..fb8f3576ee9 100644 --- a/sys/arch/i386/include/cputypes.h +++ b/sys/arch/i386/include/cputypes.h @@ -34,6 +34,7 @@ #define CPUCLASS_386 0 #define CPUCLASS_486 1 #define CPUCLASS_586 2 +#define CPUCLASS_686 3 /* * Kinds of Processor @@ -45,3 +46,4 @@ #define CPU_486 3 /* Intel 80486DX */ #define CPU_586 4 /* Intel P.....m (I hate lawyers; it's TM) */ #define CPU_486DLC 5 /* Cyrix 486DLC */ +#define CPU_686 6 /* Intel P.....m Pro */ diff --git a/sys/dev/pci/pcidevs b/sys/dev/pci/pcidevs index 16c3f6461ee..c7296dbdfa1 100644 --- a/sys/dev/pci/pcidevs +++ b/sys/dev/pci/pcidevs @@ -1,4 +1,4 @@ -$OpenBSD: pcidevs,v 1.14 1996/11/28 23:28:11 niklas Exp $ +$OpenBSD: pcidevs,v 1.15 1996/12/05 18:08:09 dm Exp $ /* $NetBSD: pcidevs,v 1.20 1996/10/19 13:01:49 jonathan Exp $ */ @@ -526,6 +526,11 @@ product INTEL SAA7116 0x1223 SAA7116 product INTEL 82437 0x122d 82437 Triton product INTEL 82471 0x122e 82471 Triton product INTEL 82438 0x1230 82438 +product INTEL 82440FX 0x1237 82440FX Natoma, PCI and memory controller +product INTEL 82371SBa 0x7000 82371SB PCI-ISA bridge +product INTEL 82371SBb 0x7010 82371SB IDE interface +product INTEL 82450KX 0x84c4 82450KX Orion, PCI memory controller +product INTEL 82454GX 0x84c5 82454GX Orion, host to PCI bridge /* I. T. T. products */ product ITT AGX016 0x0001 AGX016 diff --git a/sys/dev/pci/pcidevs.h b/sys/dev/pci/pcidevs.h index 64bdc9fe0bb..225ecdaa9b0 100644 --- a/sys/dev/pci/pcidevs.h +++ b/sys/dev/pci/pcidevs.h @@ -2,7 +2,7 @@ * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * OpenBSD: pcidevs,v 1.13 1996/10/14 10:22:22 deraadt Exp + * OpenBSD: pcidevs,v 1.14 1996/11/28 23:28:11 niklas Exp */ /* $NetBSD: pcidevs,v 1.20 1996/10/19 13:01:49 jonathan Exp $ */ @@ -531,6 +531,11 @@ #define PCI_PRODUCT_INTEL_82437 0x122d /* 82437 Triton */ #define PCI_PRODUCT_INTEL_82471 0x122e /* 82471 Triton */ #define PCI_PRODUCT_INTEL_82438 0x1230 /* 82438 */ +#define PCI_PRODUCT_INTEL_82440FX 0x1237 /* 82440FX Natoma, PCI and memory controller */ +#define PCI_PRODUCT_INTEL_82371SBa 0x7000 /* 82371SB PCI-ISA bridge */ +#define PCI_PRODUCT_INTEL_82371SBb 0x7010 /* 82371SB IDE interface */ +#define PCI_PRODUCT_INTEL_82450KX 0x84c4 /* 82450KX Orion, PCI memory controller */ +#define PCI_PRODUCT_INTEL_82454GX 0x84c5 /* 82454GX Orion, host to PCI bridge */ /* I. T. T. products */ #define PCI_PRODUCT_ITT_AGX016 0x0001 /* AGX016 */ diff --git a/sys/dev/pci/pcidevs_data.h b/sys/dev/pci/pcidevs_data.h index ec726eee944..26f15a65070 100644 --- a/sys/dev/pci/pcidevs_data.h +++ b/sys/dev/pci/pcidevs_data.h @@ -2,7 +2,7 @@ * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * OpenBSD: pcidevs,v 1.13 1996/10/14 10:22:22 deraadt Exp + * OpenBSD: pcidevs,v 1.14 1996/11/28 23:28:11 niklas Exp */ /* $NetBSD: pcidevs,v 1.20 1996/10/19 13:01:49 jonathan Exp $ */ @@ -464,6 +464,36 @@ struct pci_knowndev pci_knowndevs[] = { "Intel", "82438", }, + { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82440FX, + 0, + "Intel", + "82440FX Natoma, PCI and memory controller", + }, + { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82371SBa, + 0, + "Intel", + "82371SB PCI-ISA bridge", + }, + { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82371SBb, + 0, + "Intel", + "82371SB IDE interface", + }, + { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82450KX, + 0, + "Intel", + "82450KX Orion, PCI memory controller", + }, + { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82454GX, + 0, + "Intel", + "82454GX Orion, host to PCI bridge", + }, { PCI_VENDOR_ITT, PCI_PRODUCT_ITT_AGX016, 0, -- 2.20.1