svn commit: r297190 - head/sys/kern

Edward Tomasz Napierala trasz at FreeBSD.org
Wed Mar 23 17:45:47 UTC 2016


On 0323T1412, Jean-Sébastien Pédron wrote:
> On 22/03/2016 16:55, Ian Lepore wrote:
> > On Tue, 2016-03-22 at 13:46 +0000, Edward Tomasz Napierala wrote:
> >> Author: trasz
> >> Date: Tue Mar 22 13:46:01 2016
> >> New Revision: 297190
> >> URL: https://svnweb.freebsd.org/changeset/base/297190
> >>
> >> Log:
> >>   Wait for root mount tokens before showing the root mount prompt.
> >>   This restores the pre-r290196 behaviour, eliminating the need to manually
> >>   press '.' a couple of times to get USB to finish probing.
> >>   
> >>   Note that there's still something wrong with the console (character
> >>   echoing doesn't quite work), and there's also a reported problem with
> >>   BHyVe, but those two don't seem related to the problem above.
> > 
> > Just a datapoint on the echoing... it works fine on a serial console,
> > it's been years since I've seen glitches at the mountroot prompt.  So
> > the problem may be in vt or kbdmux.
> 
> I confirm this is a known issue with vt(4): it uses a callout to refresh
> the screen, but for reasons unknown to me, the callout is not called
> anymore on mountroot prompt. I tried to debug this but failed. Since
> then, I didn't have time to work on this again.
> 
> So maybe callouts are disabled in this situation. If there is a way to
> detect that, then vt(4) can go back to a "synchronous mode" where it
> refreshes the screen after each typed character, like it does when ddb
> is active.

Looks like that's the case: for some reason the callouts don't work.
This trivial hack is a (mostly) working workaround:

Index: svn/head/sys/kern/kern_cons.c
===================================================================
--- svn/head/sys/kern/kern_cons.c	(revision 297210)
+++ svn/head/sys/kern/kern_cons.c	(working copy)
@@ -430,6 +430,7 @@ cngets(char *cp, size_t size, int visible)
 	lp = cp;
 	end = cp + size - 1;
 	for (;;) {
+		pause("meh", 1);
 		c = cngetc() & 0177;
 		switch (c) {
 		case '\n':



More information about the svn-src-head mailing list