Patchwork ASRock E350M1: Boot delay with debug enabled, system RAM reported incorrectly in Linux

Submitter Scott
Date 2011-06-20 03:17:09
Message ID <CB471C26A608475CADF8FD370971386C@asusp67>
Download mbox | patch
Permalink /patch/3178/
State New
Headers show


Scott - 2011-06-20 03:17:09
Peter Stuge wrote:

]> If you can send me a binary or otherwise let me recreate the serial
]> logging problem, I will take a look.

Hello Peter,

Thanks. This shows the problem on my board. I have not been in
the habit of enabling kconfig option console_post, and that is why
I did not see the problem at first. I noticed the post code logging
in Marshall's log file, but forgot to try adding that to mine. The 
problem is caused when code logs to the serial port before it is
initialized. This happens with the first two post calls to post_code().
Apparently the baud rate defaults to some really slow value, causing
the those 24 characters to take a long time to transmit. The attached
patch is one way to fix the problem. It looks like this problem 
potentially affects several other coreboot projects.

asrock e350m1: fix problem were startup hangs for minutes if serial port post
code logging (kconfig console_post) is enabled. This is caused by logging to
the serial port before it is initialized. 

Signed-off-by: Scott Duplichan <>


diff -u -r coreboot-8fed77a\src\mainboard\asrock\e350m1\romstage.c coreboot-slowserialfix\src\mainboard\asrock\e350m1\romstage.c
--- coreboot-8fed77a\src\mainboard\asrock\e350m1\romstage.c	Sat Jun 18 19:50:32 2011
+++ coreboot-slowserialfix\src\mainboard\asrock\e350m1\romstage.c	Sun Jun 19 21:50:51 2011
@@ -73,10 +73,10 @@ 
 	if (!cpu_init_detectedx && boot_cpu()) {
-		post_code(0x30);
+		outb(0x30, 0x80);
-		post_code(0x31);
+		outb(0x31, 0x80);
 		w83627hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);