--- sys/i386/pci/pci_pir.c.orig 2009-10-11 02:59:35.000000000 +0800 +++ sys/i386/pci/pci_pir.c 2009-10-11 03:58:48.000000000 +0800 @@ -123,6 +123,12 @@ "Mask of allowed irqs to try to route when it has no good clue about\n" "which irqs it should use."); +static uint32_t pir_checksum_ignore = 0; +TUNABLE_INT("hw.pci.pir_checksum_ignore", &pir_checksum_ignore); +SYSCTL_INT(_hw_pci, OID_AUTO, pir_checksum_ignore, CTLFLAG_RDTUN, + &pir_checksum_ignore, 0, + "Ignore incorrect checksum of PCI BIOS's PIR table"); + /* * Look for the interrupt routing table. * @@ -160,8 +166,14 @@ for (cv = (u_int8_t *)pt, ck = 0, i = 0; i < (pt->pt_header.ph_length); i++) ck += cv[i]; - if (ck != 0) + if (ck != 0) { + if (bootverbose) + printf("$PIR: checksum %#04x incorrect, %s\n", + (unsigned)ck, + pir_checksum_ignore ? "using anyway" : "table ignored"); + if (!pir_checksum_ignore) return; + } /* Ok, we've got a valid table. */ pci_route_table = pt;