aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/exit_car.S5
-rw-r--r--src/console/Kconfig7
-rw-r--r--src/console/init.c2
-rw-r--r--src/include/console/console.h3
4 files changed, 15 insertions, 2 deletions
diff --git a/src/arch/x86/exit_car.S b/src/arch/x86/exit_car.S
index 421d5434a7..ca9b70e663 100644
--- a/src/arch/x86/exit_car.S
+++ b/src/arch/x86/exit_car.S
@@ -26,6 +26,11 @@ stack_top:
.text
.global _start
_start:
+#if IS_ENABLED(CONFIG_POSTCAR_CONSOLE)
+ /* Enable the console */
+ call console_init
+#endif /* CONFIG_POSTCAR_CONSOLE */
+
/* chipset_teardown_car() is expected to disable cache-as-ram. */
call chipset_teardown_car
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 90fb426cee..e945c259d7 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -7,6 +7,13 @@ config BOOTBLOCK_CONSOLE
help
Use console during the bootblock if supported
+config POSTCAR_CONSOLE
+ bool "Enable console output during postcar."
+ depends on POSTCAR_STAGE
+ default n
+ help
+ Use console during the postcar if supported
+
config SQUELCH_EARLY_SMP
bool "Squelch AP CPUs from early console."
default y
diff --git a/src/console/init.c b/src/console/init.c
index 8f40abbe37..189079b98f 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -30,7 +30,7 @@ int console_log_level(int msg_level)
return (console_loglevel >= msg_level);
}
-void console_init(void)
+asmlinkage void console_init(void)
{
#if !defined(__PRE_RAM__)
console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
diff --git a/src/include/console/console.h b/src/include/console/console.h
index ddb5c0524b..dcd5fe9cc2 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -18,6 +18,7 @@
#include <stdint.h>
#include <rules.h>
+#include <arch/cpu.h>
#include <console/post_codes.h>
#include <commonlib/loglevel.h>
@@ -51,7 +52,7 @@ void __attribute__ ((noreturn)) die(const char *msg);
(ENV_SMM && CONFIG_DEBUG_SMI))
#if __CONSOLE_ENABLE__
-void console_init(void);
+asmlinkage void console_init(void);
int console_log_level(int msg_level);
int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
void do_putchar(unsigned char byte);