ACK: [PATCH 1/2] lib: fwts_acpi_tables: add a function to get FADT versions

Colin Ian King colin.king at canonical.com
Mon Aug 16 09:57:30 UTC 2021


On 13/08/2021 22:35, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/lib/include/fwts_acpi_tables.h |  1 +
>  src/lib/src/fwts_acpi_tables.c     | 14 ++++++++++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/src/lib/include/fwts_acpi_tables.h b/src/lib/include/fwts_acpi_tables.h
> index 2ac649bb..6b768d79 100644
> --- a/src/lib/include/fwts_acpi_tables.h
> +++ b/src/lib/include/fwts_acpi_tables.h
> @@ -92,5 +92,6 @@ void fwts_acpi_space_id(fwts_framework *fw, const char *table, const char *field
>  	const uint8_t actual, const uint8_t num_type, ...);
>  
>  uint32_t fwts_get_acpi_version(fwts_framework *fw);
> +void fwts_get_fadt_version(fwts_framework *fw, uint8_t *major, uint8_t *minor);
>  
>  #endif
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index b08cbdfd..9f12539f 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -1829,3 +1829,17 @@ uint32_t fwts_get_acpi_version(fwts_framework *fw)
>  
>  	return acpi_version;
>  }
> +
> +/*
> + *  fwts_get_fadt_version()
> + * 	get fadt major and minor versions
> + */
> +void fwts_get_fadt_version(fwts_framework *fw, uint8_t *major, uint8_t *minor)
> +{
> +	uint32_t acpi_version;
> +
> +	/* ACPI version = FADT major & minor versions */
> +	acpi_version = fwts_get_acpi_version(fw);
> +	*major = (acpi_version & 0xF00) >> 8;
> +	*minor = (acpi_version & 0xFF) >> 4;
> +}
> 

Acked-by: Colin Ian King <colin.king at canonical.com>




More information about the fwts-devel mailing list