diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1995-04-14 02:06:00 +0000 | 
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1995-04-14 02:06:00 +0000 | 
| commit | 09a901eb605300b89bcf4fdeac655a5320aec356 (patch) | |
| tree | dd2429cccdc6751f78ef61d6e53b5dc10a609303 | |
| parent | 8a03631b28ef2f87f8c8a0f5723f2720982a54fd (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 18 | ||||
| -rw-r--r-- | sys/i386/i386/machdep.c | 18 | 
2 files changed, 28 insertions, 8 deletions
| diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 2aa0e14ed91f..c5e6948f68fa 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -422,12 +422,13 @@ identifycpu()  		panic("startup: bad cpu id");  	} -#ifdef I586_CPU +#if defined(I586_CPU)  	if(cpu_class == CPUCLASS_586) {  		calibrate_cyclecounter();  		printf("%d-MHz ", pentium_mhz);  	}  #endif +#if defined(I486_CPU) || defined(I586_CPU)  	if (!strcmp(cpu_vendor,"GenuineIntel")) {  		if ((cpu_id & 0xf00) > 3) {  			cpu_model[0] = '\0'; @@ -442,8 +443,10 @@ identifycpu()  			}  			if ((cpu_id & 0xf00) == 0x400) {  				strcat(cpu_model, "i486 "); +#if defined(I586_CPU)  			} else if ((cpu_id & 0xf00) == 0x500) {  				strcat(cpu_model, "Pentium "); +#endif  			} else {  				strcat(cpu_model, "unknown ");  			} @@ -466,7 +469,7 @@ identifycpu()  				break;  			case 0x480:  				strcat(cpu_model, "DX4"); break; -#ifdef I586_CPU +#if defined(I586_CPU)  			case 0x510:   				if (pentium_mhz == 60) {  					strcat(cpu_model, "510\\60"); @@ -489,25 +492,32 @@ identifycpu()  			}  		}  	} - +#endif  	printf("%s (", cpu_model);  	switch(cpu_class) {  	case CPUCLASS_286:  		printf("286");  		break; +#if defined(I386_CPU)  	case CPUCLASS_386:  		printf("386");  		break; +#endif +#if defined(I486_CPU)  	case CPUCLASS_486:  		printf("486");  		break; +#endif +#if defined(I586_CPU)  	case CPUCLASS_586:  		printf("Pentium");  		break; +#endif  	default:  		printf("unknown");	/* will panic below... */  	}  	printf("-class CPU)\n"); +#if defined(I486_CPU) || defined(I586_CPU)  	if(*cpu_vendor)  		printf("  Origin = \"%s\"",cpu_vendor);  	if(cpu_id) @@ -521,7 +531,7 @@ identifycpu()  		}  	}  	printf("\n"); - +#endif  	/*  	 * Now that we have told the user what they have,  	 * let them know if that machine type isn't configured. diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 2aa0e14ed91f..c5e6948f68fa 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -422,12 +422,13 @@ identifycpu()  		panic("startup: bad cpu id");  	} -#ifdef I586_CPU +#if defined(I586_CPU)  	if(cpu_class == CPUCLASS_586) {  		calibrate_cyclecounter();  		printf("%d-MHz ", pentium_mhz);  	}  #endif +#if defined(I486_CPU) || defined(I586_CPU)  	if (!strcmp(cpu_vendor,"GenuineIntel")) {  		if ((cpu_id & 0xf00) > 3) {  			cpu_model[0] = '\0'; @@ -442,8 +443,10 @@ identifycpu()  			}  			if ((cpu_id & 0xf00) == 0x400) {  				strcat(cpu_model, "i486 "); +#if defined(I586_CPU)  			} else if ((cpu_id & 0xf00) == 0x500) {  				strcat(cpu_model, "Pentium "); +#endif  			} else {  				strcat(cpu_model, "unknown ");  			} @@ -466,7 +469,7 @@ identifycpu()  				break;  			case 0x480:  				strcat(cpu_model, "DX4"); break; -#ifdef I586_CPU +#if defined(I586_CPU)  			case 0x510:   				if (pentium_mhz == 60) {  					strcat(cpu_model, "510\\60"); @@ -489,25 +492,32 @@ identifycpu()  			}  		}  	} - +#endif  	printf("%s (", cpu_model);  	switch(cpu_class) {  	case CPUCLASS_286:  		printf("286");  		break; +#if defined(I386_CPU)  	case CPUCLASS_386:  		printf("386");  		break; +#endif +#if defined(I486_CPU)  	case CPUCLASS_486:  		printf("486");  		break; +#endif +#if defined(I586_CPU)  	case CPUCLASS_586:  		printf("Pentium");  		break; +#endif  	default:  		printf("unknown");	/* will panic below... */  	}  	printf("-class CPU)\n"); +#if defined(I486_CPU) || defined(I586_CPU)  	if(*cpu_vendor)  		printf("  Origin = \"%s\"",cpu_vendor);  	if(cpu_id) @@ -521,7 +531,7 @@ identifycpu()  		}  	}  	printf("\n"); - +#endif  	/*  	 * Now that we have told the user what they have,  	 * let them know if that machine type isn't configured. | 
