]> xenbits.xensource.com Git - seabios.git/commitdiff
Initialize the LINT LVTs on the local APIC of the BSP.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 14 Nov 2009 18:43:01 +0000 (13:43 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 14 Nov 2009 18:43:01 +0000 (13:43 -0500)
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 <mch@virtutech.com>
src/smp.c

index 71b0da8ce39994759877ebdb2f206957f0f73538..71004767ba5c23f0ebba65c54d045cf4105f3b6d 100644 (file)
--- 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;