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; }
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46059/1/src/soc/amd/picasso/psp_ver... File src/soc/amd/picasso/psp_verstage/printk.c:
https://review.coreboot.org/c/coreboot/+/46059/1/src/soc/amd/picasso/psp_ver... PS1, Line 36: for(i = 0; i < cnt; i++) { space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/46059/1/src/soc/amd/picasso/psp_ver... PS1, Line 36: for(i = 0; i < cnt; i++) { braces {} are not necessary for single statement blocks
Kangheui Won has uploaded a new patch set (#2). ( 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, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/46059/2
Eric Peers has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46059/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46059/2//COMMIT_MSG@9 PS2, Line 9: psp_verstage uses separate pritnk implementation, which does not include nit printk
Rob Barnes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
Patch Set 2: Code-Review+1
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Furquan Shaikh, Martin Roth, Rob Barnes, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46059
to look at the new patch set (#4).
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
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 --- M src/soc/amd/picasso/psp_verstage/printk.c 1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/46059/4
Kangheui Won has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46059/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46059/2//COMMIT_MSG@9 PS2, Line 9: psp_verstage uses separate pritnk implementation, which does not include
nit printk
Done
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46059 )
Change subject: amd/picasso/psp_verstage: use cbmem console ......................................................................
Patch Set 4: Code-Review+2
Edward O'Callaghan has submitted this change. ( 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 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 --- M src/soc/amd/picasso/psp_verstage/printk.c 1 file changed, 6 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Edward O'Callaghan: Looks good to me, approved Rob Barnes: Looks good to me, but someone else must approve
diff --git a/src/soc/amd/picasso/psp_verstage/printk.c b/src/soc/amd/picasso/psp_verstage/printk.c index 2f9d30a..a99d8bc 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_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; }