Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2014 14:23:29 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274711 - head/sys/kern
Message-ID:  <201411191423.sAJENTJ0017870@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411191423.sAJENTJ0017870>