[efi] Generalise EFI entropy generation to non-x86 CPUs
[ipxe.git] / src / interface / efi / efi_guid.c
1 /*
2 * Copyright (C) 2014 Michael Brown <mbrown@fensystems.co.uk>.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA.
18 *
19 * You can also choose to distribute this program under the terms of
20 * the Unmodified Binary Distribution Licence (as given in the file
21 * COPYING.UBDL), provided that you have satisfied its requirements.
22 */
23
24 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25
26 #include <ipxe/efi/efi.h>
27 #include <ipxe/efi/Protocol/AbsolutePointer.h>
28 #include <ipxe/efi/Protocol/Arp.h>
29 #include <ipxe/efi/Protocol/BlockIo.h>
30 #include <ipxe/efi/Protocol/BusSpecificDriverOverride.h>
31 #include <ipxe/efi/Protocol/ComponentName.h>
32 #include <ipxe/efi/Protocol/ComponentName2.h>
33 #include <ipxe/efi/Protocol/ConsoleControl/ConsoleControl.h>
34 #include <ipxe/efi/Protocol/DevicePath.h>
35 #include <ipxe/efi/Protocol/DevicePathToText.h>
36 #include <ipxe/efi/Protocol/Dhcp4.h>
37 #include <ipxe/efi/Protocol/DiskIo.h>
38 #include <ipxe/efi/Protocol/DriverBinding.h>
39 #include <ipxe/efi/Protocol/GraphicsOutput.h>
40 #include <ipxe/efi/Protocol/HiiConfigAccess.h>
41 #include <ipxe/efi/Protocol/HiiFont.h>
42 #include <ipxe/efi/Protocol/Ip4.h>
43 #include <ipxe/efi/Protocol/Ip4Config.h>
44 #include <ipxe/efi/Protocol/LoadFile.h>
45 #include <ipxe/efi/Protocol/LoadFile2.h>
46 #include <ipxe/efi/Protocol/LoadedImage.h>
47 #include <ipxe/efi/Protocol/ManagedNetwork.h>
48 #include <ipxe/efi/Protocol/Mtftp4.h>
49 #include <ipxe/efi/Protocol/NetworkInterfaceIdentifier.h>
50 #include <ipxe/efi/Protocol/PciIo.h>
51 #include <ipxe/efi/Protocol/PciRootBridgeIo.h>
52 #include <ipxe/efi/Protocol/PxeBaseCode.h>
53 #include <ipxe/efi/Protocol/SerialIo.h>
54 #include <ipxe/efi/Protocol/SimpleFileSystem.h>
55 #include <ipxe/efi/Protocol/SimpleNetwork.h>
56 #include <ipxe/efi/Protocol/SimplePointer.h>
57 #include <ipxe/efi/Protocol/SimpleTextIn.h>
58 #include <ipxe/efi/Protocol/SimpleTextInEx.h>
59 #include <ipxe/efi/Protocol/SimpleTextOut.h>
60 #include <ipxe/efi/Protocol/TcgService.h>
61 #include <ipxe/efi/Protocol/Tcp4.h>
62 #include <ipxe/efi/Protocol/Udp4.h>
63 #include <ipxe/efi/Protocol/UgaDraw.h>
64 #include <ipxe/efi/Protocol/UnicodeCollation.h>
65 #include <ipxe/efi/Protocol/UsbHostController.h>
66 #include <ipxe/efi/Protocol/Usb2HostController.h>
67 #include <ipxe/efi/Protocol/UsbIo.h>
68 #include <ipxe/efi/Protocol/VlanConfig.h>
69 #include <ipxe/efi/Guid/FileInfo.h>
70 #include <ipxe/efi/Guid/FileSystemInfo.h>
71
72 /** @file
73 *
74 * EFI GUIDs
75 *
76 */
77
78 /* TrEE protocol GUID definition in EDK2 headers is broken (missing braces) */
79 #define EFI_TREE_PROTOCOL_GUID \
80 { 0x607f766c, 0x7455, 0x42be, \
81 { 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f } }
82
83 /** Absolute pointer protocol GUID */
84 EFI_GUID efi_absolute_pointer_protocol_guid
85 = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID;
86
87 /** ARP protocol GUID */
88 EFI_GUID efi_arp_protocol_guid
89 = EFI_ARP_PROTOCOL_GUID;
90
91 /** ARP service binding protocol GUID */
92 EFI_GUID efi_arp_service_binding_protocol_guid
93 = EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID;
94
95 /** Block I/O protocol GUID */
96 EFI_GUID efi_block_io_protocol_guid
97 = EFI_BLOCK_IO_PROTOCOL_GUID;
98
99 /** Bus specific driver override protocol GUID */
100 EFI_GUID efi_bus_specific_driver_override_protocol_guid
101 = EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID;
102
103 /** Component name protocol GUID */
104 EFI_GUID efi_component_name_protocol_guid
105 = EFI_COMPONENT_NAME_PROTOCOL_GUID;
106
107 /** Component name 2 protocol GUID */
108 EFI_GUID efi_component_name2_protocol_guid
109 = EFI_COMPONENT_NAME2_PROTOCOL_GUID;
110
111 /** Console control protocol GUID */
112 EFI_GUID efi_console_control_protocol_guid
113 = EFI_CONSOLE_CONTROL_PROTOCOL_GUID;
114
115 /** Device path protocol GUID */
116 EFI_GUID efi_device_path_protocol_guid
117 = EFI_DEVICE_PATH_PROTOCOL_GUID;
118
119 /** DHCPv4 protocol GUID */
120 EFI_GUID efi_dhcp4_protocol_guid
121 = EFI_DHCP4_PROTOCOL_GUID;
122
123 /** DHCPv4 service binding protocol GUID */
124 EFI_GUID efi_dhcp4_service_binding_protocol_guid
125 = EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID;
126
127 /** Disk I/O protocol GUID */
128 EFI_GUID efi_disk_io_protocol_guid
129 = EFI_DISK_IO_PROTOCOL_GUID;
130
131 /** Driver binding protocol GUID */
132 EFI_GUID efi_driver_binding_protocol_guid
133 = EFI_DRIVER_BINDING_PROTOCOL_GUID;
134
135 /** Graphics output protocol GUID */
136 EFI_GUID efi_graphics_output_protocol_guid
137 = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
138
139 /** HII configuration access protocol GUID */
140 EFI_GUID efi_hii_config_access_protocol_guid
141 = EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID;
142
143 /** HII font protocol GUID */
144 EFI_GUID efi_hii_font_protocol_guid
145 = EFI_HII_FONT_PROTOCOL_GUID;
146
147 /** IPv4 protocol GUID */
148 EFI_GUID efi_ip4_protocol_guid
149 = EFI_IP4_PROTOCOL_GUID;
150
151 /** IPv4 configuration protocol GUID */
152 EFI_GUID efi_ip4_config_protocol_guid
153 = EFI_IP4_CONFIG_PROTOCOL_GUID;
154
155 /** IPv4 service binding protocol GUID */
156 EFI_GUID efi_ip4_service_binding_protocol_guid
157 = EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID;
158
159 /** Load file protocol GUID */
160 EFI_GUID efi_load_file_protocol_guid
161 = EFI_LOAD_FILE_PROTOCOL_GUID;
162
163 /** Load file 2 protocol GUID */
164 EFI_GUID efi_load_file2_protocol_guid
165 = EFI_LOAD_FILE2_PROTOCOL_GUID;
166
167 /** Loaded image protocol GUID */
168 EFI_GUID efi_loaded_image_protocol_guid
169 = EFI_LOADED_IMAGE_PROTOCOL_GUID;
170
171 /** Loaded image device path protocol GUID */
172 EFI_GUID efi_loaded_image_device_path_protocol_guid
173 = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
174
175 /** Managed network protocol GUID */
176 EFI_GUID efi_managed_network_protocol_guid
177 = EFI_MANAGED_NETWORK_PROTOCOL_GUID;
178
179 /** Managed network service binding protocol GUID */
180 EFI_GUID efi_managed_network_service_binding_protocol_guid
181 = EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID;
182
183 /** MTFTPv4 protocol GUID */
184 EFI_GUID efi_mtftp4_protocol_guid
185 = EFI_MTFTP4_PROTOCOL_GUID;
186
187 /** MTFTPv4 service binding protocol GUID */
188 EFI_GUID efi_mtftp4_service_binding_protocol_guid
189 = EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID;
190
191 /** Network interface identifier protocol GUID (old version) */
192 EFI_GUID efi_nii_protocol_guid
193 = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID;
194
195 /** Network interface identifier protocol GUID (new version) */
196 EFI_GUID efi_nii31_protocol_guid
197 = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31;
198
199 /** PCI I/O protocol GUID */
200 EFI_GUID efi_pci_io_protocol_guid
201 = EFI_PCI_IO_PROTOCOL_GUID;
202
203 /** PCI root bridge I/O protocol GUID */
204 EFI_GUID efi_pci_root_bridge_io_protocol_guid
205 = EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID;
206
207 /** PXE base code protocol GUID */
208 EFI_GUID efi_pxe_base_code_protocol_guid
209 = EFI_PXE_BASE_CODE_PROTOCOL_GUID;
210
211 /** Serial I/O protocol GUID */
212 EFI_GUID efi_serial_io_protocol_guid
213 = EFI_SERIAL_IO_PROTOCOL_GUID;
214
215 /** Simple file system protocol GUID */
216 EFI_GUID efi_simple_file_system_protocol_guid
217 = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
218
219 /** Simple network protocol GUID */
220 EFI_GUID efi_simple_network_protocol_guid
221 = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
222
223 /** Simple pointer protocol GUID */
224 EFI_GUID efi_simple_pointer_protocol_guid
225 = EFI_SIMPLE_POINTER_PROTOCOL_GUID;
226
227 /** Simple text input protocol GUID */
228 EFI_GUID efi_simple_text_input_protocol_guid
229 = EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID;
230
231 /** Simple text input extension protocol GUID */
232 EFI_GUID efi_simple_text_input_ex_protocol_guid
233 = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
234
235 /** Simple text output protocol GUID */
236 EFI_GUID efi_simple_text_output_protocol_guid
237 = EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID;
238
239 /** TCG protocol GUID */
240 EFI_GUID efi_tcg_protocol_guid
241 = EFI_TCG_PROTOCOL_GUID;
242
243 /** TCPv4 protocol GUID */
244 EFI_GUID efi_tcp4_protocol_guid
245 = EFI_TCP4_PROTOCOL_GUID;
246
247 /** TCPv4 service binding protocol GUID */
248 EFI_GUID efi_tcp4_service_binding_protocol_guid
249 = EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID;
250
251 /** TrEE protocol GUID */
252 EFI_GUID efi_tree_protocol_guid
253 = EFI_TREE_PROTOCOL_GUID;
254
255 /** UDPv4 protocol GUID */
256 EFI_GUID efi_udp4_protocol_guid
257 = EFI_UDP4_PROTOCOL_GUID;
258
259 /** UDPv4 service binding protocol GUID */
260 EFI_GUID efi_udp4_service_binding_protocol_guid
261 = EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID;
262
263 /** UGA draw protocol GUID */
264 EFI_GUID efi_uga_draw_protocol_guid
265 = EFI_UGA_DRAW_PROTOCOL_GUID;
266
267 /** Unicode collation protocol GUID */
268 EFI_GUID efi_unicode_collation_protocol_guid
269 = EFI_UNICODE_COLLATION_PROTOCOL_GUID;
270
271 /** USB host controller protocol GUID */
272 EFI_GUID efi_usb_hc_protocol_guid
273 = EFI_USB_HC_PROTOCOL_GUID;
274
275 /** USB2 host controller protocol GUID */
276 EFI_GUID efi_usb2_hc_protocol_guid
277 = EFI_USB2_HC_PROTOCOL_GUID;
278
279 /** USB I/O protocol GUID */
280 EFI_GUID efi_usb_io_protocol_guid
281 = EFI_USB_IO_PROTOCOL_GUID;
282
283 /** VLAN configuration protocol GUID */
284 EFI_GUID efi_vlan_config_protocol_guid
285 = EFI_VLAN_CONFIG_PROTOCOL_GUID;
286
287 /** File information GUID */
288 EFI_GUID efi_file_info_id = EFI_FILE_INFO_ID;
289
290 /** File system information GUID */
291 EFI_GUID efi_file_system_info_id = EFI_FILE_SYSTEM_INFO_ID;