TianoCore EDK2 master
Loading...
Searching...
No Matches
IScsiDriver.h
Go to the documentation of this file.
1
11#ifndef _ISCSI_DRIVER_H_
12#define _ISCSI_DRIVER_H_
13
14#define ISCSI_V4_PRIVATE_GUID \
15 { \
16 0xfa3cde4c, 0x87c2, 0x427d, { 0xae, 0xde, 0x7d, 0xd0, 0x96, 0xc8, 0x8c, 0x58 } \
17 }
18
19#define ISCSI_V6_PRIVATE_GUID \
20 { \
21 0x28be27e5, 0x66cc, 0x4a31, { 0xa3, 0x15, 0xdb, 0x14, 0xc3, 0x74, 0x4d, 0x85 } \
22 }
23
24#define ISCSI_INITIATOR_NAME_VAR_NAME L"I_NAME"
25
26#define IP_MODE_AUTOCONFIG_IP4 3
27#define IP_MODE_AUTOCONFIG_IP6 4
28#define ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_ISCSI_HBA 0x00
29#define STOP_UEFI_ISCSI_IF_HBA_INSTALL_AIP 0x01
30#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP4 0x02
31#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP6 0x04
32#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_OFFLOAD 0x08
33#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_MPIO 0x10
34#define STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP4 0x20
35#define STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP6 0x40
36#define ALWAYS_USE_ISCSI_HBA_AND_IGNORE_UEFI_ISCSI 0xFF
37
38extern EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentName2;
39extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName;
40extern EFI_UNICODE_STRING_TABLE *gIScsiControllerNameTable;
41extern EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName;
42extern EFI_AUTHENTICATION_INFO_PROTOCOL gIScsiAuthenticationInfo;
43extern EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate;
44extern EFI_GUID gIScsiV4PrivateGuid;
45extern EFI_GUID gIScsiV6PrivateGuid;
46
47typedef struct {
48 CHAR16 PortString[ISCSI_NAME_IFR_MAX_SIZE];
49 LIST_ENTRY NicInfoList;
50 UINT8 NicCount;
51 UINT8 CurrentNic;
52 UINT8 MaxNic;
53 BOOLEAN Ipv6Flag;
54 BOOLEAN OneSessionEstablished;
55 BOOLEAN EnableMpio;
56 UINT8 MpioCount; // The number of attempts in MPIO.
57 UINT8 Krb5MpioCount; // The number of attempts login with KRB5 in MPIO.
58 UINT8 SinglePathCount; // The number of single path attempts.
59 UINT8 ValidSinglePathCount; // The number of valid single path attempts.
60 UINT8 BootSelectedIndex;
61 UINT8 AttemptCount;
62 LIST_ENTRY AttemptConfigs; // User configured Attempt list.
63 CHAR8 InitiatorName[ISCSI_NAME_MAX_SIZE];
64 UINTN InitiatorNameLength;
66
67extern ISCSI_PRIVATE_DATA *mPrivate;
68
69typedef struct {
70 LIST_ENTRY Link;
71 UINT32 HwAddressSize;
72 EFI_MAC_ADDRESS PermanentAddress;
73 UINT8 NicIndex;
74 UINT16 VlanId;
75 UINTN BusNumber;
76 UINTN DeviceNumber;
77 UINTN FunctionNumber;
78 BOOLEAN Ipv6Available;
80
82 UINT32 Reserved;
84
85//
86// EFI Driver Binding Protocol for iSCSI driver.
87//
88
132EFIAPI
135 IN EFI_HANDLE ControllerHandle,
136 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
137 );
138
175EFIAPI
178 IN EFI_HANDLE ControllerHandle,
179 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
180 );
181
209EFIAPI
212 IN EFI_HANDLE ControllerHandle,
213 IN UINTN NumberOfChildren,
214 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
215 );
216
260EFIAPI
263 IN EFI_HANDLE ControllerHandle,
264 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
265 );
266
303EFIAPI
306 IN EFI_HANDLE ControllerHandle,
307 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
308 );
309
337EFIAPI
340 IN EFI_HANDLE ControllerHandle,
341 IN UINTN NumberOfChildren,
342 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
343 );
344
345//
346// EFI Component Name(2) Protocol for iSCSI driver.
347//
348
389EFIAPI
392 IN CHAR8 *Language,
393 OUT CHAR16 **DriverName
394 );
395
466EFIAPI
469 IN EFI_HANDLE ControllerHandle,
470 IN EFI_HANDLE ChildHandle OPTIONAL,
471 IN CHAR8 *Language,
472 OUT CHAR16 **ControllerName
473 );
474
475//
476// EFI iSCSI Initiator Name Protocol for iSCSI driver.
477//
478
503EFIAPI
506 IN OUT UINTN *BufferSize,
507 OUT VOID *Buffer
508 );
509
536EFIAPI
539 IN OUT UINTN *BufferSize,
540 IN VOID *Buffer
541 );
542
543//
544// EFI_AUTHENTICATION_INFO_PROTOCOL for iSCSI driver.
545//
546
561EFIAPI
564 IN EFI_HANDLE ControllerHandle,
565 OUT VOID **Buffer
566 );
567
580EFIAPI
583 IN EFI_HANDLE ControllerHandle,
584 IN VOID *Buffer
585 );
586
587//
588// EFI_EXT_SCSI_PASS_THRU_PROTOCOL for iSCSI driver.
589//
590
642EFIAPI
645 IN UINT8 *Target,
646 IN UINT64 Lun,
648 IN EFI_EVENT Event OPTIONAL
649 );
650
681EFIAPI
684 IN OUT UINT8 **Target,
685 IN OUT UINT64 *Lun
686 );
687
715EFIAPI
718 IN UINT8 *Target,
719 IN UINT64 Lun,
720 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
721 );
722
745EFIAPI
748 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
749 OUT UINT8 **Target,
750 OUT UINT64 *Lun
751 );
752
763EFIAPI
766 );
767
779EFIAPI
782 IN UINT8 *Target,
783 IN UINT64 Lun
784 );
785
808EFIAPI
811 IN OUT UINT8 **Target
812 );
813
814#endif
UINT64 UINTN
EFI_STATUS EFIAPI IScsiExtScsiPassThruResetTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun)
EFI_STATUS EFIAPI IScsiGetAuthenticationInfo(IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, OUT VOID **Buffer)
EFI_STATUS EFIAPI IScsiExtScsiPassThruBuildDevicePath(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI IScsiExtScsiPassThruGetNextTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT8 **Target, IN OUT UINT64 *Lun)
EFI_STATUS EFIAPI IScsiIp4DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: IScsiDriver.c:1281
EFI_STATUS EFIAPI IScsiExtScsiPassThruGetNextTarget(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT8 **Target)
EFI_STATUS EFIAPI IScsiIp6DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: IScsiDriver.c:1385
EFI_STATUS EFIAPI IScsiIp4DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
Definition: IScsiDriver.c:1325
EFI_STATUS EFIAPI IScsiExtScsiPassThruGetTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT8 **Target, OUT UINT64 *Lun)
EFI_STATUS EFIAPI IScsiSetInitiatorName(IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer)
EFI_STATUS EFIAPI IScsiExtScsiPassThruResetChannel(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This)
EFI_STATUS EFIAPI IScsiIp6DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: IScsiDriver.c:1436
EFI_STATUS EFIAPI IScsiSetAuthenticationInfo(IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN VOID *Buffer)
EFI_STATUS EFIAPI IScsiIp6DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
Definition: IScsiDriver.c:1480
EFI_STATUS EFIAPI IScsiComponentNameGetDriverName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
Definition: ComponentName.c:83
EFI_STATUS EFIAPI IScsiIp4DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: IScsiDriver.c:1230
EFI_STATUS EFIAPI IScsiExtScsiPassThruFunction(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)
EFI_STATUS EFIAPI IScsiComponentNameGetControllerName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
EFI_STATUS EFIAPI IScsiGetInitiatorName(IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
Definition: Base.h:213