summaryrefslogtreecommitdiffstats
path: root/host-cmd-manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ipmid: host-cmd-manager to use default event source for timersVernon Mauery2018-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The sdbusplus/timer.hpp class can be passed an event, but by default, it just uses the default system event queue. This updates the host-cmd-manager Manager class to use the defaults. Tested-by: Send the heartbeat command with the host powered off and watch for a timeout message: dbus-send --print-reply --system \ --dest=xyz.openbmc_project.Ipmi.Host \ /xyz/openbmc_project/control/host0 \ xyz.openbmc_project.Control.Host.Execute \ string:"xyz.openbmc_project.Control.Host.Command.Heartbeat" Watch the log (journalctl -f): Nov 27 00:34:52 wolfpass ipmid[1255]: Pushing cmd on to queue Nov 27 00:34:52 wolfpass ipmid[1255]: Pushing cmd on to queue Nov 27 00:34:52 wolfpass ipmid[1255]: Asserting SMS Attention Nov 27 00:34:52 wolfpass ipmid[1255]: SMS Attention asserted Nov 27 00:35:23 wolfpass ipmid[1255]: Host control timeout hit! Change-Id: I904d34b67050723a9c7e405bda4e02f1a9cb4dbd Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Convert variant usage to std interfaceWilliam A. Kennington III2018-10-181-1/+4
| | | | | | | | | | | | | This is just a refactoring to use the c++17 std::variant interfaces instead of the mapbox::variant specific ones. We should be able to use mapbox::variant and std::variant interchangeably now. Tested: Built against sdbusplus with mapbox::variant and sbusplus using std::variant. Both variant compile and test out. Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc Signed-off-by: William A. Kennington III <wak@google.com>
* Use the common timer classVernon Mauery2018-10-181-4/+4
| | | | | | | | | The common timer class from sdbusplus offers all the timer goodness that we currently use. The unit test is also no longer needed (and has been added to sdbusplus's version of the timer.hpp implementation). Change-Id: I278817489433a29ca739f70fdacd8bb897797d66 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* rename headers to match stylePatrick Venture2018-09-251-5/+7
| | | | | | | | | | | | | | | | | | Moving headers from ".h" to ".hpp" Reworked the header inclusion a bit so that host-ipmid is treated as a library, and local headers aren't. renamed apphandler.h => apphandler.hpp renamed chassishandler.h => chassishandler.hpp renamed globalhandler.h => globalhandler.hpp renamed sensorhandler.h => sensorhandler.hpp renamed storageaddsel.h => storageaddsel.hpp renamed storagehandler.h => storagehandler.hpp renamed systemintfcmds.h => systemintfcmds.hpp Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-09-071-28/+25
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* Clear host command queue on a power onMatt Spinler2018-07-241-1/+41
| | | | | | | | | | | | | | | | | | | | | When the RequestedHostTransition property changes to On, clear any pending commands in the command queue. This is done to avoid race conditions around state transitions as well as other scenarios like the following: 1) Host is already off 2) RequestedHostTransition is set to Off 3) RequestedHostTransition is set to On 4) Host powers on 5) Host immediately powers off because of the pending command sent in 2). Resolves openbmc/openbmc#3207 Tested: Verified the scenario above no longer occurs. Change-Id: I26c8195c305c75b01333d1b10ff4bf16d76b91a6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Reducing IPMI logging footprintAditya Saripalli2018-04-181-4/+4
| | | | | | | | | | | | -host-ipmid is very noisy in terms of journal logging. A small step towards cleaning that up. -Also converted printfs to phosphor-logging. Partially Resolves openbmc/openbmc#2507 Change-Id: I749c19c18d1cabf6f0216830c8cb0a08ee43d6de Signed-off-by: Aditya Saripalli <aditya0124@gmail.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Make host command manager accessible by OpenPower OEMVishwanatha Subbanna2017-08-141-0/+9
| | | | | | | | | Since OpenPower Host IPMI OEM also needs to use the Host Command manager, need to place the files in appropriate directories and make needed changes. Change-Id: I7536a0ff1e53a844ec05f73c4e0605cbf4341465 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Use Host Command Manager in host interface implementationVishwanatha Subbanna2017-08-141-1/+0
| | | | | Change-Id: Icefce510a3a0022bf0288fa99518459b732a2e04 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Define the Manager for handling host bound commandsVishwanatha Subbanna2017-08-141-0/+147
Since some of the host bound commands are valid only for OpenPower systems, a manager is needed, which can handle commands from OpenBmc common code and also OpenPower implementations. Change-Id: Icf6566e701921ecea4c8cff1c16e498385303396 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud