removed from amd64 in locore.S 1.71 in 2015 the cpuid_level == -1 path can go in a later step
diff --git sys/arch/amd64/include/cpu.h sys/arch/amd64/include/cpu.h index b8db48f2714..d8b7bc61ede 100644 --- sys/arch/amd64/include/cpu.h +++ sys/arch/amd64/include/cpu.h @@ -369,7 +369,6 @@ struct timeval; /* locore.S */ extern int biosbasemem; extern int biosextmem; -extern int cpu; extern int cpu_feature; extern int cpu_ebxfeature; extern int cpu_ecxfeature; diff --git sys/arch/i386/i386/locore0.S sys/arch/i386/i386/locore0.S index 8d03facc7b7..cba7edd53ba 100644 --- sys/arch/i386/i386/locore0.S +++ sys/arch/i386/i386/locore0.S @@ -131,7 +131,7 @@ start: movw $0x1234,0x472 # warm boot testl %eax,%eax jnz .Ltry586 -.Lis486: movl $CPU_486,RELOC(_C_LABEL(cpu)) +.Lis486: jmp 2f diff --git sys/arch/i386/i386/machdep.c sys/arch/i386/i386/machdep.c index 36f3eef49e5..364132760fc 100644 --- sys/arch/i386/i386/machdep.c +++ sys/arch/i386/i386/machdep.c @@ -493,15 +493,6 @@ i386_init_pcb_tss(struct cpu_info *ci) */ char cpu_model[120]; -/* - * Note: these are just the ones that may not have a cpuid instruction. - * We deal with the rest in a different way. - */ -const struct cpu_nocpuid_nameclass i386_nocpuid_cpus[] = { - { CPUVENDOR_INTEL, "Intel", "486DX", CPUCLASS_486, - NULL}, /* CPU_486 */ -}; - const char *classnames[] = { "", "486", @@ -1672,18 +1663,13 @@ identifycpu(struct cpu_info *ci) extern uint32_t cpu_meltdown; if (cpuid_level == -1) { -#ifdef DIAGNOSTIC - if (cpu < 0 || cpu >= - (sizeof i386_nocpuid_cpus/sizeof(struct cpu_nocpuid_nameclass))) - panic("unknown cpu type %d", cpu); -#endif - name = i386_nocpuid_cpus[cpu].cpu_name; - vendor = i386_nocpuid_cpus[cpu].cpu_vendor; - vendorname = i386_nocpuid_cpus[cpu].cpu_vendorname; + name = "486DX"; + vendor = CPUVENDOR_INTEL; + vendorname = "Intel"; model = -1; step = -1; - class = i386_nocpuid_cpus[cpu].cpu_class; - ci->cpu_setup = i386_nocpuid_cpus[cpu].cpu_setup; + class = CPUCLASS_486; + ci->cpu_setup = NULL; modifier = ""; token = ""; } else { diff --git sys/arch/i386/include/cpu.h sys/arch/i386/include/cpu.h index 5f300710562..e6f2237eafe 100644 --- sys/arch/i386/include/cpu.h +++ sys/arch/i386/include/cpu.h @@ -342,7 +342,6 @@ struct cpu_cpuid_feature { }; /* locore.s */ -extern int cpu; extern int cpu_id; extern char cpu_vendor[]; /* note: NOT nul-terminated */ extern char cpu_brandstr[]; diff --git sys/arch/i386/include/cputypes.h sys/arch/i386/include/cputypes.h index fd7c6b0bd3d..52f1f5318ec 100644 --- sys/arch/i386/include/cputypes.h +++ sys/arch/i386/include/cputypes.h @@ -36,12 +36,6 @@ #define CPUCLASS_586 2 #define CPUCLASS_686 3 -/* - * Kind of Processor. - */ - -#define CPU_486 0 /* Intel 80486DX */ - /* * CPU vendors */