From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=us.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=miltonm@us.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=us.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=J46U+Z3B; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BZcq15mpyzDqHr for ; Mon, 24 Aug 2020 13:21:33 +1000 (AEST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07O3D7QK158564 for ; Sun, 23 Aug 2020 23:21:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=in-reply-to : from : to : cc : date : mime-version : references : content-transfer-encoding : content-type : message-id : subject; s=pp1; bh=ngvnNaWjWuyBfQKhsKCn70rNlYGsIFaP7TgcfLrwN4o=; b=J46U+Z3BBEj0mr/EGzrOKipa6WYoF9rm3tiIrZgWDhbRhr4s/bSS2Rn/Rz624UKET+WH zistToec4KKTxmuVRSv9tQ8UcLeZxePapD7AXPzxq2UtN6N6vpFcyQ8a2Ug+uG8oy217 cDfxCfE+vmGYb2C2G2OmDOilBCBOEDHbfMCWFtQ1qv9c71vLS51Buzr9AMbIZPug4d+x ISLkqQyOS2ZrJQk6KkECF1Z0xrYp+WafT4OMwlM4TjR8zEI63QQpU7l1ZCd+/pcrUtr2 BS47v64y5QxoFopbrLolr2HLZcvdQp4m1Z50ekSH6TaKfUyc1Xzxd7ATgLXnDBkX8V68 8Q== Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [158.85.210.119]) by mx0b-001b2d01.pphosted.com with ESMTP id 3345epg4n3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 23 Aug 2020 23:21:30 -0400 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Mon, 24 Aug 2020 03:21:29 -0000 Received: from us1b3-smtp07.a3dr.sjc01.isc4sb.com (10.122.203.198) by smtp.notes.na.collabserv.com (10.122.182.123) with smtp.notes.na.collabserv.com ESMTP; Mon, 24 Aug 2020 03:21:28 -0000 Received: from us1b3-mail228.a3dr.sjc03.isc4sb.com ([10.168.214.55]) by us1b3-smtp07.a3dr.sjc01.isc4sb.com with ESMTP id 2020082403212747-530728 ; Mon, 24 Aug 2020 03:21:27 +0000 In-Reply-To: <9DB3C10D-AC72-4508-879A-1E15BB9E4E69@gmail.com> From: "Milton Miller II" To: Mike Jones Cc: OpenBMC Maillist Date: Mon, 24 Aug 2020 03:21:26 +0000 MIME-Version: 1.0 Sensitivity: Importance: Normal X-Priority: 3 (Normal) References: <9DB3C10D-AC72-4508-879A-1E15BB9E4E69@gmail.com> X-Mailer: IBM iNotes ($HaikuForm 1054.1) | IBM Domino Build SCN1812108_20180501T0841_FP65 April 15, 2020 at 09:48 X-LLNOutbound: False X-Disclaimed: 16631 X-TNEFEvaluated: 1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 x-cbid: 20082403-3975-0000-0000-000002C42CFA X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.371236; ST=0; TS=0; UL=0; ISC=; MB=0.456565 X-IBM-SpamModules-Versions: BY=3.00013704; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000295; SDB=6.01424488; UDB=6.00764527; IPR=6.01207216; MB=3.00033671; MTD=3.00000008; XFM=3.00000015; UTC=2020-08-24 03:21:28 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2020-08-24 01:51:51 - 6.00011758 x-cbparentid: 20082403-3976-0000-0000-000040052F04 Message-Id: Subject: Re: Server Power On mystery X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-24_01:2020-08-21, 2020-08-24 signatures=0 X-Proofpoint-Spam-Reason: orgsafe X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 03:21:35 -0000
On August 21, 2020, Mike Jones wrote:
>I am trying to u= nderstand how the Server power button in the webui
>works.
>>As before, using raspberry pi, and I=E2=80=99ll leave project links at= the
>end for anyone that wants to use them. Things work up to monito= ring
>voltages. Note the conf project has a phosphor branch for the f= ull
>monty.>>To reverse engineer, I setup: dbus-monitor =E2=80= =94system > someFile.log
>
>There is a message for systemd1.= Manager; member=3DStartUnit and best I
>can tell, somehow this gets r= outed to systemd to start some service
>or run some exe. I see this m= entioned in the dbus transactions:
>
>"obmc-host-start@0.target=E2=80= =9D
>
>And that is in /lib/systemd/system and depends
>on=  ob= mc-host-startmin@0.target, but that does not depend on any
>servi= ce. So that is a dead end. It also depends on a reboot attempts,
&g= t;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<= /a>
>-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 =E2=80=9Cls=E2=80=9D t= hat path, the above dependencies are not there.
>There is only a depe= ndency on phosphor-fan-presence-tach@0.service
>
>There is= some state service that lead to things with xzy paths, and I
>eventu= ally found /run/systemd/units. These have file names starting
>with = =E2=80=9Cinvocation=E2=80=9D in the names and link to GUID like nodes that = don=E2=80=99t
>=E2=80=9Ccat=E2=80=9D like a normal file. So I am not = sure how those work. Is there
>some kernel driver that works like sys= fs so that these nodes are not
>traditional files?
>
>Wha= t I am trying to understand is two things:
>
>- Interaction wit= h the power regulator
>- Interaction with the host cpu
>
>= ;So my hope is someone can connect the dots of the path from the dbus
&g= t;to systemd through the targets to a service executable doing the work
= >so I can try to replace them with:
>
>- Something that turn= s the regulators on/off, with pmbus in this
>case.
>- Something= that can behave like a host to keep the system happy like
>a real sy= stem.



