[PATCH 1/1] fwts-test: fwts-test: EFI_RT_PROPERTIES_TABLE

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Oct 14 18:42:40 UTC 2020


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>
---
 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