Commit 66f57430 authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] delete ACPI DMI/BIOS cutoff year by default

CONFIG_ACPI_BLACKLIST_YEAR=2001 for old behaviour
parent 7cc3b88a
...@@ -830,10 +830,16 @@ acpi_boot_init (void) ...@@ -830,10 +830,16 @@ acpi_boot_init (void)
*/ */
error = acpi_blacklisted(); error = acpi_blacklisted();
if (error) { if (error) {
printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n"); extern int acpi_force;
if (acpi_force) {
printk(KERN_WARNING PREFIX "acpi=force override\n");
} else {
printk(KERN_WARNING PREFIX "Disabling ACPI support\n");
disable_acpi(); disable_acpi();
return error; return error;
} }
}
/* /*
* set sci_int and PM timer address * set sci_int and PM timer address
......
...@@ -444,27 +444,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={ ...@@ -444,27 +444,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
{ NULL, } { NULL, }
}; };
/*
* Walk the blacklist table running matching functions until someone
* returns 1 or we hit the end.
*/
static __init void dmi_check_blacklist(void)
{
#ifdef CONFIG_ACPI_BOOT
if (dmi_ident[DMI_BIOS_DATE]) {
char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/');
if (s && !acpi_force)
acpi_bios_year(s+1);
}
#endif
dmi_check_system(dmi_blacklist);
}
/* /*
* Process a DMI table entry. Right now all we care about are the BIOS * Process a DMI table entry. Right now all we care about are the BIOS
* and machine entries. For 2.5 we should pull the smbus controller info * and machine entries. For 2.5 we should pull the smbus controller info
...@@ -521,7 +500,7 @@ void __init dmi_scan_machine(void) ...@@ -521,7 +500,7 @@ void __init dmi_scan_machine(void)
{ {
int err = dmi_iterate(dmi_decode); int err = dmi_iterate(dmi_decode);
if(err == 0) if(err == 0)
dmi_check_blacklist(); dmi_check_system(dmi_blacklist);
else else
printk(KERN_INFO "DMI not present.\n"); printk(KERN_INFO "DMI not present.\n");
} }
......
...@@ -220,6 +220,16 @@ config ACPI_CUSTOM_DSDT_FILE ...@@ -220,6 +220,16 @@ config ACPI_CUSTOM_DSDT_FILE
help help
Enter the full path name to the file wich includes the AmlCode declaration. Enter the full path name to the file wich includes the AmlCode declaration.
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year"
default 0
help
enter a 4-digit year, eg. 2001 to disable ACPI by default
on platforms with DMI BIOS date before January 1st that year.
"acpi=force" can be used to override this mechanism.
Enter 0 to disable this mechanism and allow ACPI to
run by default no matter what the year. (default)
config ACPI_DEBUG config ACPI_DEBUG
bool "Debug Statements" bool "Debug Statements"
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
* blacklist.c * blacklist.c
* *
* Check to see if the given machine has a known bad ACPI BIOS * Check to see if the given machine has a known bad ACPI BIOS
* or if the BIOS is too old.
* *
* Copyright (C) 2004 Len Brown <len.brown@intel.com>
* Copyright (C) 2002 Andy Grover <andrew.grover@intel.com> * Copyright (C) 2002 Andy Grover <andrew.grover@intel.com>
* *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -30,6 +32,7 @@ ...@@ -30,6 +32,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <linux/dmi.h>
enum acpi_blacklist_predicates enum acpi_blacklist_predicates
{ {
...@@ -69,27 +72,45 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = ...@@ -69,27 +72,45 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata =
{""} {""}
}; };
#define ACPI_BLACKLIST_CUTOFF_YEAR 2001
/* #if CONFIG_ACPI_BLACKLIST_YEAR
* Notice: this is called from dmi_scan.c, which contains second (!) blacklist
*/ static int __init
void __init blacklist_by_year(void)
acpi_bios_year(char *s)
{ {
int year, disable = 0; int year;
char *s = dmi_get_system_info(DMI_BIOS_DATE);
if (!s)
return 0;
if (!*s)
return 0;
s = strrchr(s, '/');
if (!s)
return 0;
s += 1;
year = simple_strtoul(s,NULL,0); year = simple_strtoul(s,NULL,0);
if (year >= 1000)
disable = year < ACPI_BLACKLIST_CUTOFF_YEAR; if (year < 100) { /* 2-digit year */
else if (year < 1 || (year > 90 && year <= 99)) year += 1900;
disable = 1; if (year < 1996) /* no dates < spec 1.0 */
if (disable) { year += 100;
printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
printk(KERN_NOTICE "You can enable it with acpi=force\n");
acpi_disabled = 1;
} }
if (year < CONFIG_ACPI_BLACKLIST_YEAR) {
printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), "
"acpi=force is required to enable ACPI\n",
year, CONFIG_ACPI_BLACKLIST_YEAR);
return 1;
}
return 0;
} }
#else
static inline int blacklist_by_year(void) { return 0; }
#endif
int __init int __init
acpi_blacklisted(void) acpi_blacklisted(void)
...@@ -141,6 +162,8 @@ acpi_blacklisted(void) ...@@ -141,6 +162,8 @@ acpi_blacklisted(void)
} }
} }
blacklisted += blacklist_by_year();
return blacklisted; return blacklisted;
} }
...@@ -596,7 +596,10 @@ acpi_early_init (void) ...@@ -596,7 +596,10 @@ acpi_early_init (void)
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt}; struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
ACPI_FUNCTION_TRACE("acpi_bus_init"); ACPI_FUNCTION_TRACE("acpi_early_init");
if (acpi_disabled)
return;
/* enable workarounds, unless strict ACPI spec. compliance */ /* enable workarounds, unless strict ACPI spec. compliance */
if (!acpi_strict) if (!acpi_strict)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment