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>
diff --git a/src/soc/intel/denverton_ns/lpc.c b/src/soc/intel/denverton_ns/lpc.c
index 7f47e5e..f0a7058 100644
--- a/src/soc/intel/denverton_ns/lpc.c
+++ b/src/soc/intel/denverton_ns/lpc.c
@@ -31,10 +31,10 @@
*/
static void pch_enable_ioapic(struct device *dev)
{
- set_ioapic_id((void *)IO_APIC_ADDR, IO_APIC0);
-
/* affirm full set of redirection table entries ("write once") */
ioapic_set_max_vectors(VIO_APIC_VADDR, PCH_REDIR_ETR);
+
+ set_ioapic_id((void *)IO_APIC_ADDR, IO_APIC0);
}
/* interrupt router lookup for internal devices */