qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Can QEMU -M virt on arm / aarch64 have multiple seria


From: Peter Maydell
Subject: Re: [Qemu-discuss] Can QEMU -M virt on arm / aarch64 have multiple serial TTYs like such as PL011 ttyAMA0 and ttyAMA1?
Date: Thu, 1 Nov 2018 11:03:26 +0000

On 1 November 2018 at 09:53, Ciro Santilli <address@hidden> wrote:
> https://unix.stackexchange.com/questions/479085/can-qemu-m-virt-on-arm-aarch64-have-multiple-serial-ttys-like-such-as-pl011-t
>
> I was playing around with TTYs, and for `qemu-system-x86_64 -M pc`,
> whenever I pass the `-serial` option it crates a new TTY and I can
> attach a serial like `ttyS0` and `ttyS1` to it from Linux.
>
> For ARM however, I can't get past the first `ttyAMA0`. If I add
> `-serial`, it does not show on `info qtree` and the kernel boot
> messages only find one:
>
>     9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 54, base_baud = 0)
> is a PL011 rev1
>
> Is it possible, and if not, is there a specific design reason for that?

No, we only have a single UART on the virt board (because at the
time I wrote the code I didn't see a reason for having more).
We've had requests for a second UART before. The problem with
adding it is that it will break UEFI booting, because if you
have two UARTS in the dtb then Linux will use the first listed
but UEFI will use the second, so commandlines which used to work
will stop working.

This is probably handleable by either:
 * only creating the 2nd UART if given a -machine option to
   specifically ask for it
 * creating the 2nd UART on-demand based on how many -serial
   options were passed

but the first of those is clunky and I'm a bit worried the
second will have unexpected side effects (eg via however
libvirt starts QEMU.)

So it kind of went on the "wishlist" feature list. (The actual
code required is probably only a dozen or so lines, it's figuring
out the best mechanism for determining whether to create the
second UART that's hard.)

thanks
-- PMM



reply via email to

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