/usr/src/fwts-efi-runtime-dkms-14.03.01/efi_runtime.h is in fwts-efi-runtime-dkms 14.03.01-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | /*
* EFI Runtime driver
*
* Copyright(C) 2012-2014 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _EFI_RUNTIME_H_
#define _EFI_RUNTIME_H_
typedef enum {
EfiResetCold,
EfiResetWarm,
EfiResetShutdown
} EFI_RESET_TYPE;
typedef struct {
uint32_t Data1;
uint16_t Data2;
uint16_t Data3;
uint8_t Data4[8];
} __attribute__ ((packed)) EFI_GUID;
typedef struct {
uint16_t Year; /* 1900 – 9999 */
uint8_t Month; /* 1 – 12 */
uint8_t Day; /* 1 – 31 */
uint8_t Hour; /* 0 – 23 */
uint8_t Minute; /* 0 – 59 */
uint8_t Second; /* 0 – 59 */
uint8_t Pad1;
uint32_t Nanosecond; /* 0 – 999,999,999 */
int16_t TimeZone; /* -1440 to 1440 or 2047 */
uint8_t Daylight;
uint8_t Pad2;
} __attribute__ ((packed)) EFI_TIME;
typedef struct {
uint32_t Resolution;
uint32_t Accuracy;
uint8_t SetsToZero;
} __attribute__ ((packed)) EFI_TIME_CAPABILITIES;
typedef struct {
EFI_GUID CapsuleGuid;
uint32_t HeaderSize;
uint32_t Flags;
uint32_t CapsuleImageSize;
} __attribute__ ((packed)) EFI_CAPSULE_HEADER;
struct efi_getvariable {
uint16_t *VariableName;
EFI_GUID *VendorGuid;
uint32_t *Attributes;
uint64_t *DataSize;
void *Data;
uint64_t *status;
} __attribute__ ((packed));
struct efi_setvariable {
uint16_t *VariableName;
EFI_GUID *VendorGuid;
uint32_t Attributes;
uint64_t DataSize;
void *Data;
uint64_t *status;
} __attribute__ ((packed));
struct efi_getnextvariablename {
uint64_t *VariableNameSize;
uint16_t *VariableName;
EFI_GUID *VendorGuid;
uint64_t *status;
} __attribute__ ((packed));
struct efi_queryvariableinfo {
uint32_t Attributes;
uint64_t *MaximumVariableStorageSize;
uint64_t *RemainingVariableStorageSize;
uint64_t *MaximumVariableSize;
uint64_t *status;
} __attribute__ ((packed));
struct efi_gettime {
EFI_TIME *Time;
EFI_TIME_CAPABILITIES *Capabilities;
uint64_t *status;
} __attribute__ ((packed));
struct efi_settime {
EFI_TIME *Time;
uint64_t *status;
} __attribute__ ((packed));
struct efi_getwakeuptime {
uint8_t *Enabled;
uint8_t *Pending;
EFI_TIME *Time;
uint64_t *status;
} __attribute__ ((packed));
struct efi_setwakeuptime {
uint8_t Enabled;
EFI_TIME *Time;
uint64_t *status;
} __attribute__ ((packed));
struct efi_getnexthighmonotoniccount {
uint32_t *HighCount;
uint64_t *status;
} __attribute__ ((packed));
struct efi_querycapsulecapabilities {
EFI_CAPSULE_HEADER **CapsuleHeaderArray;
uint64_t CapsuleCount;
uint64_t *MaximumCapsuleSize;
EFI_RESET_TYPE *ResetType;
uint64_t *status;
} __attribute__ ((packed));
/* ioctl calls that are permitted to the /dev/efi_runtime interface. */
#define EFI_RUNTIME_GET_VARIABLE \
_IOWR('p', 0x01, struct efi_getvariable)
#define EFI_RUNTIME_SET_VARIABLE \
_IOW('p', 0x02, struct efi_setvariable)
#define EFI_RUNTIME_GET_TIME \
_IOR('p', 0x03, struct efi_gettime)
#define EFI_RUNTIME_SET_TIME \
_IOW('p', 0x04, struct efi_settime)
#define EFI_RUNTIME_GET_WAKETIME \
_IOR('p', 0x05, struct efi_getwakeuptime)
#define EFI_RUNTIME_SET_WAKETIME \
_IOW('p', 0x06, struct efi_setwakeuptime)
#define EFI_RUNTIME_GET_NEXTVARIABLENAME \
_IOWR('p', 0x07, struct efi_getnextvariablename)
#define EFI_RUNTIME_QUERY_VARIABLEINFO \
_IOR('p', 0x08, struct efi_queryvariableinfo)
#define EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT \
_IOR('p', 0x09, struct efi_getnexthighmonotoniccount)
#define EFI_RUNTIME_QUERY_CAPSULECAPABILITIES \
_IOR('p', 0x0A, struct efi_querycapsulecapabilities)
#endif /* _EFI_RUNTIME_H_ */
|