iPXE
phantom_hw.h
Go to the documentation of this file.
1 #ifndef _PHANTOM_HW_H
2 #define _PHANTOM_HW_H
3 
4 /*
5  * Copyright (C) 2008 Michael Brown <mbrown@fensystems.co.uk>.
6  * Copyright (C) 2008 NetXen, Inc.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301, USA.
22  *
23  * You can also choose to distribute this program under the terms of
24  * the Unmodified Binary Distribution Licence (as given in the file
25  * COPYING.UBDL), provided that you have satisfied its requirements.
26  */
27 
28 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
29 
30 /**
31  * @file
32  *
33  * Phantom hardware definitions
34  *
35  */
36 
37 /** A Phantom RX descriptor */
39  pseudo_bit_t handle[16]; /**< Reference handle */
40  pseudo_bit_t flags[16]; /**< Flags */
41  pseudo_bit_t length[32]; /**< Buffer length */
42 
43  /* --------------------------------------------------------------- */
44 
45  pseudo_bit_t dma_addr[64]; /**< Buffer DMA address */
46 
47 };
48 
49 /** A Phantom RX status descriptor */
51  pseudo_bit_t port[4]; /**< Port number */
52  pseudo_bit_t status[4]; /**< Checksum status */
53  pseudo_bit_t type[4]; /**< Type */
54  pseudo_bit_t total_length[16]; /**< Total packet length */
55  pseudo_bit_t handle[16]; /**< Reference handle */
56  pseudo_bit_t protocol[4]; /**< Protocol */
57  pseudo_bit_t pkt_offset[5]; /**< Offset to packet start */
58  pseudo_bit_t desc_cnt[3]; /**< Descriptor count */
59  pseudo_bit_t owner[2]; /**< Owner */
60  pseudo_bit_t opcode[6]; /**< Opcode */
61 
62  /* --------------------------------------------------------------- */
63 
64  pseudo_bit_t hash_value[32]; /**< RSS hash value */
65  pseudo_bit_t hash_type[8]; /**< RSS hash type */
66  pseudo_bit_t lro[8]; /**< LRO data */
67 };
68 
69 /** Phantom RX status opcodes */
73 };
74 
75 /** A Phantom TX descriptor */
77  pseudo_bit_t tcp_hdr_offset[8]; /**< TCP header offset (LSO) */
78  pseudo_bit_t ip_hdr_offset[8]; /**< IP header offset (LSO) */
79  pseudo_bit_t flags[7]; /**< Flags */
80  pseudo_bit_t opcode[6]; /**< Opcode */
81  pseudo_bit_t hw_rsvd_0[3]; /**< (Reserved) */
82  pseudo_bit_t num_buffers[8]; /**< Total number of buffers */
83  pseudo_bit_t length[24]; /**< Total length */
84 
85  /* --------------------------------------------------------------- */
86 
87  pseudo_bit_t buffer2_dma_addr[64]; /**< Buffer 2 DMA address */
88 
89  /* --------------------------------------------------------------- */
90 
91  pseudo_bit_t handle[16]; /**< Reference handle (n/a) */
92  pseudo_bit_t port_mss[16]; /**< TCP MSS (LSO) */
93  pseudo_bit_t port[4]; /**< Port */
94  pseudo_bit_t context_id[4]; /**< Context ID */
95  pseudo_bit_t total_hdr_length[8]; /**< MAC+IP+TCP header (LSO) */
96  pseudo_bit_t conn_id[16]; /**< IPSec connection ID */
97 
98  /* --------------------------------------------------------------- */
99 
100  pseudo_bit_t buffer3_dma_addr[64]; /**< Buffer 3 DMA address */
101 
102  /* --------------------------------------------------------------- */
103 
104  pseudo_bit_t buffer1_dma_addr[64]; /**< Buffer 1 DMA address */
105 
106  /* --------------------------------------------------------------- */
107 
108  pseudo_bit_t buffer1_length[16]; /**< Buffer 1 length */
109  pseudo_bit_t buffer2_length[16]; /**< Buffer 2 length */
110  pseudo_bit_t buffer3_length[16]; /**< Buffer 3 length */
111  pseudo_bit_t buffer4_length[16]; /**< Buffer 4 length */
112 
113  /* --------------------------------------------------------------- */
114 
115  pseudo_bit_t buffer4_dma_addr[64]; /**< Buffer 4 DMA address */
116 
117  /* --------------------------------------------------------------- */
118 
119  pseudo_bit_t hw_rsvd_1[64]; /**< (Reserved) */
120 };
121 
122 /** A Phantom MAC address request body */
124  pseudo_bit_t opcode[8]; /**< Opcode */
125  pseudo_bit_t tag[8]; /**< Tag */
126  pseudo_bit_t mac_addr_0[8]; /**< MAC address byte 0 */
127  pseudo_bit_t mac_addr_1[8]; /**< MAC address byte 1 */
128  pseudo_bit_t mac_addr_2[8]; /**< MAC address byte 2 */
129  pseudo_bit_t mac_addr_3[8]; /**< MAC address byte 3 */
130  pseudo_bit_t mac_addr_4[8]; /**< MAC address byte 4 */
131  pseudo_bit_t mac_addr_5[8]; /**< MAC address byte 5 */
132 };
133 
134 /** Phantom MAC request opcodes */
136  UNM_MAC_ADD = 0x01, /**< Add MAC address */
137  UNM_MAC_DEL = 0x02, /**< Delete MAC address */
138 };
139 
140 /** A Phantom NIC request command descriptor */
142  struct {
151  } common;
152 
153  /* --------------------------------------------------------------- */
154 
155  struct {
156  pseudo_bit_t opcode[8];
162  } header;
163 
164  /* --------------------------------------------------------------- */
165 
166  union {
169  } body;
170 };
171 
172 /** Phantom NIC request opcodes */
174  UNM_MAC_EVENT = 0x01, /**< Add/delete MAC address */
175 };
176 
177 /** A Phantom command descriptor */
181 };
182 
183 /** Phantom command descriptor opcodes */
185  UNM_TX_ETHER_PKT = 0x01, /**< Transmit raw Ethernet */
186  UNM_NIC_REQUEST = 0x14, /**< NIC request */
187 };
188 
189 #endif /* _PHANTOM_HW_H */
pseudo_bit_t mac_addr_3[8]
MAC address byte 3.
Definition: phantom_hw.h:129
Transmit raw Ethernet.
Definition: phantom_hw.h:185
pseudo_bit_t handle[16]
Reference handle.
Definition: phantom_hw.h:55
pseudo_bit_t buffer4_length[16]
Buffer 4 length.
Definition: phantom_hw.h:111
pseudo_bit_t desc_cnt[3]
Descriptor count.
Definition: phantom_hw.h:58
A Phantom TX descriptor.
Definition: phantom_hw.h:76
pseudo_bit_t dma_addr[64]
Buffer DMA address.
Definition: phantom_hw.h:45
pseudo_bit_t pkt_offset[5]
Offset to packet start.
Definition: phantom_hw.h:57
pseudo_bit_t opcode[6]
Opcode.
Definition: phantom_hw.h:80
A Phantom NIC request command descriptor.
Definition: phantom_hw.h:141
phantom_cds_opcode
Phantom command descriptor opcodes.
Definition: phantom_hw.h:184
struct phantom_nic_request_body_mac_request_pb mac_request
Definition: phantom_hw.h:167
pseudo_bit_t hw_rsvd_0[3]
(Reserved)
Definition: phantom_hw.h:81
A Phantom RX descriptor.
Definition: phantom_hw.h:38
pseudo_bit_t tcp_hdr_offset[8]
TCP header offset (LSO)
Definition: phantom_hw.h:77
pseudo_bit_t port[4]
Port.
Definition: phantom_hw.h:93
NIC request.
Definition: phantom_hw.h:186
pseudo_bit_t handle[16]
Reference handle (n/a)
Definition: phantom_hw.h:91
pseudo_bit_t port[4]
Port number.
Definition: phantom_hw.h:51
struct phantom_tx_cds_pb tx
Definition: phantom_hw.h:179
pseudo_bit_t total_hdr_length[8]
MAC+IP+TCP header (LSO)
Definition: phantom_hw.h:95
pseudo_bit_t buffer3_length[16]
Buffer 3 length.
Definition: phantom_hw.h:110
unsigned char pseudo_bit_t
Datatype used to represent a bit in the pseudo-structures.
Definition: nx_bitops.h:37
pseudo_bit_t hw_rsvd_0[3]
Definition: phantom_hw.h:147
pseudo_bit_t type[4]
Type.
Definition: phantom_hw.h:53
pseudo_bit_t conn_id[16]
IPSec connection ID.
Definition: phantom_hw.h:96
pseudo_bit_t buffer1_dma_addr[64]
Buffer 1 DMA address.
Definition: phantom_hw.h:104
pseudo_bit_t num_buffers[8]
Total number of buffers.
Definition: phantom_hw.h:82
pseudo_bit_t need_completion[1]
Definition: phantom_hw.h:159
pseudo_bit_t mac_addr_2[8]
MAC address byte 2.
Definition: phantom_hw.h:128
A Phantom RX status descriptor.
Definition: phantom_hw.h:50
Add/delete MAC address.
Definition: phantom_hw.h:174
pseudo_bit_t ip_hdr_offset[8]
IP header offset (LSO)
Definition: phantom_hw.h:78
pseudo_bit_t buffer2_length[16]
Buffer 2 length.
Definition: phantom_hw.h:109
pseudo_bit_t dst_major[4]
Definition: phantom_hw.h:145
pseudo_bit_t total_length[16]
Total packet length.
Definition: phantom_hw.h:54
pseudo_bit_t protocol[4]
Protocol.
Definition: phantom_hw.h:56
pseudo_bit_t handle[16]
Reference handle.
Definition: phantom_hw.h:39
pseudo_bit_t context_id[4]
Context ID.
Definition: phantom_hw.h:94
A Phantom command descriptor.
Definition: phantom_hw.h:178
pseudo_bit_t mac_addr_1[8]
MAC address byte 1.
Definition: phantom_hw.h:127
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
pseudo_bit_t port_mss[16]
TCP MSS (LSO)
Definition: phantom_hw.h:92
pseudo_bit_t flags[16]
Flags.
Definition: phantom_hw.h:40
pseudo_bit_t qmsg_type[6]
Definition: phantom_hw.h:150
union phantom_nic_request_cds_pb::@99 body
pseudo_bit_t buffer3_dma_addr[64]
Buffer 3 DMA address.
Definition: phantom_hw.h:100
phantom_mac_request_opcode
Phantom MAC request opcodes.
Definition: phantom_hw.h:135
pseudo_bit_t length[32]
Buffer length.
Definition: phantom_hw.h:41
pseudo_bit_t padding[384]
Definition: phantom_hw.h:168
pseudo_bit_t opcode[6]
Opcode.
Definition: phantom_hw.h:60
A Phantom MAC address request body.
Definition: phantom_hw.h:123
pseudo_bit_t length[24]
Total length.
Definition: phantom_hw.h:83
struct phantom_nic_request_cds_pb nic_request
Definition: phantom_hw.h:180
pseudo_bit_t comp_id[8]
Definition: phantom_hw.h:157
pseudo_bit_t buffer2_dma_addr[64]
Buffer 2 DMA address.
Definition: phantom_hw.h:87
Delete MAC address.
Definition: phantom_hw.h:137
phantom_sds_opcode
Phantom RX status opcodes.
Definition: phantom_hw.h:70
pseudo_bit_t mac_addr_4[8]
MAC address byte 4.
Definition: phantom_hw.h:130
pseudo_bit_t owner[2]
Owner.
Definition: phantom_hw.h:59
pseudo_bit_t buffer4_dma_addr[64]
Buffer 4 DMA address.
Definition: phantom_hw.h:115
pseudo_bit_t mac_addr_5[8]
MAC address byte 5.
Definition: phantom_hw.h:131
struct phantom_nic_request_cds_pb::@97 common
phantom_nic_request_opcode
Phantom NIC request opcodes.
Definition: phantom_hw.h:173
pseudo_bit_t lro[8]
LRO data.
Definition: phantom_hw.h:66
pseudo_bit_t hw_rsvd_1[64]
(Reserved)
Definition: phantom_hw.h:119
pseudo_bit_t opcode[6]
Definition: phantom_hw.h:146
pseudo_bit_t mac_addr_0[8]
MAC address byte 0.
Definition: phantom_hw.h:126
pseudo_bit_t dst_minor[18]
Definition: phantom_hw.h:143
pseudo_bit_t sub_opcode[8]
Definition: phantom_hw.h:161
pseudo_bit_t hash_value[32]
RSS hash value.
Definition: phantom_hw.h:64
pseudo_bit_t hw_rsvd_1[2]
Definition: phantom_hw.h:149
pseudo_bit_t context_id[16]
Definition: phantom_hw.h:158
pseudo_bit_t flags[7]
Flags.
Definition: phantom_hw.h:79
pseudo_bit_t hash_type[8]
RSS hash type.
Definition: phantom_hw.h:65
Add MAC address.
Definition: phantom_hw.h:136
pseudo_bit_t msginfo[24]
Definition: phantom_hw.h:148
struct phantom_nic_request_cds_pb::@98 header
pseudo_bit_t buffer1_length[16]
Buffer 1 length.
Definition: phantom_hw.h:108
pseudo_bit_t status[4]
Checksum status.
Definition: phantom_hw.h:52
pseudo_bit_t dst_subq[1]
Definition: phantom_hw.h:144