diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-09-07 10:51:33 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-07 17:40:00 +0200 |
commit | bb577f980ef35e2b0d00aeed566724e5032aa5eb (patch) | |
tree | 2c9016f7811fb3ea80bbbc8d9856c217110695b7 /arch/x86/kernel | |
parent | x86: check for and defend against BIOS memory corruption (diff) | |
download | linux-bb577f980ef35e2b0d00aeed566724e5032aa5eb.tar.xz linux-bb577f980ef35e2b0d00aeed566724e5032aa5eb.zip |
x86: add periodic corruption check
Perodically check for corruption in low phusical memory. Don't bother
checking at fault time, since it won't show anything useful.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/setup.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index ee89ebc5aabc..c239b3780973 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -623,6 +623,7 @@ static void __init setup_bios_corruption_check(void) } static int __read_mostly bios_corruption_check = 1; +static struct timer_list periodic_check_timer; void check_for_bios_corruption(void) { @@ -650,6 +651,22 @@ void check_for_bios_corruption(void) dump_stack(); } +static void periodic_check_for_corruption(unsigned long data) +{ + check_for_bios_corruption(); + mod_timer(&periodic_check_timer, jiffies + 60*HZ); +} + +void start_periodic_check_for_corruption(void) +{ + if (!bios_corruption_check) + return; + + init_timer(&periodic_check_timer); + periodic_check_timer.function = &periodic_check_for_corruption; + periodic_check_for_corruption(0); +} + static int set_bios_corruption_check(char *arg) { char *end; |