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

Re: [Xen-users] serial console to Dom0 -- connection, but only 'garbage' (� , 'question mark') output. config wrong?

  • To: pgnet.dev@xxxxxxxxx, Xen-users@xxxxxxxxxxxxx
  • From: Sarah Newman <srn@xxxxxxxxx>
  • Date: Fri, 31 Jan 2020 17:48:48 -0800
  • Delivery-date: Sat, 01 Feb 2020 01:49:38 +0000
  • Dkim-filter: OpenDKIM Filter v2.11.0 mail.prgmr.com F2BD472008A
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>

On 1/31/20 5:39 PM, PGNet Dev wrote:
On 1/31/20 4:45 PM, Sarah Newman wrote:
But in newer versions of Xen the syntax you're using should be supported. 
Looking at the source files docs/misc/xen-command-line.pandoc and 
xen/drivers/char/ns16550.c, I think there's a problem with hyphens versus 

Try changing io_base to io-base in your command line.

i was just poking at that myself.

@ https://xenbits.xen.org/docs/4.13-testing/misc/xen-command-line.html#com1

it says

"The accepted name keywords for name=value pairs are:
     io-base - accepts integer which specified IO base port for UART registers

i.e., hyphenated. then, in the next comment,

        The following are examples of correct specifications:

note, *all* underscores :-/

If I use underscores,


the /dev/ttyS2 device *is* defined and probeable on boot.

OTOH, with hyphens, there's no /dev created.

Haven't yet found any *errors* abt it :-S

Need to take a look at the code myself & monkey with logging to understand 
what's right.

I looked up the ttyS2 port and irq using

$ cat /sys/class/tty/ttyS2/device/resources
state = active


        cat /sys/class/tty/ttyS2/device/resources
                state = active
                io 0x3e8-0x3ef
                irq 3
                dma disabled

serial --unit=2 --speed=115200
terminal_input serial console
terminal_output serial console

I mod'd  /etc/default/grub to

        GRUB_TERMINAL_INPUT="serial console "
        GRUB_TERMINAL_OUTPUT="serial console"
        GRUB_SERIAL_COMMAND="serial --unit=2 --speed=115200"

and, switched to the 'shorthand',

        GRUB_CMDLINE_XEN="com1=115200,8n1,0x03e8,3 console=com1,vga ..."

and updated the initrd.


        grep serial /boot/grub2/grub.cfg
                serial --unit=2 --speed=115200
                terminal_input serial console
                terminal_output serial console


        grep com /boot/grub2/xen-4.13.0_04-lp151.688.cfg
                ... com1=115200,8n1,0x03e8,3 console=com1,vga

after reboot, there's unfortunately NO assigned UART

        setserial -g /dev/ttyS* | grep 03e8
                /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 3

and the /dev can't be written,

        /bin/stty -F /dev/ttyS2 115200 raw -echo
                /bin/stty: /dev/ttyS2: Input/output error

ok, confused.

That sounds like Xen claiming the serial port.

Given you want Xen and Linux to share a serial port, shouldn't you be using the 
virtual serial port hvc0 within Linux when booted under xen?

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.