Odd problem with ofw_console on Ultra-10

Pyun YongHyeon yongari at kt-is.co.kr
Mon Aug 2 20:07:35 PDT 2004

On Mon, Aug 02, 2004 at 10:04:31PM -0400, Garance A Drosihn wrote:
 > Back on July 21/2004,
 > in the thread "Installworld problem on sparc64?"
 >        I (Garance) wrote:
 > >
 > >I did a buildworld/buildkernel/installkernel yesterday, and it
 > >seemed to work fine.  I then went to reboot, to do the installworld.
 > >If I try to boot in single-user mode, the startup process hangs
 > >right after:  Mounting root from ufs:/dev/ad0a
 > >
 > >If I just boot up normally (not bothering with single-user), it
 > >comes up fine.  The line that shows up after "Mounting root" is:
 > >   Pre-seeding PRNG: kickstart.
 > >
 > >So I do the normal boot-up, and then type `shutdown' to get into
 > >single-user mode.  Again the machine hangs.  I have to power-off
 > >and back on to get it's attention.
 > >
 > >Eventually I booted up multi-user, just killed a few daemons,
 > >and ran installworld.  That seems to have gone okay.  I was able
 > >to reboot after doing the installworld, and it comes up pretty
 > >much okay (a few minor messages from ntpd, but otherwise nothing
 > >seems unusual).  A `shutdown -r' also works fine.  However, if I
 > >try to do a plain 'shutdown now', the machine again hangs.  It
 > >stops after writing out:
 > >   Stopping cron.
 > >   Shutting down local daemons:.
 > >   Writing entropy file:.
 > >   Terminated
 > >   .
 > >and never comes up asking me for which shell I want to run (where
 > >/bin/sh would be the default).  Also, now that I have completely
 > >upgraded, I still can not seem to boot in single-user mode, as I
 > >described above.
 > >My install is working off the regular console (keyboard/monitor
 > >setup), not a serial-console setup, on an Ultra-10.

Me too. I hate serial cable...

 > From the onslaught of replies to this (aka "Zero"), I assume I am
 > still the only person seeing this.  Well, I still do not quite
 > understand all the details of the problem.  But after much time,
 > several blind alleys, and many buildworlds later, I have narrowed
 > it down to the following commit:
 >    obrien      2004-06-24 02:57:12 UTC
 >    FreeBSD src repository
 >    Log:
 >    Better OFW console support on Sun Ultra2 machines.
 >    Ultra2 users may want to set OFWCONS_POLL_HZ to a value of '20'.
 >    I have left default value at '4' as higher values can consume
 >    a more than is acceptable amount of CPU, and we don't have a
 >    consensus yet what is an optimal value.
 >    Submitted by:   Pyun YongHyeon <yongari at kt-is.co.kr>
 >    Revision  Changes    Path
 >    1.11      +1 -0      src/sys/conf/options.sparc64
 >    1.25      +17 -9     src/sys/dev/ofw/ofw_console.c
 >    1.7       +2 -0      src/sys/sparc64/conf/NOTES
 > If I take my non-working system, and backout revision 1.25 of
 > ofw_console.c, then it goes back to working fine in single-user
 > mode.  Before doing that, I also tried adding the line:
 > option	OFWCONS_POLL_HZ=30	# 20 or more works best on Ultra2
 > (to increase it up from the default of '4'), but that didn't
 > seem to do any good.  I suspect my main problem is that I run
 > my ultra-10 from a regular keyboard/console, while everyone else
 > seems to be doing it via a serial console.
 > Now that I think I have a way around the single-user problem, I'm
 > going to try to bring my system up-to-date (minus the above change),
 > and see how well that works.  That'll take me another day, though...
 > There is much about the behavior I see from this bug which does
 > not make sense to me.  Given the behavior I see, real issue might
 > be something pretty simple.  Like maybe something that needs to be
 > reset in /sbin/init .

Here is untested patch(copy & pasted). I thought Peter Grehan already
committed it since it also breaks powerpc console.
Rebuilding new kernel now and let you know the result.

--- ofw_console.c.orig  Tue Aug  3 12:02:15 2004
+++ ofw_console.c       Tue Aug  3 11:54:27 2004
@@ -129,7 +129,7 @@
                tp->t_iflag = TTYDEF_IFLAG;
                tp->t_oflag = TTYDEF_OFLAG;
-               tp->t_cflag = TTYDEF_CFLAG;
+               tp->t_cflag = TTYDEF_CFLAG | CLOCAL;
                tp->t_lflag = TTYDEF_LFLAG;
                tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;

 > -- 
 > Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
 > Senior Systems Programmer           or  gad at freebsd.org
 > Rensselaer Polytechnic Institute    or  drosih at rpi.edu

Best regards,
Pyun YongHyeon
Pyun YongHyeon <http://www.kr.freebsd.org/~yongari>

More information about the freebsd-sparc64 mailing list