ACPI: Do not enable ACPI SPCR console by default on arm64
Subsystems (4)
PATCH 1/1 ACPI: Do not enable ACPI SPCR console by default on arm64
Consistency with x86 and loongarch, don't enable ACPI SPCR console by default on arm64
--- arch/arm64/kernel/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/acpi.c +2 -1
@@ -227,7 +227,8 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +/* Do not enable ACPI SPCR console by default */ +acpi_parse_spcr (earlycon_acpi_spcr_enable, false);if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
Signature · 1 line
2.42.1
Quoted 13 lines · Liu Wei
Consistency with x86 and loongarch, don't enable ACPI SPCR console by default on arm64
Signed-off-by Liu Wei <[email protected]>--- arch/arm64/kernel/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/arm64/kernel/acpi.c +0
-0
arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 234
Quoted 9 lines
arch/arm64/kernel/acpi.c +2
-1@@ -227,7 +227,8 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +/* Do not enable ACPI SPCR console by default */ +acpi_parse_spcr (earlycon_acpi_spcr_enable, false);if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
It's been a while, and the status of arm hardware may have changed. IIRC the choice to force enable this is that most arm hardware is headless and this was a _required_ option for booting.
I'm not sure if that's still the case as it's been a long time.
Can anyone from the ARM community provide an approval here?
P.
Will Deacon
maintainerQuoted 28 lines · Prarit Bhargava
Quoted 13 lines · Liu Wei
Consistency with x86 and loongarch, don't enable ACPI SPCR console by default on arm64
Signed-off-by Liu Wei <[email protected]>--- arch/arm64/kernel/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/arm64/kernel/acpi.c +0
-0arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 234
Quoted 9 lines
arch/arm64/kernel/acpi.c +2
-1@@ -227,7 +227,8 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +/* Do not enable ACPI SPCR console by default */ +acpi_parse_spcr (earlycon_acpi_spcr_enable, false);if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }It's been a while, and the status of arm hardware may have changed. IIRC the choice to force enable this is that most arm hardware is headless and this was a _required_ option for booting.
Quoted 3 lines
I'm not sure if that's still the case as it's been a long time.
Can anyone from the ARM community provide an approval here?
I don't have a strong opinion either way, but adding the Arm ACPI folks in case they care.
Having said that, if the only rationale for this patch is consistency with other architectures, then I think I'd lean towards leaving the behaviour as-is so we don't give users a nasty surprise on their next kernel upgrade.
Will
Quoted 33 lines · Will Deacon
Quoted 28 lines · Prarit Bhargava
Quoted 13 lines · Liu Wei
Consistency with x86 and loongarch, don't enable ACPI SPCR console by default on arm64
Signed-off-by Liu Wei <[email protected]>--- arch/arm64/kernel/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/arm64/kernel/acpi.c +0
-0arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 234
Quoted 9 lines
arch/arm64/kernel/acpi.c +2
-1@@ -227,7 +227,8 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +/* Do not enable ACPI SPCR console by default */ +acpi_parse_spcr (earlycon_acpi_spcr_enable, false);if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }It's been a while, and the status of arm hardware may have changed. IIRC the choice to force enable this is that most arm hardware is headless and this was a _required_ option for booting.
Quoted 3 lines
I'm not sure if that's still the case as it's been a long time.
Can anyone from the ARM community provide an approval here?
Quoted 8 lines
I don't have a strong opinion either way, but adding the Arm ACPI folks in case they care.
Having said that, if the only rationale for this patch is consistency with other architectures, then I think I'd lean towards leaving the behaviour as-is so we don't give users a nasty surprise on their next kernel upgrade.
+1, I am concerned about breaking existing behaviour on the platforms in the wild. Also many platforms running ACPI would have already used console cmdline parameter if SPCR is not their choice for the console. So I don't see the need to align with other arch default behaviour here, we can revisit if someone shouts with a real reason as why cmdline option is not viable.
--
Regards,
Sudeep
Quoted 52 lines · Liu Wei
From: Sudeep Holla <[email protected]>
Quoted 42 lines · Will Deacon
Quoted 33 lines · Prarit Bhargava
Quoted 28 lines · Liu Wei
Quoted 13 lines
Consistency with x86 and loongarch, don't enable ACPI SPCR console by default on arm64
Signed-off-by Liu Wei <[email protected]>--- arch/arm64/kernel/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/arm64/kernel/acpi.c +0
-0arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 234
Quoted 9 lines
arch/arm64/kernel/acpi.c +2
-1@@ -227,7 +227,8 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +/* Do not enable ACPI SPCR console by default */ +acpi_parse_spcr (earlycon_acpi_spcr_enable, false);if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }It's been a while, and the status of arm hardware may have changed. IIRC the choice to force enable this is that most arm hardware is headless and this was a _required_ option for booting.
Quoted 3 lines
I'm not sure if that's still the case as it's been a long time.
Can anyone from the ARM community provide an approval here?
Quoted 8 lines
I don't have a strong opinion either way, but adding the Arm ACPI folks in case they care.
Having said that, if the only rationale for this patch is consistency with other architectures, then I think I'd lean towards leaving the behaviour as-is so we don't give users a nasty surprise on their next kernel upgrade.
Quoted 6 lines
+1, I am concerned about breaking existing behaviour on the platforms in the wild. Also many platforms running ACPI would have already used console cmdline parameter if SPCR is not their choice for the console. So I don't see the need to align with other arch default behaviour here, we can revisit if someone shouts with a real reason as why cmdline option is not viable.
Quoted 4 lines
For varying privacy and security reasons, sometimes we would like to completely silence the serial console output, and only enable it through cmdline when needed.
FWIW, I understand that concern but the feedback you're receiving is that there are many existing systems that depend on this behavior. Breaking users for your concerns is not a good idea.
Perhaps a solution is to add yet-another-config-option, or add a kernel parameter to disable the SPCR console on ARM?
Something like "acpi=nospcr"?
P.
Quoted 13 lines
On ARM, it is difficult because SPCR is enabled by default.
Thanks for your patience,
Liu WeiQuoted 4 lines
--
Regards,
Sudeep
PATCH v2 1/1 ACPI: Add config to disable ACPI SPCR console by default on arm64
In reply to Liu WeiFor varying privacy and security reasons, sometimes we would like to completely silence the serial console output, and only enable it through cmdline when needed.
But there are many existing systems that depend on this console, so add CONFIG_ARM_DISABLE_ACPI_SPCR_CONSOLE for this situation.
---
v2: Add a config option suggested by Prarit
--- arch/arm64/kernel/acpi.c | 12 ++++++++++++ drivers/acpi/arm64/Kconfig | 11 +++++++++++ 2 files changed, 23 insertions(+)
arch/arm64/kernel/acpi.c +12 -0
@@ -227,7 +227,19 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { +/* +* For varying privacy and security reasons, sometimes need +* to completely silence the serial console output, and only +* enable it by cmdline when needed. +* But there are many existing systems that depend on this +* behavior, so use CONFIG_ARM_DISABLE_ACPI_SPCR_CONSOLE. +*/ +#ifdef CONFIG_ARM_DISABLE_ACPI_SPCR_CONSOLE +acpi_parse_spcr (earlycon_acpi_spcr_enable, false); +#else acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +#endif +if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
drivers/acpi/arm64/Kconfig +11 -0
@@ -21,3 +21,14 @@ config ACPI_AGDI config ACPI_APMT bool + +config ARM_DISABLE_ACPI_SPCR_CONSOLE + bool "Disable ACPI SPCR Console by Default on Arm64" + depends on ARM64 && ACPI_SPCR_TABLE + default n + help + For varying privacy and security reasons, sometimes need to + completely silence the serial console output, and only enable + it by kernel cmdline when needed. + + Say Y to disable ACPI SPCR console by default.
Signature · 1 line
2.42.1
Re: [PATCH v2] ACPI: Add config to disable ACPI SPCR console by default on arm64
Quoted 28 lines · Liu Wei
For varying privacy and security reasons, sometimes we would like to completely silence the serial console output, and only enable it through cmdline when needed.
But there are many existing systems that depend on this console, so add
CONFIG_ARM_DISABLE_ACPI_SPCR_CONSOLEfor this situation.Signed-off-by Liu Wei <[email protected]>Suggested-by Prarit Bhargava <[email protected]>---
v2: Add a config option suggested by Prarit
--- arch/arm64/kernel/acpi.c | 12 ++++++++++++ drivers/acpi/arm64/Kconfig | 11 +++++++++++ 2 files changed, 23 insertions(+)arch/arm64/kernel/acpi.c +3
-0@@ -227,7 +227,19 @@ void __init acpi_boot_table_init(void)if (earlycon_acpi_spcr_enable)early_init_dt_scan_chosen_stdout (); }else { +/* +* For varying privacy and security reasons, sometimes need +* to completely silence the serial console output, and only
arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 242
Quoted 10 lines
arch/arm64/kernel/acpi.c +9
-0+* enable it by cmdline when needed. +* But there are many existing systems that depend on this +* behavior, so use CONFIG_ARM_DISABLE_ACPI_SPCR_CONSOLE. +*/ +#ifdef CONFIG_ARM_DISABLE_ACPI_SPCR_CONSOLE +acpi_parse_spcr (earlycon_acpi_spcr_enable, false); +#else acpi_parse_spcr (earlycon_acpi_spcr_enable, true); +#endif +
I don't think you want a config option here after all. See my previous comment about "acpi=nospcr". I realized that if you do use a config then distros will not have the ability to default 'on', and advise users to disable it for their use cases.
Try the 'acpi=nospcr' option. That should keep everyone happy.
P.
Quoted 22 lines
arch/arm64/kernel/acpi.c +0
-0if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }drivers/acpi/arm64/Kconfig +11
-0@@ -21,3 +21,14 @@ config ACPI_AGDI config ACPI_APMT bool + +config ARM_DISABLE_ACPI_SPCR_CONSOLE + bool "Disable ACPI SPCR Console by Default on Arm64" + depends on ARM64 && ACPI_SPCR_TABLE + default n + help + For varying privacy and security reasons, sometimes need to + completely silence the serial console output, and only enable + it by kernel cmdline when needed. + + Say Y to disable ACPI SPCR console by default.
PATCH v3 1/1 ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on arm64
In reply to Liu WeiFor varying privacy and security reasons, sometimes we would like to completely silence the serial console, and only enable it when needed.
But there are many existing systems that depend on this console, so add acpi=nospcr for this situation.
---
v2: Add a config option suggested by Prarit
v3: Use cmdline acpi=nospcr instead of config
--- Documentation/admin-guide/kernel-parameters.txt | 9 ++++++--- arch/arm64/kernel/acpi.c | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +6 -3
@@ -12,7 +12,7 @@ acpi= [HW,ACPI,X86,ARM64,RISCV64,EARLY] Advanced Configuration and Power Interface Format: { force | on | off | strict | noirq | rsdt | - copy_dsdt } + copy_dsdt | nospcr } force -- enable ACPI if default was off on -- enable ACPI but allow fallback to DT [arm64,riscv64] off -- disable ACPI if default was on
@@ -21,8 +21,11 @@ strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory - For ARM64 and RISCV64, ONLY "acpi=off", "acpi=on" or - "acpi=force" are available + nospcr -- disable ACPI SPCR as default console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are available See also Documentation/power/runtime_pm.rst, pci=noacpi
arch/arm64/kernel/acpi.c +16 -1
@@ -45,6 +45,7 @@ EXPORT_SYMBOL(acpi_pci_disabled);static bool param_acpi_off__initdata ;static bool param_acpi_on__initdata ;static bool param_acpi_force__initdata ; +static bool param_acpi_nospcr__initdata ;static int __init parse_acpi (char *arg) {
@@ -58,6 +59,8 @@ static int __init parse_acpi(char *arg) param_acpi_on = true; else if (strcmp(arg, "force") == 0) /* force ACPI to be enabled */ param_acpi_force = true; + else if (strcmp(arg, "nospcr") == 0) /* disable ACPI SPCR as default console */ + param_acpi_nospcr = true; else return -EINVAL; /* Core will print when we return error */
@@ -237,7 +240,19 @@ void __init acpi_boot_table_init(void) acpi_put_table(facs); }#endif -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); + +/* +* For varying privacy and security reasons, sometimes need +* to completely silence the serial console output, and only +* enable it when needed. +* But there are many existing systems that depend on this +* behavior, use acpi=nospcr for this. +*/ +acpi_parse_spcr (earlycon_acpi_spcr_enable, + !param_acpi_nospcr); +pr_info ("Use ACPI SPCR as default console: %s\n" , + param_acpi_nospcr ?"No" :"Yes" ); +if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
Signature · 1 line
2.42.1
Re: [PATCH V3] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on arm64
Quoted 5 lines · Liu Wei
For varying privacy and security reasons, sometimes we would like to completely silence the serial console, and only enable it when needed.
But there are many existing systems that depend on this console, so add acpi=nospcr for this situation.
Maybe it is just me, but i see nospcr and my brain expands it to "no speaker". Adding to that, your commit message says "completely silence"...
Documentation/admin-guide/kernel-parameters.txt line 28
Quoted 5 lines
Documentation/admin-guide/kernel-parameters.txt +5
-0+ nospcr -- disable ACPI SPCR as default console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are available
How about putting the word 'serial' in here somewhere, just to give users an additional clue you are not talking about a speaker, CTRL-G etc.
Andrew
Re: [PATCH V3] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on arm64
From: Andrew Lunn <[email protected]>
Quoted 11 lines · Liu Wei
Quoted 5 lines
For varying privacy and security reasons, sometimes we would like to completely silence the serial console, and only enable it when needed.
But there are many existing systems that depend on this console, so add acpi=nospcr for this situation.
Maybe it is just me, but i see nospcr and my brain expands it to "no speaker". Adding to that, your commit message says "completely silence"...
Quoted 9 lines
Documentation/admin-guide/kernel-parameters.txt line 28
Quoted 5 lines
Documentation/admin-guide/kernel-parameters.txt +5
-0+ nospcr -- disable ACPI SPCR as default console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are availableHow about putting the word 'serial' in here somewhere, just to give users an additional clue you are not talking about a speaker, CTRL-G etc.
Thank you for your suggestion.
You mean acpi=nospcr_serial or acpi=no_spcrserial? However, it appears somewhat unconventional compared to the original acpi=* parameter.
How about introducing a new one, such as acpi_no_spcr_serial or acpi_no_spcr_console?
Best wishes,
Liu Wei
Quoted 1 line
Andrew
Will Deacon
maintainerRe: [PATCH V3] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on arm64
Quoted 23 lines · Liu Wei
From: Andrew Lunn <[email protected]>
Quoted 11 lines · Liu Wei
Quoted 5 lines
For varying privacy and security reasons, sometimes we would like to completely silence the serial console, and only enable it when needed.
But there are many existing systems that depend on this console, so add acpi=nospcr for this situation.
Maybe it is just me, but i see nospcr and my brain expands it to "no speaker". Adding to that, your commit message says "completely silence"...
Quoted 9 lines
Documentation/admin-guide/kernel-parameters.txt line 28
Quoted 5 lines
Documentation/admin-guide/kernel-parameters.txt +5
-0+ nospcr -- disable ACPI SPCR as default console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are availableHow about putting the word 'serial' in here somewhere, just to give users an additional clue you are not talking about a speaker, CTRL-G etc.
Quoted 7 lines
Thank you for your suggestion.
You mean acpi=nospcr_serial or acpi=no_spcrserial? However, it appears somewhat unconventional compared to the original acpi=* parameter.
How about introducing a new one, such as
acpi_no_spcr_serialoracpi_no_spcr_console?
I think acpi=nospcr is fine like it is. Just expand the acronym in the documentation so that it's obviously not talking about a speaker.
Will
Re: [PATCH V3] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on arm64
In reply to Liu WeiQuoted 23 lines · Liu Wei
From: Andrew Lunn <[email protected]>
Quoted 11 lines · Liu Wei
Quoted 5 lines
For varying privacy and security reasons, sometimes we would like to completely silence the serial console, and only enable it when needed.
But there are many existing systems that depend on this console, so add acpi=nospcr for this situation.
Maybe it is just me, but i see nospcr and my brain expands it to "no speaker". Adding to that, your commit message says "completely silence"...
Quoted 9 lines
Documentation/admin-guide/kernel-parameters.txt line 28
Quoted 5 lines
Documentation/admin-guide/kernel-parameters.txt +5
-0+ nospcr -- disable ACPI SPCR as default console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are availableHow about putting the word 'serial' in here somewhere, just to give users an additional clue you are not talking about a speaker, CTRL-G etc.
Quoted 4 lines
Thank you for your suggestion.
You mean acpi=nospcr_serial or acpi=no_spcrserial? However, it appears somewhat unconventional compared to the original acpi=* parameter.
How about:
nospcr -- disable ACPI SPCR as default _serial_ console on ARM64
Please as Will suggested, add a definition somewhere.
Andrew
Re: [PATCH V3] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on arm64
From: Andrew Lunn <[email protected]>
Quoted 26 lines · Liu Wei
Quoted 25 lines
From: Andrew Lunn <[email protected]>
Quoted 11 lines · Liu Wei
Quoted 5 lines
For varying privacy and security reasons, sometimes we would like to completely silence the serial console, and only enable it when needed.
But there are many existing systems that depend on this console, so add acpi=nospcr for this situation.
Maybe it is just me, but i see nospcr and my brain expands it to "no speaker". Adding to that, your commit message says "completely silence"...
Quoted 9 lines
Documentation/admin-guide/kernel-parameters.txt line 28
Quoted 5 lines
Documentation/admin-guide/kernel-parameters.txt +5
-0+ nospcr -- disable ACPI SPCR as default console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are availableHow about putting the word 'serial' in here somewhere, just to give users an additional clue you are not talking about a speaker, CTRL-G etc.
Thank you for your suggestion.
Quoted 9 lines
Quoted 2 lines
You mean acpi=nospcr_serial or acpi=no_spcrserial? However, it appears somewhat unconventional compared to the original acpi=* parameter.
How about:
nospcr -- disable ACPI SPCR as default _serial_ console on ARM64
Please as Will suggested, add a definition somewhere.
Ok, I will send the v4 version later.
Thanks for all suggestion.
Liu Wei
Quoted 1 line
Andrew
PATCH v4 1/1 ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
In reply to Liu WeiFor varying privacy and security reasons, sometimes we would like to completely silence the _serial_ console, and only enable it when needed.
But there are many existing systems that depend on this _serial_ console, so add acpi=nospcr to disable console in ACPI SPCR table as default _serial_ console.
---
v2: Add a config option suggested by Prarit
v3: Use cmdline acpi=nospcr instead of config
v4: Some description in comment or document
--- .../admin-guide/kernel-parameters.txt | 10 +++++++--- arch/arm64/kernel/acpi.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +7 -3
@@ -12,7 +12,7 @@ acpi= [HW,ACPI,X86,ARM64,RISCV64,EARLY] Advanced Configuration and Power Interface Format: { force | on | off | strict | noirq | rsdt | - copy_dsdt } + copy_dsdt | nospcr } force -- enable ACPI if default was off on -- enable ACPI but allow fallback to DT [arm64,riscv64] off -- disable ACPI if default was on
@@ -21,8 +21,12 @@ strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory - For ARM64 and RISCV64, ONLY "acpi=off", "acpi=on" or - "acpi=force" are available + nospcr -- disable console in ACPI SPCR table as + default _serial_ console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are available See also Documentation/power/runtime_pm.rst, pci=noacpi
arch/arm64/kernel/acpi.c +17 -1
@@ -45,6 +45,7 @@ EXPORT_SYMBOL(acpi_pci_disabled);static bool param_acpi_off__initdata ;static bool param_acpi_on__initdata ;static bool param_acpi_force__initdata ; +static bool param_acpi_nospcr__initdata ;static int __init parse_acpi (char *arg) {
@@ -58,6 +59,8 @@ static int __init parse_acpi(char *arg) param_acpi_on = true; else if (strcmp(arg, "force") == 0) /* force ACPI to be enabled */ param_acpi_force = true; + else if (strcmp(arg, "nospcr") == 0) /* disable SPCR as default console */ + param_acpi_nospcr = true; else return -EINVAL; /* Core will print when we return error */
@@ -237,7 +240,20 @@ void __init acpi_boot_table_init(void) acpi_put_table(facs); }#endif -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); + +/* +* For varying privacy and security reasons, sometimes need +* to completely silence the serial console output, and only +* enable it when needed. +* But there are many existing systems that depend on this +* behavior, use acpi=nospcr to disable console in ACPI SPCR +* table as default serial console. +*/ +acpi_parse_spcr (earlycon_acpi_spcr_enable, + !param_acpi_nospcr); +pr_info ("Use ACPI SPCR as default console: %s\n" , + param_acpi_nospcr ?"No" :"Yes" ); +if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
Signature · 1 line
2.42.1
Re: [PATCH v4] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
Quoted 84 lines · Liu Wei
For varying privacy and security reasons, sometimes we would like to completely silence the _serial_ console, and only enable it when needed.
But there are many existing systems that depend on this _serial_ console, so add acpi=nospcr to disable console in ACPI SPCR table as default _serial_ console.
Signed-off-by Liu Wei <[email protected]>Suggested-by Prarit Bhargava <[email protected]>Suggested-by Will Deacon <[email protected]>Suggested-by Andrew Lunn <[email protected]>---
v2: Add a config option suggested by Prarit
v3: Use cmdline acpi=nospcr instead of config
v4: Some description in comment or document
--- .../admin-guide/kernel-parameters.txt | 10 +++++++--- arch/arm64/kernel/acpi.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-)Documentation/admin-guide/kernel-parameters.txt +7
-3@@ -12,7 +12,7 @@ acpi= [HW,ACPI,X86,ARM64,RISCV64,EARLY] Advanced Configuration and Power Interface Format: { force | on | off | strict | noirq | rsdt | - copy_dsdt } + copy_dsdt | nospcr } force -- enable ACPI if default was off on -- enable ACPI but allow fallback to DT [arm64,riscv64] off -- disable ACPI if default was on@@ -21,8 +21,12 @@ strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory - For ARM64 and RISCV64, ONLY "acpi=off", "acpi=on" or - "acpi=force" are available + nospcr -- disable console in ACPI SPCR table as + default _serial_ console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are available See also Documentation/power/runtime_pm.rst, pci=noacpiarch/arm64/kernel/acpi.c +10
-1@@ -45,6 +45,7 @@ EXPORT_SYMBOL(acpi_pci_disabled);static bool param_acpi_off__initdata ;static bool param_acpi_on__initdata ;static bool param_acpi_force__initdata ; +static bool param_acpi_nospcr__initdata ;static int __init parse_acpi (char *arg) {@@ -58,6 +59,8 @@ static int __init parse_acpi(char *arg) param_acpi_on = true; else if (strcmp(arg, "force") == 0) /* force ACPI to be enabled */ param_acpi_force = true; + else if (strcmp(arg, "nospcr") == 0) /* disable SPCR as default console */ + param_acpi_nospcr = true; else return -EINVAL; /* Core will print when we return error */@@ -237,7 +240,20 @@ void __init acpi_boot_table_init(void) acpi_put_table(facs); }#endif -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); + +/* +* For varying privacy and security reasons, sometimes need +* to completely silence the serial console output, and only +* enable it when needed. +* But there are many existing systems that depend on this +* behavior, use acpi=nospcr to disable console in ACPI SPCR
arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 259
Quoted 10 lines
arch/arm64/kernel/acpi.c +7
-0+* table as default serial console. +*/ +acpi_parse_spcr (earlycon_acpi_spcr_enable, + !param_acpi_nospcr); +pr_info ("Use ACPI SPCR as default console: %s\n" , + param_acpi_nospcr ?"No" :"Yes" ); +if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
This looks good to me. Sorry that this took so long Liu.
P.
Re: [PATCH v4] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
From: Prarit Bhargava <[email protected]>
Quoted 24 lines · Liu Wei
Quoted 23 lines
For varying privacy and security reasons, sometimes we would like to completely silence the _serial_ console, and only enable it when needed.
But there are many existing systems that depend on this _serial_ console, so add acpi=nospcr to disable console in ACPI SPCR table as default _serial_ console.
Signed-off-by Liu Wei <[email protected]>Suggested-by Prarit Bhargava <[email protected]>Suggested-by Will Deacon <[email protected]>Suggested-by Andrew Lunn <[email protected]>---
v2: Add a config option suggested by Prarit
v3: Use cmdline acpi=nospcr instead of config
v4: Some description in comment or document
--- .../admin-guide/kernel-parameters.txt | 10 +++++++--- arch/arm64/kernel/acpi.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-)
Quoted 7 lines
Quoted 2 lines
...
This looks good to me. Sorry that this took so long Liu.
Reviewed-by Prarit Bhargava <[email protected]>
Thanks, my pleasure.
Liu Wei
Quoted 2 lines
P.
Re: [PATCH v4] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
In reply to Liu WeiQuoted 6 lines · Liu Wei
For varying privacy and security reasons, sometimes we would like to completely silence the _serial_ console, and only enable it when needed.
But there are many existing systems that depend on this _serial_ console, so add acpi=nospcr to disable console in ACPI SPCR table as default _serial_ console.
I think this is reasonable, with ACPI SPCR on in default is compatible with old systems.
Quoted 68 lines
Signed-off-by Liu Wei <[email protected]>Suggested-by Prarit Bhargava <[email protected]>Suggested-by Will Deacon <[email protected]>Suggested-by Andrew Lunn <[email protected]>---
v2: Add a config option suggested by Prarit
v3: Use cmdline acpi=nospcr instead of config
v4: Some description in comment or document
--- .../admin-guide/kernel-parameters.txt | 10 +++++++--- arch/arm64/kernel/acpi.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-)Documentation/admin-guide/kernel-parameters.txt +7
-3@@ -12,7 +12,7 @@ acpi= [HW,ACPI,X86,ARM64,RISCV64,EARLY] Advanced Configuration and Power Interface Format: { force | on | off | strict | noirq | rsdt | - copy_dsdt } + copy_dsdt | nospcr } force -- enable ACPI if default was off on -- enable ACPI but allow fallback to DT [arm64,riscv64] off -- disable ACPI if default was on@@ -21,8 +21,12 @@ strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory - For ARM64 and RISCV64, ONLY "acpi=off", "acpi=on" or - "acpi=force" are available + nospcr -- disable console in ACPI SPCR table as + default _serial_ console on ARM64 + For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or + "acpi=nospcr" are available + For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force" + are available See also Documentation/power/runtime_pm.rst, pci=noacpiarch/arm64/kernel/acpi.c +3
-0@@ -45,6 +45,7 @@ EXPORT_SYMBOL(acpi_pci_disabled);static bool param_acpi_off__initdata ;static bool param_acpi_on__initdata ;static bool param_acpi_force__initdata ; +static bool param_acpi_nospcr__initdata ;static int __init parse_acpi (char *arg) {@@ -58,6 +59,8 @@ static int __init parse_acpi(char *arg) param_acpi_on = true; else if (strcmp(arg, "force") == 0) /* force ACPI to be enabled */ param_acpi_force = true; + else if (strcmp(arg, "nospcr") == 0) /* disable SPCR as default console */ + param_acpi_nospcr = true; else return -EINVAL; /* Core will print when we return error */@@ -237,7 +240,20 @@ void __init acpi_boot_table_init(void)acpi_put_table (facs);
arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 249
Quoted 10 lines
arch/arm64/kernel/acpi.c +7
-1}#endif -acpi_parse_spcr (earlycon_acpi_spcr_enable, true); + +/* +* For varying privacy and security reasons, sometimes need +* to completely silence the serial console output, and only +* enable it when needed. +* But there are many existing systems that depend on this +* behavior, use acpi=nospcr to disable console in ACPI SPCR
Nit: s/behavior/behaviour
arch/arm64/kernel/acpi.c void __init acpi_boot_table_init(void) · line 259
Quoted 10 lines
arch/arm64/kernel/acpi.c +7
-0+* table as default serial console. +*/ +acpi_parse_spcr (earlycon_acpi_spcr_enable, + !param_acpi_nospcr); +pr_info ("Use ACPI SPCR as default console: %s\n" , + param_acpi_nospcr ?"No" :"Yes" ); +if (IS_ENABLED (CONFIG_ACPI_BGRT ))acpi_table_parse (ACPI_SIG_BGRT , acpi_parse_bgrt); }
Thanks
Hanjun
Re: [PATCH v4] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
In reply to Liu WeiQuoted 8 lines · Liu Wei
For varying privacy and security reasons, sometimes we would like to completely silence the _serial_ console, and only enable it when needed.
But there are many existing systems that depend on this _serial_ console, so add acpi=nospcr to disable console in ACPI SPCR table as default _serial_ console.
[...]
Applied to arm64 (for-next/acpi), thanks!
[1/1] ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
https://git.kernel.org/arm64/c/f5a4af3c7527
Signature · 1 line
Catalin