1 #ifndef _IPXE_IB_SRP_H 2 #define _IPXE_IB_SRP_H 3 4 /** @file 5 * 6 * SCSI RDMA Protocol over Infiniband 7 * 8 */ 9 10 FILE_LICENCE ( BSD2 ); 11 12 #include <stdint.h> 13 #include <ipxe/acpi.h> 14 #include <ipxe/interface.h> 15 #include <ipxe/infiniband.h> 16 #include <ipxe/srp.h> 17 18 /** SRP initiator port identifier for Infiniband */ 19 union ib_srp_initiator_port_id { 20 /** SRP version of port identifier */ 21 union srp_port_id srp; 22 /** Infiniband version of port identifier */ 23 struct { 24 /** Identifier extension */ 25 union ib_guid id_ext; 26 /** IB channel adapter GUID */ 27 union ib_guid hca_guid; 28 } __attribute__ (( packed )) ib; 29 }; 30 31 /** SRP target port identifier for Infiniband */ 32 union ib_srp_target_port_id { 33 /** SRP version of port identifier */ 34 union srp_port_id srp; 35 /** Infiniband version of port identifier */ 36 struct { 37 /** Identifier extension */ 38 union ib_guid id_ext; 39 /** I/O controller GUID */ 40 union ib_guid ioc_guid; 41 } __attribute__ (( packed )) ib; 42 }; 43 44 /** 45 * sBFT Infiniband subtable 46 */ 47 struct sbft_ib_subtable { 48 /** Source GID */ 49 union ib_gid sgid; 50 /** Destination GID */ 51 union ib_gid dgid; 52 /** Service ID */ 53 union ib_guid service_id; 54 /** Partition key */ 55 uint16_t pkey; 56 /** Reserved */ 57 uint8_t reserved[6]; 58 } __attribute__ (( packed )); 59 60 /** 61 * An Infiniband SRP sBFT created by iPXE 62 */ 63 struct ipxe_ib_sbft { 64 /** The table header */ 65 struct sbft_table table; 66 /** The SCSI subtable */ 67 struct sbft_scsi_subtable scsi; 68 /** The SRP subtable */ 69 struct sbft_srp_subtable srp; 70 /** The Infiniband subtable */ 71 struct sbft_ib_subtable ib; 72 }; 73 74 /** An Infiniband SRP device */ 75 struct ib_srp_device { 76 /** Reference count */ 77 struct refcnt refcnt; 78 79 /** SRP transport interface */ 80 struct interface srp; 81 /** CMRC interface */ 82 struct interface cmrc; 83 84 /** Infiniband device */ 85 struct ib_device *ibdev; 86 87 /** ACPI descriptor */ 88 struct acpi_descriptor desc; 89 /** Boot firmware table parameters */ 90 struct ipxe_ib_sbft sbft; 91 }; 92 93 #endif /* _IPXE_IB_SRP_H */ 94