ACPI MADT contains info on 2 IO-APICs.
 io_apic_get_unique_id panics due to being unable to assign an id to the
 second one (the memory location reads as all ones). The chipset spec
 (specifically: ICH6-M) is only talking about one IO-APIC, so most likely the
 MADT is in error.

Marcus Wegner <wegner3000@hotmail.com>


diff -urN linux-2.6.13-8/arch/i386/kernel/io_apic.c linux-2.6.13-8-marcus/arch/i386/kernel/io_apic.c
--- linux-2.6.13-8/arch/i386/kernel/io_apic.c	2005-09-06 17:53:38.000000000 +0200
+++ linux-2.6.13-8-marcus/arch/i386/kernel/io_apic.c	2005-09-11 03:44:08.000000000 +0200
@@ -2493,7 +2493,10 @@
 
 		/* Sanity check */
 		if (reg_00.bits.ID != apic_id)
-			panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
+		{
+			printk("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
+			return(-1);
+		}
 	}
 
 	apic_printk(APIC_VERBOSE, KERN_INFO
diff -urN linux-2.6.13-8/arch/i386/kernel/mpparse.c linux-2.6.13-8-marcus/arch/i386/kernel/mpparse.c
--- linux-2.6.13-8/arch/i386/kernel/mpparse.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13-8-marcus/arch/i386/kernel/mpparse.c	2005-09-11 04:01:18.000000000 +0200
@@ -893,6 +893,7 @@
 	u32			gsi_base)
 {
 	int			idx = 0;
+	int			tmpid = 0;
 
 	if (nr_ioapics >= MAX_IO_APICS) {
 		printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
@@ -912,8 +913,13 @@
 	mp_ioapics[idx].mpc_apicaddr = address;
 
 	set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
-	if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15))
-		mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id);
+	if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) {
+		if ((tmpid = io_apic_get_unique_id(idx, id)) == -1) {
+			nr_ioapics--;
+			return;
+		}
+		mp_ioapics[idx].mpc_apicid = tmpid;
+	}
 	else
 		mp_ioapics[idx].mpc_apicid = id;
 	mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);