Lines Matching +full:bus +full:- +full:power
7 #include "xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp"
10 #include <systemd/sd-bus.h>
12 #include <phosphor-logging/elog-errors.hpp>
13 #include <phosphor-logging/lg2.hpp>
36 using namespace sdbusplus::server::xyz::openbmc_project::control::power;
55 while ((arg = getopt_long(argc, argv, "h:", longOpts, &optIndex)) != -1) in main()
72 auto bus = sdbusplus::bus::new_default(); in main() local
75 HostObjects settings(bus, hostId); in main()
80 // This application is only run if chassis power is off in main()
83 // implement any power restore policies in main()
93 bus, bmcPath.str, BMCState::interface, "LastRebootCause")); in main()
99 "BMC was reset due to pinhole reset, no power restore policy will be run"); in main()
108 "BMC was reset due to watchdog, no power restore policy will be run"); in main()
117 "BMC was reset due to cold reset, no power restore policy will be run"); in main()
123 /* The logic here is to first check the one-time PowerRestorePolicy setting. in main()
125 * user setting in the non one-time object, otherwise honor the one-time in main()
128 auto methodOneTime = bus.new_method_call( in main()
134 auto methodUserSetting = bus.new_method_call( in main()
143 auto reply = bus.call(methodOneTime); in main()
151 info("One time not set, check user setting of power policy"); in main()
153 auto reply = bus.call(methodUserSetting); in main()
163 bus, settings.powerRestorePolicyOneTime, powerRestoreIntf, in main()
168 auto methodUserSettingDelay = bus.new_method_call( in main()
178 auto delayResult = bus.call(methodUserSettingDelay); in main()
186 info("Host power is off, processing power policy {POWER_POLICY}", in main()
196 utils::waitBmcReady(bus, powerRestoreDelaySec); in main()
201 bus, hostPath, HostState::interface, "RestartCause", in main()
205 bus, hostPath, HostState::interface, "RequestedHostTransition", in main()
208 // Always execute power on if AlwaysOn is set, otherwise check config in main()
215 … "Chassis power was not on prior to BMC reboot so do not run any further power policy"); in main()
226 utils::waitBmcReady(bus, powerRestoreDelaySec); in main()
230 // Read last requested state and re-request it to execute it in main()
232 bus, hostPath, HostState::interface, "RequestedHostTransition"); in main()
237 bus, hostPath, HostState::interface, in main()
248 utils::waitBmcReady(bus, powerRestoreDelaySec); in main()
252 // Read last requested state and re-request it to execute it in main()
254 bus, hostPath, HostState::interface, "RequestedHostTransition"); in main()
256 // As long as the host transition is not 'Off' power on host state. in main()
261 bus, hostPath, HostState::interface, "RestartCause", in main()
265 bus, hostPath, HostState::interface, in main()