summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/amd/mandolin/mainboard.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mainboard/amd/mandolin/mainboard.c b/src/mainboard/amd/mandolin/mainboard.c
index 1eb3329d13..397179a68a 100644
--- a/src/mainboard/amd/mandolin/mainboard.c
+++ b/src/mainboard/amd/mandolin/mainboard.c
@@ -69,6 +69,12 @@ static void init_tables(void)
memset(fch_apic_routing, PIRQ_NC, sizeof(fch_apic_routing));
for (i = 0; i < mb_fch_irq_mapping_table_size; i++) {
+ if (mb_irq_map[i].intr_index >= FCH_IRQ_ROUTING_ENTRIES) {
+ printk(BIOS_WARNING,
+ "Invalid IRQ index %u in FCH IRQ routing table entry %zu\n",
+ mb_irq_map[i].intr_index, i);
+ continue;
+ }
fch_pic_routing[mb_irq_map[i].intr_index] = mb_irq_map[i].pic_irq_num;
fch_apic_routing[mb_irq_map[i].intr_index] = mb_irq_map[i].apic_irq_num;
}