--- linux-2.4.21-ac2/arch/i386/kernel/mpparse.c.org 2003-06-30 12:52:21.000000000 -0700 +++ linux-2.4.21-ac2/arch/i386/kernel/mpparse.c 2003-06-30 12:54:40.000000000 -0700 @@ -987,7 +987,10 @@ { struct mpc_config_processor processor; int boot_cpu = 0; - + + static unsigned long apic_ver; + static int first_time = 1; + if (id >= MAX_APICS) { printk(KERN_WARNING "Processor #%d invalid (max %d)\n", id, MAX_APICS); @@ -999,7 +1002,18 @@ processor.mpc_type = MP_PROCESSOR; processor.mpc_apicid = id; - processor.mpc_apicver = 0x10; /* TBD: lapic version */ + + if (first_time) { + first_time = 0; + set_fixmap(FIX_APIC_BASE, APIC_DEFAULT_PHYS_BASE); + Dprintk("Local APIC ID %lx\n", apic_read(APIC_ID)); + apic_ver = apic_read(APIC_LVR); + Dprintk("Local APIC Version %lx\n", apic_ver); + if (APIC_XAPIC_SUPPORT(apic_ver)) + xapic_support = 1; + } + processor.mpc_apicver = apic_ver; + processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0); processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0); processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) |