iPXE
srp.h
Go to the documentation of this file.
1#ifndef _IPXE_SRP_H
2#define _IPXE_SRP_H
3
4/** @file
5 *
6 * SCSI RDMA Protocol
7 *
8 */
9
10FILE_LICENCE ( BSD2 );
11FILE_SECBOOT ( PERMITTED );
12
13#include <stdint.h>
14#include <byteswap.h>
15#include <ipxe/iobuf.h>
16#include <ipxe/xfer.h>
17#include <ipxe/scsi.h>
18#include <ipxe/acpi.h>
19
20/*****************************************************************************
21 *
22 * Common fields
23 *
24 *****************************************************************************
25 */
26
27/** An SRP information unit tag */
28union srp_tag {
31} __attribute__ (( packed ));
32
33/** SRP tag magic marker */
34#define SRP_TAG_MAGIC 0x69505845
35
36/** An SRP port ID */
40} __attribute__ (( packed ));
41
42/** SRP information unit common fields */
43struct srp_common {
44 /** Information unit type */
46 /** Reserved */
48 /** Tag */
49 union srp_tag tag;
50} __attribute__ (( packed ));
51
52/*****************************************************************************
53 *
54 * Login request
55 *
56 *****************************************************************************
57 */
58
59/** An SRP login request information unit */
61 /** Information unit type
62 *
63 * This must be @c SRP_LOGIN_REQ
64 */
66 /** Reserved */
68 /** Tag */
69 union srp_tag tag;
70 /** Requested maximum initiator to target IU length */
72 /** Reserved */
74 /** Required buffer formats
75 *
76 * This is the bitwise OR of one or more @c
77 * SRP_LOGIN_REQ_FMT_XXX constants.
78 */
80 /** Flags
81 *
82 * This is the bitwise OR of zero or more @c
83 * SRP_LOGIN_REQ_FLAG_XXX and @c SRP_LOGIN_REQ_MCA_XXX
84 * constants.
85 */
87 /** Reserved */
89 /** Initiator port identifier */
91 /** Target port identifier */
93} __attribute__ (( packed ));
94
95/** Type of an SRP login request */
96#define SRP_LOGIN_REQ 0x00
97
98/** Require indirect data buffer descriptor format */
99#define SRP_LOGIN_REQ_FMT_IDBD 0x04
100
101/** Require direct data buffer descriptor format */
102#define SRP_LOGIN_REQ_FMT_DDBD 0x02
103
104/** Use solicited notification for asynchronous events */
105#define SRP_LOGIN_REQ_FLAG_AESOLNT 0x40
106
107/** Use solicited notification for credit request */
108#define SRP_LOGIN_REQ_FLAG_CRSOLNT 0x20
109
110/** Use solicited notification for logouts */
111#define SRP_LOGIN_REQ_FLAG_LOSOLNT 0x10
112
113/** Multi-channel action mask */
114#define SRP_LOGIN_REQ_MCA_MASK 0x03
115
116/** Single RDMA channel operation */
117#define SRP_LOGIN_REQ_MCA_SINGLE_CHANNEL 0x00
118
119/** Multiple independent RDMA channel operation */
120#define SRP_LOGIN_REQ_MCA_MULTIPLE_CHANNELS 0x01
121
122/*****************************************************************************
123 *
124 * Login response
125 *
126 *****************************************************************************
127 */
128
129/** An SRP login response */
131 /** Information unit type
132 *
133 * This must be @c SRP_LOGIN_RSP
134 */
136 /** Reserved */
138 /** Request limit delta */
140 /** Tag */
142 /** Maximum initiator to target IU length */
144 /** Maximum target to initiator IU length */
146 /** Supported buffer formats
147 *
148 * This is the bitwise OR of one or more @c
149 * SRP_LOGIN_RSP_FMT_XXX constants.
150 */
152 /** Flags
153 *
154 * This is the bitwise OR of zero or more @c
155 * SRP_LOGIN_RSP_FLAG_XXX and @c SRP_LOGIN_RSP_MCR_XXX
156 * constants.
157 */
159 /** Reserved */
161} __attribute__ (( packed ));
162
163/** Type of an SRP login response */
164#define SRP_LOGIN_RSP 0xc0
165
166/** Indirect data buffer descriptor format supported */
167#define SRP_LOGIN_RSP_FMT_IDBD 0x04
168
169/** Direct data buffer descriptor format supported */
170#define SRP_LOGIN_RSP_FMT_DDBD 0x02
171
172/** Solicited notification is supported */
173#define SRP_LOGIN_RSP_FLAG_SOLNTSUP 0x10
174
175/** Multi-channel result mask */
176#define SRP_LOGIN_RSP_MCR_MASK 0x03
177
178/** No existing RDMA channels were associated with the same I_T nexus */
179#define SRP_LOGIN_RSP_MCR_NO_EXISTING_CHANNELS 0x00
180
181/** One or more existing RDMA channels were terminated */
182#define SRP_LOGIN_RSP_MCR_EXISTING_CHANNELS_TERMINATED 0x01
183
184/** One or more existing RDMA channels continue to operate independently */
185#define SRP_LOGIN_RSP_MCR_EXISTING_CHANNELS_CONTINUE 0x02
186
187/*****************************************************************************
188 *
189 * Login rejection
190 *
191 *****************************************************************************
192 */
193
194/** An SRP login rejection */
196 /** Information unit type
197 *
198 * This must be @c SRP_LOGIN_REJ
199 */
201 /** Reserved */
203 /** Reason
204 *
205 * This is a @c SRP_LOGIN_REJ_REASON_XXX constant.
206 */
208 /** Tag */
210 /** Reserved */
212 /** Supported buffer formats
213 *
214 * This is the bitwise OR of one or more @c
215 * SRP_LOGIN_REJ_FMT_XXX constants.
216 */
218 /** Reserved */
220} __attribute__ (( packed ));
221
222/** Type of an SRP login rejection */
223#define SRP_LOGIN_REJ 0xc2
224
225/** Unable to establish RDMA channel, no reason specified */
226#define SRP_LOGIN_REJ_REASON_UNKNOWN 0x00010000UL
227
228/** Insufficient RDMA channel resources */
229#define SRP_LOGIN_REJ_REASON_INSUFFICIENT_RESOURCES 0x00010001UL
230
231/** Requested maximum initiator to target IU length value too large */
232#define SRP_LOGIN_REJ_REASON_BAD_MAX_I_T_IU_LEN 0x00010002UL
233
234/** Unable to associate RDMA channel with specified I_T nexus */
235#define SRP_LOGIN_REJ_REASON_CANNOT_ASSOCIATE 0x00010003UL
236
237/** One or more requested data buffer descriptor formats are not supported */
238#define SRP_LOGIN_REJ_REASON_UNSUPPORTED_BUFFER_FORMAT 0x00010004UL
239
240/** SRP target port does not support multiple RDMA channels per I_T nexus */
241#define SRP_LOGIN_REJ_REASON_NO_MULTIPLE_CHANNELS 0x00010005UL
242
243/** RDMA channel limit reached for this initiator */
244#define SRP_LOGIN_REJ_REASON_NO_MORE_CHANNELS 0x00010006UL
245
246/** SRP login rejection reason is defined */
247#define SRP_LOGIN_REJ_REASON_DEFINED( reason ) \
248 ( ( (reason) & 0xfffffff0UL ) == 0x00010000UL )
249
250/** Indirect data buffer descriptor format supported */
251#define SRP_LOGIN_REJ_FMT_IDBD 0x04
252
253/** Direct data buffer descriptor format supported */
254#define SRP_LOGIN_REJ_FMT_DDBD 0x02
255
256/*****************************************************************************
257 *
258 * Initiator logout
259 *
260 *****************************************************************************
261 */
262
263/** An SRP initiator logout request */
265 /** Information unit type
266 *
267 * This must be @c SRP_I_LOGOUT
268 */
270 /** Reserved */
272 /** Tag */
274} __attribute__ (( packed ));
275
276/** Type of an SRP initiator logout request */
277#define SRP_I_LOGOUT 0x03
278
279/*****************************************************************************
280 *
281 * Target logout
282 *
283 *****************************************************************************
284 */
285
286/** An SRP target logout request */
288 /** Information unit type
289 *
290 * This must be @c SRP_T_LOGOUT
291 */
293 /** Flags
294 *
295 * This is the bitwise OR of zero or more @c
296 * SRP_T_LOGOUT_FLAG_XXX constants.
297 */
299 /** Reserved */
301 /** Reason
302 *
303 * This is a @c SRP_T_LOGOUT_REASON_XXX constant.
304 */
306 /** Tag */
308} __attribute__ (( packed ));
309
310/** Type of an SRP target logout request */
311#define SRP_T_LOGOUT 0x80
312
313/** The initiator specified solicited notification of logouts */
314#define SRP_T_LOGOUT_FLAG_SOLNT 0x01
315
316/** No reason specified */
317#define SRP_T_LOGOUT_REASON_UNKNOWN 0x00000000UL
318
319/** Inactive RDMA channel (reclaiming resources) */
320#define SRP_T_LOGOUT_REASON_INACTIVE 0x00000001UL
321
322/** Invalid information unit type code received by SRP target port */
323#define SRP_T_LOGOUT_REASON_INVALID_TYPE 0x00000002UL
324
325/** SRP initiator port sent response with no corresponding request */
326#define SRP_T_LOGOUT_REASON_SPURIOUS_RESPONSE 0x00000003UL
327
328/** RDMA channel disconnected due to multi-channel action code in new login */
329#define SRP_T_LOGOUT_REASON_MCA 0x00000004UL
330
331/** Unsuppported format code value specified in data-out buffer descriptor */
332#define SRP_T_LOGOUT_UNSUPPORTED_DATA_OUT_FORMAT 0x00000005UL
333
334/** Unsuppported format code value specified in data-in buffer descriptor */
335#define SRP_T_LOGOUT_UNSUPPORTED_DATA_IN_FORMAT 0x00000006UL
336
337/** Invalid length for IU type */
338#define SRP_T_LOGOUT_INVALID_IU_LEN 0x00000008UL
339
340/*****************************************************************************
341 *
342 * Task management
343 *
344 *****************************************************************************
345 */
346
347/** An SRP task management request */
349 /** Information unit type
350 *
351 * This must be @c SRP_TSK_MGMT
352 */
354 /** Flags
355 *
356 * This is the bitwise OR of zero or more
357 * @c SRP_TSK_MGMT_FLAG_XXX constants.
358 */
360 /** Reserved */
362 /** Tag */
364 /** Reserved */
366 /** Logical unit number */
367 struct scsi_lun lun;
368 /** Reserved */
370 /** Task management function
371 *
372 * This is a @c SRP_TASK_MGMT_FUNC_XXX constant
373 */
375 /** Reserved */
377 /** Tag of task to be managed */
379 /** Reserved */
381} __attribute__ (( packed ));
382
383/** Type of an SRP task management request */
384#define SRP_TSK_MGMT 0x01
385
386/** Use solicited notification for unsuccessful completions */
387#define SRP_TSK_MGMT_FLAG_UCSOLNT 0x04
388
389/** Use solicited notification for successful completions */
390#define SRP_TSK_MGMT_FLAG_SCSOLNT 0x02
391
392/** The task manager shall perform an ABORT TASK function */
393#define SRP_TSK_MGMT_FUNC_ABORT_TASK 0x01
394
395/** The task manager shall perform an ABORT TASK SET function */
396#define SRP_TSK_MGMT_FUNC_ABORT_TASK_SET 0x02
397
398/** The task manager shall perform a CLEAR TASK SET function */
399#define SRP_TSK_MGMT_FUNC_CLEAR_TASK_SET 0x04
400
401/** The task manager shall perform a LOGICAL UNIT RESET function */
402#define SRP_TSK_MGMT_FUNC_LOGICAL_UNIT_RESET 0x08
403
404/** The task manager shall perform a CLEAR ACA function */
405#define SRP_TSK_MGMT_FUNC_CLEAR_ACA 0x40
406
407/*****************************************************************************
408 *
409 * SCSI command
410 *
411 *****************************************************************************
412 */
413
414/** An SRP SCSI command */
415struct srp_cmd {
416 /** Information unit type
417 *
418 * This must be @c SRP_CMD
419 */
421 /** Flags
422 *
423 * This is the bitwise OR of zero or more @c SRP_CMD_FLAG_XXX
424 * constants.
425 */
427 /** Reserved */
429 /** Data buffer descriptor formats
430 *
431 * This is the bitwise OR of one @c SRP_CMD_DO_FMT_XXX and one @c
432 * SRP_CMD_DI_FMT_XXX constant.
433 */
435 /** Data-out buffer descriptor count */
437 /** Data-in buffer descriptor count */
439 /** Tag */
441 /** Reserved */
443 /** Logical unit number */
444 struct scsi_lun lun;
445 /** Reserved */
447 /** Task attribute
448 *
449 * This is a @c SRP_CMD_TASK_ATTR_XXX constant.
450 */
452 /** Reserved */
454 /** Additional CDB length */
456 /** Command data block */
458} __attribute__ (( packed ));
459
460/** Type of an SRP SCSI command */
461#define SRP_CMD 0x02
462
463/** Use solicited notification for unsuccessful completions */
464#define SRP_CMD_FLAG_UCSOLNT 0x04
465
466/** Use solicited notification for successful completions */
467#define SRP_CMD_FLAG_SCSOLNT 0x02
468
469/** Data-out buffer format mask */
470#define SRP_CMD_DO_FMT_MASK 0xf0
471
472/** Direct data-out buffer format */
473#define SRP_CMD_DO_FMT_DIRECT 0x10
474
475/** Indirect data-out buffer format */
476#define SRP_CMD_DO_FMT_INDIRECT 0x20
477
478/** Data-in buffer format mask */
479#define SRP_CMD_DI_FMT_MASK 0x0f
480
481/** Direct data-in buffer format */
482#define SRP_CMD_DI_FMT_DIRECT 0x01
483
484/** Indirect data-in buffer format */
485#define SRP_CMD_DI_FMT_INDIRECT 0x02
486
487/** Use the rules for a simple task attribute */
488#define SRP_CMD_TASK_ATTR_SIMPLE 0x00
489
490/** Use the rules for a head of queue task attribute */
491#define SRP_CMD_TASK_ATTR_QUEUE_HEAD 0x01
492
493/** Use the rules for an ordered task attribute */
494#define SRP_CMD_TASK_ATTR_ORDERED 0x02
495
496/** Use the rules for an automatic contingent allegiance task attribute */
497#define SRP_CMD_TASK_ATTR_AUTOMATIC_CONTINGENT_ALLEGIANCE 0x08
498
499/** An SRP memory descriptor */
501 /** Virtual address */
503 /** Memory handle */
505 /** Data length */
507} __attribute__ (( packed ));
508
509/*****************************************************************************
510 *
511 * SCSI response
512 *
513 *****************************************************************************
514 */
515
516/** An SRP SCSI response */
517struct srp_rsp {
518 /** Information unit type
519 *
520 * This must be @c SRP_RSP
521 */
523 /** Flags
524 *
525 * This is the bitwise OR of zero or more @c SRP_RSP_FLAG_XXX
526 * constants.
527 */
529 /** Reserved */
531 /** Request limit delta */
533 /** Tag */
535 /** Reserved */
537 /** Valid fields
538 *
539 * This is the bitwise OR of zero or more @c SRP_RSP_VALID_XXX
540 * constants.
541 */
543 /** Status
544 *
545 * This is the SCSI status code.
546 */
548 /** Data-out residual count */
550 /** Data-in residual count */
552 /** Sense data list length */
554 /** Response data list length */
556} __attribute__ (( packed ));
557
558/** Type of an SRP SCSI response */
559#define SRP_RSP 0xc1
560
561/** The initiator specified solicited notification of this response */
562#define SRP_RSP_FLAG_SOLNT 0x01
563
564/** Data-in residual count field is valid and represents an underflow */
565#define SRP_RSP_VALID_DIUNDER 0x20
566
567/** Data-in residual count field is valid and represents an overflow */
568#define SRP_RSP_VALID_DIOVER 0x10
569
570/** Data-out residual count field is valid and represents an underflow */
571#define SRP_RSP_VALID_DOUNDER 0x08
572
573/** Data-out residual count field is valid and represents an overflow */
574#define SRP_RSP_VALID_DOOVER 0x04
575
576/** Sense data list length field is valid */
577#define SRP_RSP_VALID_SNSVALID 0x02
578
579/** Response data list length field is valid */
580#define SRP_RSP_VALID_RSPVALID 0x01
581
582/**
583 * Get response data portion of SCSI response
584 *
585 * @v rsp SCSI response
586 * @ret response_data Response data, or NULL if not present
587 */
588static inline const void * srp_rsp_response_data ( const struct srp_rsp *rsp ) {
589 return ( ( rsp->valid & SRP_RSP_VALID_RSPVALID ) ?
590 ( ( ( const void * ) rsp ) + sizeof ( *rsp ) ) : NULL );
591}
592
593/**
594 * Get length of response data portion of SCSI response
595 *
596 * @v rsp SCSI response
597 * @ret response_data_len Response data length
598 */
599static inline size_t srp_rsp_response_data_len ( const struct srp_rsp *rsp ) {
600 return ( ( rsp->valid & SRP_RSP_VALID_RSPVALID ) ?
601 ntohl ( rsp->response_data_len ) : 0 );
602}
603
604/**
605 * Get sense data portion of SCSI response
606 *
607 * @v rsp SCSI response
608 * @ret sense_data Sense data, or NULL if not present
609 */
610static inline const void * srp_rsp_sense_data ( const struct srp_rsp *rsp ) {
611 return ( ( rsp->valid & SRP_RSP_VALID_SNSVALID ) ?
612 ( ( ( const void * ) rsp ) + sizeof ( *rsp ) +
614}
615
616/**
617 * Get length of sense data portion of SCSI response
618 *
619 * @v rsp SCSI response
620 * @ret sense_data_len Sense data length
621 */
622static inline size_t srp_rsp_sense_data_len ( const struct srp_rsp *rsp ) {
623 return ( ( rsp->valid & SRP_RSP_VALID_SNSVALID ) ?
624 ntohl ( rsp->sense_data_len ) : 0 );
625}
626
627/*****************************************************************************
628 *
629 * Credit request
630 *
631 *****************************************************************************
632 */
633
634/** An SRP credit request */
636 /** Information unit type
637 *
638 * This must be @c SRP_CRED_REQ
639 */
641 /** Flags
642 *
643 * This is the bitwise OR of zero or more
644 * @c SRP_CRED_REQ_FLAG_XXX constants.
645 */
647 /** Reserved */
649 /** Request limit delta */
651 /** Tag */
653} __attribute__ (( packed ));
654
655/** Type of an SRP credit request */
656#define SRP_CRED_REQ 0x81
657
658/** The initiator specified solicited notification of credit requests */
659#define SRP_CRED_REQ_FLAG_SOLNT 0x01
660
661/*****************************************************************************
662 *
663 * Credit response
664 *
665 *****************************************************************************
666 */
667
668/** An SRP credit response */
670 /** Information unit type
671 *
672 * This must be @c SRP_CRED_RSP
673 */
675 /** Reserved */
677 /** Tag */
679} __attribute__ (( packed ));
680
681/** Type of an SRP credit response */
682#define SRP_CRED_RSP 0x41
683
684/*****************************************************************************
685 *
686 * Asynchronous event request
687 *
688 *****************************************************************************
689 */
690
691/** An SRP asynchronous event request */
693 /** Information unit type
694 *
695 * This must be @c SRP_AER_REQ
696 */
698 /** Flags
699 *
700 * This is the bitwise OR of zero or more @c
701 * SRP_AER_REQ_FLAG_XXX constants.
702 */
704 /** Reserved */
706 /** Request limit delta */
708 /** Tag */
710 /** Reserved */
712 /** Logical unit number */
713 struct scsi_lun lun;
714 /** Sense data list length */
716 /** Reserved */
718} __attribute__ (( packed ));
719
720/** Type of an SRP asynchronous event request */
721#define SRP_AER_REQ 0x82
722
723/** The initiator specified solicited notification of asynchronous events */
724#define SRP_AER_REQ_FLAG_SOLNT 0x01
725
726/**
727 * Get sense data portion of asynchronous event request
728 *
729 * @v aer_req SRP asynchronous event request
730 * @ret sense_data Sense data
731 */
732static inline __always_inline void *
734 return ( ( ( void * ) aer_req ) + sizeof ( *aer_req ) );
735}
736
737/**
738 * Get length of sense data portion of asynchronous event request
739 *
740 * @v aer_req SRP asynchronous event request
741 * @ret sense_data_len Sense data length
742 */
743static inline __always_inline size_t
745 return ( ntohl ( aer_req->sense_data_len ) );
746}
747
748/*****************************************************************************
749 *
750 * Asynchronous event response
751 *
752 *****************************************************************************
753 */
754
755/** An SRP asynchronous event response */
757 /** Information unit type
758 *
759 * This must be @c SRP_AER_RSP
760 */
762 /** Reserved */
764 /** Tag */
766} __attribute__ (( packed ));
767
768/** Type of an SRP asynchronous event response */
769#define SRP_AER_RSP 0x42
770
771/*****************************************************************************
772 *
773 * SRP boot firmware table
774 *
775 * The working draft specification for the SRP boot firmware table can
776 * be found at
777 *
778 * https://ipxe.org/wiki/srp/sbft
779 *
780 *****************************************************************************
781 */
782
783/** SRP Boot Firmware Table signature */
784#define SBFT_SIG ACPI_SIGNATURE ( 's', 'B', 'F', 'T' )
785
786/** An offset from the start of the sBFT */
788
789/**
790 * SRP Boot Firmware Table
791 */
793 /** ACPI header */
795 /** Offset to SCSI subtable */
797 /** Offset to SRP subtable */
799 /** Offset to IB subtable, if present */
801 /** Reserved */
803} __attribute__ (( packed ));
804
805/**
806 * sBFT SCSI subtable
807 */
809 /** LUN */
810 struct scsi_lun lun;
811} __attribute__ (( packed ));
812
813/**
814 * sBFT SRP subtable
815 */
817 /** Initiator port identifier */
819 /** Target port identifier */
821} __attribute__ (( packed ));
822
823/*****************************************************************************
824 *
825 * SRP devices
826 *
827 *****************************************************************************
828 */
829
830extern int srp_open ( struct interface *block, struct interface *socket,
831 union srp_port_id *initiator, union srp_port_id *target,
832 uint32_t memory_handle, struct scsi_lun *lun );
833
834#endif /* _IPXE_SRP_H */
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
unsigned short uint16_t
Definition stdint.h:11
unsigned int uint32_t
Definition stdint.h:12
unsigned long long uint64_t
Definition stdint.h:13
unsigned char uint8_t
Definition stdint.h:10
uint8_t lun
Logical Unit Number.
Definition edd.h:3
#define __always_inline
Declare a function to be always inline.
Definition compiler.h:611
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define ntohl(value)
Definition byteswap.h:135
#define __attribute__(x)
Definition compiler.h:10
ACPI data structures.
I/O buffers.
uint64_t rsp
Definition librm.h:18
uint8_t block[3][8]
DES-encrypted blocks.
Definition mschapv2.h:1
SCSI devices.
static __always_inline void * srp_aer_req_sense_data(struct srp_aer_req *aer_req)
Get sense data portion of asynchronous event request.
Definition srp.h:733
#define SRP_RSP_VALID_SNSVALID
Sense data list length field is valid.
Definition srp.h:577
static const void * srp_rsp_sense_data(const struct srp_rsp *rsp)
Get sense data portion of SCSI response.
Definition srp.h:610
uint16_t sbft_off_t
An offset from the start of the sBFT.
Definition srp.h:787
#define SRP_RSP_VALID_RSPVALID
Response data list length field is valid.
Definition srp.h:580
static size_t srp_rsp_response_data_len(const struct srp_rsp *rsp)
Get length of response data portion of SCSI response.
Definition srp.h:599
static __always_inline size_t srp_aer_req_sense_data_len(struct srp_aer_req *aer_req)
Get length of sense data portion of asynchronous event request.
Definition srp.h:744
int srp_open(struct interface *block, struct interface *socket, union srp_port_id *initiator, union srp_port_id *target, uint32_t memory_handle, struct scsi_lun *lun)
Open SRP device.
Definition srp.c:713
static const void * srp_rsp_response_data(const struct srp_rsp *rsp)
Get response data portion of SCSI response.
Definition srp.h:588
static size_t srp_rsp_sense_data_len(const struct srp_rsp *rsp)
Get length of sense data portion of SCSI response.
Definition srp.h:622
An ACPI description header.
Definition acpi.h:180
An object interface.
Definition interface.h:125
sBFT SCSI subtable
Definition srp.h:808
struct scsi_lun lun
LUN.
Definition srp.h:810
sBFT SRP subtable
Definition srp.h:816
union srp_port_id initiator
Initiator port identifier.
Definition srp.h:818
union srp_port_id target
Target port identifier.
Definition srp.h:820
SRP Boot Firmware Table.
Definition srp.h:792
uint8_t reserved[6]
Reserved.
Definition srp.h:802
sbft_off_t srp_offset
Offset to SRP subtable.
Definition srp.h:798
sbft_off_t ib_offset
Offset to IB subtable, if present.
Definition srp.h:800
sbft_off_t scsi_offset
Offset to SCSI subtable.
Definition srp.h:796
struct acpi_header acpi
ACPI header.
Definition srp.h:794
A SCSI LUN.
Definition scsi.h:236
An SRP asynchronous event request.
Definition srp.h:692
uint8_t flags
Flags.
Definition srp.h:703
uint8_t type
Information unit type.
Definition srp.h:697
uint32_t sense_data_len
Sense data list length.
Definition srp.h:715
struct scsi_lun lun
Logical unit number.
Definition srp.h:713
uint32_t request_limit_delta
Request limit delta.
Definition srp.h:707
union srp_tag tag
Tag.
Definition srp.h:709
uint8_t reserved0[2]
Reserved.
Definition srp.h:705
uint8_t reserved2[4]
Reserved.
Definition srp.h:717
uint8_t reserved1[4]
Reserved.
Definition srp.h:711
An SRP asynchronous event response.
Definition srp.h:756
uint8_t reserved0[7]
Reserved.
Definition srp.h:763
union srp_tag tag
Tag.
Definition srp.h:765
uint8_t type
Information unit type.
Definition srp.h:761
An SRP SCSI command.
Definition srp.h:415
uint8_t data_in_buffer_count
Data-in buffer descriptor count.
Definition srp.h:438
uint8_t reserved2[1]
Reserved.
Definition srp.h:446
uint8_t task_attr
Task attribute.
Definition srp.h:451
uint8_t data_out_buffer_count
Data-out buffer descriptor count.
Definition srp.h:436
uint8_t type
Information unit type.
Definition srp.h:420
union scsi_cdb cdb
Command data block.
Definition srp.h:457
uint8_t reserved3[1]
Reserved.
Definition srp.h:453
uint8_t flags
Flags.
Definition srp.h:426
uint8_t additional_cdb_len
Additional CDB length.
Definition srp.h:455
uint8_t reserved1[4]
Reserved.
Definition srp.h:442
union srp_tag tag
Tag.
Definition srp.h:440
struct scsi_lun lun
Logical unit number.
Definition srp.h:444
uint8_t data_buffer_formats
Data buffer descriptor formats.
Definition srp.h:434
uint8_t reserved0[3]
Reserved.
Definition srp.h:428
SRP information unit common fields.
Definition srp.h:43
union srp_tag tag
Tag.
Definition srp.h:49
uint8_t type
Information unit type.
Definition srp.h:45
uint8_t reserved0[7]
Reserved.
Definition srp.h:47
An SRP credit request.
Definition srp.h:635
uint8_t type
Information unit type.
Definition srp.h:640
uint32_t request_limit_delta
Request limit delta.
Definition srp.h:650
union srp_tag tag
Tag.
Definition srp.h:652
uint8_t flags
Flags.
Definition srp.h:646
uint8_t reserved0[2]
Reserved.
Definition srp.h:648
An SRP credit response.
Definition srp.h:669
uint8_t type
Information unit type.
Definition srp.h:674
uint8_t reserved0[7]
Reserved.
Definition srp.h:676
union srp_tag tag
Tag.
Definition srp.h:678
An SRP initiator logout request.
Definition srp.h:264
union srp_tag tag
Tag.
Definition srp.h:273
uint8_t reserved0[7]
Reserved.
Definition srp.h:271
uint8_t type
Information unit type.
Definition srp.h:269
An SRP login rejection.
Definition srp.h:195
uint8_t reserved2[6]
Reserved.
Definition srp.h:219
uint8_t type
Information unit type.
Definition srp.h:200
uint8_t reserved1[8]
Reserved.
Definition srp.h:211
uint32_t reason
Reason.
Definition srp.h:207
union srp_tag tag
Tag.
Definition srp.h:209
uint16_t supported_buffer_formats
Supported buffer formats.
Definition srp.h:217
uint8_t reserved0[3]
Reserved.
Definition srp.h:202
An SRP login request information unit.
Definition srp.h:60
union srp_port_id target
Target port identifier.
Definition srp.h:92
uint16_t required_buffer_formats
Required buffer formats.
Definition srp.h:79
uint8_t reserved2[5]
Reserved.
Definition srp.h:88
uint8_t flags
Flags.
Definition srp.h:86
union srp_port_id initiator
Initiator port identifier.
Definition srp.h:90
uint8_t type
Information unit type.
Definition srp.h:65
uint32_t max_i_t_iu_len
Requested maximum initiator to target IU length.
Definition srp.h:71
uint8_t reserved0[7]
Reserved.
Definition srp.h:67
uint8_t reserved1[4]
Reserved.
Definition srp.h:73
union srp_tag tag
Tag.
Definition srp.h:69
An SRP login response.
Definition srp.h:130
uint8_t type
Information unit type.
Definition srp.h:135
uint8_t reserved1[25]
Reserved.
Definition srp.h:160
uint8_t reserved0[3]
Reserved.
Definition srp.h:137
uint32_t max_t_i_iu_len
Maximum target to initiator IU length.
Definition srp.h:145
uint8_t flags
Flags.
Definition srp.h:158
uint32_t max_i_t_iu_len
Maximum initiator to target IU length.
Definition srp.h:143
union srp_tag tag
Tag.
Definition srp.h:141
uint32_t request_limit_delta
Request limit delta.
Definition srp.h:139
uint16_t supported_buffer_formats
Supported buffer formats.
Definition srp.h:151
An SRP memory descriptor.
Definition srp.h:500
uint64_t address
Virtual address.
Definition srp.h:502
uint32_t handle
Memory handle.
Definition srp.h:504
uint32_t len
Data length.
Definition srp.h:506
An SRP SCSI response.
Definition srp.h:517
uint32_t response_data_len
Response data list length.
Definition srp.h:555
uint32_t data_out_residual_count
Data-out residual count.
Definition srp.h:549
uint8_t reserved0[2]
Reserved.
Definition srp.h:530
uint8_t reserved1[2]
Reserved.
Definition srp.h:536
union srp_tag tag
Tag.
Definition srp.h:534
uint32_t sense_data_len
Sense data list length.
Definition srp.h:553
uint8_t flags
Flags.
Definition srp.h:528
uint8_t status
Status.
Definition srp.h:547
uint8_t type
Information unit type.
Definition srp.h:522
uint32_t request_limit_delta
Request limit delta.
Definition srp.h:532
uint32_t data_in_residual_count
Data-in residual count.
Definition srp.h:551
uint8_t valid
Valid fields.
Definition srp.h:542
An SRP target logout request.
Definition srp.h:287
union srp_tag tag
Tag.
Definition srp.h:307
uint32_t reason
Reason.
Definition srp.h:305
uint8_t flags
Flags.
Definition srp.h:298
uint8_t reserved0[2]
Reserved.
Definition srp.h:300
uint8_t type
Information unit type.
Definition srp.h:292
An SRP task management request.
Definition srp.h:348
union srp_tag tag
Tag.
Definition srp.h:363
union srp_tag managed_tag
Tag of task to be managed.
Definition srp.h:378
uint8_t flags
Flags.
Definition srp.h:359
uint8_t reserved3[1]
Reserved.
Definition srp.h:376
struct scsi_lun lun
Logical unit number.
Definition srp.h:367
uint8_t function
Task management function.
Definition srp.h:374
uint8_t reserved4[8]
Reserved.
Definition srp.h:380
uint8_t reserved2[2]
Reserved.
Definition srp.h:369
uint8_t type
Information unit type.
Definition srp.h:353
uint8_t reserved1[4]
Reserved.
Definition srp.h:365
uint8_t reserved0[6]
Reserved.
Definition srp.h:361
A SCSI Command Data Block.
Definition scsi.h:207
An SRP port ID.
Definition srp.h:37
uint32_t dwords[4]
Definition srp.h:39
uint8_t bytes[16]
Definition srp.h:38
An SRP information unit tag.
Definition srp.h:28
uint32_t dwords[2]
Definition srp.h:30
uint8_t bytes[8]
Definition srp.h:29
Data transfer interfaces.