All of lore.kernel.org
 help / color / mirror / Atom feed
* how softpoweroff works for openbmc
@ 2020-02-13 15:17 =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
  2020-02-14  2:40 ` Lei YU
  0 siblings, 1 reply; 3+ messages in thread
From: =?gb18030?B?xM/SsKXgpeult6WopemltA==?= @ 2020-02-13 15:17 UTC (permalink / raw)
  To: =?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1499 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1777 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-14  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 15:17 how softpoweroff works for openbmc =?gb18030?B?xM/SsKXgpeult6WopemltA==?=
2020-02-14  2:40 ` Lei YU
2020-02-14  8:06   ` =?gb18030?B?u9i4tKO6IGhvdyBzb2Z0cG93ZXJvZmYgd29ya3MgZm9yIG9wZW5ibWM=?= =?gb18030?B?xM/SsKXgpeult6WopemltA==?=

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.