svn commit: r274711 - head/sys/kern

Zbigniew Bodek zbb at FreeBSD.org
Wed Nov 19 14:23:30 UTC 2014


Author: zbb
Date: Wed Nov 19 14:23:29 2014
New Revision: 274711
URL: https://svnweb.freebsd.org/changeset/base/274711

Log:
  Stop using early_putc immediately after configuring console with cninit()
  
  Early UART should be released right after system console initialization is
  completed. Otherwise, after cninit() both early and system console coexist
  what may lead to various issues (i.a. writing to unmapped early
  UART address). This cannot be done in cninit_finish() since it can be
  called late at the end of MI configuration.
  
  Obtained from:   Semihalf
  Reviewed by:     andrew
  Sponsored by:    The FreeBSD Foundation

Modified:
  head/sys/kern/kern_cons.c

Modified: head/sys/kern/kern_cons.c
==============================================================================
--- head/sys/kern/kern_cons.c	Wed Nov 19 13:57:39 2014	(r274710)
+++ head/sys/kern/kern_cons.c	Wed Nov 19 14:23:29 2014	(r274711)
@@ -156,6 +156,13 @@ cninit(void)
 	 * Make the best console the preferred console.
 	 */
 	cnselect(best_cn);
+
+#ifdef EARLY_PRINTF
+	/*
+	 * Release early console.
+	 */
+	early_putc = NULL;
+#endif
 }
 
 void


More information about the svn-src-all mailing list