- apply patch #894595 MSR_APICBASE always returns APIC ADDRESS 0
by Kangmo Kim
This commit is contained in:
parent
82429b5ac5
commit
45bd1edfbf
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: apic.cc,v 1.30 2003-01-22 21:43:34 cbothamy Exp $
|
||||
// $Id: apic.cc,v 1.31 2004-02-12 00:56:21 cbothamy Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
#define NEED_CPU_REG_SHORTCUTS 1
|
||||
@ -38,8 +38,9 @@ void bx_generic_apic_c::init ()
|
||||
void bx_local_apic_c::update_msr_apicbase(Bit32u newbase)
|
||||
{
|
||||
Bit64u val64;
|
||||
val64 = newbase << 12; /* push the APIC base address to bits 12:35 */
|
||||
val64 += cpu->msr.apicbase & 0x0900; /* don't modify other apicbase or reserved bits */
|
||||
val64 = newbase ;
|
||||
val64 <<= 12; /* push the APIC base address to bits 12:35 */
|
||||
val64 |= cpu->msr.apicbase & 0x0900; /* don't modify other apicbase or reserved bits */
|
||||
cpu->msr.apicbase = val64;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: init.cc,v 1.50 2004-01-29 17:49:03 mcb30 Exp $
|
||||
// $Id: init.cc,v 1.51 2004-02-12 00:56:21 cbothamy Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -168,7 +168,7 @@ cpu_param_handler (bx_param_c *param, int set, Bit64s val)
|
||||
|
||||
void BX_CPU_C::init(BX_MEM_C *addrspace)
|
||||
{
|
||||
BX_DEBUG(( "Init $Id: init.cc,v 1.50 2004-01-29 17:49:03 mcb30 Exp $"));
|
||||
BX_DEBUG(( "Init $Id: init.cc,v 1.51 2004-02-12 00:56:21 cbothamy Exp $"));
|
||||
// BX_CPU_C constructor
|
||||
BX_CPU_THIS_PTR set_INTR (0);
|
||||
#if BX_SUPPORT_APIC
|
||||
@ -836,7 +836,9 @@ BX_CPU_C::reset(unsigned source)
|
||||
/* initialise MSR registers to defaults */
|
||||
#if BX_CPU_LEVEL >= 5
|
||||
/* APIC Address, APIC enabled and BSP is default, we'll fill in the rest later */
|
||||
BX_CPU_THIS_PTR msr.apicbase = (APIC_BASE_ADDR << 12) + 0x900;
|
||||
BX_CPU_THIS_PTR msr.apicbase = APIC_BASE_ADDR;
|
||||
BX_CPU_THIS_PTR msr.apicbase <<= 12;
|
||||
BX_CPU_THIS_PTR msr.apicbase |= 0x900;
|
||||
#if BX_SUPPORT_X86_64
|
||||
BX_CPU_THIS_PTR msr.lme = BX_CPU_THIS_PTR msr.lma = 0;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user