From: Markus Probst <markus.probst@posteo.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3 2/2] ACPI: SPCR: Support UART clock frequency field
Date: Fri, 24 Jul 2026 15:14:40 +0000 [thread overview]
Message-ID: <90b044a8bc6c53130afde5fc5686ae8bb547031f.camel@posteo.de> (raw)
In-Reply-To: <2026071007-amaze-tartly-6282@gregkh>
[-- Attachment #1: Type: text/plain, Size: 2140 bytes --]
On Fri, 2026-07-10 at 14:34 +0200, Greg Kroah-Hartman wrote:
I just noticed, I never replied to this email.
My apologies for the late response.
> On Mon, Jun 15, 2026 at 12:40:22AM +0000, Markus Probst 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.
>
> Ok, but then what are we going to do with this? Please make this a lot
> more descriptive, I have no idea what this is supposed to be doing at
> all.
The SPCR table provides information about a serial port. This can be
used, to make use of a serial port, before the necessary drivers are
loaded. Linux makes use of this in the earlycon console, if `earlycon`
is added to the kernel parameters.
Currently the "UART clock frequency" field in the SPCR table is
completely ignored. Thus if the uart clock frequency differs from the
kernel default of `BAUD*16`, it results in a misconfiguration of the
serial port.
>
> >
> > 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, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
> > index 73cb933fdc89..c79c809f49d4 100644
> > --- a/drivers/acpi/spcr.c
> > +++ b/drivers/acpi/spcr.c
> > @@ -228,7 +228,8 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
> > pr_info("console: %s\n", opts);
> >
> > if (enable_earlycon)
> > - setup_earlycon(opts);
> > + setup_earlycon_with_uartclk(opts,
> > + table->header.revision >= 3 ? table->uart_clk_freq : 0);
>
> Why the magic number 3?
As seen on the Link in the commit message, the "UART Clock Frequency"
field was introduced in the SPCR table with revision 3. For lower
revisions, this value must be ignored (and should be 0 anyway).
Thanks
- Markus Probst
>
> thanks,
> greg k-h
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
prev parent reply other threads:[~2026-07-24 15:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 0:40 [PATCH v3 0/2] " Markus Probst
2026-06-15 0:40 ` [PATCH v3 1/2] serial: earlycon: add uart_clk_freq parameter Markus Probst
2026-07-10 12:36 ` Greg Kroah-Hartman
2026-07-12 16:36 ` Markus Probst
2026-07-12 16:40 ` Greg Kroah-Hartman
2026-07-12 16:46 ` Markus Probst
2026-06-15 0:40 ` [PATCH v3 2/2] ACPI: SPCR: Support UART clock frequency field Markus Probst
2026-07-10 12:34 ` Greg Kroah-Hartman
2026-07-24 15:14 ` Markus Probst [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-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=90b044a8bc6c53130afde5fc5686ae8bb547031f.camel@posteo.de \
--to=markus.probst@posteo.de \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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®