Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef _IPXE_EFI_SNP_H
  2. #define _IPXE_EFI_SNP_H
  3. /** @file
  4. *
  5. * iPXE EFI SNP interface
  6. *
  7. */
  8. #include <ipxe/list.h>
  9. #include <ipxe/netdevice.h>
  10. #include <ipxe/efi/efi.h>
  11. #include <ipxe/efi/Protocol/SimpleNetwork.h>
  12. #include <ipxe/efi/Protocol/NetworkInterfaceIdentifier.h>
  13. #include <ipxe/efi/Protocol/ComponentName2.h>
  14. #include <ipxe/efi/Protocol/DevicePath.h>
  15. #include <ipxe/efi/Protocol/HiiConfigAccess.h>
  16. #include <ipxe/efi/Protocol/HiiDatabase.h>
  17. #include <ipxe/efi/Protocol/LoadFile.h>
  18. /** An SNP device */
  19. struct efi_snp_device {
  20. /** List of SNP devices */
  21. struct list_head list;
  22. /** The underlying iPXE network device */
  23. struct net_device *netdev;
  24. /** The underlying EFI PCI device */
  25. struct efi_pci_device *efipci;
  26. /** EFI device handle */
  27. EFI_HANDLE handle;
  28. /** The SNP structure itself */
  29. EFI_SIMPLE_NETWORK_PROTOCOL snp;
  30. /** The SNP "mode" (parameters) */
  31. EFI_SIMPLE_NETWORK_MODE mode;
  32. /** Started flag */
  33. int started;
  34. /** Outstanding TX packet count (via "interrupt status")
  35. *
  36. * Used in order to generate TX completions.
  37. */
  38. unsigned int tx_count_interrupts;
  39. /** Outstanding TX packet count (via "recycled tx buffers")
  40. *
  41. * Used in order to generate TX completions.
  42. */
  43. unsigned int tx_count_txbufs;
  44. /** Outstanding RX packet count (via "interrupt status") */
  45. unsigned int rx_count_interrupts;
  46. /** Outstanding RX packet count (via WaitForPacket event) */
  47. unsigned int rx_count_events;
  48. /** The network interface identifier */
  49. EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL nii;
  50. /** Component name protocol */
  51. EFI_COMPONENT_NAME2_PROTOCOL name2;
  52. /** Load file protocol handle */
  53. EFI_LOAD_FILE_PROTOCOL load_file;
  54. /** HII configuration access protocol */
  55. EFI_HII_CONFIG_ACCESS_PROTOCOL hii;
  56. /** HII package list */
  57. EFI_HII_PACKAGE_LIST_HEADER *package_list;
  58. /** HII handle */
  59. EFI_HII_HANDLE hii_handle;
  60. /** Device name */
  61. wchar_t name[ sizeof ( ( ( struct net_device * ) NULL )->name ) ];
  62. /** Driver name */
  63. wchar_t driver_name[16];
  64. /** Controller name */
  65. wchar_t controller_name[32];
  66. /** The device path
  67. *
  68. * This field is variable in size and must appear at the end
  69. * of the structure.
  70. */
  71. EFI_DEVICE_PATH_PROTOCOL path;
  72. };
  73. extern int efi_snp_hii_install ( struct efi_snp_device *snpdev );
  74. extern void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev );
  75. extern struct efi_snp_device * last_opened_snpdev ( void );
  76. extern void efi_snp_claim ( void );
  77. extern void efi_snp_release ( void );
  78. #endif /* _IPXE_EFI_SNP_H */