[fwts PATCH v2 1/1] use EFI_RT_PROPERTIES_TABLE, not variable

ivanhu ivan.hu at canonical.com
Mon Oct 19 03:33:00 UTC 2020


Hi Heinrich,

The fwts_uefi_rt_support_status_get function is used to check/get the
RuntimeServicesSupported variable then do the separate tests for the
some UEFI runtime services(variable, time and misc) and compare to the
actual implementation of the firmware. This will not be used to check
the implementation of UEFI runtime services, FWTS UEFI tests  will
default do most of the runtime service tests, only the separate
RuntimeServicesSupported tests will follow the existence of
RuntimeServicesSupported.
Doing this will cause the RuntimeServicesSupported tests to be run and
get the false results.


Cheers,
Ivan



On 10/16/20 2:48 AM, Heinrich Schuchardt wrote:
> The UEFI 2.8 specification introduced the RuntimeServicesSupported EFI
> variable. In the UEFI 2.8 specification (Errata A) this variable was
> marked invalid and replaced by the EFI_RT_PROPERTIES_TABLE configuration
> table.
> 
> If a RuntimeServicesSupported variable is not found, this does not indicate
> that runtime services are not avaiable. As of v5.9 the efi_test driver of
> the Linux kernel does not provide access to the EFI_RT_PROPERTIES_TABLE
> configuration table. So lets assume that all services are implemented. If
> they are not supported they will signal this by returning EFI_UNSUPPORTED.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v2:
> 	correct subject line
> ---
>  src/lib/src/fwts_uefi.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 0fb6b799..aeddb153 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -543,6 +543,9 @@ bool fwts_uefi_efivars_iface_exist(void)
>   *  fwts_uefi_rt_support_status_get()
>   *	get the status of runtime service support and the value of
>   *	the RuntimeServicesSupported variable
> + *
> + *  This variable only exists in UEFI 2.8 but not in UEFI 2.8 (Errata A) ff.
> + *  TODO: evaluate the EFI_RT_PROPERTIES_TABLE configuration table.
>   */
>  void fwts_uefi_rt_support_status_get(int fd, bool *getvar_supported, uint32_t *var_rtsupported)
>  {
> @@ -569,11 +572,8 @@ void fwts_uefi_rt_support_status_get(int fd, bool *getvar_supported, uint32_t *v
> 
>  	ioret = ioctl(fd, EFI_RUNTIME_GET_VARIABLE, &getvariable);
>  	if (ioret == -1) {
> -		if (status == EFI_NOT_FOUND) {
> -			*getvar_supported = true;
> -		} else {
> -			*getvar_supported = false;
> -		}
> +		*getvar_supported = true;
> +		*var_rtsupported = 0x3fff;
>  		return;
>  	}
> 
> --
> 2.28.0
> 



More information about the fwts-devel mailing list