From: Markus Probst <markus.probst@posteo.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: SPCR: Support UART clock frequency field
Date: Sat, 09 May 2026 06:13:48 +0000 [thread overview]
Message-ID: <813b3d417d04904080629c65111a57133ffd767a.camel@posteo.de> (raw)
In-Reply-To: <CAJZ5v0jzgDgw1eMugtSPc7ceeTXUM17=3uUaVY8OBkV7nBLsvg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]
On Fri, 2026-05-08 at 21:19 +0200, Rafael J. Wysocki wrote:
> On Tue, May 5, 2026 at 9:36 PM Markus Probst <markus.probst@posteo.de> wrote:
> >
> > The Microsoft Serial Port Console Redirection (SPCR) specification
> > revision 1.08 comprises additional field: UART Clock Frequency [1].
> >
> > It contains a non-zero value indicating the UART clock frequency in Hz.
> >
> > Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table [1]
> > Signed-off-by: Markus Probst <markus.probst@posteo.de>
> > ---
> > drivers/acpi/spcr.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
> > index 73cb933fdc89..d80ad87efae0 100644
> > --- a/drivers/acpi/spcr.c
> > +++ b/drivers/acpi/spcr.c
> > @@ -220,6 +220,9 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
> > if (!baud_rate) {
> > snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype,
> > table->serial_port.address);
> > + } else if (table->header.revision >= 3 && table->uart_clk_freq) {
> > + snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d,%u", uart, iotype,
> > + table->serial_port.address, baud_rate, table->uart_clk_freq);
> > } else {
> > snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype,
> > table->serial_port.address, baud_rate);
> >
> > ---
>
> Please have a look at the sashiko.dev feedback at
>
> https://sashiko.dev/#/patchset/20260505-acpi_spcr-v1-1-fd4bc6f4eb53%40posteo.de
>
> and let me know what you think.
For the first comment, I don't think thats an issue, as there is no
length check for the other fields either.
The second comment however seems true.
while earlycon parses
<baudrate>,<uartclk>
regular uart parses
<baudrate><parity><bits><flow>
This is strange, because according to kernel documentation, options for
uart should be identical for earlycon and console kernel parameters.
[1] [2].
Thanks
- Markus Probst
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/serial_core.c?h=v7.1-rc1#n2097
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/kernel-parameters.txt?h=v7.1-rc1#n1451
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
next prev parent reply other threads:[~2026-05-09 6:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 19:36 Markus Probst
2026-05-08 19:19 ` Rafael J. Wysocki
2026-05-09 6:13 ` Markus Probst [this message]
2026-05-09 8:47 ` Markus Probst
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=813b3d417d04904080629c65111a57133ffd767a.camel@posteo.de \
--to=markus.probst@posteo.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®