# Message Bridging note ## Prerequisite * [Source Codes Diagram and Unified Modeling Language](http://wiki.insyde.com/index.php/Source_Codes_Diagram_and_Unified_Modeling_Language) * [Supervyse 3.x Coding Standard](http://wiki.insyde.com/index.php/Supervyse_3.x_Coding_Standard) ## Concept and Flow ### ipmid Init Flow ![Imgur](https://i.imgur.com/Pw6gcMR.png) * platformInit * loads the config.xml and create PIA data. * [Load config file](http://wiki.insyde.com/index.php/Load_config_file) * CHECKPOINT_TASKS_RUN flag * 尚不清楚 CheckpointWait() 背後的運作機制 ### channel initial flow ![Imgur](https://i.imgur.com/FFKUTVH.png) ### Example * SMS Channel ![Imgur](https://i.imgur.com/UPXUc2m.jpg) * SMM Channel ![Imgur](https://i.imgur.com/I1civbo.jpg) * IPMB Channel Command Request and Response ![Imgur](https://i.imgur.com/NAajMw9.png) ### Channel Command Handle Flow ![Imgur](https://i.imgur.com/ndYkEve.png) * CMDProcessor() [參照 SMS 圖之右側] will look up IPMI command table for command handler to execute then send back IPMI command response. ## [Add A New Channel](http://wiki.insyde.com/index.php/How_To_Add_A_New_Channel) ## [Configure Channels](http://wiki.insyde.com/index.php/How_To_Configure_Channels) ## Source Code Overview ### Data Struture ```c like typedef struct { SChannelMethods *psMethods; // pointer to channel type specific methods SChannelData *psData; // pointer to channel specific data } SChannel; SChannel g_sChannels[MAX_CHANNELS] ``` * Channel method (列出目前熟悉的部分) * pInitialize * pBridgeReq * pBridgeRsp * pRespondTo (HAL) ## Tool (尚未動手) * [Remote Debug with gdb](http://wiki.insyde.com/index.php/Supervyse_Remote_Debug_with_gdb_Setting_Guide) * [Firmware Runtime Debug](http://wiki.insyde.com/index.php/Supervyse_3.0_Firmware_Runtime_Debug#Shared_Memory) ## 待研究 * [Timers](http://wiki.insyde.com/index.php/Insyde_BMC_ipmid_OS_System_Timers#Timers_Functions) * [System Event Subsystem](http://wiki.insyde.com/index.php/Insyde_BMC_ipmid_System_Event_Subsystem#Related_Links)