diff --git a/sys/amd64/amd64/mpboot.S b/sys/amd64/amd64/mpboot.S index 9d51b1faa198..1c66daef2939 100644 --- a/sys/amd64/amd64/mpboot.S +++ b/sys/amd64/amd64/mpboot.S @@ -31,7 +31,7 @@ * mpboot.s: FreeBSD machine support for the Intel MP Spec * multiprocessor systems. * - * $Id: mpboot.s,v 1.3 1997/08/25 10:57:36 peter Exp $ + * $Id: mpboot.s,v 1.4 1997/08/26 18:10:32 peter Exp $ */ #include /* miscellaneous asm macros */ @@ -92,6 +92,18 @@ mp_begin: /* now running relocated at KERNBASE */ call _init_secondary /* load i386 tables */ CHECKPOINT(0x38, 5) +#ifdef VM86 + /* + * If the [BSP] CPU has support for VME, turn it on. + */ + testl $CPUID_VME, _cpu_feature /* XXX WRONG! BSP! */ + jz 1f + movl %cr4, %eax + orl $CR4_VME, %eax + movl %eax, %cr4 +1: +#endif + /* disable the APIC, just to be SURE */ movl lapic_svr, %eax /* get spurious vector reg. */ andl $~APIC_SVR_SWEN, %eax /* clear software enable bit */ diff --git a/sys/i386/i386/mpboot.s b/sys/i386/i386/mpboot.s index 9d51b1faa198..1c66daef2939 100644 --- a/sys/i386/i386/mpboot.s +++ b/sys/i386/i386/mpboot.s @@ -31,7 +31,7 @@ * mpboot.s: FreeBSD machine support for the Intel MP Spec * multiprocessor systems. * - * $Id: mpboot.s,v 1.3 1997/08/25 10:57:36 peter Exp $ + * $Id: mpboot.s,v 1.4 1997/08/26 18:10:32 peter Exp $ */ #include /* miscellaneous asm macros */ @@ -92,6 +92,18 @@ mp_begin: /* now running relocated at KERNBASE */ call _init_secondary /* load i386 tables */ CHECKPOINT(0x38, 5) +#ifdef VM86 + /* + * If the [BSP] CPU has support for VME, turn it on. + */ + testl $CPUID_VME, _cpu_feature /* XXX WRONG! BSP! */ + jz 1f + movl %cr4, %eax + orl $CR4_VME, %eax + movl %eax, %cr4 +1: +#endif + /* disable the APIC, just to be SURE */ movl lapic_svr, %eax /* get spurious vector reg. */ andl $~APIC_SVR_SWEN, %eax /* clear software enable bit */