From: Laszlo Ersek <lersek@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Heyi Guo <guoheyi@huawei.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Hao Wu <hao.a.wu@intel.com>, Julien Grall <julien.grall@arm.com>,
wanghaibin.wang@huawei.com,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [RFC 0/3] Enable runtime serial debug for ArmVirtQemu
Date: Fri, 1 Mar 2019 17:14:00 +0100 [thread overview]
Message-ID: <03c7e9cf-a8e2-5b0c-6aca-26502ebddba0@redhat.com> (raw)
In-Reply-To: <CAFEAcA8AQjMJytpbXbBPH_YyuVW-PawhSgGeXaZGhVzRUPh9+A@mail.gmail.com>
On 03/01/19 16:09, Peter Maydell wrote:
> On Fri, 1 Mar 2019 at 14:59, Laszlo Ersek <lersek@redhat.com> wrote:
>>
>> +Peter
>>
>> On 03/01/19 13:24, Heyi Guo wrote:
>>> On 2019/2/28 21:39, Laszlo Ersek wrote:
>>
>>>> (4) What's most worrying is that this change would lead to an unexpected
>>>> sharing of the PL011 device between the OS and the firmware. I don't
>>>> think that's a great idea, especially if QEMU's ACPI payload explicitly
>>>> advertises the port to the OS.
>>> That's true, so I propose to disable the feature by default. It is only
>>> used for UEFI runtime code debug. It is always painful when we don't a
>>> handy debug tool for runtime services code.
>>
>> I think this is the only problem that we have at the design level.
>>
>> What I'd like to understand is whether it is safe to drive the PL011
>> serial port from both the firmware and the kernel.
>
> I would suggest that it probably is not safe. Certainly it
> does not seem likely to be robust against all possible future
> changes to the kernel's driver and/or the firmware's driver.
>
>> This is why I'm not a big fan of this approach. Using separate devices
>> for kernel and firmware would be a lot better.
>>
>> I remember that Peter did some work to enable two PL011 devices on the
>> "virt" board. IIRC the issue was that the PL011 enumeration order /
>> numbering in edk2, and in the Linux (guest) kernel, was exactly the
>> opposite. And that caused both logs to go to different devices; you
>> couldn't have a single log file that started with the firmware log, and
>> continued (after a definite switch-over) with the kernel log.
>
> Yes, that's basically it (I forget the exact details and it's the
> kind of thing that may well depend on exactly what version of the
> kernel or what version of the firmware you were using). I do still
> have a todo list item to add a 2nd UART (probably "if the user
> specifically asked for it with an extra -serial option"), but
> we can't just add it to the board by default.
Thanks for the info!
> Note that if you are using QEMU under emulation where it is emulating
> EL3 then you always get a second UART which is visible only to the
> secure world. This is specifically intended for firmware to use.
The ArmVirtQemu firmware doesn't handle the secure world at all (yet?).
Thanks
Laszlo
prev parent reply other threads:[~2019-03-01 16:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 8:05 [RFC 0/3] Enable runtime serial debug for ArmVirtQemu Heyi Guo
2019-02-28 8:05 ` [RFC 1/3] MdeModulePkg/StatusCode: Add PCD to enable runtime serial debug Heyi Guo
2019-02-28 8:05 ` [RFC 2/3] ArmVirtPkg: add runtime instance of FdtPL011SerialPortLib Heyi Guo
2019-02-28 8:05 ` [RFC 3/3] ArmVirtQemu: enable runtime debug by build flag Heyi Guo
2019-02-28 12:10 ` [RFC 0/3] Enable runtime serial debug for ArmVirtQemu Ard Biesheuvel
2019-03-01 15:27 ` Laszlo Ersek
2019-03-04 13:52 ` Heyi Guo
2019-03-12 6:56 ` Heyi Guo
2019-03-12 17:05 ` Laszlo Ersek
2019-03-12 17:28 ` Andrew Fish
2019-03-12 19:42 ` Laszlo Ersek
2019-03-13 20:16 ` Brian J. Johnson
2019-03-14 3:52 ` Andrew Fish
2019-03-16 9:41 ` Heyi Guo
2019-03-20 9:55 ` Laszlo Ersek
2019-03-20 12:16 ` Heyi Guo
2019-03-20 17:47 ` Laszlo Ersek
2019-03-21 3:23 ` Heyi Guo
2019-02-28 13:39 ` Laszlo Ersek
2019-03-01 12:24 ` Heyi Guo
2019-03-01 14:59 ` Laszlo Ersek
2019-03-01 15:14 ` Ard Biesheuvel
[not found] ` <CAFEAcA8AQjMJytpbXbBPH_YyuVW-PawhSgGeXaZGhVzRUPh9+A@mail.gmail.com>
2019-03-01 16:14 ` Laszlo Ersek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03c7e9cf-a8e2-5b0c-6aca-26502ebddba0@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox