aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/mpparse.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-01 11:34:56 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-01 11:34:56 +0100
commitb81f8a02e719ea650d3f87edd4c75cdb686df728 (patch)
tree6f714cabc7890ed7fe662ecbeb75be0640e59677 /xen/arch/x86/mpparse.c
parent6176d3cd0bab4b90736e73da2db80e8aeb7f5e1d (diff)
downloadxen-b81f8a02e719ea650d3f87edd4c75cdb686df728.tar.gz
xen-b81f8a02e719ea650d3f87edd4c75cdb686df728.tar.bz2
xen-b81f8a02e719ea650d3f87edd4c75cdb686df728.zip
x86: Support x2APIC mode.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'xen/arch/x86/mpparse.c')
-rw-r--r--xen/arch/x86/mpparse.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index 0d14f35c77..5f2be943e2 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -814,12 +814,15 @@ void __init find_smp_config (void)
void __init mp_register_lapic_address (
u64 address)
{
- mp_lapic_addr = (unsigned long) address;
+ if ( !x2apic_enabled )
+ {
+ mp_lapic_addr = (unsigned long) address;
- set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
+ set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
+ }
if (boot_cpu_physical_apicid == -1U)
- boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID));
+ boot_cpu_physical_apicid = get_apic_id();
Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
}