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>
This commit is contained in:
parent
68e5fd2a5c
commit
326a499f6f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue