patch-2.4.19 linux-2.4.19/arch/i386/kernel/dmi_scan.c
Next file: linux-2.4.19/arch/i386/kernel/entry.S
Previous file: linux-2.4.19/arch/i386/kernel/bluesmoke.c
Back to the patch index
Back to the overall index
- Lines: 229
- Date:
Fri Aug 2 17:39:42 2002
- Orig file:
linux-2.4.18/arch/i386/kernel/dmi_scan.c
- Orig date:
Mon Feb 25 11:37:53 2002
diff -urN linux-2.4.18/arch/i386/kernel/dmi_scan.c linux-2.4.19/arch/i386/kernel/dmi_scan.c
@@ -9,6 +9,7 @@
#include <linux/pm.h>
#include <asm/keyboard.h>
#include <asm/system.h>
+#include <linux/bootmem.h>
unsigned long dmi_broken;
int is_sony_vaio_laptop;
@@ -51,7 +52,7 @@
u8 *data;
int i=1;
- buf = ioremap(base, len);
+ buf = bt_ioremap(base, len);
if(buf==NULL)
return -1;
@@ -83,7 +84,7 @@
data+=2;
i++;
}
- iounmap(buf);
+ bt_iounmap(buf, len);
return 0;
}
@@ -155,7 +156,7 @@
return;
if (dmi_ident[slot])
return;
- dmi_ident[slot] = kmalloc(strlen(p)+1, GFP_KERNEL);
+ dmi_ident[slot] = alloc_bootmem(strlen(p)+1);
if(dmi_ident[slot])
strcpy(dmi_ident[slot], p);
else
@@ -292,6 +293,62 @@
return 0;
}
+/*
+ * Some machines, usually laptops, can't handle an enabled local APIC.
+ * The symptoms include hangs or reboots when suspending or resuming,
+ * attaching or detaching the power cord, or entering BIOS setup screens
+ * through magic key sequences.
+ */
+static int __init local_apic_kills_bios(struct dmi_blacklist *d)
+{
+#ifdef CONFIG_X86_LOCAL_APIC
+ extern int dont_enable_local_apic;
+ if (!dont_enable_local_apic) {
+ dont_enable_local_apic = 1;
+ printk(KERN_WARNING "%s with broken BIOS detected. "
+ "Refusing to enable the local APIC.\n",
+ d->ident);
+ }
+#endif
+ return 0;
+}
+
+/*
+ * The Microstar 6163-2 (a.k.a Pro) mainboard will hang shortly after
+ * resumes, and also at what appears to be asynchronous APM events,
+ * if the local APIC is enabled.
+ */
+static int __init apm_kills_local_apic(struct dmi_blacklist *d)
+{
+#ifdef CONFIG_X86_LOCAL_APIC
+ extern int dont_enable_local_apic;
+ if (apm_info.bios.version && !dont_enable_local_apic) {
+ dont_enable_local_apic = 1;
+ printk(KERN_WARNING "%s with broken BIOS detected. "
+ "Refusing to enable the local APIC.\n",
+ d->ident);
+ }
+#endif
+ return 0;
+}
+
+/*
+ * The Intel AL440LX mainboard will hang randomly if the local APIC
+ * timer is running and the APM BIOS hasn't been disabled.
+ */
+static int __init apm_kills_local_apic_timer(struct dmi_blacklist *d)
+{
+#ifdef CONFIG_X86_LOCAL_APIC
+ extern int dont_use_local_apic_timer;
+ if (apm_info.bios.version && !dont_use_local_apic_timer) {
+ dont_use_local_apic_timer = 1;
+ printk(KERN_WARNING "%s with broken BIOS detected. "
+ "The local APIC timer will not be used.\n",
+ d->ident);
+ }
+#endif
+ return 0;
+}
/*
* Check for clue free BIOS implementations who use
@@ -353,6 +410,7 @@
* The MP1.4 table is right however and so SMP kernels tend to work.
*/
+extern int skip_ioapic_setup;
static __init int broken_pirq(struct dmi_blacklist *d)
{
printk(KERN_INFO " *** Possibly defective BIOS detected (irqtable)\n");
@@ -360,6 +418,9 @@
printk(KERN_INFO " *** If you see IRQ problems, in paticular SCSI resets and hangs at boot\n");
printk(KERN_INFO " *** contact your hardware vendor and ask about updates.\n");
printk(KERN_INFO " *** Building an SMP kernel may evade the bug some of the time.\n");
+#ifdef CONFIG_X86_IO_APIC
+ skip_ioapic_setup = 0;
+#endif
return 0;
}
@@ -452,6 +513,11 @@
MATCH(DMI_BIOS_VERSION, "A04"),
MATCH(DMI_BIOS_DATE, "08/24/2000"), NO_MATCH
} },
+ { broken_apm_power, "Dell Inspiron 2500", { /* Handle problems with APM on Inspiron 2500 */
+ MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ MATCH(DMI_BIOS_VERSION, "A12"),
+ MATCH(DMI_BIOS_DATE, "02/04/2002"), NO_MATCH
+ } },
{ set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
@@ -493,12 +559,23 @@
MATCH(DMI_PRODUCT_NAME, "Delhi3"),
NO_MATCH, NO_MATCH,
} },
+ { apm_is_horked, "Fujitsu-Siemens", { /* APM crashes */
+ MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
+ MATCH(DMI_BIOS_VERSION, "Version1.01"),
+ NO_MATCH, NO_MATCH,
+ } },
{ apm_is_horked, "Sharp PC-PJ/AX", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "SHARP"),
MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
MATCH(DMI_BIOS_VERSION,"Version R2.08")
} },
+ { apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
+ MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+ MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+ MATCH(DMI_BIOS_VERSION,"A11")
+ } },
{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
MATCH(DMI_PRODUCT_NAME, "PCG-"),
@@ -534,6 +611,12 @@
MATCH(DMI_BIOS_DATE, "08/11/00"), NO_MATCH
} },
+ { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
+ MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ MATCH(DMI_BIOS_VERSION, "R0206Z3"),
+ MATCH(DMI_BIOS_DATE, "12/25/00"), NO_MATCH
+ } },
+
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0203D0"),
@@ -546,6 +629,12 @@
MATCH(DMI_BIOS_DATE, "08/25/00"), NO_MATCH
} },
+ { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
+ MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ MATCH(DMI_BIOS_VERSION, "R0209Z3"),
+ MATCH(DMI_BIOS_DATE, "05/12/01"), NO_MATCH
+ } },
+
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-F104K */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0204K2"),
@@ -563,6 +652,36 @@
MATCH(DMI_BIOS_DATE, "09/12/00"), NO_MATCH
} },
+ /* Machines which have problems handling enabled local APICs */
+
+ { local_apic_kills_bios, "Dell Inspiron", {
+ MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ MATCH(DMI_PRODUCT_NAME, "Inspiron"),
+ NO_MATCH, NO_MATCH
+ } },
+
+ { local_apic_kills_bios, "Dell Latitude", {
+ MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ MATCH(DMI_PRODUCT_NAME, "Latitude"),
+ NO_MATCH, NO_MATCH
+ } },
+
+ { local_apic_kills_bios, "IBM Thinkpad T20", {
+ MATCH(DMI_BOARD_VENDOR, "IBM"),
+ MATCH(DMI_BOARD_NAME, "264741U"),
+ NO_MATCH, NO_MATCH
+ } },
+
+ { apm_kills_local_apic, "Microstar 6163", {
+ MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
+ MATCH(DMI_BOARD_NAME, "MS-6163"),
+ NO_MATCH, NO_MATCH } },
+
+ { apm_kills_local_apic_timer, "Intel AL440LX", {
+ MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
+ MATCH(DMI_BOARD_NAME, "AL440LX"),
+ NO_MATCH, NO_MATCH } },
+
/* Problem Intel 440GX bioses */
{ broken_pirq, "SABR1 Bios", { /* Bad $PIR */
@@ -731,12 +850,9 @@
}
}
-static int __init dmi_scan_machine(void)
+void __init dmi_scan_machine(void)
{
int err = dmi_iterate(dmi_decode);
if(err == 0)
dmi_check_blacklist();
- return err;
}
-
-module_init(dmi_scan_machine);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)