aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
Diffstat (limited to 'src/console')
-rw-r--r--src/console/Makefile.inc8
-rw-r--r--src/console/init.c4
-rw-r--r--src/console/printk.c9
3 files changed, 13 insertions, 8 deletions
diff --git a/src/console/Makefile.inc b/src/console/Makefile.inc
index f8bbf221cf..ef917da962 100644
--- a/src/console/Makefile.inc
+++ b/src/console/Makefile.inc
@@ -1,19 +1,17 @@
-ramstage-y += printk.c
+ramstage-y += vtxprintf.c printk.c vsprintf.c
ramstage-y += init.c console.c
-ramstage-y += vtxprintf.c
-ramstage-y += vsprintf.c
ramstage-y += post.c
ramstage-y += die.c
smm-$(CONFIG_DEBUG_SMI) += vtxprintf.c printk.c
smm-$(CONFIG_SMM_TSEG) += die.c
-romstage-$(CONFIG_EARLY_CONSOLE) += vtxprintf.c
+romstage-$(CONFIG_EARLY_CONSOLE) += vtxprintf.c printk.c
romstage-$(CONFIG_EARLY_CONSOLE) += init.c console.c
romstage-y += post.c
romstage-y += die.c
-bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += vtxprintf.c
+bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += vtxprintf.c printk.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += init.c console.c
bootblock-y += die.c
diff --git a/src/console/init.c b/src/console/init.c
index 28934e751e..c6ceab54c2 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -29,6 +29,10 @@
#include <device/pci.h>
#endif
+#if !defined(__PRE_RAM__)
+int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
+#endif
+
void console_init(void)
{
#if !defined(__PRE_RAM__)
diff --git a/src/console/printk.c b/src/console/printk.c
index e24c752492..7ea8c06937 100644
--- a/src/console/printk.c
+++ b/src/console/printk.c
@@ -5,14 +5,12 @@
*
*/
+#include <smp/node.h>
#include <smp/spinlock.h>
#include <console/vtxprintf.h>
#include <console/console.h>
#include <trace.h>
-int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
-int default_console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
-
DECLARE_SPIN_LOCK(console_lock)
int do_printk(int msg_level, const char *fmt, ...)
@@ -24,6 +22,11 @@ int do_printk(int msg_level, const char *fmt, ...)
return 0;
}
+#if CONFIG_SQUELCH_EARLY_SMP && defined(__PRE_RAM__)
+ if (!boot_cpu())
+ return 0;
+#endif
+
DISABLE_TRACE;
spin_lock(&console_lock);