diff mbox

[VIVID,SRU] SAUCE: ACPI / tables: Add acpi_force_32bit_fadt_addr option to force 32 bit FADT addresses (LP: #1529381)

Message ID 1453394617-990-1-git-send-email-colin.king@canonical.com
State New
Headers show

Commit Message

Colin Ian King Jan. 21, 2016, 4:43 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1529381

Some HP laptops seem to have invalid 64 bit FADT X_PM* addresses
which are causing various boot issues.  In these cases, it would
be useful to force ACPI to use the valid legacy 32 bit equivalent
PM addresses.  Add a acpi_force_32bit_fadt_addr to set the ACPICA
acpi_gbl_use32_bit_fadt_addresses to TRUE to force this override.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 Documentation/kernel-parameters.txt |  6 ++++++
 drivers/acpi/tables.c               | 10 ++++++++++
 2 files changed, 16 insertions(+)

Comments

Brad Figg Jan. 21, 2016, 5 p.m. UTC | #1
On Thu, Jan 21, 2016 at 04:43:37PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1529381
> 
> Some HP laptops seem to have invalid 64 bit FADT X_PM* addresses
> which are causing various boot issues.  In these cases, it would
> be useful to force ACPI to use the valid legacy 32 bit equivalent
> PM addresses.  Add a acpi_force_32bit_fadt_addr to set the ACPICA
> acpi_gbl_use32_bit_fadt_addresses to TRUE to force this override.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  Documentation/kernel-parameters.txt |  6 ++++++
>  drivers/acpi/tables.c               | 10 ++++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 33eb611..bfb8cdb 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -262,6 +262,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>  			dynamic table installation which will install SSDT
>  			tables to /sys/firmware/acpi/tables/dynamic.
>  
> +	acpi_force_32bit_fadt_addr
> +			force FADT to use 32 bit addresses rather than the
> +			64 bit X_* addresses. Some firmware have broken 64
> +			bit addresses for force ACPI ignore these and use
> +			the older legacy 32 bit addresss.
> +
>  	acpica_no_return_repair [HW, ACPI]
>  			Disable AML predefined validation mechanism
>  			This mechanism can repair the evaluation result to make
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index 93b8152..7400c02 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -406,3 +406,13 @@ static int __init acpi_force_table_verification_setup(char *s)
>  }
>  
>  early_param("acpi_force_table_verification", acpi_force_table_verification_setup);
> +
> +static int __init acpi_force_32bit_fadt_addr(char *s)
> +{
> +	pr_info("Forcing 32 Bit FADT addresses\n");
> +	acpi_gbl_use32_bit_fadt_addresses = TRUE;
> +
> +	return 0;
> +}
> +
> +early_param("acpi_force_32bit_fadt_addr", acpi_force_32bit_fadt_addr);
> -- 
> 1.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Kamal Mostafa Jan. 21, 2016, 7:56 p.m. UTC | #2

Tim Gardner Jan. 21, 2016, 10:15 p.m. UTC | #3
Do we have to care about newer kernels ?
Tim Gardner Jan. 21, 2016, 10:16 p.m. UTC | #4
On 01/21/2016 03:15 PM, Tim Gardner wrote:
> Do we have to care about newer kernels ?
> 

never mind. I just saw the other emails on this topic.
diff mbox

Patch

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 33eb611..bfb8cdb 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -262,6 +262,12 @@  bytes respectively. Such letter suffixes can also be entirely omitted.
 			dynamic table installation which will install SSDT
 			tables to /sys/firmware/acpi/tables/dynamic.
 
+	acpi_force_32bit_fadt_addr
+			force FADT to use 32 bit addresses rather than the
+			64 bit X_* addresses. Some firmware have broken 64
+			bit addresses for force ACPI ignore these and use
+			the older legacy 32 bit addresss.
+
 	acpica_no_return_repair [HW, ACPI]
 			Disable AML predefined validation mechanism
 			This mechanism can repair the evaluation result to make
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 93b8152..7400c02 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -406,3 +406,13 @@  static int __init acpi_force_table_verification_setup(char *s)
 }
 
 early_param("acpi_force_table_verification", acpi_force_table_verification_setup);
+
+static int __init acpi_force_32bit_fadt_addr(char *s)
+{
+	pr_info("Forcing 32 Bit FADT addresses\n");
+	acpi_gbl_use32_bit_fadt_addresses = TRUE;
+
+	return 0;
+}
+
+early_param("acpi_force_32bit_fadt_addr", acpi_force_32bit_fadt_addr);