summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/conf/GENERIC6
-rw-r--r--sys/arch/i386/conf/RAMDISK6
-rw-r--r--sys/arch/i386/conf/RAMDISKB6
-rw-r--r--sys/arch/i386/conf/RAMDISKC6
-rw-r--r--sys/arch/i386/conf/RAMDISK_CD6
-rw-r--r--sys/arch/i386/conf/files.i38618
-rw-r--r--sys/arch/i386/i386/autoconf.c6
-rw-r--r--sys/arch/i386/i386/cpu.c4
-rw-r--r--sys/arch/i386/i386/locore.s10
-rw-r--r--sys/arch/i386/i386/machdep.c93
-rw-r--r--sys/arch/i386/i386/pmap.c4
-rw-r--r--sys/arch/i386/i386/procfs_machdep.c4
-rw-r--r--sys/arch/i386/i386/via.c5
-rw-r--r--sys/arch/i386/include/cpu.h21
-rw-r--r--sys/arch/i386/include/cpufunc.h6
-rw-r--r--sys/arch/i386/isa/clock.c13
-rw-r--r--sys/arch/i386/isa/npx.c12
-rw-r--r--sys/arch/i386/pci/elan520.c6
-rw-r--r--sys/arch/i386/pci/ichpcib.c4
-rw-r--r--sys/arch/i386/pci/piixpcib.c6
20 files changed, 50 insertions, 192 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 12d6c098087..e9d4a009449 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.591 2007/11/25 17:11:12 oga Exp $
+# $OpenBSD: GENERIC,v 1.592 2007/11/28 17:05:09 tedu Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -13,10 +13,6 @@ machine i386
include "../../../conf/GENERIC"
maxusers 32 # estimated number of users
-option I486_CPU # CPU classes; at least one is REQUIRED
-option I586_CPU
-option I686_CPU
-
option USER_PCICONF # user-space PCI configuration
#option VM86 # Virtual 8086 emulation
diff --git a/sys/arch/i386/conf/RAMDISK b/sys/arch/i386/conf/RAMDISK
index d48afb1ebef..a14c3f2c7d5 100644
--- a/sys/arch/i386/conf/RAMDISK
+++ b/sys/arch/i386/conf/RAMDISK
@@ -1,14 +1,10 @@
-# $OpenBSD: RAMDISK,v 1.156 2007/11/15 22:21:32 deraadt Exp $
+# $OpenBSD: RAMDISK,v 1.157 2007/11/28 17:05:09 tedu Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I486_CPU # CPU classes; at least one is REQUIRED
-option I586_CPU
-option I686_CPU
-
option SMALL_KERNEL
option NO_PROPOLICE
diff --git a/sys/arch/i386/conf/RAMDISKB b/sys/arch/i386/conf/RAMDISKB
index f6d1bf6d444..271c10e115c 100644
--- a/sys/arch/i386/conf/RAMDISKB
+++ b/sys/arch/i386/conf/RAMDISKB
@@ -1,14 +1,10 @@
-# $OpenBSD: RAMDISKB,v 1.100 2007/11/15 22:21:32 deraadt Exp $
+# $OpenBSD: RAMDISKB,v 1.101 2007/11/28 17:05:09 tedu Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I486_CPU # CPU classes; at least one is REQUIRED
-option I586_CPU
-option I686_CPU
-
option SMALL_KERNEL
option NO_PROPOLICE
diff --git a/sys/arch/i386/conf/RAMDISKC b/sys/arch/i386/conf/RAMDISKC
index c4acfa38c78..78f11387b3e 100644
--- a/sys/arch/i386/conf/RAMDISKC
+++ b/sys/arch/i386/conf/RAMDISKC
@@ -1,14 +1,10 @@
-# $OpenBSD: RAMDISKC,v 1.81 2007/11/16 03:18:36 deraadt Exp $
+# $OpenBSD: RAMDISKC,v 1.82 2007/11/28 17:05:09 tedu Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I486_CPU # CPU classes; at least one is REQUIRED
-option I586_CPU
-option I686_CPU
-
option SMALL_KERNEL
option NO_PROPOLICE
diff --git a/sys/arch/i386/conf/RAMDISK_CD b/sys/arch/i386/conf/RAMDISK_CD
index 1b14c87dfbf..2a1508f152e 100644
--- a/sys/arch/i386/conf/RAMDISK_CD
+++ b/sys/arch/i386/conf/RAMDISK_CD
@@ -1,14 +1,10 @@
-# $OpenBSD: RAMDISK_CD,v 1.145 2007/11/15 22:21:32 deraadt Exp $
+# $OpenBSD: RAMDISK_CD,v 1.146 2007/11/28 17:05:09 tedu Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I486_CPU # CPU classes; at least one is REQUIRED
-option I586_CPU
-option I686_CPU
-
option SMALL_KERNEL
option NO_PROPOLICE
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 6c288408bd8..5fc444309bd 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.170 2007/11/25 18:25:28 deraadt Exp $
+# $OpenBSD: files.i386,v 1.171 2007/11/28 17:05:09 tedu Exp $
#
# new style config file for i386 architecture
#
@@ -18,22 +18,22 @@ file arch/i386/i386/db_memrw.c ddb | kgdb
file arch/i386/i386/db_trace.c ddb
file arch/i386/i386/db_magic.s ddb
file arch/i386/i386/disksubr.c disk
-file arch/i386/i386/est.c !small_kernel & i686_cpu
+file arch/i386/i386/est.c !small_kernel
file arch/i386/i386/gdt.c
file arch/i386/i386/in_cksum.s inet
file arch/i386/i386/machdep.c
-file arch/i386/i386/via.c i686_cpu
-file arch/i386/i386/amd64errata.c i686_cpu
+file arch/i386/i386/via.c
+file arch/i386/i386/amd64errata.c
file arch/i386/i386/kgdb_machdep.c kgdb
-file arch/i386/i386/longrun.c !small_kernel & i586_cpu
+file arch/i386/i386/longrun.c !small_kernel
file arch/i386/i386/mem.c
file arch/i386/i386/i686_mem.c mtrr
file arch/i386/i386/k6_mem.c mtrr
-file arch/i386/i386/p4tcc.c !small_kernel & i686_cpu
+file arch/i386/i386/p4tcc.c !small_kernel
file arch/i386/i386/pmap.c
-file arch/i386/i386/powernow.c !small_kernel & i586_cpu
-file arch/i386/i386/powernow-k7.c !small_kernel & i686_cpu
-file arch/i386/i386/powernow-k8.c !small_kernel & i686_cpu
+file arch/i386/i386/powernow.c !small_kernel
+file arch/i386/i386/powernow-k7.c !small_kernel
+file arch/i386/i386/powernow-k8.c !small_kernel
file arch/i386/i386/process_machdep.c
file arch/i386/i386/procfs_machdep.c procfs
file arch/i386/i386/random.s
diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c
index 0177206a6e1..109a719a94c 100644
--- a/sys/arch/i386/i386/autoconf.c
+++ b/sys/arch/i386/i386/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.75 2007/06/01 19:25:10 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.76 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */
/*-
@@ -84,7 +84,6 @@
extern dev_t bootdev;
/* Support for VIA C3 RNG */
-#ifdef I686_CPU
extern struct timeout viac3_rnd_tmo;
extern int viac3_rnd_present;
void viac3_rnd(void *);
@@ -92,7 +91,6 @@ void viac3_rnd(void *);
#ifdef CRYPTO
void viac3_crypto_setup(void);
extern int i386_has_xcrypt;
-#endif /* CRYPTO */
#endif
/*
@@ -146,7 +144,6 @@ cpu_configure(void)
*/
cold = 0;
-#ifdef I686_CPU
/*
* At this point the RNG is running, and if FSXR is set we can
* use it. Here we setup a periodic timeout to collect the data.
@@ -161,7 +158,6 @@ cpu_configure(void)
*/
if (i386_has_xcrypt)
viac3_crypto_setup();
-#endif /* CRYPTO */
#endif
}
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c
index 24d2510983d..901fc0e5e4c 100644
--- a/sys/arch/i386/i386/cpu.c
+++ b/sys/arch/i386/i386/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.28 2007/11/27 16:22:13 martynas Exp $ */
+/* $OpenBSD: cpu.c,v 1.29 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */
/*-
@@ -342,7 +342,6 @@ cpu_init(struct cpu_info *ci)
lcr4(rcr4() | CR4_PGE); /* enable global TLB caching */
ci->ci_flags |= CPUF_RUNNING;
-#if defined(I686_CPU)
/*
* If we have FXSAVE/FXRESTOR, use them.
*/
@@ -355,7 +354,6 @@ cpu_init(struct cpu_info *ci)
if (cpu_feature & (CPUID_SSE|CPUID_SSE2))
lcr4(rcr4() | CR4_OSXMMEXCPT);
}
-#endif /* I686_CPU */
}
void
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index f5ac0cf8bb3..74a7d47e6a3 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.120 2007/11/05 21:46:13 weingart Exp $ */
+/* $OpenBSD: locore.s,v 1.121 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1559,7 +1559,6 @@ IDTVEC(stk)
TRAP(T_STKFLT)
IDTVEC(prot)
TRAP(T_PROTFLT)
-#ifdef I586_CPU
IDTVEC(f00f_redirect)
pushl $T_PAGEFLT
INTRENTRY
@@ -1571,7 +1570,6 @@ IDTVEC(f00f_redirect)
jne calltrap
movb $T_PRIVINFLT,TF_TRAPNO(%esp)
jmp calltrap
-#endif
IDTVEC(page)
TRAP(T_PAGEFLT)
IDTVEC(rsvd)
@@ -1744,11 +1742,8 @@ ENTRY(bzero)
rep /* zero until word aligned */
stosb
-#if defined(I486_CPU)
-#if defined(I586_CPU) || defined(I686_CPU)
cmpl $CPUCLASS_486,_C_LABEL(cpu_class)
jne 8f
-#endif
movl %edx,%ecx
shrl $6,%ecx
@@ -1773,7 +1768,6 @@ ENTRY(bzero)
addl $64,%edi
decl %ecx
jnz 1b
-#endif
8: movl %edx,%ecx /* zero by words */
shrl $2,%ecx
@@ -1788,7 +1782,7 @@ ENTRY(bzero)
popl %edi
ret
-#if defined(I686_CPU) && !defined(SMALL_KERNEL)
+#if !defined(SMALL_KERNEL)
ENTRY(sse2_pagezero)
pushl %ebx
movl 8(%esp),%ecx
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index eba26d4a1b0..d2f06b64441 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.412 2007/11/25 10:50:13 tom Exp $ */
+/* $OpenBSD: machdep.c,v 1.413 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -239,7 +239,7 @@ paddr_t avail_end;
struct vm_map *exec_map = NULL;
struct vm_map *phys_map = NULL;
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
int p4_model;
int p3_early;
void (*update_cpuspeed)(void) = NULL;
@@ -1079,7 +1079,6 @@ const struct cpu_cpuid_feature i386_cpuid_ecxfeatures[] = {
void
winchip_cpu_setup(struct cpu_info *ci)
{
-#if defined(I586_CPU)
switch ((ci->ci_signature >> 4) & 15) { /* model */
case 4: /* WinChip C6 */
@@ -1089,10 +1088,9 @@ winchip_cpu_setup(struct cpu_info *ci)
printf("%s: TSC disabled\n", ci->ci_dev.dv_xname);
break;
}
-#endif
}
-#if defined(I686_CPU) && !defined(SMALL_KERNEL)
+#if !defined(SMALL_KERNEL)
void
cyrix3_setperf_setup(struct cpu_info *ci)
{
@@ -1104,12 +1102,10 @@ cyrix3_setperf_setup(struct cpu_info *ci)
ci->ci_dev.dv_xname);
}
}
-#endif
void
cyrix3_cpu_setup(struct cpu_info *ci)
{
-#if defined(I686_CPU)
int model = (ci->ci_signature >> 4) & 15;
int step = ci->ci_signature & 15;
@@ -1237,7 +1233,6 @@ cyrix3_cpu_setup(struct cpu_info *ci)
printf("\n");
break;
}
-#endif
}
void
@@ -1276,7 +1271,6 @@ cyrix6x86_cpu_setup(struct cpu_info *ci)
void
natsem6x86_cpu_setup(struct cpu_info *ci)
{
-#if defined(I586_CPU) || defined(I686_CPU)
extern int clock_broken_latch;
int model = (ci->ci_signature >> 4) & 15;
@@ -1287,22 +1281,19 @@ natsem6x86_cpu_setup(struct cpu_info *ci)
printf("%s: TSC disabled\n", ci->ci_dev.dv_xname);
break;
}
-#endif
}
void
intel586_cpu_setup(struct cpu_info *ci)
{
-#if defined(I586_CPU)
if (!cpu_f00f_bug) {
fix_f00f();
printf("%s: F00F bug workaround installed\n",
ci->ci_dev.dv_xname);
}
-#endif
}
-#if !defined(SMALL_KERNEL) && defined(I586_CPU)
+#if !defined(SMALL_KERNEL)
void
amd_family5_setperf_setup(struct cpu_info *ci)
{
@@ -1332,14 +1323,14 @@ amd_family5_setup(struct cpu_info *ci)
break;
case 12:
case 13:
-#if !defined(SMALL_KERNEL) && defined(I586_CPU)
+#if !defined(SMALL_KERNEL)
setperf_setup = amd_family5_setperf_setup;
#endif
break;
}
}
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
void
amd_family6_setperf_setup(struct cpu_info *ci)
{
@@ -1354,12 +1345,12 @@ amd_family6_setperf_setup(struct cpu_info *ci)
break;
}
}
-#endif /* !SMALL_KERNEL && I686_CPU */
+#endif
void
amd_family6_setup(struct cpu_info *ci)
{
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
int family = (ci->ci_signature >> 8) & 15;
extern void (*pagezero)(void *, size_t);
extern void sse2_pagezero(void *, size_t);
@@ -1378,7 +1369,7 @@ amd_family6_setup(struct cpu_info *ci)
#endif
}
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
/*
* Temperature read on the CPU is relative to the maximum
* temperature supported by the CPU, Tj(Max).
@@ -1436,7 +1427,7 @@ intel686_cpusensors_setup(struct cpu_info *ci)
}
#endif
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
void
intel686_setperf_setup(struct cpu_info *ci)
{
@@ -1459,7 +1450,7 @@ void
intel686_common_cpu_setup(struct cpu_info *ci)
{
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
setperf_setup = intel686_setperf_setup;
cpusensors_setup = intel686_cpusensors_setup;
{
@@ -1487,7 +1478,7 @@ intel686_cpu_setup(struct cpu_info *ci)
int step = ci->ci_signature & 15;
u_quad_t msr119;
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
p3_get_bus_clock(ci);
#endif
@@ -1514,7 +1505,7 @@ intel686_cpu_setup(struct cpu_info *ci)
ci->ci_level = 2;
}
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
p3_early = (model == 8 && step == 1) ? 1 : 0;
update_cpuspeed = p3_update_cpuspeed;
#endif
@@ -1523,13 +1514,13 @@ intel686_cpu_setup(struct cpu_info *ci)
void
intel686_p4_cpu_setup(struct cpu_info *ci)
{
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
p4_get_bus_clock(ci);
#endif
intel686_common_cpu_setup(ci);
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
p4_model = (ci->ci_signature >> 4) & 15;
update_cpuspeed = p4_update_cpuspeed;
#endif
@@ -1538,7 +1529,7 @@ intel686_p4_cpu_setup(struct cpu_info *ci)
void
tm86_cpu_setup(struct cpu_info *ci)
{
-#if !defined(SMALL_KERNEL) && (defined(I586_CPU) || defined(I686_CPU))
+#if !defined(SMALL_KERNEL)
longrun_init();
#endif
}
@@ -1778,7 +1769,6 @@ identifycpu(struct cpu_info *ci)
printf("%s: %s", cpu_device, cpu_model);
}
-#if defined(I586_CPU) || defined(I686_CPU)
if (ci->ci_feature_flags && (ci->ci_feature_flags & CPUID_TSC)) {
/* Has TSC */
calibrate_cyclecounter();
@@ -1799,7 +1789,6 @@ identifycpu(struct cpu_info *ci)
}
}
}
-#endif
if ((ci->ci_flags & CPUF_PRIMARY) == 0) {
printf("\n");
@@ -1838,49 +1827,15 @@ identifycpu(struct cpu_info *ci)
#endif
#ifndef SMALL_KERNEL
-#if defined(I586_CPU) || defined(I686_CPU)
if (cpuspeed != 0 && cpu_cpuspeed == NULL)
cpu_cpuspeed = pentium_cpuspeed;
#endif
-#endif
cpu_class = class;
- /*
- * Now that we have told the user what they have,
- * let them know if that machine type isn't configured.
- */
- switch (cpu_class) {
-#if !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU)
-#error No CPU classes configured.
-#endif
-#ifndef I686_CPU
- case CPUCLASS_686:
- printf("NOTICE: this kernel does not support Pentium Pro CPU class\n");
-#ifdef I586_CPU
- printf("NOTICE: lowering CPU class to i586\n");
- cpu_class = CPUCLASS_586;
- break;
-#endif
-#endif
-#ifndef I586_CPU
- case CPUCLASS_586:
- printf("NOTICE: this kernel does not support Pentium CPU class\n");
-#ifdef I486_CPU
- printf("NOTICE: lowering CPU class to i486\n");
+ if (cpu_class == CPUCLASS_386) {
+ printf("WARNING: 386 (possibly unknown?) cpu class, assuming 486\n");
cpu_class = CPUCLASS_486;
- break;
-#endif
-#endif
-#ifndef I486_CPU
- case CPUCLASS_486:
- printf("NOTICE: this kernel does not support i486 CPU class\n");
-#endif
- case CPUCLASS_386:
- printf("NOTICE: this kernel does not support i386 CPU class\n");
- panic("no appropriate CPU class available");
- default:
- break;
}
ci->cpu_class = class;
@@ -1903,7 +1858,6 @@ identifycpu(struct cpu_info *ci)
*/
lcr0(rcr0() | CR0_WP);
-#if defined(I686_CPU)
/*
* If we have FXSAVE/FXRESTOR, use them.
*/
@@ -1925,7 +1879,6 @@ identifycpu(struct cpu_info *ci)
} else
i386_use_fxsave = 0;
-#endif /* I686_CPU */
}
char *
@@ -1948,7 +1901,6 @@ tm86_cpu_name(int model)
}
#ifndef SMALL_KERNEL
-#ifdef I686_CPU
void
cyrix3_get_bus_clock(struct cpu_info *ci)
{
@@ -2153,16 +2105,13 @@ p3_update_cpuspeed(void)
cpuspeed = (bus_clock * mult) / 1000;
}
-#endif /* I686_CPU */
-#if defined(I586_CPU) || defined(I686_CPU)
int
pentium_cpuspeed(int *freq)
{
*freq = cpuspeed;
return (0);
}
-#endif
#endif /* !SMALL_KERNEL */
#ifdef COMPAT_IBCS2
@@ -2215,9 +2164,7 @@ void
sendsig(sig_t catcher, int sig, int mask, u_long code, int type,
union sigval val)
{
-#ifdef I686_CPU
extern char sigcode, sigcode_xmm;
-#endif
struct proc *p = curproc;
struct trapframe *tf = p->p_md.md_regs;
struct sigframe *fp, frame;
@@ -2315,10 +2262,8 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type,
tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
tf->tf_eip = p->p_sigcode;
tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
-#ifdef I686_CPU
if (i386_use_fxsave)
tf->tf_eip += &sigcode_xmm - &sigcode;
-#endif
tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
tf->tf_esp = (int)fp;
tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
@@ -2806,7 +2751,6 @@ extern int IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), IDTVEC(syscall), IDTVEC(mchk),
IDTVEC(osyscall), IDTVEC(simd);
-#if defined(I586_CPU)
extern int IDTVEC(f00f_redirect);
int cpu_f00f_bug = 0;
@@ -2842,7 +2786,6 @@ fix_f00f(void)
/* Tell the rest of the world */
cpu_f00f_bug = 1;
}
-#endif
#ifdef MULTIPROCESSOR
void
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index e2297cea182..0204ce8f4df 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.120 2007/11/16 16:16:06 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.121 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -313,10 +313,8 @@ static pt_entry_t *csrc_pte, *cdst_pte, *zero_pte, *ptp_pte;
static caddr_t csrcp, cdstp, zerop, ptpp;
caddr_t vmmap; /* XXX: used by mem.c... it should really uvm_map_reserve it */
-#if defined(I586_CPU)
/* stuff to fix the pentium f00f bug */
extern vaddr_t pentium_idt_vaddr;
-#endif
/*
diff --git a/sys/arch/i386/i386/procfs_machdep.c b/sys/arch/i386/i386/procfs_machdep.c
index 3a3fd5f4448..927a147e203 100644
--- a/sys/arch/i386/i386/procfs_machdep.c
+++ b/sys/arch/i386/i386/procfs_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_machdep.c,v 1.6 2006/12/20 17:50:40 gwk Exp $ */
+/* $OpenBSD: procfs_machdep.c,v 1.7 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: procfs_machdep.c,v 1.6 2001/02/21 21:39:59 jdolecek Exp $ */
/*
@@ -123,12 +123,10 @@ procfs_getcpuinfstr(char *buf, int *len)
if (left <= 0)
return 0;
-#if defined(I586_CPU) || defined(I686_CPU)
if (cpuspeed != 0)
l = snprintf(p, left, "cpu MHz\t\t: %d\n",
cpuspeed);
else
-#endif
l = snprintf(p, left, "cpu MHz\t\t: unknown\n");
if (l == -1)
diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c
index 06549205497..849a573ec89 100644
--- a/sys/arch/i386/i386/via.c
+++ b/sys/arch/i386/i386/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.16 2007/11/14 19:10:44 markus Exp $ */
+/* $OpenBSD: via.c,v 1.17 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -508,7 +508,6 @@ out:
#endif /* CRYPTO */
-#if defined(I686_CPU)
/*
* Note, the VIA C3 Nehemiah provides 4 internal 8-byte buffers, which
* store random data, and can be accessed a lot quicker than waiting
@@ -567,5 +566,3 @@ viac3_rnd(void *v)
timeout_add(tmo, (hz > 100) ? (hz / 100) : 1);
}
-
-#endif /* defined(I686_CPU) */
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 22cf9b9c1e4..95e0e8efeef 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.98 2007/11/16 16:16:06 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.99 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -263,12 +263,10 @@ struct timeval;
#define DELAY(x) (*delay_func)(x)
#define delay(x) (*delay_func)(x)
-#if defined(I586_CPU) || defined(I686_CPU)
/*
* High resolution clock support (Pentium only)
*/
void calibrate_cyclecounter(void);
-#endif
/*
* pull in #defines for kinds of processors
@@ -326,9 +324,7 @@ extern void (*cpu_idle_leave_fcn)(void);
/* apm.c */
extern int cpu_apmwarn;
-#if defined(I586_CPU) || defined(I686_CPU)
extern int cpuspeed;
-#endif
#if !defined(SMALL_KERNEL)
#define BUS66 6667
@@ -341,11 +337,9 @@ extern int cpuspeed;
extern int bus_clock;
#endif
-#ifdef I586_CPU
/* F00F bug fix stuff for pentium cpu */
extern int cpu_f00f_bug;
void fix_f00f(void);
-#endif
/* dkcsum.c */
void dkcsumattach(void);
@@ -383,30 +377,19 @@ void i8254_inittimecounter(void);
void i8254_inittimecounter_simple(void);
+#if !defined(SMALL_KERNEL)
/* est.c */
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
void est_init(const char *, int);
void est_setperf(int);
-#endif
-
/* longrun.c */
-#if !defined(SMALL_KERNEL) && defined(I586_CPU)
void longrun_init(void);
void longrun_setperf(int);
-#endif
-
/* p4tcc.c */
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
void p4tcc_init(int, int);
void p4tcc_setperf(int);
-#endif
-
-#if !defined(SMALL_KERNEL) && defined(I586_CPU)
/* powernow.c */
void k6_powernow_init(void);
void k6_powernow_setperf(int);
-#endif
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
/* powernow-k7.c */
void k7_powernow_init(void);
void k7_powernow_setperf(int);
diff --git a/sys/arch/i386/include/cpufunc.h b/sys/arch/i386/include/cpufunc.h
index 0a4134b9462..7813ce64ad6 100644
--- a/sys/arch/i386/include/cpufunc.h
+++ b/sys/arch/i386/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.13 2007/02/17 17:38:37 tom Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.14 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: cpufunc.h,v 1.8 1994/10/27 04:15:59 cgd Exp $ */
/*
@@ -172,13 +172,11 @@ tlbflushg(void)
* pre-P6-family processors.
*/
-#if defined(I686_CPU)
if (cpu_feature & CPUID_PGE) {
u_int cr4 = rcr4();
lcr4(cr4 & ~CR4_PGE);
lcr4(cr4);
} else
-#endif
tlbflush();
}
@@ -271,9 +269,7 @@ breakpoint(void)
__asm __volatile("int $3");
}
-#ifdef I686_CPU
void amd64_errata(struct cpu_info *);
-#endif
#endif /* _KERNEL */
#endif /* !_I386_CPUFUNC_H_ */
diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c
index 7339672c28c..3e3661a2aee 100644
--- a/sys/arch/i386/isa/clock.c
+++ b/sys/arch/i386/isa/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.40 2007/08/01 13:18:18 martin Exp $ */
+/* $OpenBSD: clock.c,v 1.41 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */
/*-
@@ -119,12 +119,8 @@ void rtcdrain(void *);
u_int mc146818_read(void *, u_int);
void mc146818_write(void *, u_int, u_int);
-#if defined(I586_CPU) || defined(I686_CPU)
int cpuspeed;
-#endif
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
int clock_broken_latch;
-#endif
/* Timecounter on the i8254 */
uint32_t i8254_lastcount;
@@ -254,7 +250,6 @@ int
gettick(void)
{
-#if defined(I586_CPU) || defined(I686_CPU)
if (clock_broken_latch) {
int v1, v2, v3;
int w1, w2, w3;
@@ -306,9 +301,7 @@ gettick(void)
return (v2);
}
return (v3);
- } else
-#endif
- {
+ } else {
u_char lo, hi;
u_long ef;
@@ -385,7 +378,6 @@ i8254_delay(int n)
}
}
-#if defined(I586_CPU) || defined(I686_CPU)
void
calibrate_cyclecounter(void)
{
@@ -396,7 +388,6 @@ calibrate_cyclecounter(void)
__asm __volatile("rdtsc" : "=A" (count));
cpuspeed = ((count - last_count) + 999999) / 1000000;
}
-#endif
void
i8254_initclocks(void)
diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c
index a5d4beb94a0..df1b2133c54 100644
--- a/sys/arch/i386/isa/npx.c
+++ b/sys/arch/i386/isa/npx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: npx.c,v 1.42 2006/10/18 19:48:32 tom Exp $ */
+/* $OpenBSD: npx.c,v 1.43 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: npx.c,v 1.57 1996/05/12 23:12:24 mycroft Exp $ */
#if 0
@@ -134,22 +134,18 @@ extern int i386_fpu_present;
extern int i386_fpu_exception;
extern int i386_fpu_fdivbug;
-#ifdef I686_CPU
#define fxsave(addr) __asm("fxsave %0" : "=m" (*addr))
#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*addr))
-#endif /* I686_CPU */
static __inline void
fpu_save(union savefpu *addr)
{
-#ifdef I686_CPU
if (i386_use_fxsave) {
fxsave(&addr->sv_xmm);
/* FXSAVE doesn't FNINIT like FNSAVE does -- so do it here. */
fninit();
} else
-#endif /* I686_CPU */
fnsave(&addr->sv_87);
}
@@ -161,9 +157,7 @@ npxdna_notset(struct cpu_info *ci)
int (*npxdna_func)(struct cpu_info *) = npxdna_notset;
int npxdna_s87(struct cpu_info *);
-#ifdef I686_CPU
int npxdna_xmm(struct cpu_info *);
-#endif /* I686_CPU */
void npxexit(void);
/*
@@ -393,11 +387,9 @@ npxattach(struct device *parent, struct device *self, void *aux)
npxinit(&cpu_info_primary);
i386_fpu_present = 1;
-#ifdef I686_CPU
if (i386_use_fxsave)
npxdna_func = npxdna_xmm;
else
-#endif /* I686_CPU */
npxdna_func = npxdna_s87;
}
@@ -577,7 +569,6 @@ x86fpflags_to_siginfo(u_int32_t flags)
* XXX It is unclear if the code below is correct in the multiprocessor
* XXX case. Check the NetBSD sources once again to be sure.
*/
-#ifdef I686_CPU
int
npxdna_xmm(struct cpu_info *ci)
{
@@ -654,7 +645,6 @@ npxdna_xmm(struct cpu_info *ci)
return (1);
}
-#endif /* I686_CPU */
int
npxdna_s87(struct cpu_info *ci)
diff --git a/sys/arch/i386/pci/elan520.c b/sys/arch/i386/pci/elan520.c
index e380c841af6..8712aa03dea 100644
--- a/sys/arch/i386/pci/elan520.c
+++ b/sys/arch/i386/pci/elan520.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elan520.c,v 1.13 2007/05/23 11:55:11 markus Exp $ */
+/* $OpenBSD: elan520.c,v 1.14 2007/11/28 17:05:09 tedu Exp $ */
/* $NetBSD: elan520.c,v 1.4 2002/10/02 05:47:15 thorpej Exp $ */
/*-
@@ -327,16 +327,12 @@ elansc_wdogctl_cb(void *self, int period)
void
elansc_update_cpuspeed(void)
{
-#ifdef I586_CPU
static const int elansc_mhz[] = { 0, 100, 133, 999 };
-#endif
uint8_t cpuctl;
cpuctl = bus_space_read_1(elansc->sc_memt, elansc->sc_memh,
MMCR_CPUCTL);
-#ifdef I586_CPU
cpuspeed = elansc_mhz[cpuctl & CPUCTL_CPU_CLK_SPD_MASK];
-#endif
}
void
diff --git a/sys/arch/i386/pci/ichpcib.c b/sys/arch/i386/pci/ichpcib.c
index bde0b5fc35b..997dbda8366 100644
--- a/sys/arch/i386/pci/ichpcib.c
+++ b/sys/arch/i386/pci/ichpcib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ichpcib.c,v 1.21 2007/10/17 22:13:56 brad Exp $ */
+/* $OpenBSD: ichpcib.c,v 1.22 2007/11/28 17:05:09 tedu Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -294,10 +294,8 @@ ichss_setperf(int level)
bus_space_write_1(sc->sc_pm_iot, sc->sc_pm_ioh, ICH_PM_CNTL,
cntl);
-#ifdef I686_CPU
if (update_cpuspeed != NULL)
update_cpuspeed();
-#endif
}
splx(s);
}
diff --git a/sys/arch/i386/pci/piixpcib.c b/sys/arch/i386/pci/piixpcib.c
index 20d63e8052a..9157e42c79e 100644
--- a/sys/arch/i386/pci/piixpcib.c
+++ b/sys/arch/i386/pci/piixpcib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: piixpcib.c,v 1.2 2007/05/29 02:40:24 tom Exp $ */
+/* $OpenBSD: piixpcib.c,v 1.3 2007/11/28 17:05:09 tedu Exp $ */
/*
* Copyright (c) 2007 Stefan Sperling <stsp@stsp.in-berlin.de>
@@ -116,7 +116,7 @@ void piixpcib_int15_gsic_call(struct piixpcib_softc *);
extern void pcibattach(struct device *, struct device *, void *);
/* arch/i386/i386/machdep.c */
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
extern void p3_update_cpuspeed(void);
#endif
@@ -365,7 +365,7 @@ piixpcib_setperf(int level)
* There seems to be no reliable fix for this.
*/
delay(200);
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL)
p3_update_cpuspeed();
#endif
}