From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Bin Meng <bmeng.cn@gmail.com>,
Igor Opaniuk <igor.opaniuk@gmail.com>,
Julien Masson <jmasson@baylibre.com>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Maximilian Brune <maximilian.brune@9elements.com>
Subject: Re: [PATCH v5 40/46] boot: Support IO UARTs for earlycon and console
Date: Wed, 2 Apr 2025 18:26:43 -0600 [thread overview]
Message-ID: <20250403002643.GG5495@bill-the-cat> (raw)
In-Reply-To: <CAFLszTjPi5=ro_4n8oF+ZX_OtzvKxWZvz=ipmXCnEhysVZb9-w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4276 bytes --]
On Thu, Apr 03, 2025 at 12:54:42PM +1300, Simon Glass wrote:
> Hi Tom,
>
> On Thu, 3 Apr 2025 at 08:57, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Wed, Apr 02, 2025 at 01:50:33PM -0600, Tom Rini wrote:
> > > On Thu, Apr 03, 2025 at 08:22:44AM +1300, Simon Glass wrote:
> > > > Hi Tom,
> > > >
> > > > On Thu, 3 Apr 2025 at 03:29, Tom Rini <trini@konsulko.com> wrote:
> > > > >
> > > > > On Sat, Mar 15, 2025 at 02:26:00PM +0000, Simon Glass wrote:
> > > > > > Update the string to take account of UARTs which are connected on I/O
> > > > > > ports, as on x86.
> > > > > >
> > > > > > Fix a typo in an error message in the same command, while we are here.
> > > > > >
> > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > > ---
> > > > > >
> > > > > > (no changes since v3)
> > > > > >
> > > > > > Changes in v3:
> > > > > > - Add new patch to support IO UARTs for earlycon and console
> > > > > >
> > > > > > boot/bootflow.c | 7 ++++---
> > > > > > 1 file changed, 4 insertions(+), 3 deletions(-)
> > > > > >
> > > > > > diff --git a/boot/bootflow.c b/boot/bootflow.c
> > > > > > index 58a1afa7a75..4054a966af8 100644
> > > > > > --- a/boot/bootflow.c
> > > > > > +++ b/boot/bootflow.c
> > > > > > @@ -942,8 +942,9 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg)
> > > > > > *buf = '\0';
> > > > > > if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) {
> > > > > > snprintf(buf, sizeof(buf),
> > > > > > - "uart8250,mmio32,%#lx,%dn8", info.addr,
> > > > > > - info.baudrate);
> > > > > > + "uart8250,%s,%#lx,%dn8",
> > > > > > + info.addr_space == SERIAL_ADDRESS_SPACE_IO ? "io" :
> > > > > > + "mmio", info.addr, info.baudrate);
> > > > > > } else if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_PL01X) {
> > > > > > snprintf(buf, sizeof(buf),
> > > > > > "pl011,mmio32,%#lx,%dn8", info.addr,
> > > > >
> > > > > I suppose we're well past the point where we can delete
> > > > > bootflow_cmdline_auto() itself because that's just going to lead us to
> > > > > trouble down the line (5 years from now when the kernel adopts a new
> > > > > preferred way to pass this info) and grows every platform by some amount
> > > > > of space every time we add something new here.
> > > >
> > > > Well firstly, why would you want to delete this command? It is very
> > > > useful to be able to change the cmdline.
> > > >
> > > > This command is only available with BOOTSTD_FULL, which is less than
> > > > 10% of boards.
> > >
> > > Because it's automatic non-obvious stuff. We should not be modifying the
> > > command line at all. Is it even documented that we're doing this?
>
> Yes, the command is documented. It only happens when you run the
> command. Otherwise the command line is not modified.
>
> As you know U-Boot has bootargs but that doesn't work with extlinux
> and the like, so we have this command, which does.
>
> >
> > To be clearer, the more I review your changes, the more I see a blurred
> > line that I do not this is good between "I found this handy while
> > doing something" and "This is a good generic design / feature".
> >
> > That it can be annoying at times to add the debug uart information is
> > not a new unique problem. It's something that's generally normally
> > solved. I assume you hit this on x86 where it's more annoying than most.
> > But a generic feature it should not have been.
>
> I'm not even sure why you wrote this email, then.
Because this is another little thing I'm being flexible on and not
naking, I just think it's wrong-headed. And you seem to think I'm never
being flexible. So I started this by saying I'm not naking it, I just
think it's wrong.
> U-Boot has all the information needed to set up the UART correctly and
> it is extremely tedious to do otherwise. This is a bootloader, so it
> needs to support kernel development. I actually think this is a really
> cool feature.
It's "cool" until it breaks. And grows platforms for features they
can't/won't support.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-04-03 0:26 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-15 14:25 [PATCH v5 00/46] x86: Improve operation under QEMU Simon Glass
2025-03-15 14:25 ` [PATCH v5 01/46] boot: Correct ramdisk address Simon Glass
2025-03-15 14:25 ` [PATCH v5 02/46] sandbox: Correct a typo in mapmem Simon Glass
2025-03-15 14:25 ` [PATCH v5 03/46] x86: Expand x86_64 early memory Simon Glass
2025-03-15 14:25 ` [PATCH v5 04/46] x86: qemu: Switch to bochs display Simon Glass
2025-03-15 14:25 ` [PATCH v5 05/46] x86: qemu: Enable dhrystone Simon Glass
2025-03-15 14:25 ` [PATCH v5 06/46] x86: qemu: Avoid accessing BSS too early Simon Glass
2025-03-15 14:25 ` [PATCH v5 07/46] x86: Drop mpspec from the SPL build Simon Glass
2025-03-17 14:31 ` Tom Rini
2025-03-18 8:32 ` Simon Glass
2025-03-15 14:25 ` [PATCH v5 08/46] x86: Add some log categories Simon Glass
2025-03-15 14:25 ` [PATCH v5 09/46] x86: Drop use of CONFIG_REALMODE_DEBUG Simon Glass
2025-03-17 14:32 ` Tom Rini
2025-03-15 14:25 ` [PATCH v5 10/46] x86: Avoid clearing the VESA display Simon Glass
2025-03-15 14:25 ` [PATCH v5 11/46] x86: Add 64-bit entries to the GDT Simon Glass
2025-03-15 14:25 ` [PATCH v5 12/46] x86: Use defines for the cache flags Simon Glass
2025-03-15 14:25 ` [PATCH v5 13/46] x86: spl: Drop duplicate CPU init Simon Glass
2025-03-15 14:25 ` [PATCH v5 14/46] x86: Drop the message about features missing in 64-bit Simon Glass
2025-03-15 14:25 ` [PATCH v5 15/46] x86: Include stdbool.h in interrupt header Simon Glass
2025-03-15 14:25 ` [PATCH v5 16/46] x86: Tidy up the GDT size in start/16.S Simon Glass
2025-03-15 14:25 ` [PATCH v5 17/46] x86: Disable paging before changing to long mode Simon Glass
2025-03-15 14:25 ` [PATCH v5 18/46] x86: Use the same GDT when jumping " Simon Glass
2025-03-15 14:25 ` [PATCH v5 19/46] x86: Use a simple jump into " Simon Glass
2025-03-15 14:25 ` [PATCH v5 20/46] x86: Rename the _D dirty flag Simon Glass
2025-03-15 14:25 ` [PATCH v5 21/46] x86: Support CPU functions in long mode Simon Glass
2025-03-15 14:25 ` [PATCH v5 22/46] x86: Add functions to convert between mtrr size and mask Simon Glass
2025-03-15 14:25 ` [PATCH v5 23/46] x86: Update mtrr command to support 64-bit values Simon Glass
2025-03-15 14:25 ` [PATCH v5 24/46] x86: Update cpuid_eax et al to work on amd64 Simon Glass
2025-03-15 14:25 ` [PATCH v5 25/46] x86: Correct msr operation " Simon Glass
2025-03-15 14:25 ` [PATCH v5 26/46] x86: Allow adding non-aligned size for MTRR Simon Glass
2025-03-15 14:25 ` [PATCH v5 27/46] x86: emulation: Set an MTRR for the RAM Simon Glass
2025-03-15 14:25 ` [PATCH v5 28/46] x86: qemu: Support environment and cat command Simon Glass
2025-03-15 14:25 ` [PATCH v5 29/46] test/py: Correct sizing of created disks Simon Glass
2025-03-15 14:25 ` [PATCH v5 30/46] test/py: Add a helper to send characters Simon Glass
2025-03-15 14:25 ` [PATCH v5 31/46] test/py: Allow tests to be filtered by role Simon Glass
2025-03-15 14:25 ` [PATCH v5 32/46] x86: e820: Add a function to dump the e820 table Simon Glass
2025-03-15 14:25 ` [PATCH v5 33/46] x86: Add a new API for e820 Simon Glass
2025-03-15 14:25 ` [PATCH v5 34/46] x86: qemu: Use the new e820 API Simon Glass
2025-03-15 14:25 ` [PATCH v5 35/46] x86: emulation: Support BLOBLIST_TABLES properly Simon Glass
2025-03-15 14:25 ` [PATCH v5 36/46] x86: Support a 64-bit ramdisk address Simon Glass
2025-03-15 14:25 ` [PATCH v5 37/46] acpi: Mark struct acpi_rsdp as packed Simon Glass
2025-03-15 14:25 ` [PATCH v5 38/46] boot: Consider non-bootable partitions Simon Glass
2025-03-18 14:04 ` Tom Rini
2025-03-18 15:24 ` Simon Glass
2025-03-18 15:52 ` Tom Rini
2025-03-19 15:03 ` Simon Glass
2025-03-19 15:40 ` Tom Rini
2025-03-20 3:43 ` Simon Glass
2025-03-20 14:22 ` Tom Rini
2025-03-21 18:38 ` Simon Glass
2025-03-28 16:29 ` Tom Rini
2025-03-28 23:41 ` Simon Glass
2025-04-02 14:28 ` Tom Rini
2025-04-02 19:22 ` Simon Glass
2025-04-03 17:43 ` Tom Rini
2025-03-15 14:25 ` [PATCH v5 39/46] boot: Handle running out of labels Simon Glass
2025-03-15 14:26 ` [PATCH v5 40/46] boot: Support IO UARTs for earlycon and console Simon Glass
2025-04-02 14:28 ` Tom Rini
2025-04-02 19:22 ` Simon Glass
2025-04-02 19:50 ` Tom Rini
2025-04-02 19:56 ` Tom Rini
2025-04-02 23:54 ` Simon Glass
2025-04-03 0:26 ` Tom Rini [this message]
2025-04-03 17:57 ` Simon Glass
2025-03-15 14:26 ` [PATCH v5 41/46] sandbox: acpi: Avoid a warning about FADT Simon Glass
2025-03-15 14:26 ` [PATCH v5 42/46] sandbox: acpi: Correct mapping in FADT Simon Glass
2025-03-15 14:26 ` [PATCH v5 43/46] acpi: Add a checksum to the DMAR table Simon Glass
2025-03-21 11:47 ` Heinrich Schuchardt
2025-03-15 14:26 ` [PATCH v5 44/46] test: acpi: Correct memory leaks Simon Glass
2025-03-21 11:34 ` Heinrich Schuchardt
2025-03-15 14:26 ` [PATCH v5 45/46] acpi: Support checking checksums Simon Glass
2025-03-21 10:49 ` Heinrich Schuchardt
2025-03-21 12:24 ` Heinrich Schuchardt
2025-03-28 12:01 ` Simon Glass
2025-03-15 14:26 ` [PATCH v5 46/46] test: Add a test for booting Ubuntu 24.04 Simon Glass
2025-04-05 14:31 ` [PATCH v5 00/46] x86: Improve operation under QEMU Tom Rini
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-all 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=20250403002643.GG5495@bill-the-cat \
--to=trini@konsulko.com \
--cc=bmeng.cn@gmail.com \
--cc=igor.opaniuk@gmail.com \
--cc=jmasson@baylibre.com \
--cc=maximilian.brune@9elements.com \
--cc=mkorpershoek@baylibre.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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