Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
66f57430
Commit
66f57430
authored
Sep 01, 2004
by
Len Brown
Committed by
Len Brown
Sep 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ACPI] delete ACPI DMI/BIOS cutoff year by default
CONFIG_ACPI_BLACKLIST_YEAR=2001 for old behaviour
parent
7cc3b88a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
41 deletions
+62
-41
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/boot.c
+9
-3
arch/i386/kernel/dmi_scan.c
arch/i386/kernel/dmi_scan.c
+1
-22
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+10
-0
drivers/acpi/blacklist.c
drivers/acpi/blacklist.c
+38
-15
drivers/acpi/bus.c
drivers/acpi/bus.c
+4
-1
No files found.
arch/i386/kernel/acpi/boot.c
View file @
66f57430
...
@@ -830,9 +830,15 @@ acpi_boot_init (void)
...
@@ -830,9 +830,15 @@ 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
;
disable_acpi
();
return
error
;
if
(
acpi_force
)
{
printk
(
KERN_WARNING
PREFIX
"acpi=force override
\n
"
);
}
else
{
printk
(
KERN_WARNING
PREFIX
"Disabling ACPI support
\n
"
);
disable_acpi
();
return
error
;
}
}
}
/*
/*
...
...
arch/i386/kernel/dmi_scan.c
View file @
66f57430
...
@@ -443,27 +443,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
...
@@ -443,27 +443,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
...
@@ -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
"
);
}
}
...
...
drivers/acpi/Kconfig
View file @
66f57430
...
@@ -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"
...
...
drivers/acpi/blacklist.c
View file @
66f57430
...
@@ -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
;
}
}
drivers/acpi/bus.c
View file @
66f57430
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment