Please enable JavaScript.
Coggle requires JavaScript to display documents.
sync-agent.h, :explode:int main /ipmimain-6.62.0.0.0-src/data/IPMI_Main…
sync-agent.h
sync-agent
/sync_agent-6.104.0.0.0-src/data/sync-agent.sh
stop
start
agent.lua
execute agent.lua in all "oem" & "extensions" folder
local extension_modules = utils.get_modules("extensions", "agent")
local oem_modules = utils.get_modules("oem", "agent")
local extension_c_modules = utils.get_c_modules("extensions", "agent")
local oem_c_modules = utils.get_c_modules("oem", "agent")
/sync_agent-6.104.0.0.0-src/data/app/RTP_1_5/agent.lua
local sync_sel_to_redfish = require("subagents.
sel2redfish
")
local sync_ipmi_to_redfish = require("subagents.
ipmi2redfish
")
local sync_bios_to_redfish = require("subagents.
bios2redfish
")
/gami_manager_module-6.353.0.0.0-src/data/RTP_1_5/extensions/ipmi/agent.lua
bios2redfish
Check access permissions /var/RedFishReqQ then make FIFO pipe
use ffi.C read chunk data and. give chunk size=16 ,O_NONBLOCK size=2048
/gami_manager_module-6.353.0.0.0-src/data/RTP_1_5/extensions/ipmi/subagents/bios2redfish.lua
check /tmp/bios2redfish_sem is exist
NO
1 more item...
Yes
sel2redfish
Check access permissions /var/pipe/rf_sel then make FIFO pipe
use ffi.C read chunk data and. give chunk size=16 ,O_NONBLOCK size=2048
put data in redis [IPMI:SEL2Redfish:Queue]
utils.sub_process_nonblocking_unique("extensions/ipmi/subagents/
sel2redfish_handler.lua
")
/gami_manager_module-6.353.0.0.0-src/data/RTP_1_5/extensions/ipmi/subagents/bios2redfish.lua
classify and put in redis
/sel2redfish_handler.lua
ipmi2redfish
Check access permissions /var/pipe/rf_ipmi_cmds then make FIFO pipe
use ffi.C read chunk data and. give chunk size=16 ,O_NONBLOCK size=2048
put data in redis [IPMI:IPMI2Redfish:Queue]
utils.sub_process_nonblocking_unique("extensions/ipmi/subagents/
ipmi2redfish_handler.lua
")
Reading file and running IPMI commands which sync-agent missing
/tmp/sync_agent_cache
utils.sub_process_nonblocking_unique("extensions/ipmi/subagents/
sel2redfish_handler.lua
")
/subagents/ipmi2redfish.lua
classify and put in redis
./ipmi2redfish_handler.lua
utils.sub_process_nonblocking_unique("extensions/ipmi/subagents/
ipmi2redfish_handler.lua
")
/sync_agent-6.104.0.0.0-src/data/app/RTP_1_5/utils.lua
/gami_bmc_update_module-6.45.0.0.0-src/data/RTP_1_5/extensions/update_service/agent.lua
prepare upload image space
update-free-memory-size-2-map.lua
/gami_dynamic_extension-6.16.0.0.0-src/data/RTP_1_5/oem/dre/agent.lua
Modify redis value then /etc/init.d/sync-agent restart
"Redfish:DynamicExtension:LogServices:ErrorLog"
db:del("Dynamic:GamiExtensions:" .. instance_name .. ":DirectoryName")
redfish-2-redfishgroup.lua
redfish_intermediate_map.lua
redfishgroup-2-fns.lua
init-agent.lua
execute init-agen.lua in all "oem" & "extensions" folder
-- Finds and requires all "init-agent.lua" files in the extensions directories, causing them all to be executed
utils.get_modules("extensions", "init-agent")
-- Finds and requires all "init-agent.lua" files in the OEM directories, causing them all to be executed
utils.get_modules("oem", "init-agent")
/sync_agent-6.104.0.0.0-src/data/app/RTP_1_5/subagents/init-agent.lua
PASS
db:set("Redfish:InitAgent:IsInit", "true")
Fail
db:set("Redfish:InitAgent:IsInit", "false")
extensions ---- init-agent
local telemetry = require("init-telemetry")
local ipmi_sync = require("ipmi-sync-helpers")
/gami_manager_module-6.353.0.0.0-src/data/RTP_1_5/extensions/metrics/init-agent.lua
local host_interface = require("init-hostinterface")
local init_scripts_manager = require("init_scripts_manager")
/gami_hostinterface_module-6.82.0.0.0-src/data/RTP_1_5/extensions/host-interface/init-agent.lua
pl:set("Redfish:Managers:" .. env.ManagerSelf .. ":HostInterfaces:" .. env.ManagerSelf .. ":InterFaceName", usb_eth_name)
pl:set("Redfish:Managers:" .. env.ManagerSelf .. ":EthernetInterfaces:" .. usb_eth_name .. ":MACAddress", HWaddr)
pl:hset("Redfish:Managers:" .. env.ManagerSelf .. ":EthernetInterfaces:" .. usb_eth_name .. ":IPv4Addresses", "1:Address", ipaddr)
pl:hset("Redfish:Managers:" .. env.ManagerSelf .. ":EthernetInterfaces:" .. usb_eth_name .. ":IPv4Addresses", "1:SubnetMask", Mask)
local sel = require("init-sel")
local log_service = require("init-log-service")
local network = require("init-network")
local serial = require("init-serial")
local inventory = require("init-inventory")
local service = require("init-service")
local boot = require("init-boot")
local general = require("init-general")
local chassis_power = require("init-chassis-power")
local pam = require("init-pam")
local init_scripts_manager = require("init_scripts_manager")
/gami_manager_module-6.353.0.0.0-src/data/RTP_1_5/extensions/ipmi/init-agent.lua
local update_service = require("init-updateservice")
local init_scripts_manager = require("init_scripts_manager")
/gami_bmc_update_module-6.45.0.0.0-src/data/RTP_1_5/extensions/update_service/init-agent.lua
OEM ---- init-agent
local dynamic_utils = require("dynamic-utils")
/gami_dynamic_extension-6.16.0.0.0-src/data/RTP_1_5/oem/dre/init-agent.lua
telemetry.lua
restart
:explode:int main
/ipmimain-6.62.0.0.0-src/data/IPMI_Main.c
Check IPMI_START_SYNC_Q is open success
IPMI_daemonize()
Check CoreFeature function is enable and get each CoreMacros define value or string
RetrieveCoreFeatures
RetrieveCoreMacros
init and prepare Flashing relative thing
InitYafuVar
init common functions
m_CommonInitFnTbl
Load /conf/BMC.conf function and account numbers
GetBMCConfInfo
get the IPMI Configurations data
InitIPMIConfig
All set not use
ICMBCh
SMBUSCh
RMCPLAN1Ch
RMCPLAN2Ch
RMCPLAN3Ch
RMCPLAN4Ch
SERIALch
SMMCh
PrimaryIPMBCh
SecondaryIPMBCh
SecondaryIPMBCh
Create each queue
OS_CREATE_Q (
PEND_TASK_Q
, Q_SIZE, BMCInst);
OS_GET_Q(PEND_TASK_Q, O_RDWR, BMCInst);
define MSG_HNDLR_Q MSG_PIPES_PATH "MsgHndlrQ"
define EVT_MSG_Q MSG_PIPES_PATH "EvtMsgQ"
define PDK_API_Q MSG_PIPES_PATH "PDKAPIQ"
define SM_HNDLR_Q MSG_PIPES_PATH "SM_Hndlr_Q"
define PEND_TASK_Q MSG_PIPES_PATH "PendTaskQ"
define PEF_TASK_Q MSG_PIPES_PATH "PEFTaskQ"
define PEF_RES_Q MSG_PIPES_PATH "PEFResQ"
Initializing IPMI Configurations
m_BMCInitFnTbl{
InitPDKPARHooks,
InitPMConfig,
InitBMCSharedMem}
2 more items...
int InitIPMIConfig
/ipmimain-6.62.0.0.0-src/data/IPMIConf.c
Get default config from /etc/defconfig/BMC/ast2500evb/IPMI.conf and get config file in /conf/BMC/IPMI.conf
GetDefaultConfFile
GetIPMIConfFile
Including all AMI OEM IPMI command with GetLibMetaInfo call all GetLibMetaInfo function from /usr/local/lib/ipmi/ directory
:large_blue_circle:ex: KCSIfcTas= load KCS driver
GetLibraryMetaData
2 more items...
PRIMARY_IPMB_ADDR=32 #Primary ipmb Address
SECONDARY_IPMB_ADDR=34 #Secondary ipmb Address
THIRD_IPMB_ADDR=36 #Third ipmb Address
SERIAL_IFC_PORT=/dev/ttyS0 #Serial Interface Port details
SUPPORT_SERIAL_IFC=1 #Enables Serial Interface Support
SUPPORT_LAN_IFC=1 #Enables Lan Interface Support
SUPPORT_UDS_IFC=1 #Enables UDS Interface Support
SUPPORT_KCS1_IFC=1 #Enables KCS1 Interface Support
SUPPORT_KCS2_IFC=1 #Enables KCS2 Interface Support
SUPPORT_KCS3_IFC=1 #Enables KCS2 Interface Support
SUPPORT_SMBUS_IFC=1 #Enables SMBUS Interface Support
SUPPORT_ICMB_IFC=0 #Enables ICMB Interface Support
SECONDARY_IPMB_SUPPORT=1 #Enables Secondary IPMB Support
SUPPORT_USB_IFC=1 #Enables USB Interface Support
/oemcfg-1.0.0.0.0-src/data/project/teakplus/libipmipar_ast2500evb-6.10.0.0.0-ARM-AST2500-EthanolX-AMI-src/IPMI.conf
int GetBMCConfInfo{
ret=snprintf(
pBMCInfo
->par_path,sizeof(pBMCInfo->par_path),"%s", str);}
/libipmistack-6.47.0.0.0-src/data/BMCInfo.c
typedef struct{
INT8U RMCPLAN1Ch ;
INT8U RMCPLAN2Ch ;
INT8U ICMBCh ;
INT8U SMBUSCh ;
INT8U SERIALch ;
INT8U BridgeMsgKCSIfc;
}BMCInfo_t
/ipmi_dev-6.74.0.0.0-src/data/IPMIConf.h
InitMultiplePlatform
InitPDKHooks
InitPDKCIMEventHandler
Platform_Init
InitRedfishHooks
void RetrieveCoreFeatures(
CoreFeatures_T
*g_corefeatures){
g_corefeatures->dynamic_kcs_lan_support = IsFeatureEnabled("CONFIG_SPX_FEATURE_DYNAMIC_KCS_LAN_ENABLE_DISABLE_SUPPORT");
g_corefeatures->ethernet_over_usb_support = IsFeatureEnabled("CONFIG_SPX_FEATURE_ETHERNET_OVER_USB");
g_corefeatures->ipmi_over_usb_support = IsFeatureEnabled("CONFIG_SPX_FEATURE_IPMI_OVER_USB");
g_corefeatures->redfish_support = IsFeatureEnabled("
CONFIG_SPX_FEATURE_REDFISH_ENABLED
");
g_corefeatures->hhm_smbios_support = IsFeatureEnabled("
CONFIG_SPX_FEATURE_HHM_SMBIOS
")
g_corefeatures->hhm_hostinterface_support = IsFeatureEnabled("
CONFIG_SPX_FEATURE_HHM_HOSTINTERFACE
")}
void RetrieveCoreMacros(
CoreMacros_T
g_coremacros,CoreFeatures_T
g_corefeatures){
g_coremacros->kcs_res_timeout = GetMacrodefine_getint("CONFIG_SPX_FEATURE_KCS_CHANNEL_RESP_TIMEOUT_SECS",0);
g_coremacros->ipmi_thread_monitor_timeout = GetMacrodefine_getint("CONFIG_SPX_FEATURE_IPMI_THREAD_MONITOR_TIMEOUT", 60);}
/libfeaturedefine-6.12.0.0.0-src/data/featuredef.c
g_RESTInterface_CmdHndlr
/libipmiamioemrestiface-6.17.0.0.0-src/data/RESTInterface.c
ExCmdHndlrMap_T
/libipmiamioemrestiface-6.17.0.0.0-src/data/RESTInterfaceMetaInfo.c
/ipmimain-6.62.0.0.0-src/data/IPMIConf.c
if(g_corefeatures.redfish_support == ENABLED)
if (-1 == mkfifo (REDFISH_REQ_Q , 0777) && (errno != EEXIST))
Write back IPMI pipes
/libipmiamioemrestiface-6.17.0.0.0-src/data/RESTInterfaceMetaInfo.c
/libipmiamioemrestiface-6.17.0.0.0-src/data/RESTInterfaceMetaInfo.c