Lines Matching +full:no +full:- +full:reset +full:- +full:on +full:- +full:init

1 // SPDX-License-Identifier: GPL-2.0
3 * Based on the same principle as kgdboe using the NETPOLL api, this
5 * which is multiplexed on a console port.
9 * 2007-2008 (c) Jason Wessel - Wind River Systems, Inc.
31 /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
32 static int configured = -1;
53 * When we leave the debug trap handler we need to reset the keyboard status
57 * The path to deliver the reset is somewhat circuitous.
59 * To deliver the reset we register an input handler, reset the keyboard and
65 * all its NMI and/or NMI-like oddities. To solve this the kgdboc trap exit code
66 * (the "post_exception" callback) uses irq_work_queue(), which is NMI-safe, to
78 /* Return an error - we do not want to bind, just to reset */ in kgdboc_reset_connect()
79 return -ENODEV; in kgdboc_reset_connect()
109 * this work running on different CPUs so they don't try in kgdboc_restore_input_helper()
157 kdb_poll_idx--; in kgdboc_unregister_kbd()
160 i--; in kgdboc_unregister_kbd()
199 int err = -ENODEV; in configure_kgdboc()
235 if (cons->device && cons->device(cons, &idx) == p && in configure_kgdboc()
278 /* Convert "no device" to "defer" so we'll keep trying */ in kgdboc_probe()
279 if (ret == -ENODEV) in kgdboc_probe()
280 ret = -EPROBE_DEFER; in kgdboc_probe()
305 * kernel's mechanisms (like -EPROBE_DEFER) to call us when our in init_kgdboc()
306 * underlying tty is ready. Here we init our platform driver and in init_kgdboc()
315 ret = -ENOMEM; in init_kgdboc()
343 return -1; in kgdboc_get_char()
344 return kgdb_tty_driver->ops->poll_get_char(kgdb_tty_driver, in kgdboc_get_char()
352 kgdb_tty_driver->ops->poll_put_char(kgdb_tty_driver, in kgdboc_put_char()
364 return -ENOSPC; in param_set_kgdboc_var()
369 return -EBUSY; in param_set_kgdboc_var()
376 if (len && config[len - 1] == '\n') in param_set_kgdboc_var()
377 config[len - 1] = '\0'; in param_set_kgdboc_var()
383 * Configure with the new params as long as init already ran. in param_set_kgdboc_var()
384 * Note that we can get called before init if someone loads us in param_set_kgdboc_var()
386 * the odd syntax of "kgdboc.kgdboc=..." on the kernel command. in param_set_kgdboc_var()
393 * specifying an invalid config on the kernel command line vs. in param_set_kgdboc_var()
395 * to configure what was specified on the kernel command line in param_set_kgdboc_var()
396 * we'll leave it in the 'config' and return -EPROBE_DEFER from in param_set_kgdboc_var()
475 if (!kgdboc_earlycon_io_ops.cons->read(kgdboc_earlycon_io_ops.cons, in kgdboc_earlycon_get_char()
484 kgdboc_earlycon_io_ops.cons->write(kgdboc_earlycon_io_ops.cons, &chr, in kgdboc_earlycon_put_char()
501 * we have no other choice so we keep using it. Since not all in kgdboc_earlycon_pre_exp_handler()
527 con->exit = earlycon_orig_exit; in kgdboc_earlycon_deferred_exit()
537 if (kgdboc_earlycon_io_ops.cons->exit == kgdboc_earlycon_deferred_exit) in kgdboc_earlycon_deinit()
543 kgdboc_earlycon_io_ops.cons->exit = earlycon_orig_exit; in kgdboc_earlycon_deinit()
544 else if (kgdboc_earlycon_io_ops.cons->exit) in kgdboc_earlycon_deinit()
550 kgdboc_earlycon_io_ops.cons->exit(kgdboc_earlycon_io_ops.cons); in kgdboc_earlycon_deinit()
563 #define MAX_CONSOLE_NAME_LEN (sizeof((struct console *) 0)->name)
579 * Hold the console_list_lock to guarantee that no consoles are in kgdboc_earlycon_init()
581 * Trapping the exit() callback relies on exit() not being in kgdboc_earlycon_init()
583 * traversal of the console list and race-free reading of @flags. in kgdboc_earlycon_init()
587 if (con->write && con->read && in kgdboc_earlycon_init()
588 (con->flags & (CON_BOOT | CON_ENABLED)) && in kgdboc_earlycon_init()
589 (!opt || !opt[0] || strcmp(con->name, opt) == 0)) in kgdboc_earlycon_init()
597 * in first and, in any case, on ACPI systems earlycon may in kgdboc_earlycon_init()
604 pr_info("No suitable earlycon yet, will try later\n"); in kgdboc_earlycon_init()
616 pr_info("Going to register kgdb with earlycon '%s'\n", con->name); in kgdboc_earlycon_init()
622 earlycon_orig_exit = con->exit; in kgdboc_earlycon_init()
623 con->exit = kgdboc_earlycon_deferred_exit; in kgdboc_earlycon_init()
629 /* Non-zero means malformed option so we always return zero */ in kgdboc_earlycon_init()