[coreboot-gerrit] Patch set updated for coreboot: 9494322 console: Do not translate `\n` to `\r` in CBMEM console

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Thu Mar 26 20:15:07 CET 2015


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5600

-gerrit

commit 94943228866fed9ff1794f645f90f8dad9db5bc3
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Mon Apr 28 23:09:27 2014 +0200

    console: Do not translate `\n` to `\r` in CBMEM console
    
    coreboot messages written to CBMEM console and read with `cbmem -c`,
    currently have a control character at the end.
    
    	coreboot-4.0-5833-gcf7b498 Mon Apr 28 09:53:22 CEST 2014 booting...^M
    
    This happens in the function `printk()` where a new line character
    `\n` is replaced by a carriage return character `\r` in the function
    `printk()`. This was introduced for serial/UART consoles, but is not
    needed for CBMEM console. So do not replace the new line character
    there.
    
    The logic is only changed for CBMEM console but the change is probably
    also useful for other consoles.
    
    Change-Id: Ia37db2c7a9ac941fecdd45538bf2c45f115ff874
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/console/console.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/console/console.c b/src/console/console.c
index ff4b3e4..ac052be 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -40,6 +40,10 @@ void console_hw_init(void)
 void console_tx_byte(unsigned char byte)
 {
 	__cbmemc_tx_byte(byte);
+
+	if (byte == '\n')
+		console_tx_byte('\r');
+
 	__spkmodem_tx_byte(byte);
 	__qemu_debugcon_tx_byte(byte);
 



More information about the coreboot-gerrit mailing list