qemu-discuss
[Top][All Lists]
Advanced

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

How to use multiple uart in a virtual machine?


From: Chan Kim
Subject: How to use multiple uart in a virtual machine?
Date: Wed, 16 Mar 2022 17:31:48 +0900

Hello all,

 

After checking character device option for qemu invocation, https://www.qemu.org/docs/master/system/invocation.html#hxtool-6

I tried to add another uart for a modified arm64 virt machine (named ab21q).

So I added second uart like this  (in hw/arm/ab21q.c which is modified from hw/arm/virt.c,  using qemu-6.2.0)

create_uart(vms, AB21Q_UART, sysmem, serial_hd(0));

create_uart(vms, AB21Q_UART1, sysmem, serial_hd(1)); // second uart

    // AB21Q_UART and AB21Q_UART1 have their own address space and irq number

I added the command option

-chardev stdio,mux=on,id=char0 -serial chardev:char0 -serial chardev:char0

But qemu gives this error :

qemu-system-aarch64: cannot use stdio by multiple character devices

(BTW, I’m running from u-boot program for starting linux)

How can I add second uart and make the second uart output to appear in the stdio also?

Any comment or help will be much appreciated.

Thank you!

 

Chan Kim

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]