iPXE
efi_null.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 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 (at your option) 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 <string.h>
27 #include <ipxe/efi/efi.h>
28 #include <ipxe/efi/efi_null.h>
29 
30 /** @file
31  *
32  * EFI null interfaces
33  *
34  */
35 
36 /******************************************************************************
37  *
38  * Simple Network Protocol
39  *
40  ******************************************************************************
41  */
42 
43 static EFI_STATUS EFIAPI
45  return EFI_UNSUPPORTED;
46 }
47 
48 static EFI_STATUS EFIAPI
50  return EFI_UNSUPPORTED;
51 }
52 
53 static EFI_STATUS EFIAPI
55  UINTN extra_rx_bufsize __unused,
56  UINTN extra_tx_bufsize __unused ) {
57  return EFI_UNSUPPORTED;
58 }
59 
60 static EFI_STATUS EFIAPI
62  BOOLEAN ext_verify __unused ) {
63  return EFI_UNSUPPORTED;
64 }
65 
66 static EFI_STATUS EFIAPI
68  return EFI_UNSUPPORTED;
69 }
70 
71 static EFI_STATUS EFIAPI
73  UINT32 enable __unused,
74  UINT32 disable __unused,
75  BOOLEAN mcast_reset __unused,
76  UINTN mcast_count __unused,
77  EFI_MAC_ADDRESS *mcast __unused ) {
78  return EFI_UNSUPPORTED;
79 }
80 
81 static EFI_STATUS EFIAPI
83  BOOLEAN reset __unused,
84  EFI_MAC_ADDRESS *new __unused ) {
85  return EFI_UNSUPPORTED;
86 }
87 
88 static EFI_STATUS EFIAPI
90  BOOLEAN reset __unused, UINTN *stats_len __unused,
92  return EFI_UNSUPPORTED;
93 }
94 
95 static EFI_STATUS EFIAPI
97  BOOLEAN ipv6 __unused,
100  return EFI_UNSUPPORTED;
101 }
102 
103 static EFI_STATUS EFIAPI
107  return EFI_UNSUPPORTED;
108 }
109 
110 static EFI_STATUS EFIAPI
112  UINT32 *interrupts __unused, VOID **txbuf __unused ) {
113  return EFI_UNSUPPORTED;
114 }
115 
116 static EFI_STATUS EFIAPI
118  UINTN ll_header_len __unused, UINTN len __unused,
120  EFI_MAC_ADDRESS *ll_dest __unused,
121  UINT16 *net_proto __unused ) {
122  return EFI_UNSUPPORTED;
123 }
124 
125 static EFI_STATUS EFIAPI
127  UINTN *ll_header_len __unused, UINTN *len __unused,
129  EFI_MAC_ADDRESS *ll_dest __unused,
130  UINT16 *net_proto __unused ) {
131  return EFI_UNSUPPORTED;
132 }
133 
136  .Start = efi_null_snp_start,
137  .Stop = efi_null_snp_stop,
138  .Initialize = efi_null_snp_initialize,
139  .Reset = efi_null_snp_reset,
140  .Shutdown = efi_null_snp_shutdown,
141  .ReceiveFilters = efi_null_snp_receive_filters,
142  .StationAddress = efi_null_snp_station_address,
143  .Statistics = efi_null_snp_statistics,
144  .MCastIpToMac = efi_null_snp_mcast_ip_to_mac,
145  .NvData = efi_null_snp_nvdata,
146  .GetStatus = efi_null_snp_get_status,
147  .Transmit = efi_null_snp_transmit,
148  .Receive = efi_null_snp_receive,
149 };
150 
151 /**
152  * Nullify SNP interface
153  *
154  * @v snp SNP interface
155  */
157 
158  memcpy ( snp, &efi_null_snp,
159  offsetof ( typeof ( *snp ), WaitForPacket ) );
161 }
162 
163 /******************************************************************************
164  *
165  * Network Interface Identification protocol
166  *
167  ******************************************************************************
168  */
169 
170 static EFIAPI VOID efi_null_undi_issue ( UINT64 cdb_phys ) {
171  PXE_CDB *cdb = ( ( void * ) ( intptr_t ) cdb_phys );
172 
175 }
176 
177 static PXE_SW_UNDI efi_null_undi __attribute__ (( aligned ( 16 ) )) = {
178  .Signature = PXE_ROMID_SIGNATURE,
179  .Len = sizeof ( efi_null_undi ),
180  .Rev = PXE_ROMID_REV,
181  .MajorVer = PXE_ROMID_MAJORVER,
182  .MinorVer = PXE_ROMID_MINORVER,
183  .Implementation = PXE_ROMID_IMP_SW_VIRT_ADDR,
184 };
185 
186 /**
187  * Nullify NII interface
188  *
189  * @v nii NII interface
190  */
193  nii->Id = ( ( intptr_t ) &efi_null_undi );
194 }
195 
196 /******************************************************************************
197  *
198  * Component name protocol
199  *
200  ******************************************************************************
201  */
202 
203 static EFI_STATUS EFIAPI
205  CHAR8 *language __unused,
206  CHAR16 **driver_name __unused ) {
207  return EFI_UNSUPPORTED;
208 }
209 
210 static EFI_STATUS EFIAPI
213  EFI_HANDLE child __unused,
214  CHAR8 *language __unused,
215  CHAR16 **controller_name __unused ) {
216  return EFI_UNSUPPORTED;
217 }
218 
221  .GetControllerName = efi_null_get_controller_name,
222  .SupportedLanguages = "",
223 };
224 
225 /**
226  * Nullify Component Name Protocol interface
227  *
228  * @v name2 Component name protocol
229  */
231 
232  memcpy ( name2, &efi_null_name2, sizeof ( *name2 ) );
233 }
234 
235 /******************************************************************************
236  *
237  * Load file protocol
238  *
239  ******************************************************************************
240  */
241 
242 static EFI_STATUS EFIAPI
245  BOOLEAN booting __unused, UINTN *len __unused,
246  VOID *data __unused ) {
247  return EFI_UNSUPPORTED;
248 }
249 
250 /**
251  * Nullify Load File Protocol interface
252  *
253  * @v load_file Load file protocol
254  */
256  load_file->LoadFile = efi_null_load_file;
257 }
258 
259 /******************************************************************************
260  *
261  * HII configuration access protocol
262  *
263  ******************************************************************************
264  */
265 
266 static EFI_STATUS EFIAPI
269  EFI_STRING *progress __unused,
270  EFI_STRING *results __unused ) {
271  return EFI_UNSUPPORTED;
272 }
273 
274 static EFI_STATUS EFIAPI
276  EFI_STRING config __unused,
277  EFI_STRING *progress __unused ) {
278  return EFI_UNSUPPORTED;
279 }
280 
281 static EFI_STATUS EFIAPI
284  EFI_QUESTION_ID question_id __unused,
286  EFI_BROWSER_ACTION_REQUEST *action_request __unused ) {
287  return EFI_UNSUPPORTED;
288 }
289 
292  .RouteConfig = efi_null_hii_route,
293  .Callback = efi_null_hii_callback,
294 };
295 
296 /**
297  * Nullify HII configuration access protocol
298  *
299  * @v hii HII configuration access protocol
300  */
302 
303  memcpy ( hii, &efi_null_hii, sizeof ( *hii ) );
304 }
305 
306 /******************************************************************************
307  *
308  * Block I/O protocol
309  *
310  ******************************************************************************
311  */
312 
313 static EFI_STATUS EFIAPI
315  BOOLEAN verify __unused ) {
316  return EFI_UNSUPPORTED;
317 }
318 
319 static EFI_STATUS EFIAPI
323  return EFI_UNSUPPORTED;
324 }
325 
326 static EFI_STATUS EFIAPI
330  return EFI_UNSUPPORTED;
331 }
332 
333 static EFI_STATUS EFIAPI
335  return EFI_UNSUPPORTED;
336 }
337 
339 
342  .Media = &efi_null_block_media,
343  .Reset = efi_null_block_reset,
344  .ReadBlocks = efi_null_block_read,
345  .WriteBlocks = efi_null_block_write,
346  .FlushBlocks = efi_null_block_flush,
347 };
348 
349 /**
350  * Nullify block I/O protocol
351  *
352  * @v block Block I/O protocol
353  */
355 
356  memcpy ( block, &efi_null_block, sizeof ( *block ) );
357 }
358 
359 /******************************************************************************
360  *
361  * PXE base code protocol
362  *
363  ******************************************************************************
364  */
365 
366 static EFI_STATUS EFIAPI
368  BOOLEAN use_ipv6 __unused ) {
369  return EFI_UNSUPPORTED;
370 }
371 
372 static EFI_STATUS EFIAPI
374  return EFI_UNSUPPORTED;
375 }
376 
377 static EFI_STATUS EFIAPI
379  BOOLEAN sort __unused ) {
380  return EFI_UNSUPPORTED;
381 }
382 
383 static EFI_STATUS EFIAPI
386  BOOLEAN bis __unused,
388  return EFI_UNSUPPORTED;
389 }
390 
391 static EFI_STATUS EFIAPI
398  BOOLEAN callback __unused ) {
399  return EFI_UNSUPPORTED;
400 }
401 
402 static EFI_STATUS EFIAPI
407  EFI_IP_ADDRESS *gateway __unused,
410  UINTN *hdr_len __unused, VOID *hdr __unused,
412  return EFI_UNSUPPORTED;
413 }
414 
415 static EFI_STATUS EFIAPI
422  UINTN *hdr_len __unused, VOID *hdr __unused,
424  return EFI_UNSUPPORTED;
425 }
426 
427 static EFI_STATUS EFIAPI
430  return EFI_UNSUPPORTED;
431 }
432 
433 static EFI_STATUS EFIAPI
437  return EFI_UNSUPPORTED;
438 }
439 
440 static EFI_STATUS EFIAPI
442  BOOLEAN *autoarp __unused,
443  BOOLEAN *sendguid __unused, UINT8 *ttl __unused,
444  UINT8 *tos __unused,
445  BOOLEAN *callback __unused ) {
446  return EFI_UNSUPPORTED;
447 }
448 
449 static EFI_STATUS EFIAPI
452  EFI_IP_ADDRESS *netmask __unused ) {
453  return EFI_UNSUPPORTED;
454 }
455 
456 static EFI_STATUS EFIAPI
458  BOOLEAN *dhcpdisc_ok __unused,
459  BOOLEAN *dhcpack_ok __unused,
460  BOOLEAN *proxyoffer_ok __unused,
461  BOOLEAN *pxebsdisc_ok __unused,
462  BOOLEAN *pxebsack_ok __unused,
463  BOOLEAN *pxebsbis_ok __unused,
469  EFI_PXE_BASE_CODE_PACKET *pxebsbis __unused ) {
470  return EFI_UNSUPPORTED;
471 }
472 
475  .Start = efi_null_pxe_start,
476  .Stop = efi_null_pxe_stop,
477  .Dhcp = efi_null_pxe_dhcp,
478  .Discover = efi_null_pxe_discover,
479  .Mtftp = efi_null_pxe_mtftp,
480  .UdpWrite = efi_null_pxe_udp_write,
481  .UdpRead = efi_null_pxe_udp_read,
482  .SetIpFilter = efi_null_pxe_set_ip_filter,
483  .Arp = efi_null_pxe_arp,
484  .SetParameters = efi_null_pxe_set_parameters,
485  .SetStationIp = efi_null_pxe_set_station_ip,
486  .SetPackets = efi_null_pxe_set_packets,
487 };
488 
489 /**
490  * Nullify PXE base code protocol
491  *
492  * @v pxe PXE base code protocol
493  */
495 
496  memcpy ( pxe, &efi_null_pxe, offsetof ( typeof ( *pxe ), Mode ) );
497  pxe->Mode->Started = FALSE;
498 }
499 
500 /******************************************************************************
501  *
502  * Apple Net Boot protocol
503  *
504  ******************************************************************************
505  */
506 
507 static EFI_STATUS EFIAPI
510  return EFI_UNSUPPORTED;
511 }
512 
513 static EFI_STATUS EFIAPI
516  return EFI_UNSUPPORTED;
517 }
518 
521  .GetBsdpResponse = efi_null_apple_bsdp,
522 };
523 
524 /**
525  * Nullify Apple Net Boot protocol
526  *
527  * @v apple Apple Net Boot protocol
528  */
530 
531  memcpy ( apple, &efi_null_apple, sizeof ( *apple ) );
532 }
533 
534 /******************************************************************************
535  *
536  * USB I/O Protocol
537  *
538  ******************************************************************************
539  */
540 
541 static EFI_STATUS EFIAPI
547  return EFI_UNSUPPORTED;
548 }
549 
550 static EFI_STATUS EFIAPI
552  UINT8 endpoint __unused, VOID *data __unused,
554  UINT32 *status __unused ) {
555  return EFI_UNSUPPORTED;
556 }
557 
558 static EFI_STATUS EFIAPI
560  UINT8 endpoint __unused,
561  VOID *data __unused,
562  UINTN *len __unused,
564  UINT32 *status __unused ) {
565  return EFI_UNSUPPORTED;
566 }
567 
568 static EFI_STATUS EFIAPI
570  UINT8 endpoint __unused,
572  UINTN interval __unused,
575  callback __unused,
576  VOID *context __unused ) {
577  return EFI_UNSUPPORTED;
578 }
579 
580 static EFI_STATUS EFIAPI
582  UINT8 endpoint __unused,
584  UINT32 *status __unused ) {
585  return EFI_UNSUPPORTED;
586 }
587 
588 static EFI_STATUS EFIAPI
590  UINT8 endpoint __unused,
591  VOID *data __unused,
594  callback __unused,
595  VOID *context __unused ) {
596  return EFI_UNSUPPORTED;
597 }
598 
599 static EFI_STATUS EFIAPI
602  *efidesc __unused ) {
603  return EFI_UNSUPPORTED;
604 }
605 
606 static EFI_STATUS EFIAPI
609  *efidesc __unused ) {
610  return EFI_UNSUPPORTED;
611 }
612 
613 static EFI_STATUS EFIAPI
616  *efidesc __unused ) {
617  return EFI_UNSUPPORTED;
618 }
619 
620 static EFI_STATUS EFIAPI
624  *efidesc __unused ) {
625  return EFI_UNSUPPORTED;
626 }
627 
628 static EFI_STATUS EFIAPI
630  UINT16 language __unused,
632  CHAR16 **string __unused ) {
633  return EFI_UNSUPPORTED;
634 }
635 
636 static EFI_STATUS EFIAPI
638  UINT16 **languages __unused,
639  UINT16 *len __unused ) {
640  return EFI_UNSUPPORTED;
641 }
642 
643 static EFI_STATUS EFIAPI
645  return EFI_UNSUPPORTED;
646 }
647 
650  .UsbBulkTransfer = efi_null_usb_bulk_transfer,
651  .UsbAsyncInterruptTransfer = efi_null_usb_async_interrupt_transfer,
652  .UsbSyncInterruptTransfer = efi_null_usb_sync_interrupt_transfer,
653  .UsbIsochronousTransfer = efi_null_usb_isochronous_transfer,
654  .UsbAsyncIsochronousTransfer = efi_null_usb_async_isochronous_transfer,
655  .UsbGetDeviceDescriptor = efi_null_usb_get_device_descriptor,
656  .UsbGetConfigDescriptor = efi_null_usb_get_config_descriptor,
657  .UsbGetInterfaceDescriptor = efi_null_usb_get_interface_descriptor,
658  .UsbGetEndpointDescriptor = efi_null_usb_get_endpoint_descriptor,
659  .UsbGetStringDescriptor = efi_null_usb_get_string_descriptor,
660  .UsbGetSupportedLanguages = efi_null_usb_get_supported_languages,
661  .UsbPortReset = efi_null_usb_port_reset,
662 };
663 
664 /**
665  * Nullify USB I/O protocol
666  *
667  * @v usbio USB I/O protocol
668  */
670 
671  memcpy ( usbio, &efi_null_usbio, sizeof ( *usbio ) );
672 }
#define __attribute__(x)
Definition: compiler.h:10
struct option_descriptor read[1]
Definition: nvo_cmd.c:115
#define EFI_UNSUPPORTED
Enumeration of EFI_STATUS.
Definition: UefiBaseType.h:123
static EFI_STATUS EFIAPI efi_null_snp_receive_filters(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, UINT32 enable __unused, UINT32 disable __unused, BOOLEAN mcast_reset __unused, UINTN mcast_count __unused, EFI_MAC_ADDRESS *mcast __unused)
Definition: efi_null.c:72
The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access to a network adapter.
PXE_STATCODE StatCode
Definition: UefiPxe.h:889
u32 info
Definition: ar9003_mac.h:67
GET_DHCP_RESPONSE GetDhcpResponse
Definition: AppleNetBoot.h:42
#define PXE_ROMID_MAJORVER
UNDI command interface revision.
Definition: UefiPxe.h:853
static EFI_STATUS EFIAPI efi_null_pxe_arp(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, EFI_IP_ADDRESS *ip __unused, EFI_MAC_ADDRESS *mac __unused)
Definition: efi_null.c:434
This protocol is used to retrieve user readable names of drivers and controllers managed by UEFI Driv...
static EFI_STATUS EFIAPI efi_null_pxe_dhcp(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, BOOLEAN sort __unused)
Definition: efi_null.c:378
static EFIAPI VOID efi_null_undi_issue(UINT64 cdb_phys)
Definition: efi_null.c:170
uint32_t lba
Start address.
Definition: scsi.h:23
#define PXE_ROMID_SIGNATURE
Signature of !PXE structure.
Definition: UefiPxe.h:841
static EFI_STATUS EFIAPI efi_null_usb_get_interface_descriptor(EFI_USB_IO_PROTOCOL *usbio __unused, EFI_USB_INTERFACE_DESCRIPTOR *efidesc __unused)
Definition: efi_null.c:614
static EFI_STATUS EFIAPI efi_null_pxe_set_parameters(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, BOOLEAN *autoarp __unused, BOOLEAN *sendguid __unused, UINT8 *ttl __unused, UINT8 *tos __unused, BOOLEAN *callback __unused)
Definition: efi_null.c:441
static EFI_STATUS EFIAPI efi_null_apple_dhcp(EFI_APPLE_NET_BOOT_PROTOCOL *apple __unused, UINTN *len __unused, VOID *data __unused)
Definition: efi_null.c:508
static EFI_STATUS EFIAPI efi_null_apple_bsdp(EFI_APPLE_NET_BOOT_PROTOCOL *apple __unused, UINTN *len __unused, VOID *data __unused)
Definition: efi_null.c:514
uint8_t opcode
Opcode.
Definition: ena.h:16
static EFI_STATUS EFIAPI efi_null_usb_get_endpoint_descriptor(EFI_USB_IO_PROTOCOL *usbio __unused, UINT8 index __unused, EFI_USB_ENDPOINT_DESCRIPTOR *efidesc __unused)
Definition: efi_null.c:621
UINT8_t filter
Receive packet filter.
Definition: pxe_api.h:68
struct golan_inbox_hdr hdr
Message header.
Definition: CIB_PRM.h:28
static EFI_STATUS EFIAPI efi_null_snp_shutdown(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused)
Definition: efi_null.c:67
An optional protocol that is used to describe details about the software layer that is used to produc...
32-byte buffer containing a network Media Access Control address.
Definition: UefiBaseType.h:102
static EFI_STATUS EFIAPI efi_null_usb_get_string_descriptor(EFI_USB_IO_PROTOCOL *usbio __unused, UINT16 language __unused, UINT8 index __unused, CHAR16 **string __unused)
Definition: efi_null.c:629
unsigned char BOOLEAN
Definition: ProcessorBind.h:61
uint8_t type
Type.
Definition: ena.h:16
uint16_t block
Definition: tftp.h:12
static EFI_STATUS EFIAPI efi_null_usb_isochronous_transfer(EFI_USB_IO_PROTOCOL *usbio __unused, UINT8 endpoint __unused, VOID *data __unused, UINTN len __unused, UINT32 *status __unused)
Definition: efi_null.c:581
static EFI_STATUS EFIAPI efi_null_usb_port_reset(EFI_USB_IO_PROTOCOL *usbio __unused)
Definition: efi_null.c:644
static EFI_STATUS EFIAPI efi_null_block_reset(EFI_BLOCK_IO_PROTOCOL *block __unused, BOOLEAN verify __unused)
Definition: efi_null.c:314
static EFI_STATUS EFIAPI efi_null_pxe_start(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, BOOLEAN use_ipv6 __unused)
Definition: efi_null.c:367
#define PXE_STATFLAGS_COMMAND_FAILED
Definition: UefiPxe.h:424
This protocol provides control over block devices.
Definition: BlockIo.h:222
Standard Interface Descriptor USB 2.0 spec, Section 9.6.5.
Definition: Usb.h:147
unsigned int UINT32
Definition: ProcessorBind.h:56
uint32_t blksize
Block size for this segment.
Definition: pccrc.h:24
EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig
The EFI_USB_IO_PROTOCOL provides four basic transfers types described in the USB 1....
Definition: UsbIo.h:485
unsigned short CHAR16
Definition: ProcessorBind.h:59
static EFI_APPLE_NET_BOOT_PROTOCOL efi_null_apple
Definition: efi_null.c:519
uint8_t direction
Direction.
Definition: ena.h:14
UINT32 State
Reports the current state of the network interface.
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:51
#define offsetof(type, field)
Get offset of a field within a structure.
Definition: stddef.h:24
static EFI_STATUS EFIAPI efi_null_usb_control_transfer(EFI_USB_IO_PROTOCOL *usbio __unused, EFI_USB_DEVICE_REQUEST *packet __unused, EFI_USB_DATA_DIRECTION direction __unused, UINT32 timeout __unused, VOID *data __unused, UINTN len __unused, UINT32 *status __unused)
Definition: efi_null.c:542
uint8_t mac[ETH_ALEN]
MAC address.
Definition: ena.h:24
static EFI_SIMPLE_NETWORK_PROTOCOL efi_null_snp
Definition: efi_null.c:134
EFI_USB_DATA_DIRECTION
USB data transfer direction.
Definition: UsbIo.h:52
unsigned long intptr_t
Definition: stdint.h:21
CHAR16 * EFI_STRING
IP4_t src_ip
IP address of this station.
Definition: pxe_api.h:58
unsigned char UINT8
Definition: ProcessorBind.h:62
static EFI_STATUS EFIAPI efi_null_snp_nvdata(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, BOOLEAN read __unused, UINTN offset __unused, UINTN len __unused, VOID *data __unused)
Definition: efi_null.c:104
static EFI_STATUS EFIAPI efi_null_snp_stop(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused)
Definition: efi_null.c:49
UINTN EFI_BROWSER_ACTION_REQUEST
Definition: FormBrowser2.h:58
UINT64 Id
The address of the first byte of the identifying structure for this network interface.
static EFI_STATUS EFIAPI efi_null_block_write(EFI_BLOCK_IO_PROTOCOL *block __unused, UINT32 media __unused, EFI_LBA lba __unused, UINTN len __unused, VOID *data __unused)
Definition: efi_null.c:327
static EFI_STATUS EFIAPI efi_null_hii_callback(const EFI_HII_CONFIG_ACCESS_PROTOCOL *hii __unused, EFI_BROWSER_ACTION action __unused, EFI_QUESTION_ID question_id __unused, UINT8 type __unused, EFI_IFR_TYPE_VALUE *value __unused, EFI_BROWSER_ACTION_REQUEST *action_request __unused)
Definition: efi_null.c:282
This protocol provides a callable interface between the HII and drivers.
EFI_SIMPLE_NETWORK_MODE * Mode
Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
uint32_t start
Starting offset.
Definition: netvsc.h:12
static EFI_STATUS EFIAPI efi_null_usb_sync_interrupt_transfer(EFI_USB_IO_PROTOCOL *usbio __unused, UINT8 endpoint __unused, VOID *data __unused, UINTN *len __unused, UINTN timeout __unused, UINT32 *status __unused)
Definition: efi_null.c:559
uint8_t status
Status.
Definition: ena.h:16
static EFI_STATUS EFIAPI efi_null_pxe_set_packets(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, BOOLEAN *dhcpdisc_ok __unused, BOOLEAN *dhcpack_ok __unused, BOOLEAN *proxyoffer_ok __unused, BOOLEAN *pxebsdisc_ok __unused, BOOLEAN *pxebsack_ok __unused, BOOLEAN *pxebsbis_ok __unused, EFI_PXE_BASE_CODE_PACKET *dhcpdisc __unused, EFI_PXE_BASE_CODE_PACKET *dhcpack __unused, EFI_PXE_BASE_CODE_PACKET *proxyoffer __unused, EFI_PXE_BASE_CODE_PACKET *pxebsdisc __unused, EFI_PXE_BASE_CODE_PACKET *pxebsack __unused, EFI_PXE_BASE_CODE_PACKET *pxebsbis __unused)
Definition: efi_null.c:457
static EFI_PXE_BASE_CODE_PROTOCOL efi_null_pxe
Definition: efi_null.c:473
static EFI_STATUS EFIAPI efi_null_hii_route(const EFI_HII_CONFIG_ACCESS_PROTOCOL *hii __unused, EFI_STRING config __unused, EFI_STRING *progress __unused)
Definition: efi_null.c:275
A hardware device.
Definition: device.h:73
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static EFI_USB_IO_PROTOCOL efi_null_usbio
Definition: efi_null.c:648
#define EFI_BLOCK_IO_INTERFACE_REVISION
Revision defined in EFI1.1.
Definition: BlockIo.h:217
#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION
Definition: PxeBaseCode.h:894
#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
Format of Setup Data for USB Device Requests USB 2.0 spec, Section 9.3.
Definition: Usb.h:99
The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.
Definition: LoadFile.h:84
UINT8_t Rev
PCI revision.
Definition: pxe_api.h:62
MTFTP information.
Definition: PxeBaseCode.h:212
static PXE_SW_UNDI efi_null_undi
Definition: efi_null.c:177
void efi_nullify_usbio(EFI_USB_IO_PROTOCOL *usbio)
Nullify USB I/O protocol.
Definition: efi_null.c:669
16-byte buffer aligned on a 4-byte boundary.
Definition: UefiBaseType.h:110
UINT64 EFI_LBA
Logical block address.
Definition: UefiBaseType.h:51
UDP_PORT_t src_port
Source UDP port.
Definition: pxe_api.h:60
static EFI_STATUS EFIAPI efi_null_load_file(EFI_LOAD_FILE_PROTOCOL *load_file __unused, EFI_DEVICE_PATH_PROTOCOL *path __unused, BOOLEAN booting __unused, UINTN *len __unused, VOID *data __unused)
Definition: efi_null.c:243
static EFI_STATUS EFIAPI efi_null_usb_get_config_descriptor(EFI_USB_IO_PROTOCOL *usbio __unused, EFI_USB_CONFIG_DESCRIPTOR *efidesc __unused)
Definition: efi_null.c:607
EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName
static EFI_STATUS EFIAPI efi_null_pxe_set_ip_filter(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, EFI_PXE_BASE_CODE_IP_FILTER *filter __unused)
Definition: efi_null.c:428
void efi_nullify_pxe(EFI_PXE_BASE_CODE_PROTOCOL *pxe)
Nullify PXE base code protocol.
Definition: efi_null.c:494
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
UINT16 EFI_PXE_BASE_CODE_UDP_PORT
Definition: PxeBaseCode.h:111
#define PXE_ROMID_MINORVER
Definition: UefiPxe.h:854
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define PXE_ROMID_IMP_SW_VIRT_ADDR
Definition: UefiPxe.h:860
EFI null interfaces.
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
unsigned short UINT16
Definition: ProcessorBind.h:58
static EFI_HII_CONFIG_ACCESS_PROTOCOL efi_null_hii
Definition: efi_null.c:290
#define EFIAPI
UINT64 Revision
The revision of the EFI_PXE_BASE_CODE_PROTOCOL.
Definition: PxeBaseCode.h:915
#define PXE_ROMID_REV
!PXE structure format revision
Definition: UefiPxe.h:846
IP4_t dest_ip
Destination IP address.
Definition: pxe_api.h:59
static EFI_STATUS EFIAPI efi_null_pxe_udp_read(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, UINT16 flags __unused, EFI_IP_ADDRESS *dest_ip __unused, EFI_PXE_BASE_CODE_UDP_PORT *dest_port __unused, EFI_IP_ADDRESS *src_ip __unused, EFI_PXE_BASE_CODE_UDP_PORT *src_port __unused, UINTN *hdr_len __unused, VOID *hdr __unused, UINTN *len __unused, VOID *data __unused)
Definition: efi_null.c:416
static EFI_STATUS EFIAPI efi_null_snp_station_address(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, BOOLEAN reset __unused, EFI_MAC_ADDRESS *new __unused)
Definition: efi_null.c:82
void efi_nullify_hii(EFI_HII_CONFIG_ACCESS_PROTOCOL *hii)
Nullify HII configuration access protocol.
Definition: efi_null.c:301
#define PXE_STATCODE_UNSUPPORTED
Definition: UefiPxe.h:624
IP4_t ip
Destination IP address.
Definition: pxe_api.h:58
static EFI_STATUS EFIAPI efi_null_snp_reset(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, BOOLEAN ext_verify __unused)
Definition: efi_null.c:61
static EFI_STATUS EFIAPI efi_null_snp_receive(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, UINTN *ll_header_len __unused, UINTN *len __unused, VOID *data __unused, EFI_MAC_ADDRESS *ll_src __unused, EFI_MAC_ADDRESS *ll_dest __unused, UINT16 *net_proto __unused)
Definition: efi_null.c:126
UINT64 UINTN
Unsigned value of native width.
Definition: ProcessorBind.h:71
IP Receive Filter structure.
Definition: PxeBaseCode.h:79
Standard Endpoint Descriptor USB 2.0 spec, Section 9.6.6.
Definition: Usb.h:163
#define VOID
Undeclared type.
Definition: Base.h:319
static EFI_STATUS EFIAPI efi_null_get_driver_name(EFI_COMPONENT_NAME2_PROTOCOL *name2 __unused, CHAR8 *language __unused, CHAR16 **driver_name __unused)
Definition: efi_null.c:204
unsigned long long UINT64
Definition: ProcessorBind.h:54
static EFI_STATUS EFIAPI efi_null_block_flush(EFI_BLOCK_IO_PROTOCOL *block __unused)
Definition: efi_null.c:334
static EFI_BLOCK_IO_MEDIA efi_null_block_media
Definition: efi_null.c:338
static EFI_STATUS EFIAPI efi_null_get_controller_name(EFI_COMPONENT_NAME2_PROTOCOL *name2 __unused, EFI_HANDLE device __unused, EFI_HANDLE child __unused, CHAR8 *language __unused, CHAR16 **controller_name __unused)
Definition: efi_null.c:211
EFI_USB_IO_CONTROL_TRANSFER UsbControlTransfer
Definition: UsbIo.h:489
EFI API.
static EFI_STATUS EFIAPI efi_null_pxe_mtftp(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, EFI_PXE_BASE_CODE_TFTP_OPCODE opcode __unused, VOID *data __unused, BOOLEAN overwrite __unused, UINT64 *len __unused, UINTN *blksize __unused, EFI_IP_ADDRESS *ip __unused, UINT8 *filename __unused, EFI_PXE_BASE_CODE_MTFTP_INFO *info __unused, BOOLEAN callback __unused)
Definition: efi_null.c:392
Packet structure.
Definition: PxeBaseCode.h:254
Block IO read only mode data and updated only via members of BlockIO.
Definition: BlockIo.h:136
void efi_nullify_name2(EFI_COMPONENT_NAME2_PROTOCOL *name2)
Nullify Component Name Protocol interface.
Definition: efi_null.c:230
static EFI_STATUS EFIAPI efi_null_pxe_udp_write(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, UINT16 flags __unused, EFI_IP_ADDRESS *dest_ip __unused, EFI_PXE_BASE_CODE_UDP_PORT *dest_port __unused, EFI_IP_ADDRESS *gateway __unused, EFI_IP_ADDRESS *src_ip __unused, EFI_PXE_BASE_CODE_UDP_PORT *src_port __unused, UINTN *hdr_len __unused, VOID *hdr __unused, UINTN *len __unused, VOID *data __unused)
Definition: efi_null.c:403
#define __unused
Declare a variable or data structure as unused.
Definition: compiler.h:573
Discover() information override structure.
Definition: PxeBaseCode.h:182
uint32_t len
Length.
Definition: ena.h:14
static EFI_STATUS EFIAPI efi_null_snp_statistics(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, BOOLEAN reset __unused, UINTN *stats_len __unused, EFI_NETWORK_STATISTICS *stats __unused)
Definition: efi_null.c:89
static EFI_STATUS EFIAPI efi_null_usb_get_supported_languages(EFI_USB_IO_PROTOCOL *usbio __unused, UINT16 **languages __unused, UINT16 *len __unused)
Definition: efi_null.c:637
PXE_UINT64 EntryPoint
API entry point.
Definition: UefiPxe.h:827
EFI_LOAD_FILE LoadFile
Definition: LoadFile.h:85
char CHAR8
Definition: ProcessorBind.h:63
void efi_nullify_block(EFI_BLOCK_IO_PROTOCOL *block)
Nullify block I/O protocol.
Definition: efi_null.c:354
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
UINT64 Revision
Revision of the EFI_SIMPLE_NETWORK_PROTOCOL.
static EFI_STATUS EFIAPI efi_null_hii_extract(const EFI_HII_CONFIG_ACCESS_PROTOCOL *hii __unused, EFI_STRING request __unused, EFI_STRING *progress __unused, EFI_STRING *results __unused)
Definition: efi_null.c:267
static EFI_STATUS EFIAPI efi_null_block_read(EFI_BLOCK_IO_PROTOCOL *block __unused, UINT32 media __unused, EFI_LBA lba __unused, UINTN len __unused, VOID *data __unused)
Definition: efi_null.c:320
static EFI_STATUS EFIAPI efi_null_snp_transmit(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, UINTN ll_header_len __unused, UINTN len __unused, VOID *data __unused, EFI_MAC_ADDRESS *ll_src __unused, EFI_MAC_ADDRESS *ll_dest __unused, UINT16 *net_proto __unused)
Definition: efi_null.c:117
u8 request[0]
List of IEs requested.
Definition: ieee80211.h:16
Standard Configuration Descriptor USB 2.0 spec, Section 9.6.3.
Definition: Usb.h:132
PXE_STATFLAGS StatFlags
Definition: UefiPxe.h:890
void efi_nullify_load_file(EFI_LOAD_FILE_PROTOCOL *load_file)
Nullify Load File Protocol interface.
Definition: efi_null.c:255
static char media[]
Definition: sundance.c:85
EFI_PXE_BASE_CODE_TFTP_OPCODE
TFTP opcode definitions.
Definition: PxeBaseCode.h:195
#define FALSE
Definition: tlan.h:45
static EFI_STATUS EFIAPI efi_null_usb_async_interrupt_transfer(EFI_USB_IO_PROTOCOL *usbio __unused, UINT8 endpoint __unused, BOOLEAN start __unused, UINTN interval __unused, UINTN len __unused, EFI_ASYNC_USB_TRANSFER_CALLBACK callback __unused, VOID *context __unused)
Definition: efi_null.c:569
static EFI_STATUS EFIAPI efi_null_snp_start(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused)
Definition: efi_null.c:44
static EFI_STATUS EFIAPI efi_null_pxe_set_station_ip(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, EFI_IP_ADDRESS *ip __unused, EFI_IP_ADDRESS *netmask __unused)
Definition: efi_null.c:450
UINT16 EFI_QUESTION_ID
void timeout(int)
static EFI_STATUS EFIAPI efi_null_snp_initialize(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, UINTN extra_rx_bufsize __unused, UINTN extra_tx_bufsize __unused)
Definition: efi_null.c:54
void efi_nullify_nii(EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *nii)
Nullify NII interface.
Definition: efi_null.c:191
static EFI_STATUS EFIAPI efi_null_pxe_discover(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused, UINT16 type __unused, UINT16 *layer __unused, BOOLEAN bis __unused, EFI_PXE_BASE_CODE_DISCOVER_INFO *info __unused)
Definition: efi_null.c:384
static EFI_STATUS EFIAPI efi_null_pxe_stop(EFI_PXE_BASE_CODE_PROTOCOL *pxe __unused)
Definition: efi_null.c:373
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
UINT64 Revision
The revision to which the block IO interface adheres.
Definition: BlockIo.h:228
void efi_nullify_apple(EFI_APPLE_NET_BOOT_PROTOCOL *apple)
Nullify Apple Net Boot protocol.
Definition: efi_null.c:529
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
EFI_PXE_BASE_CODE_MODE * Mode
The pointer to the EFI_PXE_BASE_CODE_MODE data for this device.
Definition: PxeBaseCode.h:931
The EFI_PXE_BASE_CODE_PROTOCOL is used to control PXE-compatible devices.
Definition: PxeBaseCode.h:909
static EFI_STATUS EFIAPI efi_null_usb_bulk_transfer(EFI_USB_IO_PROTOCOL *usbio __unused, UINT8 endpoint __unused, VOID *data __unused, UINTN *len __unused, UINTN timeout __unused, UINT32 *status __unused)
Definition: efi_null.c:551
int overwrite(const WINDOW *, WINDOW *)
static EFI_STATUS EFIAPI efi_null_snp_get_status(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, UINT32 *interrupts __unused, VOID **txbuf __unused)
Definition: efi_null.c:111
static EFI_STATUS EFIAPI efi_null_usb_async_isochronous_transfer(EFI_USB_IO_PROTOCOL *usbio __unused, UINT8 endpoint __unused, VOID *data __unused, UINTN len __unused, EFI_ASYNC_USB_TRANSFER_CALLBACK callback __unused, VOID *context __unused)
Definition: efi_null.c:589
static EFI_STATUS EFIAPI efi_null_usb_get_device_descriptor(EFI_USB_IO_PROTOCOL *usbio __unused, EFI_USB_DEVICE_DESCRIPTOR *efidesc __unused)
Definition: efi_null.c:600
Simple Network Protocol data structures.
Definition: SimpleNetwork.h:47
Standard Device Descriptor USB 2.0 spec, Section 9.6.1.
Definition: Usb.h:111
String functions.
static EFI_STATUS EFIAPI efi_null_snp_mcast_ip_to_mac(EFI_SIMPLE_NETWORK_PROTOCOL *snp __unused, BOOLEAN ipv6 __unused, EFI_IP_ADDRESS *ip __unused, EFI_MAC_ADDRESS *mac __unused)
Definition: efi_null.c:96
static EFI_COMPONENT_NAME2_PROTOCOL efi_null_name2
Definition: efi_null.c:219
void efi_nullify_snp(EFI_SIMPLE_NETWORK_PROTOCOL *snp)
Nullify SNP interface.
Definition: efi_null.c:156
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
Async USB transfer callback routine.
Definition: UsbIo.h:88
Definition: efi.h:50
UINTN EFI_BROWSER_ACTION
static EFI_BLOCK_IO_PROTOCOL efi_null_block
Definition: efi_null.c:340
uint8_t flags
Flags.
Definition: ena.h:18