[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 0/3] acpi: Add machine option to disable SPCR table
From: |
Li Chen |
Subject: |
Re: [PATCH V2 0/3] acpi: Add machine option to disable SPCR table |
Date: |
Wed, 23 Apr 2025 17:17:05 +0800 |
User-agent: |
Zoho Mail |
Hi Bibo,
---- On Wed, 23 Apr 2025 16:49:09 +0800 bibo mao <maobibo@loongson.cn> wrote
---
>
>
> On 2025/4/23 下午4:36, Li Chen wrote:
> > Hi Bibo,
> >
> > ---- On Wed, 23 Apr 2025 14:27:36 +0800 bibo mao <maobibo@loongson.cn>
> > wrote ---
> > >
> > >
> > > On 2025/4/22 下午8:03, Li Chen wrote:
> > > > This series introduces a new machine option, spcr=on|off, allowing
> > users
> > > > to disable the ACPI SPCR (Serial Port Console Redirection) table.
> > > > By default, SPCR is enabled. Disabling it can help ensure that the
> > guest > console behavior is determined solely by kernel command-line
> > parameters
> > > Hi Li,
> > >
> > > SPCR only provides serial port HW description information.
> > >
> > > However how to use is determined by Linux kernel, Can you describe the
> > > detailed scenario which is unintended serial console configurations
> > > imposed by firmware?
> >
> > Yes, it is decided by the kernel, more specifically, by how
> > architecture-specific code utilizes acpi_parse_spcr. For example, in the
> > 5.10 arm64 kernel
> > https://elixir.bootlin.com/linux/v5.10.236/source/arch/arm64/kernel/acpi.c#L236,
> > it passes true to acpi_parse_spcr's param enable_console.
> >
> > So, SPCR consoles are respected by Arm64 Linux by default. Therefore, even
> > without a console=ttyAMA0 configuration, ttyAMA0 is still added as a
> > preferred console
> > and used by printk.
> About serial port, there is ACPI SPCR table and DSDT table. About how to
> use, it is decided by kernel, so I think that it probably kernel usage
> issue.
>
> However I have no opposing view with your patch, adding option
> "spcr=on|off" sounds good.
Thanks, I totally agree with you. BTW, newer kernels introduce the nospcr
command-line argument, allowing users to control if respect SPCR or not:
https://elixir.bootlin.com/linux/v6.15-rc3/source/arch/arm64/kernel/acpi.c#L254
Regards,
Li
- [PATCH V2 1/3] acpi: Add machine option to disable SPCR table, (continued)