Re: [PATCH] serial: amba-pl011: Enable UART in earlycon setup
From: Arnd Bergmann
Date: Tue Feb 10 2026 - 09:11:27 EST
On Tue, Feb 10, 2026, at 14:49, Peter Maydell wrote:
> On Tue, 10 Feb 2026 at 13:23, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> On Tue, Feb 10, 2026, at 13:50, Peter Maydell wrote:
>>
>> One more question: what is the symptom without this patch with
>> qemu? You mentioned on IRC that qemu may warn about attempting
>> to write to the uart when it is disabled. Would we still get
>> the correct early console output before the uart is enabled?
>
> The symptom is that if you run QEMU with '-d guest_errors' to ask
> it to log things the guest does that it thinks are bugs in the
> guest, then you get a lot of "PL011 data written to disabled UART"
> warnings. The guest still boots fine, and assuming you directed
> the logging to a file rather than stdout you see the guest output.
Ok, thanks for the explanation! I still wonder whether we will
want a stable backport of the patch. It sounds like it won't
be needed for qemu (because most people won't see the harmless
warning especially after your patch) or most real hardware
(because the bootloader will have initialized the console),
but there may still be corner cases that need it.
Arnd