<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Milton,<div class=""><br class=""></div><div class="">This is giving me a good start and I am digging through the docs.</div><div class=""><br class=""></div><div class="">I want to test my concepts, so for each of these, I’ll write what I think is true and you can tell me where I am wrong, and put a question where I am not sure.</div><div class=""><br class=""></div><div class="">- BMC power is assumed to be independent from BMC power</div><div class="">- Enabling chassis power can interact with a HotSwap device or power path switching device, or an IBC, etc, to power on/off everything in the chassis but the BMC</div><div class="">- When the Host is off, does this imply it has no power, or that the host is in an idle state and not running but has power applied?</div><div class="">- For the above question, I assume most systems are VRM based</div><div class="">- What about auxiliary supplies? Suppose a design has an FPGA or DSP independent from the host. Are these expected to follow chassis or host power? In non-CPU systems, the poweron of an FPGA and other support chips can have a complicated sequence. Is that handled in an integrated fashion with the VRM or independently?</div><div class=""><br class=""></div><div class="">Mike<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 23, 2020, at 9:22 PM, Milton Miller II <<a href="mailto:miltonm@us.ibm.com" class="">miltonm@us.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Resend as plain text.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On August 21, 2020, Mike Jones wrote:>I am trying to understand how<br class="">the Server power button in the webui<br class=""><blockquote type="cite" class="">works.<br class=""><br class="">As before, using raspberry pi, and I’ll leave project links at the<br class="">end for anyone that wants to use them. Things work up to monitoring<br class="">voltages. Note the conf project has a phosphor branch for the full<br class="">monty.>>To reverse engineer, I setup: dbus-monitor —system ><br class=""></blockquote>someFile.log<br class=""><blockquote type="cite" class=""><br class="">There is a message for systemd1.Manager; member=StartUnit and best I<br class="">can tell, somehow this gets routed to systemd to start some service<br class="">or run some exe. I see this mentioned in the dbus transactions:<br class=""><br class="">"<a href="mailto:obmc-host-start@0.target" class="">obmc-host-start@0.target</a>”<br class=""><br class="">And that is in /lib/systemd/system and depends<br class="">on <a href="mailto:obmc-host-startmin@0.target" class="">obmc-host-startmin@0.target</a>, but that does not depend on any<br class="">service. So that is a dead end. It also depends on a reboot<br class=""></blockquote>attempts,<br class=""><blockquote type="cite" class="">but I think that is not responsible for power on/off.<br class=""><br class="">Then there are chassis services, but I cannot find a link from<br class=""><a href="mailto:obmc-host-start@0.target" class="">obmc-host-start@0.target</a> to <a href="mailto:objc-chassis-poweron@0.target" class="">objc-chassis-poweron@0.target</a>.<br class=""></blockquote><br class=""><br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">In this<br class=""></blockquote>doc: <a href="https://github.com/openbmc/docs/blob/master/architecture/openbm" class="">https://github.com/openbmc/docs/blob/master/architecture/openbm</a><br class=""></blockquote>c<br class=""><blockquote type="cite" class="">-systemd.md<br class=""><br class="">It shows:<br class=""><br class=""><br class="">ls -1 /lib/systemd/system/obmc-chassis-poweron\@0.target.requires/<br class=""><a href="mailto:op-power-start@0.service" class="">op-power-start@0.service</a> <a href="mailto:op-wait-power-on@0.service" class="">op-wait-power-on@0.service</a>>>But when I “ls”<br class=""></blockquote>that path, the above dependencies are not there.<br class=""><blockquote type="cite" class="">There is only a dependency on <a href="mailto:phosphor-fan-presence-tach@0.service" class="">phosphor-fan-presence-tach@0.service</a><br class=""><br class="">There is some state service that lead to things with xzy paths, and<br class=""></blockquote>I<br class=""><blockquote type="cite" class="">eventually found /run/systemd/units. These have file names starting<br class="">with “invocation” in the names and link to GUID like nodes that<br class=""></blockquote>don’t<br class=""><blockquote type="cite" class="">“cat” like a normal file. So I am not sure how those work. Is there<br class="">some kernel driver that works like sysfs so that these nodes are not<br class="">traditional files?<br class=""><br class="">What I am trying to understand is two things:<br class=""><br class="">- Interaction with the power regulator<br class="">- Interaction with the host cpu<br class=""><br class="">So my hope is someone can connect the dots of the path from the dbus<br class="">to systemd through the targets to a service executable doing the<br class=""></blockquote>work<br class=""><blockquote type="cite" class="">so I can try to replace them with:<br class=""><br class="">- Something that turns the regulators on/off, with pmbus in this<br class="">case.<br class="">- Something that can behave like a host to keep the system happy<br class=""></blockquote>like<br class=""><blockquote type="cite" class="">a real system.<br class=""></blockquote><br class=""><br class=""><br class="">Hi.  There is some design documentation here<br class=""><br class=""><a href="https://github.com/openbmc/docs/blob/master/designs/state-management-" class="">https://github.com/openbmc/docs/blob/master/designs/state-management-</a><br class="">and-external-interfaces.md<br class=""><br class="">and that links to phosphor-state-manager which has a lot of the units<br class=""><br class="">that kick off power and state transitions.<br class=""><br class=""><br class="">The op-power-start are for systems following the OpenPOWER reference<span class="Apple-converted-space"> </span><br class="">designs.  The regulators are sequenced by an external microcontroller<br class=""><br class="">based on the state of a POWER_ON gpio from the BMC and a return<span class="Apple-converted-space"> </span><br class="">PGOOD to indicate the state.  There are also other op- prefixed units<br class="">that<span class="Apple-converted-space"> </span><br class="">initiate the host processor initialization (after the units check<br class="">that fans are<span class="Apple-converted-space"> </span><br class="">running as you found).  <br class=""><br class="">There is also a watchdog that is started when the host is started and<br class=""><br class="">pinged and stopped via IPMI.<br class=""><br class="">If you are prototyping for a x86 system, there are alternative<span class="Apple-converted-space"> </span><br class="">power implementations where the gpio toggles to represent a<span class="Apple-converted-space"> </span><br class="">main power button push and their start cpu sequences.  I think<span class="Apple-converted-space"> </span><br class="">there are also arm systems but don't know what they are using<span class="Apple-converted-space"> </span><br class="">for host interaction.<br class=""><br class="">I hope this advances your investigation and learning.<br class=""><br class="">milton<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">Mike<br class=""></blockquote><br class="">My repos<br class="">——————<br class=""><br class=""><a href="https://github.com/Proclivis/meta-pmbus-raspberrypi.git" class="">https://github.com/Proclivis/meta-pmbus-raspberrypi.git</a><br class="">https://github.com/Proclivis/meta-pmbus-phosphor.git<br class="">https://github.com/Proclivis/conf-openbmc-adi.git<br class=""><br class="">The monitor messages for StartUnit<br class="">———<br class=""><br class="">method call time=1598039669.247458 sender=:1.48 -><br class="">destination=org.freedesktop.systemd1 serial=33<br class="">path=/org/freedesktop/systemd1;<br class="">interface=org.freedesktop.systemd1.Manager; member=StartUnit<br class=""> string "obmc-host-start@0.target"<br class=""> string "replace"<br class="">method call time=1598039669.276170 sender=:1.3 -><br class="">destination=org.freedesktop.DBus serial=775<br class="">path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;<br class="">member=GetConnectionUnixUser<br class=""> string ":1.48"<br class="">method return time=1598039669.276234 sender=org.freedesktop.DBus -><br class="">destination=:1.3 serial=4294967295 reply_serial=775<br class=""> uint32 0<br class="">method call time=1598039669.280376 sender=:1.3 -><br class="">destination=org.freedesktop.DBus serial=776<br class="">path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;<br class="">member=AddMatch<br class=""> string<br class="">"type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/<br class=""></blockquote>D<br class=""><blockquote type="cite" class="">Bus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0<br class=""></blockquote>=<br class=""><blockquote type="cite" class="">':1.48'"<br class="">method return time=1598039669.280661 sender=org.freedesktop.DBus -><br class="">destination=:1.3 serial=4294967295 reply_serial=776<br class="">method call time=1598039669.280701 sender=:1.3 -><br class="">destination=org.freedesktop.DBus serial=777<br class="">path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;<br class="">member=GetNameOwner<br class=""> string ":1.48"<br class="">method return time=1598039669.280738 sender=org.freedesktop.DBus -><br class="">destination=:1.3 serial=4294967295 reply_serial=777<br class=""> string ":1.48"<br class="">signal time=1598039669.280774 sender=:1.3 -> destination=(null<br class="">destination) serial=778 path=/org/freedesktop/systemd1;<br class="">interface=org.freedesktop.systemd1.Manager; member=UnitNew<br class=""> string "<a href="mailto:obmc-host-start@0.target" class="">obmc-host-start@0.target</a>"<br class=""> object path<br class="">"/org/freedesktop/systemd1/unit/obmc_2dhost_2dstart_400_2etarget"<br class="">signal time=1598039669.280823 sender=:1.3 -> destination=(null<br class="">destination) serial=779 path=/org/freedesktop/systemd1;<br class="">interface=org.freedesktop.systemd1.Manager; member=JobNew<br class=""> uint32 1105<br class=""> object path "/org/freedesktop/systemd1/job/1105"<br class=""> string "<a href="mailto:obmc-host-start@0.target" class="">obmc-host-start@0.target</a>"<br class="">method return time=1598039669.280883 sender=:1.3 -><br class=""></blockquote>destination=:1.48<br class=""><blockquote type="cite" class="">serial=780 reply_serial=33<br class=""> object path "/org/freedesktop/systemd1/job/1105"<br class="">signal time=1598039669.281305 sender=:1.48 -> destination=(null<br class="">destination) serial=34 path=/xyz/openbmc_project/state/host0;<br class="">interface=org.freedesktop.DBus.Properties; member=PropertiesChanged<br class=""> string "xyz.openbmc_project.State.Host"<br class=""> array [<br class="">    dict entry(<br class="">       string "RequestedHostTransition"<br class="">       variant             string<br class="">"xyz.openbmc_project.State.Host.Transition.On"<br class="">    )<br class=""> ]<br class=""> array [<br class=""> ]</blockquote></blockquote></div></blockquote></div><br class=""></div></body></html>