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 #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_ */