summaryrefslogtreecommitdiffstats
path: root/systemintfcmds.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move get bmc global command to new APIYong Li2019-11-071-27/+15
| | | | | | | | | | | | | | | | | | | | Rewrite get bmc global command to the new API. Tested: ipmitool raw 6 0x2f 09 ipmitool mc getenables Receive Message Queue Interrupt : enabled Event Message Buffer Full Interrupt : disabled Event Message Buffer : disabled System Event Logging : enabled OEM 0 : disabled OEM 1 : disabled OEM 2 : disabled Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I17ef6171b29f1dcb4adcb1f93e2e4e0292883ecd
* Limit the set bmc global command to system interface onlyYong Li2019-11-071-0/+18
| | | | | | | | | | | | | | | | | Only accept command from system interface, to align with the IPMI spec. Tested: In UEFI the comand works: cmdtool.efi 20 18 2e 9 00 The command will fail if execute through network: ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus raw 6 0x2e 9 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x2e rsp=0xd5): Command not supported in present state Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I4e65cdf88fbc9364532ae04da3a7219f432dee6b
* Move set bmc global command to new APIYong Li2019-11-041-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Rewrite set bmc global command to the new API. Tested: ipmitool raw 6 0x2e 8 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x2e rsp=0xcc): Invalid data field in request ipmitool mc setenables recv_msg_intr=on system_event_log=on Enabling Receive Message Queue Interrupt Enabling System Event Logging Nothing to change... Receive Message Queue Interrupt : enabled Event Message Buffer Full Interrupt : disabled Event Message Buffer : disabled System Event Logging : enabled OEM 0 : disabled OEM 1 : disabled OEM 2 : disabled Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I79bb6186b880c8f26890cc6a1851ef05650efc5b
* Ensure host is told data available on SMS_ATNAndrew Geissler2019-04-231-19/+8
| | | | | | | | | | | | | | | | | | | The SMS_ATN path is used by OpenBMC to communicate certain commands to the host. To ensure the host queries OpenBMC for its pending command, the response to the get_msg_flags command must indicate the event message buffer is full. Commit 30206dba changed this behavior and caused a regression in this area for openpower systems. Tested: Verified phosphor-host-check now passes when host is up and running Resolves openbmc/openbmc#3526 Change-Id: I700a55d8fa35b367dc20ae0db532a0b1c0664fba Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Only include ipmid/api.hpp for the new APIVernon Mauery2019-04-081-1/+0
| | | | | | | | | | | | | | After some feedback from users of the new IPMI API, they wanted to see two things: 1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to write new handlers 2) only require including ipmid/api.hpp (instead of ipmid/api.h) So now, by simply including ipmid/api.hpp instead of ipmid/api.h (deprecated), handlers incorporating the new IPMI API can be written. Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Change linkage of ipmid_get_sdbus_plus_handler() to libipmid.soVernon Mauery2019-03-191-18/+2
| | | | | | | | | | | | | | ipmid_get_sdbus_plus_handler() was re-added to be a part of systemintfcmds where it was used. This moves it to libipmid.so because that is where symbols used by both ipmid and the providers should be. Because ipmid_get_sdbus_plus_handler() relies on the io service and the main sdbus::asio::connection is also right there, this moves those symbols to libipmid as well to keep coherent. Change-Id: Ib125a0c217c8bcf47a8a4bd0c557eb69e928245b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* [IPMI]Set/Get global enablesJia, Chunhui2019-03-071-7/+48
| | | | | | | | | | | | Recv Message Queue and SEL are enabled by default. Event Message buffer are disabled by default (not supported). Any request that try to change the mask will be rejected. Test: test pass with ipmitool Change-Id: Ia6bd4a6bf7b2b04dcfde6bfec910ca854a7aaeb8 Signed-off-by: Jia, Chunhui <chunhui.jia@linux.intel.com>
* Add back an interface used by an external providerVernon Mauery2019-02-271-0/+6
| | | | | | | | | The move to the new API removed the ipmid_get_sdbus_plus_handler interface because it looked like it was self-contained in the executable, not realizing it was needed by an external provider. Change-Id: I75bb898294cc59cae7d291f7a6a6ed1e61d62903 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Rewrite ipmid to use the new architectureVernon Mauery2019-02-251-6/+17
| | | | | | | | | | | | | New architecture highlights: * The new registration detects handler type for argument unpacking. * Upon completion the response is automatically packed. * Handlers can make use of the new async/yield sdbusplus mechanism. * The queue exports a new dbus interface for method-based IPMI calls. * The legacy handler registration is still supported for now. * The legacy dbus interface is still supported for now. Change-Id: Iae8342d9771ccebd3a0834e35597c14be4cc39cf Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-071-2/+2
| | | | | | | | | | | | | | | | | | | This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon. In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers. This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended. Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
* libipmi: Decouple user commandsWilliam A. Kennington III2018-12-201-1/+0
| | | | | | | | | | | | | This makes them an optional, separate provider like the sysfs cmds. Tested: Ran on real hardware that included libusercmds.so in /usr/lib/host-ipmid and on a machine that did not include it. Ran ipmitool on the host to verify that the user commands were present when expected. Change-Id: I07b3af5ae603c3e5f1ea41f0afc309329f4e185d Signed-off-by: William A. Kennington III <wak@google.com>
* add std namespace prefix to common methodsPatrick Venture2018-09-251-4/+5
| | | | | | | | Standard clib methods should be explicitly grabbed from the standard namespace. Change-Id: I8bcfcb260a99180d535ec8102c1a24c318cbc209 Signed-off-by: Patrick Venture <venture@google.com>
* replaced c headers with cpp where applicablePatrick Venture2018-09-251-1/+0
| | | | | Change-Id: I23a70eb540ccde5d2aba467426769feffb07b516 Signed-off-by: Patrick Venture <venture@google.com>
* rename headers to match stylePatrick Venture2018-09-251-3/+3
| | | | | | | | | | | | | | | | | | 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-31/+38
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* Reducing IPMI logging footprintAditya Saripalli2018-04-181-8/+2
| | | | | | | | | | | | -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-1/+1
| | | | | | | | | 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-38/+22
| | | | | Change-Id: Icefce510a3a0022bf0288fa99518459b732a2e04 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Update softoff to support new host control interfaceAndrew Geissler2017-05-191-41/+0
| | | | | | | | | The new host control design requires applications use its new dbus interfaces to interact with the host. This commit moves the softoff application over to this new interface. Change-Id: I3c6830a59d72df1f112ee7a63a08bfca53375bf7 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Set init_priority attribute for global/static variablesLei YU2017-05-161-8/+8
| | | | | | | | | | | | The initialization order of global/static variables and functions with constructor attribute is unspecified. Set init_priority attribute to specify the initialization order. Resolves openbmc/openbmc#1581 Change-Id: Ia85804b3b9e537e0f32b712a3ce92e7d0be554b2 Signed-off-by: Lei YU <mine260309@gmail.com>
* Add timeout support to host controlAndrew Geissler2017-05-091-1/+5
| | | | | | | On timeout, send error signal for all commands within the queue Change-Id: Ic995fd4b057bd83f121a3deec405a26e0991e9a2 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Implement basic queue for sending multiple commandsAndrew Geissler2017-05-091-28/+76
| | | | | | | Sends dbus signal upon completion of command Change-Id: Ic507f35af0b38305eecd5558c55738f2d283aac5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* IPMI: Update the dbus object for soft power off with underscoresVishwanatha Subbanna2017-04-041-4/+3
| | | | | | | Fixes openbmc/phosphor-host-ipmid#102 Change-Id: I3e7456401b7265a51578f9aa08bef2ae3f326849 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Make IPMI changes to stop timer that is started by SoftPowerOffVishwanatha Subbanna2017-03-241-0/+38
| | | | | | | | | As part of Soft Power Off, there may be a timer that would be running. This patch will stop the timer when IPMI daemon receives response from host for SoftPowerOff sequence of commands. Change-Id: Idacbff36444629623f8754de3d81d292ca19bb85 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add privilege level for each IPMI commandTom2017-01-171-3/+5
| | | | | Change-Id: I07f160c6ea83dc91f46e21f263c4cf994aff081d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Create library for System Interface Commands.Tom2017-01-171-0/+109
There are IPMI commands like Read Event Message Buffer, Set BMC Global Enables and Get Message Flags which is to be executed from host interface only. So creating a separate library for these commands which would be used only by phosphor-host-ipmid. Change-Id: I14cb4019b9ab19c84e463e5a7820010f57f1c5eb Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud