diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-06-20 15:44:32 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-10-17 02:45:01 +0000 |
commit | c78c46d433eb6103c943dc8f7db9fa970643acce (patch) | |
tree | da165871912ab6aa8cee71105b7445004ba152b6 /src | |
parent | d1da9570da7a725611dd4227e4297d0bb2ef2d21 (diff) |
cpu/x86/lapic: Only deliver ExtINT to BSP
ExtINT is related to external PIC mode i8259 interrupts,
they should be delivered to one CPU (BSP) only.
Change-Id: I78490d2cbe3d9f52e10ef2471508263fd6c146ba
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42434
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/x86/lapic/lapic.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c index 58e45248ab..b4d3c4de42 100644 --- a/src/cpu/x86/lapic/lapic.c +++ b/src/cpu/x86/lapic/lapic.c @@ -5,6 +5,7 @@ #include <cpu/x86/lapic_def.h> #include <cpu/x86/msr.h> #include <console/console.h> +#include <smp/node.h> #include <stdint.h> void enable_lapic(void) @@ -55,7 +56,11 @@ static void lapic_virtual_wire_mode_init(void) uint32_t mask = LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER | LAPIC_INPUT_POLARITY | LAPIC_DELIVERY_MODE_MASK; - lapic_update32(LAPIC_LVT0, ~mask, LAPIC_DELIVERY_MODE_EXTINT); + if (boot_cpu()) + lapic_update32(LAPIC_LVT0, ~mask, LAPIC_DELIVERY_MODE_EXTINT); + else + lapic_update32(LAPIC_LVT0, ~mask, LAPIC_LVT_MASKED | + LAPIC_DELIVERY_MODE_EXTINT); lapic_update32(LAPIC_LVT1, ~mask, LAPIC_DELIVERY_MODE_NMI); } |