diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 6 | ||||
-rw-r--r-- | drivers/serial/kgdboc.c | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index bdce359820bb..4c44d01c67f4 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -713,6 +713,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
713 | The VGA output is eventually overwritten by the real | 713 | The VGA output is eventually overwritten by the real |
714 | console. | 714 | console. |
715 | 715 | ||
716 | ekgdboc= [X86,KGDB] Allow early kernel console debugging | ||
717 | ekgdboc=kbd | ||
718 | |||
719 | This is desgined to be used in conjunction with | ||
720 | the boot argument: earlyprintk=vga | ||
721 | |||
716 | eata= [HW,SCSI] | 722 | eata= [HW,SCSI] |
717 | 723 | ||
718 | edd= [EDD] | 724 | edd= [EDD] |
diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c index b765ab48dfe7..a9a94ae72349 100644 --- a/drivers/serial/kgdboc.c +++ b/drivers/serial/kgdboc.c | |||
@@ -223,6 +223,25 @@ static struct kgdb_io kgdboc_io_ops = { | |||
223 | .post_exception = kgdboc_post_exp_handler, | 223 | .post_exception = kgdboc_post_exp_handler, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | #ifdef CONFIG_KGDB_SERIAL_CONSOLE | ||
227 | /* This is only available if kgdboc is a built in for early debugging */ | ||
228 | int __init kgdboc_early_init(char *opt) | ||
229 | { | ||
230 | /* save the first character of the config string because the | ||
231 | * init routine can destroy it. | ||
232 | */ | ||
233 | char save_ch; | ||
234 | |||
235 | kgdboc_option_setup(opt); | ||
236 | save_ch = config[0]; | ||
237 | init_kgdboc(); | ||
238 | config[0] = save_ch; | ||
239 | return 0; | ||
240 | } | ||
241 | |||
242 | early_param("ekgdboc", kgdboc_early_init); | ||
243 | #endif /* CONFIG_KGDB_SERIAL_CONSOLE */ | ||
244 | |||
226 | module_init(init_kgdboc); | 245 | module_init(init_kgdboc); |
227 | module_exit(cleanup_kgdboc); | 246 | module_exit(cleanup_kgdboc); |
228 | module_param_call(kgdboc, param_set_kgdboc_var, param_get_string, &kps, 0644); | 247 | module_param_call(kgdboc, param_set_kgdboc_var, param_get_string, &kps, 0644); |