summaryrefslogtreecommitdiff
path: root/src/arch/x86/ioapic.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-06 06:19:15 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-16 19:57:51 +0000
commitc545baaf476016c1c136c3c88214c3c4252d4059 (patch)
tree71c376f297d09fd1df3707a87afbcc0f6db9b028 /src/arch/x86/ioapic.c
parent5c2594e179f347fd23aecc4987ded12e18fa7895 (diff)
arch/x86/ioapic: Clear vector table first
Always clear vector 0 entry before optionally overwriting it with the i8259 timer redirection. Change-Id: Ia2e96f43e6494711f9fc4fd74229f5817b04b48d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55286 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/x86/ioapic.c')
-rw-r--r--src/arch/x86/ioapic.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c
index d2f65fdaf3..a11e5dd9b3 100644
--- a/src/arch/x86/ioapic.c
+++ b/src/arch/x86/ioapic.c
@@ -138,17 +138,11 @@ void ioapic_set_boot_config(void *ioapic_base, bool irq_on_fsb)
void setup_ioapic_helper(void *ioapic_base, u8 ioapic_id, bool enable_virtual_wire)
{
- int first = 0, last;
-
set_ioapic_id(ioapic_base, ioapic_id);
+ clear_ioapic(ioapic_base);
- if (enable_virtual_wire) {
+ if (enable_virtual_wire)
route_i8259_irq0(ioapic_base);
- first = 1;
- }
-
- last = ioapic_interrupt_count(ioapic_base) - 1;
- clear_vectors(ioapic_base, first, last);
}