2 * IBM eServer eHCA Infiniband device driver for Linux on POWER
4 * eHCA register definitions
6 * Authors: Waleri Fomin <fomin@de.ibm.com>
7 * Christoph Raisch <raisch@de.ibm.com>
8 * Reinhard Ernst <rernst@de.ibm.com>
10 * Copyright (c) 2005 IBM Corporation
12 * All rights reserved.
14 * This source code is distributed under a dual license of GPL v2.0 and OpenIB
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are met:
22 * Redistributions of source code must retain the above copyright notice, this
23 * list of conditions and the following disclaimer.
25 * Redistributions in binary form must reproduce the above copyright notice,
26 * this list of conditions and the following disclaimer in the documentation
27 * and/or other materials
28 * provided with the distribution.
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
34 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
37 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
38 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 * POSSIBILITY OF SUCH DAMAGE.
46 #include "ehca_tools.h"
48 #define EHCA_MAX_MTU 4
50 /* QP Table Entry Memory Map */
156 u64 reserved
[(0x400 - 0x298) / 8];
157 /* 0x400 extended data */
158 u64 reserved_ext
[(0x500 - 0x400) / 8];
160 u64 reserved2
[(0x1000 - 0x500) / 8];
164 #define QPX_SQADDER EHCA_BMASK_IBM(48, 63)
165 #define QPX_RQADDER EHCA_BMASK_IBM(48, 63)
166 #define QPX_AAELOG_RESET_SRQ_LIMIT EHCA_BMASK_IBM(3, 3)
168 #define QPTEMM_OFFSET(x) offsetof(struct hipz_qptemm, x)
170 /* MRMWPT Entry Memory Map */
184 u64 reserved4
[(0x200 - 0x40) / 8];
190 #define MRMWMM_OFFSET(x) offsetof(struct hipz_mrmwmm, x)
194 u64 reserved0
[(0x400) / 8];
241 #define QPEDMM_OFFSET(x) offsetof(struct hipz_qpedmm, x)
243 /* CQ Table Entry Memory Map */
262 u64 reserved2
[(0x1000 - 0x60) / 8];
266 #define CQX_FEC_CQE_CNT EHCA_BMASK_IBM(32, 63)
267 #define CQX_FECADDER EHCA_BMASK_IBM(32, 63)
268 #define CQX_N0_GENERATE_SOLICITED_COMP_EVENT EHCA_BMASK_IBM(0, 0)
269 #define CQX_N1_GENERATE_COMP_EVENT EHCA_BMASK_IBM(0, 0)
271 #define CQTEMM_OFFSET(x) offsetof(struct hipz_cqtemm, x)
273 /* EQ Table Entry Memory Map */
296 #define EQTEMM_OFFSET(x) offsetof(struct hipz_eqtemm, x)
298 /* access control defines for MR/MW */
299 #define HIPZ_ACCESSCTRL_L_WRITE 0x00800000
300 #define HIPZ_ACCESSCTRL_R_WRITE 0x00400000
301 #define HIPZ_ACCESSCTRL_R_READ 0x00200000
302 #define HIPZ_ACCESSCTRL_R_ATOMIC 0x00100000
303 #define HIPZ_ACCESSCTRL_MW_BIND 0x00080000
305 /* query hca response block */
306 struct hipz_query_hca
{
315 u32 cur_qp_attached_mcast_grp
;
329 u32 max_special_mrwpte
;
330 u32 max_rd_ee_context
;
332 u32 max_total_mcast_qp_attach
;
333 u32 max_mcast_qp_attach
;
336 u32 internal_clock_frequency
;
342 u32 max_rr_ee_context
;
345 u32 max_act_wqs_ee_context
;
349 u32 memory_page_size_supported
;
351 u32 local_ca_ack_delay
;
357 u64 hca_cap_indicators
;
358 u32 data_counter_register_size
;
362 } __attribute__ ((packed
));
364 #define HCA_CAP_AH_PORT_NR_CHECK EHCA_BMASK_IBM( 0, 0)
365 #define HCA_CAP_ATOMIC EHCA_BMASK_IBM( 1, 1)
366 #define HCA_CAP_AUTO_PATH_MIG EHCA_BMASK_IBM( 2, 2)
367 #define HCA_CAP_BAD_P_KEY_CTR EHCA_BMASK_IBM( 3, 3)
368 #define HCA_CAP_SQD_RTS_PORT_CHANGE EHCA_BMASK_IBM( 4, 4)
369 #define HCA_CAP_CUR_QP_STATE_MOD EHCA_BMASK_IBM( 5, 5)
370 #define HCA_CAP_INIT_TYPE EHCA_BMASK_IBM( 6, 6)
371 #define HCA_CAP_PORT_ACTIVE_EVENT EHCA_BMASK_IBM( 7, 7)
372 #define HCA_CAP_Q_KEY_VIOL_CTR EHCA_BMASK_IBM( 8, 8)
373 #define HCA_CAP_WQE_RESIZE EHCA_BMASK_IBM( 9, 9)
374 #define HCA_CAP_RAW_PACKET_MCAST EHCA_BMASK_IBM(10, 10)
375 #define HCA_CAP_SHUTDOWN_PORT EHCA_BMASK_IBM(11, 11)
376 #define HCA_CAP_RC_LL_QP EHCA_BMASK_IBM(12, 12)
377 #define HCA_CAP_SRQ EHCA_BMASK_IBM(13, 13)
378 #define HCA_CAP_UD_LL_QP EHCA_BMASK_IBM(16, 16)
379 #define HCA_CAP_RESIZE_MR EHCA_BMASK_IBM(17, 17)
380 #define HCA_CAP_MINI_QP EHCA_BMASK_IBM(18, 18)
381 #define HCA_CAP_H_ALLOC_RES_SYNC EHCA_BMASK_IBM(19, 19)
383 /* query port response block */
384 struct hipz_query_port
{
399 u16 pkey_entries
[16];
411 u64 guid_entries
[255];
412 } __attribute__ ((packed
));