2 * This file is part of the coreboot project.
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
6 * Copyright (C) 2013, Intel Corporation.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 #include <arch/pirq_routing.h>
29 #define PCI_IRQS 0xDCF0
31 const struct irq_routing_table intel_irq_routing_table
= {
32 PIRQ_SIGNATURE
, /* u32 signature */
33 PIRQ_VERSION
, /* u16 version */
34 32+16*CONFIG_IRQ_SLOT_COUNT
, /* There can be total 18 devices on the bus */
35 0x00, /* Where the interrupt router lies (bus) */
36 (0x1f<<3)|0x0, /* Where the interrupt router lies (dev) */
37 0, /* IRQs devoted exclusively to PCI usage */
41 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */
42 0x86, /* u8 checksum. */
44 /* bus, dev|fn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */
45 {0x00,(0x01<<3)|0x0, {{PIRQA
, PCI_IRQS
}, {PIRQB
, PCI_IRQS
}, {PIRQC
, PCI_IRQS
}, {PIRQD
, PCI_IRQS
}}, 0x0, 0x0}, // PCIE Port 1: INTA-PIRQA, INTB-PIRQB, INTC-PIRQC, INTD-PIRQD
46 {0x00,(0x02<<3)|0x0, {{PIRQA
, PCI_IRQS
}, {PIRQB
, PCI_IRQS
}, {PIRQC
, PCI_IRQS
}, {PIRQD
, PCI_IRQS
}}, 0x0, 0x0}, // PCIE Port 2: INTA-PIRQA, INTB-PIRQB, INTC-PIRQC, INTD-PIRQD
47 {0x00,(0x03<<3)|0x0, {{PIRQE
, PCI_IRQS
}, {PIRQF
, PCI_IRQS
}, {PIRQG
, PCI_IRQS
}, {PIRQH
, PCI_IRQS
}}, 0x0, 0x0}, // PCIE Port 3: INTA-PIRQE, INTB-PIRQF, INTC-PIRQG, INTD-PIRQH
48 {0x00,(0x04<<3)|0x0, {{PIRQE
, PCI_IRQS
}, {PIRQF
, PCI_IRQS
}, {PIRQG
, PCI_IRQS
}, {PIRQH
, PCI_IRQS
}}, 0x0, 0x0}, // PCIE Port 4: INTA-PIRQE, INTB-PIRQF, INTC-PIRQG, INTD-PIRQH
49 {0x00,(0x0b<<3)|0x0, {{PIRQA
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // IQAT INTA-PIRQA
50 {0x00,(0x0f<<3)|0x0, {{PIRQA
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // RCEC INTA-PIRQA
51 {0x00,(0x13<<3)|0x0, {{PIRQA
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // SMBUS #1 INTA-PIRQA
52 {0x00,(0x14<<3)|0x0, {{PIRQE
, PCI_IRQS
}, {PIRQF
, PCI_IRQS
}, {PIRQG
, PCI_IRQS
}, {PIRQH
, PCI_IRQS
}}, 0x0, 0x0}, // GbE, INTA-PIRQE, INTB-PIRQF, INTC-PIRQG, INTD-PIRQH
53 {0x00,(0x16<<3)|0x0, {{PIRQH
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // EHCI INTA-PIRQH
54 {0x00,(0x17<<3)|0x0, {{PIRQD
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // SATA2 INTA-PIRQD
55 {0x00,(0x18<<3)|0x0, {{PIRQD
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // SATA3 INTA-PIRQD
56 {0x00,(0x1f<<3)|0x0, {{0x00, 0x0000}, {PIRQC
, PCI_IRQS
}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // LPC/SMBUS #0 INTB - PIRQC
60 unsigned long write_pirq_routing_table(unsigned long addr
)
62 return copy_pirq_routing_table(addr
, &intel_irq_routing_table
);