diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c
index 16843d7..7b9e348 100644
--- a/hw/lpc_ich9.c
+++ b/hw/lpc_ich9.c
@@ -109,17 +109,16 @@ static void ich9_cc_init(ICH9LPCState *lpc)
     int intx;
 
     /* the default irq routing is arbitrary as long as it matches with
-     * acpi irq routing table.
-     * The one that is incompatible with piix_pci(= bochs) one is
-     * intentionally chosen to let the users know that the different
-     * board is used.
+     * acpi irq routing table and BIOS.
      *
      * int[A-D] -> pirq[E-F]
      * avoid pirq A-D because they are used for pci express port
+     * Keep the same slot rotation as piix or the bios won't know
+     * how to program PCI interrupt line registers for boot ROMs.
      */
     for (slot = 0; slot < PCI_SLOT_MAX; slot++) {
         for (intx = 0; intx < PCI_NUM_PINS; intx++) {
-            lpc->irr[slot][intx] = (slot + intx) % 4 + 4;
+            lpc->irr[slot][intx] = ((slot + intx - 1) & 3) + 4;
         }
     }
     ich9_cc_update(lpc);
