Skip to content

Commit 7a431dc

Browse files
dcpleungmbolivar-nordic
authored andcommitted
x86: qemu: add a newline after "Booting from ROM.."
Under QEMU and SeaBIOS, everything gets to be printed immediately after "Booting from ROM.." as there is no newline. This prevents parsing QEMU console output for the very first line where it needs to match from the beginning of the line. So add a dummy newline here so the next output is at the beginning of a line. Signed-off-by: Daniel Leung <[email protected]>
1 parent c11b785 commit 7a431dc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

arch/x86/core/prep_c.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ if (IS_ENABLED(CONFIG_MULTIBOOT_INFO) &&
5252

5353
#ifdef CONFIG_X86_VERY_EARLY_CONSOLE
5454
z_x86_early_serial_init();
55+
56+
#if defined(CONFIG_BOARD_QEMU_X86) || defined(CONFIG_BOARD_QEMU_X86_64)
57+
/*
58+
* Under QEMU and SeaBIOS, everything gets to be printed
59+
* immediately after "Booting from ROM.." as there is no newline.
60+
* This prevents parsing QEMU console output for the very first
61+
* line where it needs to match from the beginning of the line.
62+
* So add a dummy newline here so the next output is at
63+
* the beginning of a line.
64+
*/
65+
arch_printk_char_out('\n');
66+
#endif
5567
#endif
5668

5769
#if CONFIG_X86_STACK_PROTECTION

0 commit comments

Comments
 (0)