From 19c1a7692bf65fc40e56f93ad00cc3eefaad22a4 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 14 Nov 2009 13:43:01 -0500 Subject: [PATCH] Initialize the LINT LVTs on the local APIC of the BSP. Since the APIC is enabled, we need to initialize LINT0 to ExtINT and LINT1 to NMI. For now, only do this on non-coreboot configurations. Signed-off-by: Magnus Christensson --- src/smp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/smp.c b/src/smp.c index 71b0da8..7100476 100644 --- a/src/smp.c +++ b/src/smp.c @@ -13,6 +13,8 @@ #define APIC_ICR_LOW ((u8*)BUILD_APIC_ADDR + 0x300) #define APIC_SVR ((u8*)BUILD_APIC_ADDR + 0x0F0) +#define APIC_LINT0 ((u8*)BUILD_APIC_ADDR + 0x350) +#define APIC_LINT1 ((u8*)BUILD_APIC_ADDR + 0x360) #define APIC_ENABLED 0x0100 @@ -91,6 +93,14 @@ smp_probe(void) u32 val = readl(APIC_SVR); writel(APIC_SVR, val | APIC_ENABLED); + if (! CONFIG_COREBOOT) { + /* Set LINT0 as Ext_INT, level triggered */ + writel(APIC_LINT0, 0x8700); + + /* Set LINT1 as NMI, level triggered */ + writel(APIC_LINT1, 0x8400); + } + // broadcast SIPI writel(APIC_ICR_LOW, 0x000C4500); u32 sipi_vector = BUILD_AP_BOOT_ADDR >> 12; -- 2.39.5