All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Jones <proclivis@gmail.com>
To: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Server Power On mystery
Date: Fri, 21 Aug 2020 16:27:54 -0600	[thread overview]
Message-ID: <9DB3C10D-AC72-4508-879A-1E15BB9E4E69@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5389 bytes --]

Hi,

I am trying to understand how the Server power button in the webui works.

As before, using raspberry pi, and I’ll leave project links at the end for anyone that wants to use them. Things work up to monitoring voltages. Note the conf project has a phosphor branch for the full monty.

To reverse engineer, I setup: dbus-monitor —system > someFile.log

There is a message for systemd1.Manager; member=StartUnit and best I can tell, somehow this gets routed to systemd to start some service or run some exe. I see this mentioned in the dbus transactions:

"obmc-host-start@0.target <mailto:obmc-host-start@0.target>”

And that is in /lib/systemd/system and depends on obmc-host-startmin@0.target, but that does not depend on any service. So that is a dead end. It also depends on a reboot attempts, but I think that is not responsible for power on/off.

Then there are chassis services, but I cannot find a link from obmc-host-start@0.target to objc-chassis-poweron@0.target.

In this doc: https://github.com/openbmc/docs/blob/master/architecture/openbmc-systemd.md <https://github.com/openbmc/docs/blob/master/architecture/openbmc-systemd.md>

It shows:


ls -1 /lib/systemd/system/obmc-chassis-poweron\@0.target.requires/
op-power-start@0.service
op-wait-power-on@0.service

But when I “ls” that path, the above dependencies are not there. There is only a dependency on phosphor-fan-presence-tach@0.service <mailto:phosphor-fan-presence-tach@0.service>

There is some state service that lead to things with xzy paths, and I eventually found /run/systemd/units. These have file names starting with “invocation” in the names and link to GUID like nodes that don’t “cat” like a normal file. So I am not sure how those work. Is there some kernel driver that works like sysfs so that these nodes are not traditional files?

What I am trying to understand is two things:

- Interaction with the power regulator
- Interaction with the host cpu

So my hope is someone can connect the dots of the path from the dbus to systemd through the targets to a service executable doing the work so I can try to replace them with:

- Something that turns the regulators on/off, with pmbus in this case.
- Something that can behave like a host to keep the system happy like a real system.

Mike

My repos
——————

https://github.com/Proclivis/meta-pmbus-raspberrypi.git <https://github.com/Proclivis/meta-pmbus-raspberrypi.git>
https://github.com/Proclivis/meta-pmbus-phosphor.git <https://github.com/Proclivis/meta-pmbus-phosphor.git>
https://github.com/Proclivis/conf-openbmc-adi.git <https://github.com/Proclivis/conf-openbmc-adi.git>

The monitor messages for StartUnit
———

method call time=1598039669.247458 sender=:1.48 -> destination=org.freedesktop.systemd1 serial=33 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=StartUnit
   string "obmc-host-start@0.target <mailto:obmc-host-start@0.target>"
   string "replace"
method call time=1598039669.276170 sender=:1.3 -> destination=org.freedesktop.DBus serial=775 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetConnectionUnixUser
   string ":1.48"
method return time=1598039669.276234 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 reply_serial=775
   uint32 0
method call time=1598039669.280376 sender=:1.3 -> destination=org.freedesktop.DBus serial=776 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0=':1.48'"
method return time=1598039669.280661 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 reply_serial=776
method call time=1598039669.280701 sender=:1.3 -> destination=org.freedesktop.DBus serial=777 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string ":1.48"
method return time=1598039669.280738 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 reply_serial=777
   string ":1.48"
signal time=1598039669.280774 sender=:1.3 -> destination=(null destination) serial=778 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitNew
   string "obmc-host-start@0.target <mailto:obmc-host-start@0.target>"
   object path "/org/freedesktop/systemd1/unit/obmc_2dhost_2dstart_400_2etarget"
signal time=1598039669.280823 sender=:1.3 -> destination=(null destination) serial=779 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=JobNew
   uint32 1105
   object path "/org/freedesktop/systemd1/job/1105"
   string "obmc-host-start@0.target <mailto:obmc-host-start@0.target>"
method return time=1598039669.280883 sender=:1.3 -> destination=:1.48 serial=780 reply_serial=33
   object path "/org/freedesktop/systemd1/job/1105"
signal time=1598039669.281305 sender=:1.48 -> destination=(null destination) serial=34 path=/xyz/openbmc_project/state/host0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "xyz.openbmc_project.State.Host"
   array [
      dict entry(
         string "RequestedHostTransition"
         variant             string "xyz.openbmc_project.State.Host.Transition.On"
      )
   ]
   array [
   ]

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

             reply	other threads:[~2020-08-21 22:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF0D96B592.C63EA11D-ON002585CE.0011F8B0-002585CE.0012716F@LocalDomain>
2020-08-21 22:27 ` Mike Jones [this message]
2020-08-24  3:21   ` Server Power On mystery Milton Miller II
2020-08-24  3:22   ` Milton Miller II
2020-08-24 18:28     ` Mike Jones
2020-08-24 18:41   ` Ed Tanous
2020-08-24 19:11     ` Mike
2020-08-24 19:36       ` Mike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9DB3C10D-AC72-4508-879A-1E15BB9E4E69@gmail.com \
    --to=proclivis@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.