On 2025/4/23 下午4:36, Li Chen wrote:
Hi Bibo,

  ---- On Wed, 23 Apr 2025 14:27:36 +0800  bibo mao <maob...@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.

Regards
Bibo Mao

Regards,
Li



Reply via email to