ACK: [PATCH] acpi: fadt: Fix FACS checking
Colin Ian King
colin.king at canonical.com
Mon Jan 29 17:51:08 UTC 2018
On 25/01/18 15:04, Jeffrey Hugo wrote:
> In case of HW reduced platforms, FIRMWARE_CTRL and X_FIRMWARE_CTRL are
> allowed to be 0 in the FADT as a FACS may not be provided. The FACS
> validation which checks these fields does register a success for HW reduced
> platforms when the fields are both 0, or registers a failure for non-HW
> reduced platforms as FACS is required in that case. However, the FACS
> validation continues with other checks, which can override the previous
> success with a failure, causing an invalid test result and confusing output
> messages.
>
> We can do better by returning early after validating FIRMWARE_CTRL and
> X_FIRMWARE_CTRL are both 0 and the platform is or is not HW reduced as we
> have made a definitive pass/fail determination, and further checking is not
> warranted.
>
> Signed-off-by: Jeffrey Hugo <jhugo at codeaurora.org>
> ---
> src/acpi/fadt/fadt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
> index 9863566..d18d28c 100644
> --- a/src/acpi/fadt/fadt.c
> +++ b/src/acpi/fadt/fadt.c
> @@ -270,7 +270,8 @@ static void acpi_table_check_fadt_firmware_ctrl(fwts_framework *fw)
> "Structure (FACS) when ACPI hardware "
> "reduced mode is not set. ");
> }
> -
> + /* We have either passed or failed. No need to continue */
> + return;
> }
>
> if ((fadt->firmware_control != 0 && fadt->x_firmware_ctrl == 0) ||
>
Thanks!
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list