Disable local APIC in UP kernel. Intel specification update describes

that local APIC should be disabled in UP system.  However, some of old
BIOS does not disable local APIC, and virtual wire mode through local
APIC may cause int 15.
This commit is contained in:
KATO Takenori 1998-05-16 14:38:10 +00:00
parent 6110161faa
commit 0d303cbabf
2 changed files with 44 additions and 2 deletions

View File

@ -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;

View File

@ -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;