Hello misc,

as I found out the kernel does not use the variable comdefaultrate, which is set via the BOOTARG_CONSDEV struct passed to the kernel, but the comconsrate variable while initializing the serial console. This is initialized to B9600 via <sys/ttydefaults.h>, that explains the output I am seeing. So IMHO assigning comdefaultrate the speed passed from boot(8) is wrong and instead the rate should be assigned to comconsrate. The patch below should make it more clear what I mean, it fixes my problems with the serial console on amd64:

Index: machdep.c
===================================================================
RCS file: /var/cvs/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.68
diff -u -p -r1.68 machdep.c
--- machdep.c   17 Mar 2008 23:17:24 -0000      1.68
+++ machdep.c   28 Mar 2008 14:55:07 -0000
@@ -1816,8 +1816,8 @@ getbootinfo(char *bootinfo, int bootinfo
                                    (bios_consdev_t*)q->ba_arg;
 #include "com.h"
 #if NCOM > 0
-                               extern int comdefaultrate; /* ic/com.c */
-                               comdefaultrate = cdp->conspeed;
+                               extern int comconsrate; /* ic/com.c */
+                               comconsrate = cdp->conspeed;
 #endif
 #ifdef BOOTINFO_DEBUG
                                printf(" console 0x%x:%d",

Kind regards,
  Markus

Reply via email to