Revert "x86/lapic: Set EXTINT on BSP only"

This reverts commit aac79e0b8f.

Reason for revert: This massively slows down the boot process because
the LAPIC delivery mode for the APs is not set anymore. Plus, not all
review comments were fully addressed, yet this got merged in anyway.

Change-Id: If9bae6aae0d4d1f21b067a7d970975193c2b16d5
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42166
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Angel Pons 2020-06-16 20:10:47 +00:00 committed by Felix Held
parent 02c565b35a
commit 2ebea2d427
1 changed files with 15 additions and 11 deletions

View File

@ -2,11 +2,16 @@
#include <cpu/x86/lapic.h> #include <cpu/x86/lapic.h>
#include <console/console.h> #include <console/console.h>
#include <smp/node.h>
void do_lapic_init(void) void do_lapic_init(void)
{ {
uint32_t lvt0_val; /* this is so interrupts work. This is very limited scope --
* linux will do better later, we hope ...
*/
/* this is the first way we learned to do it. It fails on real SMP
* stuff. So we have to do things differently ...
* see the Intel mp1.4 spec, page A-3
*/
printk(BIOS_INFO, "Setting up local APIC...\n"); printk(BIOS_INFO, "Setting up local APIC...\n");
@ -23,16 +28,15 @@ void do_lapic_init(void)
lapic_write_around(LAPIC_SPIV, lapic_write_around(LAPIC_SPIV,
(lapic_read_around(LAPIC_SPIV) & ~(LAPIC_VECTOR_MASK)) (lapic_read_around(LAPIC_SPIV) & ~(LAPIC_VECTOR_MASK))
| LAPIC_SPIV_ENABLE); | LAPIC_SPIV_ENABLE);
lapic_write_around(LAPIC_LVT0,
lvt0_val = (lapic_read_around(LAPIC_LVT0) & (lapic_read_around(LAPIC_LVT0) &
~(LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER | ~(LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER |
LAPIC_LVT_REMOTE_IRR | LAPIC_INPUT_POLARITY | LAPIC_LVT_REMOTE_IRR | LAPIC_INPUT_POLARITY |
LAPIC_SEND_PENDING | LAPIC_LVT_RESERVED_1)) | LAPIC_SEND_PENDING | LAPIC_LVT_RESERVED_1 |
(LAPIC_LVT_REMOTE_IRR | LAPIC_SEND_PENDING); LAPIC_DELIVERY_MODE_MASK))
if (boot_cpu()) | (LAPIC_LVT_REMOTE_IRR | LAPIC_SEND_PENDING |
lvt0_val = SET_LAPIC_DELIVERY_MODE(lvt0_val, LAPIC_MODE_EXINT); LAPIC_DELIVERY_MODE_EXTINT)
lapic_write_around(LAPIC_LVT0, lvt0_val); );
lapic_write_around(LAPIC_LVT1, lapic_write_around(LAPIC_LVT1,
(lapic_read_around(LAPIC_LVT1) & (lapic_read_around(LAPIC_LVT1) &
~(LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER | ~(LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER |