5 * Copyright (C) 2009 Fen Systems Ltd <mbrown@fensystems.co.uk>.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31 * OF THE POSSIBILITY OF SUCH DAMAGE.
34 FILE_LICENCE ( BSD2
);
38 * SRP boot firmware table
40 * The working draft specification for the SRP boot firmware table can
43 * http://etherboot.org/wiki/srp/sbft
48 #include <gpxe/acpi.h>
49 #include <gpxe/scsi.h>
51 #include <gpxe/ib_srp.h>
53 /** SRP Boot Firmware Table signature */
54 #define SBFT_SIG "sBFT"
56 /** An offset from the start of the sBFT */
57 typedef uint16_t sbft_off_t
;
60 * SRP Boot Firmware Table
64 struct acpi_description_header acpi
;
65 /** Offset to SCSI subtable */
66 sbft_off_t scsi_offset
;
67 /** Offset to SRP subtable */
68 sbft_off_t srp_offset
;
69 /** Offset to IB subtable, if present */
73 } __attribute__ (( packed
));
78 struct sbft_scsi_subtable
{
81 } __attribute__ (( packed
));
86 struct sbft_srp_subtable
{
87 /** Initiator and target ports */
88 struct srp_port_ids port_ids
;
89 } __attribute__ (( packed
));
94 struct sbft_ib_subtable
{
97 /** Destination GID */
100 struct ib_gid_half service_id
;
105 } __attribute__ (( packed
));
108 * An sBFT created by gPXE
111 /** The table header */
112 struct sbft_table table
;
113 /** The SCSI subtable */
114 struct sbft_scsi_subtable scsi
;
115 /** The SRP subtable */
116 struct sbft_srp_subtable srp
;
117 /** The IB subtable */
118 struct sbft_ib_subtable ib
;
119 } __attribute__ (( packed
, aligned ( 16 ) ));
123 extern int sbft_fill_data ( struct srp_device
*srp
);
125 #endif /* _GPXE_SBFT_H */