1 #include <linux/config.h>
2 #include <linux/types.h>
3 #include <linux/kernel.h>
4 #include <linux/string.h>
5 #include <linux/init.h>
6 #include <linux/apm_bios.h>
7 #include <linux/slab.h>
11 #include <asm/keyboard.h>
12 #include <asm/system.h>
13 #include <linux/bootmem.h>
17 unsigned long dmi_broken;
18 int is_sony_vaio_laptop;
28 #define dmi_printk(x) printk x
33 static char * __init dmi_string(struct dmi_header *dm, u8 s)
50 * We have to be cautious here. We have seen BIOSes with DMI pointers
51 * pointing to completely the wrong place for example
54 static int __init dmi_table(u32 base, int len, int num, void (*decode)(struct dmi_header *))
57 struct dmi_header *dm;
61 buf = bt_ioremap(base, len);
68 * Stop when we see all the items the table claimed to have
69 * OR we run off the end of the table (also happens)
72 while(i<num && data-buf+sizeof(struct dmi_header)<=len)
74 dm=(struct dmi_header *)data;
76 * We want to know the total length (formated area and strings)
77 * before decoding to make sure we won't run off the table in
78 * dmi_decode or dmi_string
81 while(data-buf<len-1 && (data[0] || data[1]))
93 inline static int __init dmi_checksum(u8 *buf)
103 static int __init dmi_iterate(void (*decode)(struct dmi_header *))
110 isa_memcpy_fromio(buf, fp, 15);
111 if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
113 u16 num=buf[13]<<8|buf[12];
114 u16 len=buf[7]<<8|buf[6];
115 u32 base=buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8];
118 * DMI version 0.0 means that the real version is taken from
119 * the SMBIOS version, which we don't know at this point.
122 dmi_printk((KERN_INFO "DMI %d.%d present.\n",
123 buf[14]>>4, buf[14]&0x0F));
125 dmi_printk((KERN_INFO "DMI present.\n"));
126 dmi_printk((KERN_INFO "%d structures occupying %d bytes.\n",
128 dmi_printk((KERN_INFO "DMI table at 0x%08X.\n",
130 if(dmi_table(base,len, num, decode)==0)
153 static char *dmi_ident[DMI_STRING_MAX];
159 static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
162 char *p = dmi_string(dm, d[string]);
163 if(p==NULL || *p == 0)
167 dmi_ident[slot] = alloc_bootmem(strlen(p)+1);
169 strcpy(dmi_ident[slot], p);
171 printk(KERN_ERR "dmi_save_ident: out of memory.\n");
175 * DMI callbacks for problem boards
188 int (*callback)(struct dmi_blacklist *);
190 struct dmi_strmatch matches[4];
193 #define NO_MATCH { NONE, NULL}
194 #define MATCH(a,b) { a, b }
197 * We have problems with IDE DMA on some platforms. In paticular the
198 * KT7 series. On these it seems the newer BIOS has fixed them. The
199 * rule needs to be improved to match specific BIOS revisions with
200 * corruption problems
202 static __init int disable_ide_dma(struct dmi_blacklist *d)
204 #ifdef CONFIG_BLK_DEV_IDE
205 extern int noautodma;
209 printk(KERN_INFO "%s series board detected. Disabling IDE DMA.\n", d->ident);
217 * Reboot options and system auto-detection code provided by
218 * Dell Computer Corporation so their systems "just work". :-)
222 * Some machines require the "reboot=b" commandline option, this quirk makes that automatic.
224 static __init int set_bios_reboot(struct dmi_blacklist *d)
226 extern int reboot_thru_bios;
227 if (reboot_thru_bios == 0)
229 reboot_thru_bios = 1;
230 printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
236 * Some machines require the "reboot=s" commandline option, this quirk makes that automatic.
238 static __init int set_smp_reboot(struct dmi_blacklist *d)
241 extern int reboot_smp;
245 printk(KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n", d->ident);
252 * Some machines require the "reboot=b,s" commandline option, this quirk makes that automatic.
254 static __init int set_smp_bios_reboot(struct dmi_blacklist *d)
262 * Some bioses have a broken protected mode poweroff and need to use realmode
265 static __init int set_realmode_power_off(struct dmi_blacklist *d)
267 if (apm_info.realmode_power_off == 0)
269 apm_info.realmode_power_off = 1;
270 printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
277 * Some laptops require interrupts to be enabled during APM calls
280 static __init int set_apm_ints(struct dmi_blacklist *d)
282 if (apm_info.allow_ints == 0)
284 apm_info.allow_ints = 1;
285 printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
291 * Some APM bioses corrupt memory or just plain do not work
294 static __init int apm_is_horked(struct dmi_blacklist *d)
296 if (apm_info.disabled == 0)
298 apm_info.disabled = 1;
299 printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
304 static __init int apm_is_horked_d850md(struct dmi_blacklist *d)
306 if (apm_info.disabled == 0)
308 apm_info.disabled = 1;
309 printk(KERN_ERR "%s machine detected. Disabling APM.\n", d->ident);
310 printk(KERN_ERR "This bug is fixed in bios P15 which is available for \n");
311 printk(KERN_ERR "download from support.intel.com \n");
317 * Some APM bioses hang on APM idle calls
320 static __init int apm_likes_to_melt(struct dmi_blacklist *d)
322 if (apm_info.forbid_idle == 0)
324 apm_info.forbid_idle = 1;
325 printk(KERN_INFO "%s machine detected. Disabling APM idle calls.\n", d->ident);
331 * Check for clue free BIOS implementations who use
332 * the following QA technique
334 * [ Write BIOS Code ]<------
336 * < Does it Compile >----N--
338 * < Does it Boot Win98 >-N--
342 * Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
343 * Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
346 static __init int broken_apm_power(struct dmi_blacklist *d)
348 apm_info.get_power_status_broken = 1;
349 printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
354 * Check for a Sony Vaio system
356 * On a Sony system we want to enable the use of the sonypi
357 * driver for Sony-specific goodies like the camera and jogdial.
358 * We also want to avoid using certain functions of the PnP BIOS.
361 static __init int sony_vaio_laptop(struct dmi_blacklist *d)
363 if (is_sony_vaio_laptop == 0)
365 is_sony_vaio_laptop = 1;
366 printk(KERN_INFO "%s laptop detected.\n", d->ident);
372 * This bios swaps the APM minute reporting bytes over (Many sony laptops
373 * have this problem).
376 static __init int swab_apm_power_in_minutes(struct dmi_blacklist *d)
378 apm_info.get_power_status_swabinminutes = 1;
379 printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n");
384 * ASUS K7V-RM has broken ACPI table defining sleep modes
387 static __init int broken_acpi_Sx(struct dmi_blacklist *d)
389 printk(KERN_WARNING "Detected ASUS mainboard with broken ACPI sleep table\n");
390 dmi_broken |= BROKEN_ACPI_Sx;
395 * Toshiba fails to preserve interrupts over S1
398 static __init int init_ints_after_s1(struct dmi_blacklist *d)
400 printk(KERN_WARNING "Toshiba with broken S1 detected.\n");
401 dmi_broken |= BROKEN_INIT_AFTER_S1;
406 * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it
407 * was disabled before the suspend. Linux gets terribly confused by that.
410 typedef void (pm_kbd_func) (void);
412 static __init int broken_ps2_resume(struct dmi_blacklist *d)
414 #if defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB)
415 if (pm_kbd_request_override == NULL)
417 pm_kbd_request_override = pckbd_pm_resume;
418 printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround enabled.\n", d->ident);
425 * Work around broken HP Pavilion Notebooks which assign USB to
426 * IRQ 9 even though it is actually wired to IRQ 11
428 static __init int fix_broken_hp_bios_irq9(struct dmi_blacklist *d)
431 extern int broken_hp_bios_irq9;
432 if (broken_hp_bios_irq9 == 0)
434 broken_hp_bios_irq9 = 1;
435 printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
442 * Work around broken Acer TravelMate 360 Notebooks which assign Cardbus to
443 * IRQ 11 even though it is actually wired to IRQ 10
445 static __init int fix_acer_tm360_irqrouting(struct dmi_blacklist *d)
448 extern int acer_tm360_irqrouting;
449 if (acer_tm360_irqrouting == 0) {
450 acer_tm360_irqrouting = 1;
451 printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
458 * Exploding PnPBIOS. Don't yet know if its the BIOS or us for
462 static __init int exploding_pnp_bios(struct dmi_blacklist *d)
464 printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
465 dmi_broken |= BROKEN_PNP_BIOS;
470 * Simple "print if true" callback
473 static __init int print_if_true(struct dmi_blacklist *d)
475 printk("%s\n", d->ident);
480 #ifdef CONFIG_ACPI_BOOT
481 extern int acpi_force;
483 static __init __attribute__((unused)) int dmi_disable_acpi(struct dmi_blacklist *d)
486 printk(KERN_NOTICE "%s detected: acpi off\n",d->ident);
490 "Warning: DMI blacklist says broken, but acpi forced\n");
497 * Limit ACPI to CPU enumeration for HT
499 static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d)
502 printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident);
507 "Warning: acpi=force overrules DMI blacklist: acpi=ht\n");
511 #endif /* CONFIG_ACPI_BOOT */
513 #ifdef CONFIG_ACPI_PCI
514 static __init int disable_acpi_pci(struct dmi_blacklist *d)
516 printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident);
520 #endif /* CONFIG_ACPI_PCI */
523 * Process the DMI blacklists
528 * This will be expanded over time to force things like the APM
529 * interrupt mask settings according to the laptop
532 static __initdata struct dmi_blacklist dmi_blacklist[]={
534 { disable_ide_dma, "KT7", { /* Overbroad right now - kill DMA on problem KT7 boards */
535 MATCH(DMI_PRODUCT_NAME, "KT7-RAID"),
536 NO_MATCH, NO_MATCH, NO_MATCH
538 { disable_ide_dma, "Dell Inspiron 8100", { /* Kill DMA on Dell Inspiron 8100 laptops */
539 MATCH(DMI_PRODUCT_NAME, "Inspiron 8100"),
540 MATCH(DMI_SYS_VENDOR,"Dell Computer Corporation"), NO_MATCH, NO_MATCH
544 /* Dell Laptop hall of shame */
545 { broken_ps2_resume, "Dell Latitude C600", { /* Handle problems with APM on the C600 */
546 MATCH(DMI_SYS_VENDOR, "Dell"),
547 MATCH(DMI_PRODUCT_NAME, "Latitude C600"),
550 { apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
551 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
552 MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
553 MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
554 MATCH(DMI_BIOS_VERSION,"A11")
556 { apm_is_horked, "Dell Dimension 4100", { /* APM crashes */
557 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
558 MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
559 MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
560 MATCH(DMI_BIOS_VERSION,"A11")
562 { set_apm_ints, "Dell Inspiron", { /* Allow interrupts during suspend on Dell Inspiron laptops*/
563 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
564 MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"),
567 { set_apm_ints, "Dell Latitude", { /* Allow interrupts during suspend on Dell Latitude laptops*/
568 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
569 MATCH(DMI_PRODUCT_NAME, "Latitude C510"),
572 { broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */
573 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
574 MATCH(DMI_BIOS_VERSION, "A04"),
575 MATCH(DMI_BIOS_DATE, "08/24/2000"), NO_MATCH
579 { broken_apm_power, "Dell Inspiron 2500", { /* Handle problems with APM on Inspiron 2500 */
580 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
581 MATCH(DMI_BIOS_VERSION, "A12"),
582 MATCH(DMI_BIOS_DATE, "02/04/2002"), NO_MATCH
584 { set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
585 MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
586 MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
587 MATCH(DMI_BIOS_DATE, "134526184"), NO_MATCH
589 { set_smp_bios_reboot, "Dell PowerEdge 1300", { /* Handle problems with rebooting on Dell 1300's */
590 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
591 MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
594 { set_bios_reboot, "Dell PowerEdge 300", { /* Handle problems with rebooting on Dell 1300's */
595 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
596 MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
599 { set_bios_reboot, "Dell PowerEdge 2400", { /* Handle problems with rebooting on Dell 2400's */
600 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
601 MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
604 { set_apm_ints, "Compaq 12XL125", { /* Allow interrupts during suspend on Compaq Laptops*/
605 MATCH(DMI_SYS_VENDOR, "Compaq"),
606 MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
607 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
608 MATCH(DMI_BIOS_VERSION,"4.06")
610 { set_apm_ints, "ASUSTeK", { /* Allow interrupts during APM or the clock goes slow */
611 MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
612 MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
615 { apm_is_horked, "ABIT KX7-333[R]", { /* APM blows on shutdown */
616 MATCH(DMI_BOARD_VENDOR, "ABIT"),
617 MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"),
620 { apm_is_horked, "Trigem Delhi3", { /* APM crashes */
621 MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
622 MATCH(DMI_PRODUCT_NAME, "Delhi3"),
625 { apm_is_horked, "Fujitsu-Siemens", { /* APM crashes */
626 MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
627 MATCH(DMI_BIOS_VERSION, "Version1.01"),
630 { apm_is_horked_d850md, "Intel D850MD", { /* APM crashes */
631 MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
632 MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"),
635 { apm_is_horked, "Intel D810EMO", { /* APM crashes */
636 MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
637 MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"),
640 { apm_is_horked, "Dell XPS-Z", { /* APM crashes */
641 MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
642 MATCH(DMI_BIOS_VERSION, "A11"),
643 MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
646 { apm_is_horked, "Sharp PC-PJ/AX", { /* APM crashes */
647 MATCH(DMI_SYS_VENDOR, "SHARP"),
648 MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
649 MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
650 MATCH(DMI_BIOS_VERSION,"Version R2.08")
652 { apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
653 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
654 MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
655 MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
656 MATCH(DMI_BIOS_VERSION,"A11")
658 { apm_likes_to_melt, "Jabil AMD", { /* APM idle hangs */
659 MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
660 MATCH(DMI_BIOS_VERSION, "0AASNP06"),
663 { apm_likes_to_melt, "AMI Bios", { /* APM idle hangs */
664 MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
665 MATCH(DMI_BIOS_VERSION, "0AASNP05"),
668 { apm_likes_to_melt, "Dell Inspiron 7500", { /* APM idle hangs */
669 MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
670 MATCH(DMI_PRODUCT_NAME, "Inspiron 7500"),
674 { sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
675 MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
676 MATCH(DMI_PRODUCT_NAME, "PCG-"),
679 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
680 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
681 MATCH(DMI_BIOS_VERSION, "R0206H"),
682 MATCH(DMI_BIOS_DATE, "08/23/99"), NO_MATCH
685 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505VX */
686 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
687 MATCH(DMI_BIOS_VERSION, "W2K06H0"),
688 MATCH(DMI_BIOS_DATE, "02/03/00"), NO_MATCH
691 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-XG29 */
692 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
693 MATCH(DMI_BIOS_VERSION, "R0117A0"),
694 MATCH(DMI_BIOS_DATE, "04/25/00"), NO_MATCH
697 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
698 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
699 MATCH(DMI_BIOS_VERSION, "R0121Z1"),
700 MATCH(DMI_BIOS_DATE, "05/11/00"), NO_MATCH
703 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
704 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
705 MATCH(DMI_BIOS_VERSION, "WME01Z1"),
706 MATCH(DMI_BIOS_DATE, "08/11/00"), NO_MATCH
709 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
710 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
711 MATCH(DMI_BIOS_VERSION, "R0206Z3"),
712 MATCH(DMI_BIOS_DATE, "12/25/00"), NO_MATCH
715 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
716 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
717 MATCH(DMI_BIOS_VERSION, "R0203D0"),
718 MATCH(DMI_BIOS_DATE, "05/12/00"), NO_MATCH
721 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
722 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
723 MATCH(DMI_BIOS_VERSION, "R0203Z3"),
724 MATCH(DMI_BIOS_DATE, "08/25/00"), NO_MATCH
727 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
728 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
729 MATCH(DMI_BIOS_VERSION, "R0209Z3"),
730 MATCH(DMI_BIOS_DATE, "05/12/01"), NO_MATCH
733 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
734 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
735 MATCH(DMI_BIOS_VERSION, "WXP01Z3"),
736 MATCH(DMI_BIOS_DATE, "10/26/01"), NO_MATCH
739 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-F104K */
740 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
741 MATCH(DMI_BIOS_VERSION, "R0204K2"),
742 MATCH(DMI_BIOS_DATE, "08/28/00"), NO_MATCH
745 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
746 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
747 MATCH(DMI_BIOS_VERSION, "R0208P1"),
748 MATCH(DMI_BIOS_DATE, "11/09/00"), NO_MATCH
750 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
751 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
752 MATCH(DMI_BIOS_VERSION, "R0204P1"),
753 MATCH(DMI_BIOS_DATE, "09/12/00"), NO_MATCH
756 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600RE */
757 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
758 MATCH(DMI_BIOS_VERSION, "R0116Z1"),
762 { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600RE */
763 MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
764 MATCH(DMI_BIOS_VERSION, "RK116Z1"),
768 { exploding_pnp_bios, "Higraded P14H", { /* BIOSPnP problem */
769 MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
770 MATCH(DMI_BIOS_VERSION, "07.00T"),
771 MATCH(DMI_SYS_VENDOR, "Higraded"),
772 MATCH(DMI_PRODUCT_NAME, "P14H")
775 { init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */
776 MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
777 NO_MATCH, NO_MATCH, NO_MATCH
780 { broken_acpi_Sx, "ASUS K7V-RM", { /* Bad ACPI Sx table */
781 MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
782 MATCH(DMI_BOARD_NAME, "<K7V-RM>"),
786 { print_if_true, KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", {
787 MATCH(DMI_SYS_VENDOR, "IBM"),
788 MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
792 { fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
793 MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
794 MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
795 MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
796 MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
799 { fix_acer_tm360_irqrouting, "Acer TravelMate 36x Laptop", {
800 MATCH(DMI_SYS_VENDOR, "Acer"),
801 MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
806 * Generic per vendor APM settings
809 { set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
810 MATCH(DMI_SYS_VENDOR, "IBM"),
811 NO_MATCH, NO_MATCH, NO_MATCH
814 #ifdef CONFIG_ACPI_BOOT
816 * If your system is blacklisted here, but you find that acpi=force
817 * works for you, please contact acpi-devel@sourceforge.net
821 * Boxes that need ACPI disabled
824 { dmi_disable_acpi, "IBM Thinkpad", {
825 MATCH(DMI_BOARD_VENDOR, "IBM"),
826 MATCH(DMI_BOARD_NAME, "2629H1G"),
827 NO_MATCH, NO_MATCH }},
830 * Boxes that need acpi=ht
833 { force_acpi_ht, "FSC Primergy T850", {
834 MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
835 MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
836 NO_MATCH, NO_MATCH }},
838 { force_acpi_ht, "DELL GX240", {
839 MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
840 MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
841 NO_MATCH, NO_MATCH }},
843 { force_acpi_ht, "HP VISUALIZE NT Workstation", {
844 MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
845 MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
846 NO_MATCH, NO_MATCH }},
848 { force_acpi_ht, "Compaq ProLiant DL380 G2", {
849 MATCH(DMI_SYS_VENDOR, "Compaq"),
850 MATCH(DMI_PRODUCT_NAME, "ProLiant DL380 G2"),
851 NO_MATCH, NO_MATCH }},
853 { force_acpi_ht, "Compaq ProLiant ML530 G2", {
854 MATCH(DMI_SYS_VENDOR, "Compaq"),
855 MATCH(DMI_PRODUCT_NAME, "ProLiant ML530 G2"),
856 NO_MATCH, NO_MATCH }},
858 { force_acpi_ht, "Compaq ProLiant ML350 G3", {
859 MATCH(DMI_SYS_VENDOR, "Compaq"),
860 MATCH(DMI_PRODUCT_NAME, "ProLiant ML350 G3"),
861 NO_MATCH, NO_MATCH }},
863 { force_acpi_ht, "Compaq Workstation W8000", {
864 MATCH(DMI_SYS_VENDOR, "Compaq"),
865 MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
866 NO_MATCH, NO_MATCH }},
868 { force_acpi_ht, "ASUS P4B266", {
869 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
870 MATCH(DMI_BOARD_NAME, "P4B266"),
871 NO_MATCH, NO_MATCH }},
873 { force_acpi_ht, "ASUS P2B-DS", {
874 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
875 MATCH(DMI_BOARD_NAME, "P2B-DS"),
876 NO_MATCH, NO_MATCH }},
878 { force_acpi_ht, "ASUS CUR-DLS", {
879 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
880 MATCH(DMI_BOARD_NAME, "CUR-DLS"),
881 NO_MATCH, NO_MATCH }},
883 { force_acpi_ht, "ABIT i440BX-W83977", {
884 MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
885 MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
886 NO_MATCH, NO_MATCH }},
888 { force_acpi_ht, "IBM Bladecenter", {
889 MATCH(DMI_BOARD_VENDOR, "IBM"),
890 MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
891 NO_MATCH, NO_MATCH }},
893 { force_acpi_ht, "IBM eServer xSeries 360", {
894 MATCH(DMI_BOARD_VENDOR, "IBM"),
895 MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
896 NO_MATCH, NO_MATCH }},
898 { force_acpi_ht, "IBM eserver xSeries 330", {
899 MATCH(DMI_BOARD_VENDOR, "IBM"),
900 MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
901 NO_MATCH, NO_MATCH }},
903 { force_acpi_ht, "IBM eserver xSeries 440", {
904 MATCH(DMI_BOARD_VENDOR, "IBM"),
905 MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
906 NO_MATCH, NO_MATCH }},
908 #endif /* CONFIG_ACPI_BOOT */
909 #ifdef CONFIG_ACPI_PCI
911 * Boxes that need ACPI PCI IRQ routing disabled
914 { disable_acpi_pci, "ASUS A7V", {
915 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
916 MATCH(DMI_BOARD_NAME, "<A7V>"),
917 /* newer BIOS, Revision 1011, does work */
918 MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
921 { disable_acpi_pci, "Acer TravelMate 36x Laptop", {
922 MATCH(DMI_SYS_VENDOR, "Acer"),
923 MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
927 #endif /* CONFIG_ACPI_PCI */
934 * Walk the blacklist table running matching functions until someone
935 * returns 1 or we hit the end.
939 static __init void dmi_check_blacklist(void)
941 struct dmi_blacklist *d;
944 #ifdef CONFIG_ACPI_BOOT
945 #define ACPI_BLACKLIST_CUTOFF_YEAR 2001
947 if (dmi_ident[DMI_BIOS_DATE]) {
948 char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/');
950 int year, disable = 0;
952 year = simple_strtoul(s,NULL,0);
954 disable = year < ACPI_BLACKLIST_CUTOFF_YEAR;
955 else if (year < 1 || (year > 90 && year <= 99))
957 if (disable && !acpi_force) {
958 printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
959 printk(KERN_NOTICE "You can enable it with acpi=force\n");
971 int s = d->matches[i].slot;
974 if(dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
989 * Process a DMI table entry. Right now all we care about are the BIOS
990 * and machine entries. For 2.5 we should pull the smbus controller info
994 static void __init dmi_decode(struct dmi_header *dm)
1002 dmi_printk(("BIOS Vendor: %s\n",
1003 dmi_string(dm, data[4])));
1004 dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
1005 dmi_printk(("BIOS Version: %s\n",
1006 dmi_string(dm, data[5])));
1007 dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
1008 dmi_printk(("BIOS Release: %s\n",
1009 dmi_string(dm, data[8])));
1010 dmi_save_ident(dm, DMI_BIOS_DATE, 8);
1013 dmi_printk(("System Vendor: %s\n",
1014 dmi_string(dm, data[4])));
1015 dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
1016 dmi_printk(("Product Name: %s\n",
1017 dmi_string(dm, data[5])));
1018 dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
1019 dmi_printk(("Version: %s\n",
1020 dmi_string(dm, data[6])));
1021 dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
1022 dmi_printk(("Serial Number: %s\n",
1023 dmi_string(dm, data[7])));
1026 dmi_printk(("Board Vendor: %s\n",
1027 dmi_string(dm, data[4])));
1028 dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
1029 dmi_printk(("Board Name: %s\n",
1030 dmi_string(dm, data[5])));
1031 dmi_save_ident(dm, DMI_BOARD_NAME, 5);
1032 dmi_printk(("Board Version: %s\n",
1033 dmi_string(dm, data[6])));
1034 dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
1039 void __init dmi_scan_machine(void)
1041 int err = dmi_iterate(dmi_decode);
1043 dmi_check_blacklist();
1045 printk(KERN_INFO "DMI not present.\n");