diff mbox series

fwts_acpi_tables: skip FACS warning for reduced hardware

Message ID 20210629005006.1571482-1-alex.hung@canonical.com
State Accepted
Headers show
Series fwts_acpi_tables: skip FACS warning for reduced hardware | expand

Commit Message

Alex Hung June 29, 2021, 12:50 a.m. UTC
"This structure is optional if and only if the
HARDWARE_REDUCED_ACPI flag in the FADT is set."

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/lib/src/fwts_acpi_tables.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Colin Ian King June 29, 2021, 7:10 a.m. UTC | #1
On 29/06/2021 01:50, Alex Hung wrote:
> "This structure is optional if and only if the
> HARDWARE_REDUCED_ACPI flag in the FADT is set."
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/lib/src/fwts_acpi_tables.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index b8b710bc..b08cbdfd 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -1028,8 +1028,11 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
>  		uint64_t facs_addr;
>  		fwts_acpi_table_facs *facs = NULL;
>  
> -		/* This is most unexpected, so warn about it */
> -		fwts_log_warning(fw, "No FACS found, fwts has faked one instead.");
> +		if (fwts_acpi_is_reduced_hardware(fw))	/* FACS is optional on reduced hardware */
> +			fwts_log_info(fw, "No FACS found, fwts has faked one instead.");
> +		else	/* This is most unexpected, so warn about it */
> +			fwts_log_warning(fw, "No FACS found, fwts has faked one instead.");
> +
>  		if ((facs = fwts_low_calloc(1, size)) == NULL) {
>  			fwts_log_error(fw, "Cannot allocate fake FACS.");
>  			return FWTS_ERROR;
> 

+1  Thanks Alex.

Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu July 5, 2021, 3:45 a.m. UTC | #2
On 6/29/21 8:50 AM, Alex Hung wrote:
> "This structure is optional if and only if the
> HARDWARE_REDUCED_ACPI flag in the FADT is set."
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/lib/src/fwts_acpi_tables.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index b8b710bc..b08cbdfd 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -1028,8 +1028,11 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
>  		uint64_t facs_addr;
>  		fwts_acpi_table_facs *facs = NULL;
>  
> -		/* This is most unexpected, so warn about it */
> -		fwts_log_warning(fw, "No FACS found, fwts has faked one instead.");
> +		if (fwts_acpi_is_reduced_hardware(fw))	/* FACS is optional on reduced hardware */
> +			fwts_log_info(fw, "No FACS found, fwts has faked one instead.");
> +		else	/* This is most unexpected, so warn about it */
> +			fwts_log_warning(fw, "No FACS found, fwts has faked one instead.");
> +
>  		if ((facs = fwts_low_calloc(1, size)) == NULL) {
>  			fwts_log_error(fw, "Cannot allocate fake FACS.");
>  			return FWTS_ERROR;
> 

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
index b8b710bc..b08cbdfd 100644
--- a/src/lib/src/fwts_acpi_tables.c
+++ b/src/lib/src/fwts_acpi_tables.c
@@ -1028,8 +1028,11 @@  static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
 		uint64_t facs_addr;
 		fwts_acpi_table_facs *facs = NULL;
 
-		/* This is most unexpected, so warn about it */
-		fwts_log_warning(fw, "No FACS found, fwts has faked one instead.");
+		if (fwts_acpi_is_reduced_hardware(fw))	/* FACS is optional on reduced hardware */
+			fwts_log_info(fw, "No FACS found, fwts has faked one instead.");
+		else	/* This is most unexpected, so warn about it */
+			fwts_log_warning(fw, "No FACS found, fwts has faked one instead.");
+
 		if ((facs = fwts_low_calloc(1, size)) == NULL) {
 			fwts_log_error(fw, "Cannot allocate fake FACS.");
 			return FWTS_ERROR;