summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig12
-rw-r--r--src/console/init.c3
2 files changed, 15 insertions, 0 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 87b088f893..cba48af8e5 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -782,6 +782,18 @@ config DEBUG_ACPI
If unsure, say N.
+config DEBUG_CONSOLE_INIT
+ bool "Debug console initialisation code"
+ default n
+ help
+ With this option printk()'s are attempted before console hardware
+ initialisation has been completed. Your mileage may vary.
+
+ Typically you will need to modify source in console_hw_init() such
+ that a working console appears before the one you want to debug.
+
+ If unsure, say N.
+
# Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional
# printk(BIOS_DEBUG, ...) calls.
config REALMODE_DEBUG
diff --git a/src/console/init.c b/src/console/init.c
index f35dd51beb..0bafdbe3f0 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -72,6 +72,9 @@ asmlinkage void console_init(void)
{
init_log_level();
+ if (IS_ENABLED(CONFIG_DEBUG_CONSOLE_INIT))
+ car_set_var(console_inited, 1);
+
#if IS_ENABLED(CONFIG_EARLY_PCI_BRIDGE)
if (!ENV_SMM && !ENV_RAMSTAGE)
pci_early_bridge_init();