git: kernel - Add support for MosChip PCIe serial com, and console support

Matthew Dillon dillon at crater.dragonflybsd.org
Mon May 28 20:08:16 PDT 2018


commit fb3cf125d14f9ce5c7fbbb8774eb3d5f88f6344c
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon May 28 19:58:03 2018 -0700

    kernel - Add support for MosChip PCIe serial com, and console support
    
    * Add support for the MosChip PCIe serial com (brand is typically
      'StarTech' 'Natikve PCI Express RS232 serial adapter card with
      16550 UART'.
    
    * Add late console support.  Console operation works the same
      way, set it up in /boot/loader.conf.  Typically:
    
      sio0.flags=0x00
      sio4.flags=0x30
      sio4.baud=115200
      #set boot_serial="YES" <-- commented out, do not set this
    
      Note that at the point a late-configured serial port
      wants to become the console, syscons is probably already
      the console, so you have to use flags 0x30 instead of
      0x10 to force it to change the console.
    
    * Note, you do not have to set boot_serial="YES", because it
      won't really help since the adapter isn't accessible to the
      boot loader or to the kernel until the PCIe device probes
      in the middle of the boot sequence.
    
    * The kernel now retests for consoles at the end of its normal
      configuration sequence, which allows the now-available
      sioN devices from PCIe card(s) to become the console.
    
    * Remove syscons sccnterm() code that tried to undo the syscons
      console designation.  This code was never called in the past
      because the system console couldn't actually change once
      selected.  But now it can, and the code completely blows up
      syscons for numerous reasons.  Just leave the console
      designation intact from syscons's point of view (the main
      system will be vectored elsewhere so syscons will simply
      not receive new kernel console reads and writes).
    
    * Add a siocntxwait() call before changing com parameters,
      since we are potentially changing the baud rate here.
    
    * Change how the SIO driver assigns baud rates for the console
      to handle late-console configurations.  Also, allow sio*.baud
      variables in loader.conf to override the default com rate.
    
    * Add entries for com5 and com6 to /etc/remote, and default to
      a more reasonable baud rate of 115200.

Summary of changes:
 etc/remote                               |  4 ++
 sys/dev/misc/syscons/syscons.c           | 17 +++++++
 sys/dev/serial/sio/sio.c                 | 83 +++++++++++++++++++++++++-------
 sys/kern/tty_cons.c                      |  5 +-
 sys/platform/pc64/x86_64/autoconf.c      | 42 ++--------------
 sys/platform/vkernel64/x86_64/autoconf.c |  5 ++
 6 files changed, 98 insertions(+), 58 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fb3cf125d14f9ce5c7fbbb8774eb3d5f88f6344c


-- 
DragonFly BSD source repository


More information about the Commits mailing list