diff options
-rw-r--r-- | sys/amd64/amd64/initcpu.c | 23 | ||||
-rw-r--r-- | sys/i386/i386/initcpu.c | 23 |
2 files changed, 44 insertions, 2 deletions
diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index 42a0777..3849299 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: initcpu.c,v 1.11 1998/01/03 05:35:51 kato Exp $ + * $Id: initcpu.c,v 1.12 1998/02/04 03:47:14 eivind Exp $ */ #include "opt_cpu.h" @@ -54,6 +54,7 @@ static void init_6x86(void); #ifdef I686_CPU static void init_6x86MX(void); +static void init_ppro(void); #endif #ifdef I486_CPU @@ -433,6 +434,21 @@ init_6x86MX(void) write_eflags(eflags); } + +static void +init_ppro(void) +{ +#ifndef SMP + quad_t apicbase; + + /* + * Local APIC should be diabled in UP kernel. + */ + apicbase = rdmsr(0x1b); + apicbase &= ~0x800LL; + wrmsr(0x1b, apicbase); +#endif +} #endif /* I686_CPU */ void @@ -466,6 +482,11 @@ initializecpu(void) case CPU_M2: init_6x86MX(); break; + case CPU_686: + if (strcmp(cpu_vendor, "GenuineIntel") == 0 && + (cpu_id & 0xff0) == 0x610) + init_ppro(); + break; #endif default: break; diff --git a/sys/i386/i386/initcpu.c b/sys/i386/i386/initcpu.c index 42a0777..3849299 100644 --- a/sys/i386/i386/initcpu.c +++ b/sys/i386/i386/initcpu.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: initcpu.c,v 1.11 1998/01/03 05:35:51 kato Exp $ + * $Id: initcpu.c,v 1.12 1998/02/04 03:47:14 eivind Exp $ */ #include "opt_cpu.h" @@ -54,6 +54,7 @@ static void init_6x86(void); #ifdef I686_CPU static void init_6x86MX(void); +static void init_ppro(void); #endif #ifdef I486_CPU @@ -433,6 +434,21 @@ init_6x86MX(void) write_eflags(eflags); } + +static void +init_ppro(void) +{ +#ifndef SMP + quad_t apicbase; + + /* + * Local APIC should be diabled in UP kernel. + */ + apicbase = rdmsr(0x1b); + apicbase &= ~0x800LL; + wrmsr(0x1b, apicbase); +#endif +} #endif /* I686_CPU */ void @@ -466,6 +482,11 @@ initializecpu(void) case CPU_M2: init_6x86MX(); break; + case CPU_686: + if (strcmp(cpu_vendor, "GenuineIntel") == 0 && + (cpu_id & 0xff0) == 0x610) + init_ppro(); + break; #endif default: break; |