FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This method builds the memory descriptor table for this
 *        controller.
 *
 * @param[in] this_controller This parameter specifies the controller
 *            object for which to build the memory table.
 *
 * @return none
 */
@brief This method builds the memory descriptor table for this
controller.

@param[in] this_controller This parameter specifies the controller
object for which to build the memory table.

@return none
@brief This method builds the memory descriptor table for this controller . @param [ in ] this_controller This parameter specifies the controller object for which to build the memory table . @return none
void scic_sds_controller_build_memory_descriptor_table(
   SCIC_SDS_CONTROLLER_T *this_controller
)
{
   sci_base_mde_construct(
      &this_controller->memory_descriptors[SCU_MDE_COMPLETION_QUEUE],
      SCU_COMPLETION_RAM_ALIGNMENT,
      (sizeof(U32) * this_controller->completion_queue_entries),
      (SCI_MDE_ATTRIBUTE_CACHEABLE | SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS)
   );
   sci_base_mde_construct(
      &this_controller->memory_descriptors[SCU_MDE_REMOTE_NODE_CONTEXT],
      SCU_REMOTE_NODE_CONTEXT_ALIGNMENT,
      this_controller->remote_node_entries * sizeof(SCU_REMOTE_NODE_CONTEXT_T),
      SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS
   );
   sci_base_mde_construct(
      &this_controller->memory_descriptors[SCU_MDE_TASK_CONTEXT],
      SCU_TASK_CONTEXT_ALIGNMENT,
      this_controller->task_context_entries * sizeof(SCU_TASK_CONTEXT_T),
      SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS
   );
   scic_sds_unsolicited_frame_control_set_address_table_count(
      &this_controller->uf_control
   );
   sci_base_mde_construct(
      &this_controller->memory_descriptors[SCU_MDE_UF_BUFFER],
      SCU_UNSOLICITED_FRAME_BUFFER_ALIGNMENT,
      scic_sds_unsolicited_frame_control_get_mde_size(this_controller->uf_control),
      SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS
   );
}
void scic_sds_controller_build_memory_descriptor_table ( SCIC_SDS_CONTROLLER_T * this_controller ) { sci_base_mde_construct ( & this_controller -> memory_descriptors [ SCU_MDE_COMPLETION_QUEUE ] , SCU_COMPLETION_RAM_ALIGNMENT , ( sizeof ( U32 ) * this_controller -> completion_queue_entries ) , ( SCI_MDE_ATTRIBUTE_CACHEABLE | SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ) ) ; sci_base_mde_construct ( & this_controller -> memory_descriptors [ SCU_MDE_REMOTE_NODE_CONTEXT ] , SCU_REMOTE_NODE_CONTEXT_ALIGNMENT , this_controller -> remote_node_entries * sizeof ( SCU_REMOTE_NODE_CONTEXT_T ) , SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ) ; sci_base_mde_construct ( & this_controller -> memory_descriptors [ SCU_MDE_TASK_CONTEXT ] , SCU_TASK_CONTEXT_ALIGNMENT , this_controller -> task_context_entries * sizeof ( SCU_TASK_CONTEXT_T ) , SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ) ; scic_sds_unsolicited_frame_control_set_address_table_count ( & this_controller -> uf_control ) ; sci_base_mde_construct ( & this_controller -> memory_descriptors [ SCU_MDE_UF_BUFFER ] , SCU_UNSOLICITED_FRAME_BUFFER_ALIGNMENT , scic_sds_unsolicited_frame_control_get_mde_size ( this_controller -> uf_control ) , SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ) ; }
@brief This method builds the memory descriptor table for this
        controller.
@brief This method builds the memory descriptor table for this controller .
// The UF buffer address table size must be programmed to a power // of 2.  Find the first power of 2 that is equal to or greater then // the number of unsolicited frame buffers to be utilized.