NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/48701: spurious messages while booting silently (gpio, glxsb)



>Number:         48701
>Category:       kern
>Synopsis:       spurious messages while booting silently (gpio, glxsb)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 04 01:55:00 +0000 2014
>Originator:     Timo Buhrmester
>Release:        NetBSD 6.1.3
>Organization:
>Environment:
NetBSD alix.localdomain 6.1.3 NetBSD 6.1.3 (ALIXKERN) #2: Fri Apr  4 03:18:36 
CEST 2014  toor@alix.localdomain:/usr/obj/sys/arch/i386/compile/ALIXKERN i386
>Description:
``silent'' boot's twiddling is interrupted by fragments of messages from both 
``glxsb'' and the ``gpio'' driver.

It looks like this:
[...bootloader messages...]
Detecting hardware...: RNG AES
: 32 pins
 done.
[...timestamp + login...]


I've tracked down the issue to usage of ``printf()'' instead of 
``aprint_normal()'', the latter seems to be appropriate in this case.

Attached is a patch which fixes this.
>How-To-Repeat:
boot silent (boot -z) on a machine having hardware driven by glxsb and/or GPIO 
delat with by the gpio driver.cat /tmnpcat 
>Fix:
Index: sys/arch/i386/pci/glxsb.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/pci/glxsb.c,v
retrieving revision 1.10
diff -u -r1.10 glxsb.c
--- sys/arch/i386/pci/glxsb.c   19 Nov 2011 22:51:20 -0000      1.10
+++ sys/arch/i386/pci/glxsb.c   4 Apr 2014 01:45:01 -0000
@@ -253,7 +253,7 @@
        callout_init(&sc->sc_co, 0);
        callout_setfunc(&sc->sc_co, glxsb_rnd, sc);
        glxsb_rnd(sc);
-       printf(": RNG");
+       aprint_normal(": RNG");
 
        /* We don't have an interrupt handler, so disable completion INTs */
        intr = SB_AI_DISABLE_AES_A | SB_AI_DISABLE_AES_B |
@@ -264,9 +264,9 @@
        sc->sc_dmat = pa->pa_dmat;
 
        if (glxsb_crypto_setup(sc))
-               printf(" AES");
+               aprint_normal(" AES");
 
-       printf("\n");
+       aprint_normal("\n");
 }
 
 void
Index: sys/dev/gpio/gpio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/gpio/gpio.c,v
retrieving revision 1.50
diff -u -r1.50 gpio.c
--- sys/dev/gpio/gpio.c 25 Nov 2011 13:49:43 -0000      1.50
+++ sys/dev/gpio/gpio.c 4 Apr 2014 01:45:30 -0000
@@ -198,7 +198,7 @@
        sc->sc_pins = gba->gba_pins;
        sc->sc_npins = gba->gba_npins;
 
-       printf(": %d pins\n", sc->sc_npins);
+       aprint_normal(": %d pins\n", sc->sc_npins);
 
        if (!pmf_device_register(self, NULL, gpio_resume))
                aprint_error_dev(self, "couldn't establish power handler\n");



Home | Main Index | Thread Index | Old Index