diff options
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 289247d974c6..0ca27c7b0e8d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -637,6 +637,38 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | hpet_address = hpet_tbl->address.address; | 639 | hpet_address = hpet_tbl->address.address; |
640 | |||
641 | /* | ||
642 | * Some broken BIOSes advertise HPET at 0x0. We really do not | ||
643 | * want to allocate a resource there. | ||
644 | */ | ||
645 | if (!hpet_address) { | ||
646 | printk(KERN_WARNING PREFIX | ||
647 | "HPET id: %#x base: %#lx is invalid\n", | ||
648 | hpet_tbl->id, hpet_address); | ||
649 | return 0; | ||
650 | } | ||
651 | #ifdef CONFIG_X86_64 | ||
652 | /* | ||
653 | * Some even more broken BIOSes advertise HPET at | ||
654 | * 0xfed0000000000000 instead of 0xfed00000. Fix it up and add | ||
655 | * some noise: | ||
656 | */ | ||
657 | if (hpet_address == 0xfed0000000000000UL) { | ||
658 | if (!hpet_force_user) { | ||
659 | printk(KERN_WARNING PREFIX "HPET id: %#x " | ||
660 | "base: 0xfed0000000000000 is bogus\n " | ||
661 | "try hpet=force on the kernel command line to " | ||
662 | "fix it up to 0xfed00000.\n", hpet_tbl->id); | ||
663 | hpet_address = 0; | ||
664 | return 0; | ||
665 | } | ||
666 | printk(KERN_WARNING PREFIX | ||
667 | "HPET id: %#x base: 0xfed0000000000000 fixed up " | ||
668 | "to 0xfed00000.\n", hpet_tbl->id); | ||
669 | hpet_address >>= 32; | ||
670 | } | ||
671 | #endif | ||
640 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", | 672 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", |
641 | hpet_tbl->id, hpet_address); | 673 | hpet_tbl->id, hpet_address); |
642 | 674 | ||