diff options
author | Kangheui Won <khwon@chromium.org> | 2020-10-05 19:35:22 +1100 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2020-10-07 04:27:01 +0000 |
commit | 326a499f6fd81bb4a48618cc6fbe3340f4adb37e (patch) | |
tree | afda79263cc9de2401eff28b37c73d168cd49daf | |
parent | 68e5fd2a5cb4065233f09b0b70318a2868a5981d (diff) |
amd/picasso/psp_verstage: use cbmem console
psp_verstage uses separate printk implementation, which does not include
code to add console output to cbmem.
Add cbmemc_init and cbmemc_tx_byte to add console output to cbmem.
BUG=b:159220781
TEST=build
BRANCH=zork
Change-Id: I63ba5814903565c372dbeb50004565a371dad730
Signed-off-by: Kangheui Won <khwon@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46059
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/amd/picasso/psp_verstage/printk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/soc/amd/picasso/psp_verstage/printk.c b/src/soc/amd/picasso/psp_verstage/printk.c index 2f9d30a29e..a99d8bc35d 100644 --- a/src/soc/amd/picasso/psp_verstage/printk.c +++ b/src/soc/amd/picasso/psp_verstage/printk.c @@ -2,12 +2,13 @@ #include <bl_uapp/bl_syscall_public.h> #include <console/console.h> +#include <console/cbmem_console.h> #include <console/streams.h> #include <stdarg.h> void console_hw_init(void) { - // Nothing to init for svc_debug_print + __cbmemc_init(); } int do_printk(int msg_level, const char *fmt, ...) @@ -24,14 +25,16 @@ int do_printk(int msg_level, const char *fmt, ...) int do_vprintk(int msg_level, const char *fmt, va_list args) { - int i, log_this; + int i, cnt, log_this; char buf[256]; log_this = console_log_level(msg_level); if (log_this < CONSOLE_LOG_FAST) return 0; - i = vsnprintf(buf, sizeof(buf), fmt, args); + cnt = vsnprintf(buf, sizeof(buf), fmt, args); + for (i = 0; i < cnt; i++) + __cbmemc_tx_byte(buf[i]); svc_debug_print(buf); return i; } |