On Sun, 8 Oct 2023 at 17:39, Laszlo Ersek <ler...@redhat.com> wrote:
>
> This ArmVirtPkg series can be fetched from:
>
>   repo:   https://pagure.io/lersek/edk2.git
>   branch: armvirt-dual-serial @ 65ee08413595
>
> The series does the following:
>
> - It centralizes (and cleans up) two FDT parsing actions, namely looking
>   up all serial ports, and looking up the /chosen "stdout-path" serial
>   port, in a new library class and instance.
>
> - It rebases Fdt16550SerialPortHookLib, EarlyFdtPL011SerialPortLib and
>   PlatformPeiLib to the new library.
>
> - If QEMU specifies just one PL011 UART, then this patch set is
>   unobservable from the outside.
>
> - If QEMU specifies (at least) two PL011 UARTs, then we distinguish a
>   "chosen" one, and a (first) "non-chosen" one:
>
>   - Both EarlyFdtPL011SerialPortLib, and (PlatformPeiLib +
>     FdtPL011SerialPortLib), target the "chosen" PL011. The consequence
>     of this is that (a) direct SerialPortLib traffic, (b) the dependent
>     SerialIo (SerialDxe) protocol traffic, and (c) the dependent UEFI
>     console traffic, all occcur on the same PL011, and do so regardless
>     of the firmware phase. Furthermore, (d) the Linux serial console
>     traffic is directed to the same PL011 as well. In total, the
>     "chosen" PL011 UART becomes "the console", covering both firmware
>     and Linux.
>
>   - Three new DebugLib instances -- namely Flash, RAM, and DXE Runtime
>     instances of "DebugLibFdtPL011Uart" -- target the (first)
>     "non-chosen" PL011. The consequence is that DebugLib output is
>     hermetically separated from the above-mentioned console, mirroring
>     the isa-debugcon situation with x86 OVMF.
>
> Peter's QEMU patch set that this series interoperates with is at:
>
>   repo:   https://git.linaro.org/people/pmaydell/qemu-arm.git
>   branch: uart-edk-investigation @ 66bff4241bf8
>
> See the larger background, and my detailed test results -- using
> "ArmVirtQemu.dsc" -- in the following thread:
>
>   EDK2 ArmVirtQemu behaviour with multiple UARTs
>   
> CAFEAcA_P5aOTQnM2ARYgR5WvKouvndMbX95XNmDsS0KTxMkMMw@mail.gmail.com">http://mid.mail-archive.com/CAFEAcA_P5aOTQnM2ARYgR5WvKouvndMbX95XNmDsS0KTxMkMMw@mail.gmail.com
>   
> https://listman.redhat.com/archives/edk2-devel-archive/2023-September/068241.html
>   https://edk2.groups.io/g/devel/message/108941
>
> For my testing, I rebased Peter's set on more recent QEMU commit
> 36e9aab3c569. Also, importantly, Peter's last patch 66bff4241bf8 ("virt:
> Reverse order of UART dtb nodes", 2023-09-21) is *indifferent* regarding
> my test results (which shows that the ordering of the two PL011 UARTs in
> the DTB does not matter, with this edk2 series applied). See more on
> that in the above-noted thread.
>
> "ArmVirtKvmTool.dsc" and "ArmVirtXen.dsc" are not supposed to be visibly
> affected by this series; I test-built them, and checked the library
> resolutions before/after in their build report files (no change).
> Runtime regression testing with these platforms would be welcome.
>
> I also test-built "ArmVirtCloudHv.dsc" and "ArmVirtQemuKernel.dsc".
> Those *are* supposed to receive the same feature, but I couldn't /
> didn't boot them, respectively.
>
> I've formatted the patches with "--find-copies-harder", because (a) that
> makes for an easier reading, and (b) leaves the patches applicable from
> the list. The base commit is noted at the end of this message.
>
> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
> Cc: Gerd Hoffmann <kra...@redhat.com>
> Cc: Julien Grall <jul...@xen.org>
> Cc: Leif Lindholm <quic_llind...@quicinc.com>
> Cc: Peter Maydell <peter.mayd...@linaro.org>
> Cc: Sami Mujawar <sami.muja...@arm.com>
>

Hello Laszlo,

Thanks for looking into this - a cleanup was overdue here.

I will take a look in more detail later, but one thing that occurred
to me when reading this overview is that having a separate DEBUG
serial port would permit us to

a) remove it from the DT
b) add a runtime mapping for it
c) keep using it after ExitBootServices

This could be useful for debugging issues with the variable store etc.

Not saying this is something to address in this series, but I'd like
to hear your take on this.

-- 
Ard.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109475): https://edk2.groups.io/g/devel/message/109475
Mute This Topic: https://groups.io/mt/101834880/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to