diff options
author | Willy Tarreau <w@1wt.eu> | 2008-01-30 07:33:33 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:33 -0500 |
commit | e6c4dc6c36b01d33a2e0c8a89828d8dd44fb4c1b (patch) | |
tree | cae199356ef2a55876ad1ffec0729738e838270c | |
parent | 45078cb5e2fb5a0e55c373755ed45b43d901f9e4 (diff) |
x86: GEODE add the "mfgptfix" boot time option to fix MFGPT timers
The new "mfgptfix" boot command line option may be usd to fix MFGPT
timers on AMD Geode platforms when the BIOS has incorrectly applied
a workaround. TinyBIOS version 0.98 is known to be affected, 0.99
fixes the problem by letting the user disable the workaround.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | Documentation/kernel-parameters.txt | 5 | ||||
-rw-r--r-- | arch/x86/kernel/mfgpt_32.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index fe3031d56431..5d171b7b8393 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1092,6 +1092,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1092 | Multi-Function General Purpose Timers on AMD Geode | 1092 | Multi-Function General Purpose Timers on AMD Geode |
1093 | platforms. | 1093 | platforms. |
1094 | 1094 | ||
1095 | mfgptfix [X86-32] Fix MFGPT timers on AMD Geode platforms when | ||
1096 | the BIOS has incorrectly applied a workaround. TinyBIOS | ||
1097 | version 0.98 is known to be affected, 0.99 fixes the | ||
1098 | problem by letting the user disable the workaround. | ||
1099 | |||
1095 | mga= [HW,DRM] | 1100 | mga= [HW,DRM] |
1096 | 1101 | ||
1097 | mousedev.tap_time= | 1102 | mousedev.tap_time= |
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index 3960ab7e1497..219f86eb6123 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c | |||
@@ -63,6 +63,21 @@ static int __init mfgpt_disable(char *s) | |||
63 | } | 63 | } |
64 | __setup("nomfgpt", mfgpt_disable); | 64 | __setup("nomfgpt", mfgpt_disable); |
65 | 65 | ||
66 | /* Reset the MFGPT timers. This is required by some broken BIOSes which already | ||
67 | * do the same and leave the system in an unstable state. TinyBIOS 0.98 is | ||
68 | * affected at least (0.99 is OK with MFGPT workaround left to off). | ||
69 | */ | ||
70 | static int __init mfgpt_fix(char *s) | ||
71 | { | ||
72 | u32 val, dummy; | ||
73 | |||
74 | /* The following udocumented bit resets the MFGPT timers */ | ||
75 | val = 0xFF; dummy = 0; | ||
76 | wrmsr(0x5140002B, val, dummy); | ||
77 | return 1; | ||
78 | } | ||
79 | __setup("mfgptfix", mfgpt_fix); | ||
80 | |||
66 | /* | 81 | /* |
67 | * Check whether any MFGPTs are available for the kernel to use. In most | 82 | * Check whether any MFGPTs are available for the kernel to use. In most |
68 | * cases, firmware that uses AMD's VSA code will claim all timers during | 83 | * cases, firmware that uses AMD's VSA code will claim all timers during |