FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This method initializes the controller with the physical memory
 *        addresses that are used to communicate with the driver.
 *
 * @param[in] this_controller
 *
 * @return none
 */
@brief This method initializes the controller with the physical memory
addresses that are used to communicate with the driver.



@return none
@brief This method initializes the controller with the physical memory addresses that are used to communicate with the driver . @return none
void scic_sds_controller_ram_initialization(
   SCIC_SDS_CONTROLLER_T *this_controller
)
{
   SCI_PHYSICAL_MEMORY_DESCRIPTOR_T *mde;
   mde = &this_controller->memory_descriptors[SCU_MDE_COMPLETION_QUEUE];
   this_controller->completion_queue = (U32*) mde->virtual_address;
   SMU_CQBAR_WRITE(this_controller, mde->physical_address);
   mde = &this_controller->memory_descriptors[SCU_MDE_REMOTE_NODE_CONTEXT];
   this_controller->remote_node_context_table = (SCU_REMOTE_NODE_CONTEXT_T *)
                                                mde->virtual_address;
   SMU_RNCBAR_WRITE(this_controller, mde->physical_address);
   mde = &this_controller->memory_descriptors[SCU_MDE_TASK_CONTEXT];
   this_controller->task_context_table = (SCU_TASK_CONTEXT_T *)
                                         mde->virtual_address;
   SMU_HTTBAR_WRITE(this_controller, mde->physical_address);
   mde = &this_controller->memory_descriptors[SCU_MDE_UF_BUFFER];
   scic_sds_unsolicited_frame_control_construct(
      &this_controller->uf_control, mde, this_controller
   );
   SCU_UFHBAR_WRITE(
      this_controller,
      this_controller->uf_control.headers.physical_address);
   SCU_PUFATHAR_WRITE(
      this_controller,
      this_controller->uf_control.address_table.physical_address);
   SCU_SECR0_WRITE(
      this_controller,
      (SIGNLE_BIT_ERROR_CORRECTION_ENABLE
       | MULTI_BIT_ERROR_REPORTING_ENABLE
       | SINGLE_BIT_ERROR_REPORTING_ENABLE) );
   SCU_SECR1_WRITE(
      this_controller,
      (SIGNLE_BIT_ERROR_CORRECTION_ENABLE
       | MULTI_BIT_ERROR_REPORTING_ENABLE
       | SINGLE_BIT_ERROR_REPORTING_ENABLE) );
}
void scic_sds_controller_ram_initialization ( SCIC_SDS_CONTROLLER_T * this_controller ) { SCI_PHYSICAL_MEMORY_DESCRIPTOR_T * mde ; mde = & this_controller -> memory_descriptors [ SCU_MDE_COMPLETION_QUEUE ] ; this_controller -> completion_queue = ( U32 * ) mde -> virtual_address ; SMU_CQBAR_WRITE ( this_controller , mde -> physical_address ) ; mde = & this_controller -> memory_descriptors [ SCU_MDE_REMOTE_NODE_CONTEXT ] ; this_controller -> remote_node_context_table = ( SCU_REMOTE_NODE_CONTEXT_T * ) mde -> virtual_address ; SMU_RNCBAR_WRITE ( this_controller , mde -> physical_address ) ; mde = & this_controller -> memory_descriptors [ SCU_MDE_TASK_CONTEXT ] ; this_controller -> task_context_table = ( SCU_TASK_CONTEXT_T * ) mde -> virtual_address ; SMU_HTTBAR_WRITE ( this_controller , mde -> physical_address ) ; mde = & this_controller -> memory_descriptors [ SCU_MDE_UF_BUFFER ] ; scic_sds_unsolicited_frame_control_construct ( & this_controller -> uf_control , mde , this_controller ) ; SCU_UFHBAR_WRITE ( this_controller , this_controller -> uf_control . headers . physical_address ) ; SCU_PUFATHAR_WRITE ( this_controller , this_controller -> uf_control . address_table . physical_address ) ; SCU_SECR0_WRITE ( this_controller , ( SIGNLE_BIT_ERROR_CORRECTION_ENABLE | MULTI_BIT_ERROR_REPORTING_ENABLE | SINGLE_BIT_ERROR_REPORTING_ENABLE ) ) ; SCU_SECR1_WRITE ( this_controller , ( SIGNLE_BIT_ERROR_CORRECTION_ENABLE | MULTI_BIT_ERROR_REPORTING_ENABLE | SINGLE_BIT_ERROR_REPORTING_ENABLE ) ) ; }
@brief This method initializes the controller with the physical memory
        addresses that are used to communicate with the driver.
@brief This method initializes the controller with the physical memory addresses that are used to communicate with the driver .
// The completion queue is actually placed in cacheable memory // Therefore it no longer comes out of memory in the MDL. // Program the location of the Remote Node Context table // into the SCU. // Program the location of the Task Context table into the SCU. // Inform the silicon as to the location of the UF headers and // address table. //enable the ECC correction and detection.