diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-06-20 19:43:37 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-10-15 12:20:50 +0000 |
commit | 90f54c9b8f2ae6d1b222bdcdda9c69f29fab2229 (patch) | |
tree | 483f74a65d7c7ea6353db0cf40bd39555d48871a | |
parent | ff556ca9956689640503f33098f7fe3c03b475f1 (diff) |
cpu/x86/lapic: Add comment on spurious interrupt
The bit LAPIC_SPIV_ENABLE returns 0 after reset even though
LAPIC has not been temporarily disabled.
Change-Id: Id261bc68fe9d1b1b0e5a3ef599a8f33a686d283b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r-- | src/cpu/x86/lapic/lapic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c index bd2fa67afd..a346bc1b14 100644 --- a/src/cpu/x86/lapic/lapic.c +++ b/src/cpu/x86/lapic/lapic.c @@ -47,9 +47,11 @@ static void lapic_virtual_wire_mode_init(void) */ lapic_update32(LAPIC_TASKPRI, ~LAPIC_TPRI_MASK, 0); - /* Put the local APIC in virtual wire mode */ + /* Set spurious interrupt vector to 0 and keep LAPIC enabled to + be able to clear LVT register mask bits. */ lapic_update32(LAPIC_SPIV, ~LAPIC_VECTOR_MASK, LAPIC_SPIV_ENABLE); + /* Put the local APIC in virtual wire mode */ uint32_t mask = LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER | LAPIC_LVT_REMOTE_IRR | LAPIC_INPUT_POLARITY | LAPIC_SEND_PENDING | LAPIC_LVT_RESERVED_1 | LAPIC_DELIVERY_MODE_MASK; |