Hi.&nb= sp; There is some design documentation here

https://github.com/openbmc/d= ocs/blob/master/designs/state-management-and-external-interfaces.md

and that links to phosphor-state-manager which has a = lot of the units
that kick off power and state transitions.<= /div>


The op-power-start are for systems = following the OpenPOWER reference
designs.  The regulat= ors are sequenced by an external microcontroller
based on th= e state of a POWER=5FON gpio from the BMC and a return
PGOOD= to indicate the state.  There are also other op- prefixed units that =
initiate the host processor initialization (after the units = check that fans are
running as you found). 
<= /div>

There is also a watchdog that is started when the = host is started and
pinged and stopped via IPMI.
<= br>
If you are prototyping for a x86 system, there are alternativ= e
power implementations where the gpio toggles to represent = a
main power button push and their start cpu sequences. = ; I think
there are also arm systems but don't know what the= y are using
for host interaction.

I= hope this advances your investigation and learning.

milton

>
>Mike
>
= >My repos
>=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94<= br>>
>https://github.com/Proclivis/meta-pmbus-raspber= rypi.git
>https://github.com/Proclivis/meta-pmbus-phosp= hor.git
>https://github.com/Proclivis/conf-openbmc-adi.git=
>
>The monitor messages for StartUnit
>=E2=80=94=E2= =80=94=E2=80=94
>
>method call time=3D1598039669.247458 sender= =3D:1.48 ->
>destination=3Dorg.freedesktop.systemd1 serial=3D33>path=3D/org/freedesktop/systemd1;
>interface=3Dorg.freedesktop.s= ystemd1.Manager; member=3DStartUnit
>   string "obmc-host-start@0.targ= et"
>   string "replace"
>method call time=3D1598= 039669.276170 sender=3D:1.3 ->
>destination=3Dorg.freedesktop.DBus= serial=3D775
>path=3D/org/freedesktop/DBus; interface=3Dorg.freedesk= top.DBus;
>member=3DGetConnectionUnixUser
>   string = ":1.48"
>method return time=3D1598039669.276234 sender=3Dorg.freedesk= top.DBus ->
>destination=3D:1.3 serial=3D4294967295 reply=5Fserial= =3D775
>   uint32 0
>method call time=3D1598039669.28= 0376 sender=3D:1.3 ->
>destination=3Dorg.freedesktop.DBus serial= =3D776
>path=3D/org/freedesktop/DBus; interface=3Dorg.freedesktop.DBu= s;
>member=3DAddMatch
>   string
>"type=3D'sign= al',sender=3D'org.freedesktop.DBus',path=3D'/org/freedesktop/D
>Bus',= interface=3D'org.freedesktop.DBus',member=3D'NameOwnerChanged',arg0=3D
&= gt;':1.48'"
>method return time=3D1598039669.280661 sender=3Dorg.free= desktop.DBus ->
>destination=3D:1.3 serial=3D4294967295 reply=5Fse= rial=3D776
>method call time=3D1598039669.280701 sender=3D:1.3 -><= br>>destination=3Dorg.freedesktop.DBus serial=3D777
>path=3D/org/f= reedesktop/DBus; interface=3Dorg.freedesktop.DBus;
>member=3DGetNameO= wner
>   string ":1.48"
>method return time=3D1598039= 669.280738 sender=3Dorg.freedesktop.DBus ->
>destination=3D:1.3 se= rial=3D4294967295 reply=5Fserial=3D777
>   string ":1.48">signal time=3D1598039669.280774 sender=3D:1.3 -> destination=3D(nu= ll
>destination) serial=3D778 path=3D/org/freedesktop/systemd1;
&g= t;interface=3Dorg.freedesktop.systemd1.Manager; member=3DUnitNew
>&nb= sp;  string "obmc-host-start@0.target"
>   object path
>= ;"/org/freedesktop/systemd1/unit/obmc=5F2dhost=5F2dstart=5F400=5F2etarget"<= br>>signal time=3D1598039669.280823 sender=3D:1.3 -> destination=3D(n= ull
>destination) serial=3D779 path=3D/org/freedesktop/systemd1;
&= gt;interface=3Dorg.freedesktop.systemd1.Manager; member=3DJobNew
>&nb= sp;  uint32 1105
>   object path "/org/freedesktop/sys= temd1/job/1105"
>   string "obmc-host-start@0.target"
>metho= d return time=3D1598039669.280883 sender=3D:1.3 -> destination=3D:1.48>serial=3D780 reply=5Fserial=3D33
>   object path "/or= g/freedesktop/systemd1/job/1105"
>signal time=3D1598039669.281305 sen= der=3D:1.48 -> destination=3D(null
>destination) serial=3D34 path= =3D/xyz/openbmc=5Fproject/state/host0;
>interface=3Dorg.freedesktop.D= Bus.Properties; member=3DPropertiesChanged
>   string "xyz.= openbmc=5Fproject.State.Host"
>   array [
> &nbs= p;    dict entry(
>      = ;   string "RequestedHostTransition"
>   &nb= sp;     variant      &nbs= p;      string
>"xyz.openbmc=5Fproject.State= .Host.Transition.On"
>      )
> &= nbsp; ]
>   array [
>   ]