[PATCH] efi_runtime: re-enable the resetsystem runtime interface

Ivan Hu ivan.hu at canonical.com
Fri Aug 24 03:29:52 UTC 2018


Re-enable the UEFI runtime service ResetSystem interface,
And also fix the gcc build warning,
warning: ‘efi_runtime_reset_system’ defined but not used

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 efi_runtime/efi_runtime.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
index d79db78..30a139a 100644
--- a/efi_runtime/efi_runtime.c
+++ b/efi_runtime/efi_runtime.c
@@ -561,10 +561,6 @@ static long efi_runtime_get_nexthighmonocount(unsigned long arg)
 	return 0;
 }
 
-#if 0
-/*
- *  Note: efi_runtime_reset_system currently not used
- */
 static long efi_runtime_reset_system(unsigned long arg)
 {
 	struct efi_resetsystem __user *resetsystem_user;
@@ -588,7 +584,6 @@ static long efi_runtime_reset_system(unsigned long arg)
 	kfree(data);
 	return 0;
 }
-#endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
 static long efi_runtime_query_variableinfo(unsigned long arg)
@@ -724,6 +719,9 @@ static long efi_runtime_ioctl(struct file *file, unsigned int cmd,
 	case EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT:
 		return efi_runtime_get_nexthighmonocount(arg);
 
+	case EFI_RUNTIME_RESET_SYSTEM:
+		return efi_runtime_reset_system(arg);
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
 	case EFI_RUNTIME_QUERY_VARIABLEINFO:
 		return efi_runtime_query_variableinfo(arg);
-- 
2.7.4




More information about the fwts-devel mailing list