From: ftillier Date: Tue, 14 Feb 2006 21:07:57 +0000 (+0000) Subject: [HCA] Support 32-bit UVP on 64-bit KVP X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=4c4029e3995fb377996cec878ed5651b72743e02;p=~shefty%2Frdma-win.git [HCA] Support 32-bit UVP on 64-bit KVP git-svn-id: svn://openib.tc.cornell.edu/gen1@216 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/hw/mt23108/user/hca_data.h b/trunk/hw/mt23108/user/hca_data.h index 9efcea1c..8a53c5df 100644 --- a/trunk/hw/mt23108/user/hca_data.h +++ b/trunk/hw/mt23108/user/hca_data.h @@ -35,7 +35,7 @@ typedef struct _ib_ca { - HH_hca_dev_t *p_hca_ul_info; + HH_hca_dev_t * __ptr64 p_hca_ul_info; void *p_hca_ul_resources; ib_ca_attr_t *p_hca_attr; HHUL_hca_hndl_t hhul_hca_hndl; diff --git a/trunk/hw/mt23108/vapi/Hca/hcahal/hh.h b/trunk/hw/mt23108/vapi/Hca/hcahal/hh.h index 3f436c18..e4f280aa 100644 --- a/trunk/hw/mt23108/vapi/Hca/hcahal/hh.h +++ b/trunk/hw/mt23108/vapi/Hca/hcahal/hh.h @@ -62,27 +62,47 @@ typedef enum * Device information (public object/context) * */ - +#pragma warning( disable : 4201 ) typedef struct HH_hca_dev_st { - char *dev_desc; /* Device description (name, etc.) */ - char *user_lib; /* User level library (dyn-link) */ + char * __ptr64 dev_desc; /* Device description (name, etc.) */ + char * __ptr64 user_lib; /* User level library (dyn-link) */ u_int32_t vendor_id; /* IEEE's 24 bit Device Vendor ID */ u_int32_t dev_id; /* Device ID */ u_int32_t hw_ver; /* Hardware version (step/rev) */ u_int64_t fw_ver; - struct hh_if_ops* if_ops; /* Interface operations */ + struct hh_if_ops* __ptr64 if_ops; /* Interface operations */ /* Size (bytes) of user-level ... */ + union + { MT_size_t hca_ul_resources_sz; /* .. resources context for an HCA */ + void* __ptr64 resv0; + }; + union + { MT_size_t pd_ul_resources_sz; /* .. resources context for a PD */ + void* __ptr64 resv1; + }; + union + { MT_size_t cq_ul_resources_sz; /* .. resources context for a CQ */ + void* __ptr64 resv2; + }; + union + { MT_size_t srq_ul_resources_sz; /* .. resources context for a SRQ */ + void* __ptr64 resv3; + }; + union + { MT_size_t qp_ul_resources_sz; /* .. resources context for a QP */ + void* __ptr64 resv4; + }; - void* device; /* Device private data */ + void* __ptr64 device; /* Device private data */ HH_hca_status_t status; /* Device Status */ } HH_hca_dev_t; - +#pragma warning( default : 4201 ) typedef enum { HH_TPT_PAGE, diff --git a/trunk/hw/mt23108/vapi/Hca/hcahal/hh_common.h b/trunk/hw/mt23108/vapi/Hca/hcahal/hh_common.h index 886ed6b3..6e3eff88 100644 --- a/trunk/hw/mt23108/vapi/Hca/hcahal/hh_common.h +++ b/trunk/hw/mt23108/vapi/Hca/hcahal/hh_common.h @@ -44,7 +44,7 @@ * */ -typedef struct HH_hca_dev_st* HH_hca_hndl_t; +typedef struct HH_hca_dev_st* __ptr64 HH_hca_hndl_t; typedef struct HHUL_sr_wqe_st HHUL_sr_wqe_t; typedef struct HHUL_rr_wqe_st HHUL_rr_wqe_t; diff --git a/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_common.h b/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_common.h index 6778cd07..2e9943c7 100644 --- a/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_common.h +++ b/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_common.h @@ -54,6 +54,8 @@ typedef u_int32_t THH_uar_index_t; typedef struct THH_uar_st *THH_uar_t; +#pragma warning( disable : 4201 ) + /* VERSION INFORMATION: used in order to retrieve major version numbers in order to deal with differences in different versions. */ typedef struct THH_ver_info_st { @@ -68,12 +70,16 @@ typedef struct THH_hca_ul_resources_st { HH_hca_hndl_t hh_hca_hndl; THH_ver_info_t version; THH_uar_index_t uar_index; + union + { MT_virt_addr_t uar_map; + void* __ptr64 resv0; + }; /* HCA capabilities to validate or use in THHUL */ MT_bool priv_ud_av; /* Privileged UD AV are enforced ? */ u_int32_t log2_mpt_size; - char *av_ddr_base; - char *av_host_base; + char * __ptr64 av_ddr_base; + char * __ptr64 av_host_base; u_int32_t max_qp_ous_wr; /* Maximum Number of oustanding WR on any WQ. */ u_int32_t max_srq_ous_wr; /* Maximum Number of oustanding WR on any WQ. */ @@ -90,34 +96,71 @@ typedef struct THH_pd_ul_resources_st { * needed. Therefore, the udavm_buf_size value is the size of the actual udavm * table, not the size of the malloc'ed buffer. */ + union + { MT_virt_addr_t udavm_buf; /* IN */ + void* __ptr64 resv0; + }; + union + { MT_size_t udavm_buf_sz; /* IN */ + void* __ptr64 resv1; + }; HH_pdm_pd_flags_t pd_flags; /* IN - if non-zero, is a PD for a special QP*/ VAPI_lkey_t udavm_buf_memkey; /* OUT - set by THH_uldm */ } THH_pd_ul_resources_t; typedef struct { + union + { MT_virt_addr_t cqe_buf; /* CQE buffer virtual addr. CQE size aligned */ + void* __ptr64 resv0; + }; + union + { MT_size_t cqe_buf_sz; /* Buffer size in bytes (mult of CQE size) */ + void* __ptr64 resv1; + }; THH_uar_index_t uar_index; /* Index of UAR used for this CQ. */ u_int32_t new_producer_index; /* New producer index after "resize_cq" (OUT)*/ } THH_cq_ul_resources_t; typedef struct { + union + { MT_virt_addr_t wqes_buf; /* WQEs buffer virtual address */ + void* __ptr64 resv0; + }; + union + { MT_size_t wqes_buf_sz; /* Buffer size in bytes */ + void* __ptr64 resv1; + }; THH_uar_index_t uar_index; /* index of UAR used for this QP */ /* ER: Not used anywhere: MT_virt_addr_t uar_map; */ /* Address in user space of UAR */ } THH_qp_ul_resources_t; typedef struct { + union + { MT_virt_addr_t wqes_buf; /* WQEs buffer virtual address */ + void* __ptr64 resv0; + }; + union + { MT_size_t wqes_buf_sz; /* Buffer size in bytes */ + void* __ptr64 resv1; + }; + union + { MT_size_t wqe_sz; /* WQE (descriptor) size in bytes */ + void* __ptr64 resv2; + }; THH_uar_index_t uar_index; /* index of UAR used for this QP */ } THH_srq_ul_resources_t; +#pragma warning( default : 4201 ) #endif /* H_THH_COMMON_H */ diff --git a/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c b/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c index 8ffbe7a0..e514476c 100644 --- a/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c +++ b/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c @@ -5000,7 +5000,7 @@ HH_ret_t THH_hob_free_pd(HH_hca_hndl_t hca_hndl, HH_pd_hndl_t pd_num) /****************************************************************************** * Function: THH_hob_alloc_rdd <==> THH_eecm_alloc_rdd *****************************************************************************/ -HH_ret_t THH_hob_alloc_rdd(HH_hca_dev_t *hh_dev_p, +HH_ret_t THH_hob_alloc_rdd(HH_hca_hndl_t hh_dev_p, HH_rdd_hndl_t *rdd_p) { #if 0 @@ -5039,7 +5039,7 @@ HH_ret_t THH_hob_alloc_rdd(HH_hca_dev_t *hh_dev_p, /****************************************************************************** * Function: THH_hob_free_rdd <==> THH_eecm_free_rdd *****************************************************************************/ -HH_ret_t THH_hob_free_rdd(HH_hca_dev_t *hh_dev_p, HH_rdd_hndl_t rdd) +HH_ret_t THH_hob_free_rdd(HH_hca_hndl_t hh_dev_p, HH_rdd_hndl_t rdd) { #if 0 THH_hob_t thh_hob_p; diff --git a/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.h b/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.h index d2b5cf06..dc517719 100644 --- a/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.h +++ b/trunk/hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.h @@ -336,8 +336,8 @@ DLL_API HH_ret_t THH_hob_alloc_ul_res(HH_hca_hndl_t hca_hndl,MOSAL_protection_ct DLL_API HH_ret_t THH_hob_free_ul_res(HH_hca_hndl_t hca_hndl,void *hca_ul_resources_p); DLL_API HH_ret_t THH_hob_alloc_pd(HH_hca_hndl_t hca_hndl, MOSAL_protection_ctx_t prot_ctx, void * pd_ul_resources_p,HH_pd_hndl_t *pd_num_p); DLL_API HH_ret_t THH_hob_free_pd(HH_hca_hndl_t hca_hndl, HH_pd_hndl_t pd_num); -DLL_API HH_ret_t THH_hob_alloc_rdd(HH_hca_dev_t *hh_dev_p, HH_rdd_hndl_t *rdd_p); -DLL_API HH_ret_t THH_hob_free_rdd(HH_hca_dev_t *hh_dev_p, HH_rdd_hndl_t rdd); +DLL_API HH_ret_t THH_hob_alloc_rdd(HH_hca_hndl_t hh_dev_p, HH_rdd_hndl_t *rdd_p); +DLL_API HH_ret_t THH_hob_free_rdd(HH_hca_hndl_t hh_dev_p, HH_rdd_hndl_t rdd); DLL_API HH_ret_t THH_hob_create_ud_av(HH_hca_hndl_t hca_hndl,HH_pd_hndl_t pd,VAPI_ud_av_t *av_p, HH_ud_av_hndl_t *ah_p); DLL_API HH_ret_t THH_hob_modify_ud_av(HH_hca_hndl_t hca_hndl, HH_ud_av_hndl_t ah,VAPI_ud_av_t *av_p); DLL_API HH_ret_t THH_hob_query_ud_av(HH_hca_hndl_t hca_hndl, HH_ud_av_hndl_t ah,VAPI_ud_av_t *av_p);