From 37833fc4be8a67aedd6e806d3addd706cc1db57b Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 7 Sep 2023 13:38:06 -0700 Subject: [PATCH] qualcomm/common: Remove carriage returns from QcLib log The memory log we get returned by QcLib contains Windows line endings ("\r\n"), while we prefer to have POSIX line endings in the CBMEM console (just "\n"). Filter the '\r' character out when copying that log into the CBMEM console to convert. Signed-off-by: Julius Werner Change-Id: I0652300c2393fbc0b3c9875bb0ca1aa921e59098 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77722 Reviewed-by: Yu-Ping Wu Reviewed-by: Shelley Chen Tested-by: build bot (Jenkins) --- src/soc/qualcomm/common/qclib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/soc/qualcomm/common/qclib.c b/src/soc/qualcomm/common/qclib.c index 561870eaab..cfe3e2ac1e 100644 --- a/src/soc/qualcomm/common/qclib.c +++ b/src/soc/qualcomm/common/qclib.c @@ -115,8 +115,11 @@ static void write_qclib_log_to_cbmemc(struct qclib_cb_if_table_entry *te) int i; char *ptr = (char *)te->blob_address; - for (i = 0; i < te->size; i++) - __cbmemc_tx_byte(*ptr++); + for (i = 0; i < te->size; i++) { + char c = *ptr++; + if (c != '\r') + __cbmemc_tx_byte(c); + } } static void write_table_entry(struct qclib_cb_if_table_entry *te)