Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / firmware / efi / test / efi_test.h
blob9812c6a02b40082b44807529d8c7093d6852675b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * EFI Test driver Header
5 * Copyright(C) 2012-2016 Canonical Ltd.
7 */
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;
17 u32 *attributes;
18 unsigned long *data_size;
19 void *data;
20 efi_status_t *status;
21 } __packed;
23 struct efi_setvariable {
24 efi_char16_t *variable_name;
25 efi_guid_t *vendor_guid;
26 u32 attributes;
27 unsigned long data_size;
28 void *data;
29 efi_status_t *status;
30 } __packed;
32 struct efi_getnextvariablename {
33 unsigned long *variable_name_size;
34 efi_char16_t *variable_name;
35 efi_guid_t *vendor_guid;
36 efi_status_t *status;
37 } __packed;
39 struct efi_queryvariableinfo {
40 u32 attributes;
41 u64 *maximum_variable_storage_size;
42 u64 *remaining_variable_storage_size;
43 u64 *maximum_variable_size;
44 efi_status_t *status;
45 } __packed;
47 struct efi_gettime {
48 efi_time_t *time;
49 efi_time_cap_t *capabilities;
50 efi_status_t *status;
51 } __packed;
53 struct efi_settime {
54 efi_time_t *time;
55 efi_status_t *status;
56 } __packed;
58 struct efi_getwakeuptime {
59 efi_bool_t *enabled;
60 efi_bool_t *pending;
61 efi_time_t *time;
62 efi_status_t *status;
63 } __packed;
65 struct efi_setwakeuptime {
66 efi_bool_t enabled;
67 efi_time_t *time;
68 efi_status_t *status;
69 } __packed;
71 struct efi_getnexthighmonotoniccount {
72 u32 *high_count;
73 efi_status_t *status;
74 } __packed;
76 struct efi_querycapsulecapabilities {
77 efi_capsule_header_t **capsule_header_array;
78 unsigned long capsule_count;
79 u64 *maximum_capsule_size;
80 int *reset_type;
81 efi_status_t *status;
82 } __packed;
84 #define EFI_RUNTIME_GET_VARIABLE \
85 _IOWR('p', 0x01, struct efi_getvariable)
86 #define EFI_RUNTIME_SET_VARIABLE \
87 _IOW('p', 0x02, struct efi_setvariable)
89 #define EFI_RUNTIME_GET_TIME \
90 _IOR('p', 0x03, struct efi_gettime)
91 #define EFI_RUNTIME_SET_TIME \
92 _IOW('p', 0x04, struct efi_settime)
94 #define EFI_RUNTIME_GET_WAKETIME \
95 _IOR('p', 0x05, struct efi_getwakeuptime)
96 #define EFI_RUNTIME_SET_WAKETIME \
97 _IOW('p', 0x06, struct efi_setwakeuptime)
99 #define EFI_RUNTIME_GET_NEXTVARIABLENAME \
100 _IOWR('p', 0x07, struct efi_getnextvariablename)
102 #define EFI_RUNTIME_QUERY_VARIABLEINFO \
103 _IOR('p', 0x08, struct efi_queryvariableinfo)
105 #define EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT \
106 _IOR('p', 0x09, struct efi_getnexthighmonotoniccount)
108 #define EFI_RUNTIME_QUERY_CAPSULECAPABILITIES \
109 _IOR('p', 0x0A, struct efi_querycapsulecapabilities)
111 #endif /* _DRIVERS_FIRMWARE_EFI_TEST_H_ */