Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55699 )
Change subject: cpu/x86/lapic: Add comment on spurious interrupt ......................................................................
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 --- M src/cpu/x86/lapic/lapic.c 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c index bd2fa67..a346bc1 100644 --- a/src/cpu/x86/lapic/lapic.c +++ b/src/cpu/x86/lapic/lapic.c @@ -47,9 +47,11 @@ */ 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;