Kangheui Won has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
amd/picasso/psp_verstage: use cbmem console
psp_verstage uses separate pritnk 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 --- M src/soc/amd/picasso/psp_verstage/printk.c 1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/46059/1
diff --git a/src/soc/amd/picasso/psp_verstage/printk.c b/src/soc/amd/picasso/psp_verstage/printk.c index 2f9d30a..1fe2dc7 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,17 @@
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; }