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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*
* Dyspxkrypt LibUEFI: Raw bindings of UEFI that conforms to the definitions of the UEFI Specification.
* Copyright (C) 2023 HTGAzureX1212.
*
* 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 3 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, see <https://www.gnu.org/licenses/>.
*/
use c_void;
use null_mut;
/// A null, mutable pointer.
pub const NULL: *mut VOID = null_mut;
/// A logical Boolean value that occupies one byte.
///
/// `TRUE` corresponds to `1` and `FALSE` corresponds to `0`. Any other values are invalid and undefined.
pub type BOOLEAN = u8;
/// A signed integer of native width.
///
/// This means 4 bytes on supported 32-bit platforms, 8 bytes on supported
/// 64-bit platforms and 16 bytes on supported 128-bit platforms.
pub type INTN = isize;
/// An unsigned integer of native width.
///
/// This means 4 bytes on supported 32-bit platforms, 8 bytes on supported
/// 64-bit platforms and 16 bytes on supported 128-bit platforms.
pub type UINTN = usize;
/// A signed 1-byte integer.
///
/// It can be used to represent integers in the range of \[`-128`, `127`].
pub type INT8 = i8;
/// An unsigned 1-byte integer.
///
/// It can be used to represent integers in the range of \[`0`, `255`].
pub type UINT8 = u8;
/// A signed 2-byte integer.
///
/// It can be used to represent integers in the range of \[`-32768`, `32767`].
pub type INT16 = i16;
/// An unsigned 2-byte integer.
///
/// It can be used to represent integers in the range of \[`0`, `65535`].
pub type UINT16 = u16;
/// A signed 4-byte integer.
///
/// It can be used to represent integers in the range of \[`-2147483648`, `2147483647`].
pub type INT32 = i32;
/// An unsigned 4-byte integer.
///
/// It can be used to represent integers in the range of \[`0`, `4294967295`].
pub type UINT32 = u32;
/// A signed 8-byte integer.
///
/// It can be used to represent integers in the range of \[`-9223372036854775808`, `9223372036854775807`].
pub type INT64 = i64;
/// An unsigned 8-byte integer.
///
/// It can be used to represent integers in the range of \[`0`, `18446744073709551615`].
pub type UINT64 = u64;
/// A signed 16-byte integer.
///
/// It can be used to represent integers in the range of \[`-170141183460469231731687303715884105728`, `170141183460469231731687303715884105727`].
pub type INT128 = i64;
/// An unsigned 16-byte integer.
///
/// It can be used to represent integers in the range of \[`0`, `340282366920938463463374607431768211455`].
pub type UINT128 = u64;
/// A 1-byte character.
///
/// Unless otherwise specified, all 1-byte or ASCII characters and strings are stored in 8-bit ASCII encoding format, using the
/// ISO-Latin-1 character set.
pub type CHAR8 = u8;
/// A 2-byte character.
///
/// Unless otherwise specified all characters and strings are stored in the UCS-2 encoding format as defined by Unicode 2.1 and
/// ISO/IEC 10646 standards.
pub type CHAR16 = u16;
/// An undeclared or unknown type.
pub type VOID = c_void;
/// A 128-bit buffer containing a globally-unique identifier value.
///
/// Unless otherwise specified, aligned on a 64-bit boundary.
/// A status code.
pub type EFI_STATUS = UINTN;
/// A handle to a collection of related interfaces.
pub type EFI_HANDLE = *mut VOID;
/// A handle to an event structure.
pub type EFI_EVENT = *mut VOID;
/// A logical block address.
pub type EFI_LBA = UINT64;
/// A task priority level.
pub type EFI_TPL = UINTN;
/// A 32-byte buffer containing a network Media Access Control address.
;
/// A 4-byte buffer containing an IPv4 internet protocol address.
;
/// A 16-byte buffer containing an IPv6 internet protocol address.
;
/// A 16-byte buffer aligned on a 4-byte boundary, containing either an IPv4 or IPv6 internet protocol address.
pub union EFI_IP_ADDRESS