1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * EFI Test driver Header
5 * Copyright(C) 2012-2016 Canonical Ltd.
9 #ifndef _DRIVERS_FIRMWARE_EFI_TEST_H_
10 #define _DRIVERS_FIRMWARE_EFI_TEST_H_
12 #include <linux/efi.h>
14 struct efi_getvariable
{
15 efi_char16_t
*variable_name
;
16 efi_guid_t
*vendor_guid
;
18 unsigned long *data_size
;
23 struct efi_setvariable
{
24 efi_char16_t
*variable_name
;
25 efi_guid_t
*vendor_guid
;
27 unsigned long data_size
;
32 struct efi_getnextvariablename
{
33 unsigned long *variable_name_size
;
34 efi_char16_t
*variable_name
;
35 efi_guid_t
*vendor_guid
;
39 struct efi_queryvariableinfo
{
41 u64
*maximum_variable_storage_size
;
42 u64
*remaining_variable_storage_size
;
43 u64
*maximum_variable_size
;
49 efi_time_cap_t
*capabilities
;
58 struct efi_getwakeuptime
{
65 struct efi_setwakeuptime
{
71 struct efi_getnexthighmonotoniccount
{
76 struct efi_querycapsulecapabilities
{
77 efi_capsule_header_t
**capsule_header_array
;
78 unsigned long capsule_count
;
79 u64
*maximum_capsule_size
;
84 struct efi_resetsystem
{
87 unsigned long data_size
;
91 #define EFI_RUNTIME_GET_VARIABLE \
92 _IOWR('p', 0x01, struct efi_getvariable)
93 #define EFI_RUNTIME_SET_VARIABLE \
94 _IOW('p', 0x02, struct efi_setvariable)
96 #define EFI_RUNTIME_GET_TIME \
97 _IOR('p', 0x03, struct efi_gettime)
98 #define EFI_RUNTIME_SET_TIME \
99 _IOW('p', 0x04, struct efi_settime)
101 #define EFI_RUNTIME_GET_WAKETIME \
102 _IOR('p', 0x05, struct efi_getwakeuptime)
103 #define EFI_RUNTIME_SET_WAKETIME \
104 _IOW('p', 0x06, struct efi_setwakeuptime)
106 #define EFI_RUNTIME_GET_NEXTVARIABLENAME \
107 _IOWR('p', 0x07, struct efi_getnextvariablename)
109 #define EFI_RUNTIME_QUERY_VARIABLEINFO \
110 _IOR('p', 0x08, struct efi_queryvariableinfo)
112 #define EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT \
113 _IOR('p', 0x09, struct efi_getnexthighmonotoniccount)
115 #define EFI_RUNTIME_QUERY_CAPSULECAPABILITIES \
116 _IOR('p', 0x0A, struct efi_querycapsulecapabilities)
118 #define EFI_RUNTIME_RESET_SYSTEM \
119 _IOW('p', 0x0B, struct efi_resetsystem)
121 #endif /* _DRIVERS_FIRMWARE_EFI_TEST_H_ */