diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2008-04-29 04:02:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:23 -0400 |
commit | 8c4dd6068221cd1d0d90490ace80eb4344914a8c (patch) | |
tree | 6aa1fed5d22bd315459a783616c94408c8526c89 | |
parent | d7321cd62470b70d2717dae5a963e7a8fabff4d5 (diff) |
edd: add default mode CONFIG_EDD_OFF=n, override with edd={on,off}
Add a kernel parameter option to 'edd' to enable/disable BIOS Enhanced Disk
Drive Services. CONFIG_EDD_OFF disables EDD while still compiling EDD into
the kernel. Default behavior can be forced using 'edd=on' or 'edd=off' as
a kernel parameter.
[akpm@linux-foundation.org: fix kernel-parameters.txt]
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | Documentation/kernel-parameters.txt | 3 | ||||
-rw-r--r-- | arch/x86/boot/edd.c | 10 | ||||
-rw-r--r-- | drivers/firmware/Kconfig | 9 |
3 files changed, 19 insertions, 3 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5afc21b20a9..3ce193f8656 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -627,8 +627,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
627 | eata= [HW,SCSI] | 627 | eata= [HW,SCSI] |
628 | 628 | ||
629 | edd= [EDD] | 629 | edd= [EDD] |
630 | Format: {"of[f]" | "sk[ipmbr]"} | 630 | Format: {"off" | "on" | "skip[mbr]"} |
631 | See comment in arch/i386/boot/edd.S | ||
632 | 631 | ||
633 | eisa_irq_edge= [PARISC,HW] | 632 | eisa_irq_edge= [PARISC,HW] |
634 | See header of drivers/parisc/eisa.c. | 633 | See header of drivers/parisc/eisa.c. |
diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c index d84a48ece78..03399d64013 100644 --- a/arch/x86/boot/edd.c +++ b/arch/x86/boot/edd.c | |||
@@ -126,17 +126,25 @@ void query_edd(void) | |||
126 | { | 126 | { |
127 | char eddarg[8]; | 127 | char eddarg[8]; |
128 | int do_mbr = 1; | 128 | int do_mbr = 1; |
129 | #ifdef CONFIG_EDD_OFF | ||
130 | int do_edd = 0; | ||
131 | #else | ||
129 | int do_edd = 1; | 132 | int do_edd = 1; |
133 | #endif | ||
130 | int be_quiet; | 134 | int be_quiet; |
131 | int devno; | 135 | int devno; |
132 | struct edd_info ei, *edp; | 136 | struct edd_info ei, *edp; |
133 | u32 *mbrptr; | 137 | u32 *mbrptr; |
134 | 138 | ||
135 | if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { | 139 | if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { |
136 | if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) | 140 | if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) { |
141 | do_edd = 1; | ||
137 | do_mbr = 0; | 142 | do_mbr = 0; |
143 | } | ||
138 | else if (!strcmp(eddarg, "off")) | 144 | else if (!strcmp(eddarg, "off")) |
139 | do_edd = 0; | 145 | do_edd = 0; |
146 | else if (!strcmp(eddarg, "on")) | ||
147 | do_edd = 1; | ||
140 | } | 148 | } |
141 | 149 | ||
142 | be_quiet = cmdline_find_option_bool("quiet"); | 150 | be_quiet = cmdline_find_option_bool("quiet"); |
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 40ffd767647..dc2cec6127d 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig | |||
@@ -17,6 +17,15 @@ config EDD | |||
17 | obscure configurations. Most disk controller BIOS vendors do | 17 | obscure configurations. Most disk controller BIOS vendors do |
18 | not yet implement this feature. | 18 | not yet implement this feature. |
19 | 19 | ||
20 | config EDD_OFF | ||
21 | bool "Sets default behavior for EDD detection to off" | ||
22 | depends on EDD | ||
23 | default n | ||
24 | help | ||
25 | Say Y if you want EDD disabled by default, even though it is compiled into the | ||
26 | kernel. Say N if you want EDD enabled by default. EDD can be dynamically set | ||
27 | using the kernel parameter 'edd={on|skipmbr|off}'. | ||
28 | |||
20 | config EFI_VARS | 29 | config EFI_VARS |
21 | tristate "EFI Variable Support via sysfs" | 30 | tristate "EFI Variable Support via sysfs" |
22 | depends on EFI | 31 | depends on EFI |