how softpoweroff works for openbmc

南野ムルシエラゴ 1181052146 at qq.com
Fri Feb 14 02:17:32 AEDT 2020


Greetings:
I am learning how power control works in openbmc system. It comes to poweroff sequence. I found that for poweroff there are "poweroff" and "softpoweroff".
1. for "poweroff", I found the call path:
ipmiChassisControl()             //phosphor-host-ipmid
initiate_state_transition()
...
d-bus
...
requestedHostTransition()   //phosphor-state-manager
...
dbus
...
on_set_power_state()            //skeleton
and finally write some gpio pin to power down.
2. for "softpoweroff", I found the call path:
ipmiChassisControl()             //phosphor-host-ipmid
stop_soft_off_timer()
sendHostShutDownCmd()
ipmid_send_cmd_to_host()
checkQueueAndAlertHost()
...
d-bus(setAttention)
...
method_send_sms_atn()      //btbridge
and finally send some message to host via BT, or in case of KCS via KCS.
My question is: 
1. In case of softpoweroff I found in code that the openbmc system just send setAttention to host and return? Does that mean letting the host system to powerdown and openbmc system does not write any power related gpio anymore?
2. If host system can handle the softpoweroff request sent by openbmc, How can host system handle it? I know there is a module called ipmi_si.ko which may communicate with openbmc. But I do not find and code in ipmi_si related with softpoweroff, or any other module in host system to control softpoweroff?
3. I am a learner of openbmc, I know there must be errors in my mail.
Can anyone help tell me?

Best Regards!
Liu Hongwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200213/3ff372db/attachment-0001.htm>


More information about the openbmc mailing list