summaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-08 11:25:29 +0300
committerFelix Held <felix-coreboot@felixheld.de>2021-10-22 14:15:52 +0000
commitea6d12a0de8af000fb72a873b63364462f280643 (patch)
treed2dc78444c6a3447641bab81b10bc2018a9ea056 /src/southbridge
parent6139ff9c9aa0b941b1c178058e4d10baa23fff70 (diff)
sb,soc/intel: Set IOAPIC max entries before APIC ID
This allows to replace set_ioapic_id() call with setup_ioapic() that also clears redirection table entries. Change-Id: I854f19c997a96bcdccb11a0906431e3291788cb6 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55308 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/intel/bd82x6x/lpc.c4
-rw-r--r--src/southbridge/intel/ibexpeak/lpc.c4
-rw-r--r--src/southbridge/intel/lynxpoint/lpc.c5
3 files changed, 7 insertions, 6 deletions
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c
index b1f5ec8430..51d6b07064 100644
--- a/src/southbridge/intel/bd82x6x/lpc.c
+++ b/src/southbridge/intel/bd82x6x/lpc.c
@@ -41,10 +41,10 @@ static void pch_enable_ioapic(struct device *dev)
pci_write_config16(dev, LPC_IBDF,
PCH_IOAPIC_PCI_BUS << 8 | PCH_IOAPIC_PCI_SLOT << 3);
- set_ioapic_id(VIO_APIC_VADDR, 0x02);
-
/* affirm full set of redirection table entries ("write once") */
ioapic_lock_max_vectors(VIO_APIC_VADDR);
+
+ set_ioapic_id(VIO_APIC_VADDR, 0x02);
}
static void pch_enable_serial_irqs(struct device *dev)
diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c
index f1cf7a3b7f..fa53db20f8 100644
--- a/src/southbridge/intel/ibexpeak/lpc.c
+++ b/src/southbridge/intel/ibexpeak/lpc.c
@@ -34,10 +34,10 @@ typedef struct southbridge_intel_ibexpeak_config config_t;
*/
static void pch_enable_ioapic(struct device *dev)
{
- set_ioapic_id(VIO_APIC_VADDR, 0x01);
-
/* affirm full set of redirection table entries ("write once") */
ioapic_lock_max_vectors(VIO_APIC_VADDR);
+
+ set_ioapic_id(VIO_APIC_VADDR, 0x01);
}
static void pch_enable_serial_irqs(struct device *dev)
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index ef75d2f77d..72f6d80977 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -35,14 +35,15 @@ static void pch_enable_ioapic(struct device *dev)
pci_write_config16(dev, LPC_IBDF,
PCH_IOAPIC_PCI_BUS << 8 | PCH_IOAPIC_PCI_SLOT << 3);
- set_ioapic_id(VIO_APIC_VADDR, 0x02);
-
/* affirm full set of redirection table entries ("write once") */
/* PCH-LP has 40 redirection entries */
if (pch_is_lp())
ioapic_set_max_vectors(VIO_APIC_VADDR, 40);
else
ioapic_lock_max_vectors(VIO_APIC_VADDR);
+
+ set_ioapic_id(VIO_APIC_VADDR, 0x02);
+
}
static void pch_enable_serial_irqs(struct device *dev)