2 * EFI Test driver Header
4 * Copyright(C) 2012-2016 Canonical Ltd.
8 #ifndef _DRIVERS_FIRMWARE_EFI_TEST_H_
9 #define _DRIVERS_FIRMWARE_EFI_TEST_H_
11 #include <linux/efi.h>
13 struct efi_getvariable {
14 efi_char16_t *variable_name;
15 efi_guid_t *vendor_guid;
17 unsigned long *data_size;
22 struct efi_setvariable {
23 efi_char16_t *variable_name;
24 efi_guid_t *vendor_guid;
26 unsigned long data_size;
31 struct efi_getnextvariablename {
32 unsigned long *variable_name_size;
33 efi_char16_t *variable_name;
34 efi_guid_t *vendor_guid;
38 struct efi_queryvariableinfo {
40 u64 *maximum_variable_storage_size;
41 u64 *remaining_variable_storage_size;
42 u64 *maximum_variable_size;
48 efi_time_cap_t *capabilities;
57 struct efi_getwakeuptime {
64 struct efi_setwakeuptime {
70 struct efi_getnexthighmonotoniccount {
75 struct efi_querycapsulecapabilities {
76 efi_capsule_header_t **capsule_header_array;
77 unsigned long capsule_count;
78 u64 *maximum_capsule_size;
83 #define EFI_RUNTIME_GET_VARIABLE \
84 _IOWR('p', 0x01, struct efi_getvariable)
85 #define EFI_RUNTIME_SET_VARIABLE \
86 _IOW('p', 0x02, struct efi_setvariable)
88 #define EFI_RUNTIME_GET_TIME \
89 _IOR('p', 0x03, struct efi_gettime)
90 #define EFI_RUNTIME_SET_TIME \
91 _IOW('p', 0x04, struct efi_settime)
93 #define EFI_RUNTIME_GET_WAKETIME \
94 _IOR('p', 0x05, struct efi_getwakeuptime)
95 #define EFI_RUNTIME_SET_WAKETIME \
96 _IOW('p', 0x06, struct efi_setwakeuptime)
98 #define EFI_RUNTIME_GET_NEXTVARIABLENAME \
99 _IOWR('p', 0x07, struct efi_getnextvariablename)
101 #define EFI_RUNTIME_QUERY_VARIABLEINFO \
102 _IOR('p', 0x08, struct efi_queryvariableinfo)
104 #define EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT \
105 _IOR('p', 0x09, struct efi_getnexthighmonotoniccount)
107 #define EFI_RUNTIME_QUERY_CAPSULECAPABILITIES \
108 _IOR('p', 0x0A, struct efi_querycapsulecapabilities)
110 #endif /* _DRIVERS_FIRMWARE_EFI_TEST_H_ */