[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86: work around certain Intel BIOSes causing (transient) hangs during



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1331112334 0
# Node ID 6c3a6fb7013da78ccddc2e6fd0467cd30bf334fe
# Parent  f141db2fe4c1600cd40e1737560f5841150a30b2
x86: work around certain Intel BIOSes causing (transient) hangs during
boot

They apparently leave the USB legacy emulation bits set in ICH10's
SMI Control and Enable register, but fail to handle the resulting SMIs
gracefully. The hangs can apparently extend indefinitely, but are
commonly observed to last between a few seconds and a minute.

This assumes that only ICH10-based systems on Intel main boards with
Intel BIOS may be affected. Until Intel comes up with a more precise
identification of affected BIOSes, all Intel ones on Intel boards
will get this workaround applied.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   23795:e17f70940d1f
xen-unstable date:        Sat Aug 27 12:14:38 2011 +0100
---


diff -r f141db2fe4c1 -r 6c3a6fb7013d xen/arch/x86/dmi_scan.c
--- a/xen/arch/x86/dmi_scan.c   Wed Mar 07 09:24:20 2012 +0000
+++ b/xen/arch/x86/dmi_scan.c   Wed Mar 07 09:25:34 2012 +0000
@@ -9,6 +9,8 @@
 #include <asm/io.h>
 #include <asm/system.h>
 #include <xen/dmi.h>
+#include <xen/pci.h>
+#include <xen/pci_regs.h>
 
 #define bt_ioremap(b,l)  ((u8 *)__acpi_map_table(b,l))
 #define bt_iounmap(b,l)  ((void)0)
@@ -188,6 +190,28 @@
        return 0;
 }
 
+static int __init ich10_bios_quirk(struct dmi_system_id *d)
+{
+    u32 port, smictl;
+
+    if ( pci_conf_read16(0, 0x1f, 0, PCI_VENDOR_ID) != 0x8086 )
+        return 0;
+
+    switch ( pci_conf_read16(0, 0x1f, 0, PCI_DEVICE_ID) ) {
+    case 0x3a14:
+    case 0x3a16:
+    case 0x3a18:
+    case 0x3a1a:
+        port = (pci_conf_read16(0, 0x1f, 0, 0x40) & 0xff80) + 0x30;
+        smictl = inl(port);
+        /* turn off LEGACY_USB{,2}_EN if enabled */
+        if ( smictl & 0x20008 )
+            outl(smictl & ~0x20008, port);
+        break;
+    }
+
+    return 0;
+}
 
 #ifdef CONFIG_ACPI_SLEEP
 static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
@@ -273,6 +297,18 @@
                        } },
 #endif
 
+       { ich10_bios_quirk, "Intel board & BIOS",
+               /*
+                * BIOS leaves legacy USB emulation enabled while
+                * SMM can't properly handle it.
+                */
+               {
+                       MATCH(DMI_BOARD_VENDOR, "Intel Corp"),
+                       MATCH(DMI_BIOS_VENDOR, "Intel Corp"),
+                       NO_MATCH, NO_MATCH
+               }
+       },
+
 #ifdef CONFIG_ACPI_BOOT
        /*
         * If your system is blacklisted here, but you find that acpi=force

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.