summaryrefslogtreecommitdiffstats
path: root/dcmihandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* dcmihandler: Add DCMI Power management support checkKirill Pakhomov2019-02-121-0/+35
| | | | | | | | | | According to section 6.6 Power management of DCMI specification, if power management feature is disabled, the related commands (Get/Set/Activate/Deactive Power Limit) should be unsupported. Change-Id: I887f33babb2fe7a1ab97bb2d0720a693171e48a1 Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
* dcmihandler: Add parameterization to JSON parser method.Kirill Pakhomov2019-02-121-7/+5
| | | | | | | | Pass JSON config file name as a parameter to make parser re-usable with various config files. Change-Id: I5bf1e91121e0e75be58383151f265b32f39a5b60 Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-071-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* IPMI channel to NIC device mapping modified within JSON config fileJohnathan Mantey2019-02-041-3/+2
| | | | | | | | | | | The IPMI to NIC channel mapping was done using a hard coded scheme. The scheme used generic channel names which were then mapped to specific device names. The hard coded generic to specific naming convention is removed, and the JSON file contains the device name directly. Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* dcmihandler: use visitor to pull sensor valuesJames Feist2018-11-211-18/+13
| | | | | | | This will help upgrade us to using doubles in the future. Change-Id: I94bb26fc43ae410a15402b4966e135d847a1fa33 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Convert variant usage to std interfaceWilliam A. Kennington III2018-10-181-10/+12
| | | | | | | | | | | | | 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>
* replaced c headers with cpp where applicablePatrick Venture2018-09-251-3/+0
| | | | | Change-Id: I23a70eb540ccde5d2aba467426769feffb07b516 Signed-off-by: Patrick Venture <venture@google.com>
* rename headers to match stylePatrick Venture2018-09-251-2/+1
| | | | | | | | | | | | | | | | | | 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-257/+210
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* Use s.c_str() in log messagesJoseph Reynolds2018-05-311-1/+1
| | | | | | | | | | Fixes issues with data passed to phosphor::logging::log(entry()). This is part of a series of commits that resolves openbmc 2905. Tested: static_assert only Change-Id: I9fac771f54e4acbec97ce1360c106b6e3eb4fe9d Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
* Reducing IPMI logging footprintAditya Saripalli2018-04-181-14/+0
| | | | | | | | | | | | -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>
* Spelling fixesGunnar Mills2018-03-231-3/+3
| | | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I1d0551f8b7ceb7f74a975cae0a35ced15c01a74d Tested: Built the repo Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* DCMI: Add get/set Configuration Parameters commandNagaraju Goruganti2018-02-221-0/+213
| | | | | | | | | | | | | | | | 1.Systemd-networkd doesn't allow to configure DHCP timings, so set is not implemented. 2.Get command to DHCP timings will return hardcoded values from systemd-networkd source code. 3.Systemd-networkd doesn't support Random Back off, so not implemented. 4.As the info about VendorClassIdentifier is not clear in the spec, Right now we are not supporting DHCP Option 60 and Option 43. We will open new issue for it. Resolves openbmc/openbmc#2752 Change-Id: I2682e5e43ceb19647e5240b095f601777213530b Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* dcmi: get sensor info: read configDeepak Kodihalli2018-02-161-4/+82
| | | | | | | | | | This commit adds the code to read dcmi sensor config, in order to respond to the 'get sensor info' command. Resolves openbmc/openbmc#2623. Change-Id: Id661ec2c1bae214b503308577d7f825a5dfeb629 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* dcmi: implement get sensor infoDeepak Kodihalli2018-02-161-34/+152
| | | | | | | | | | | | This commit implements the plumbing around the 'Get Sensor Info' command. It doesn't read the sensor information yet. That code is coming up in a subsequent commit. Refactor some of the get temperature readings code, in order to reuse certain common aspects for this commit. Change-Id: I0cb531b5b75e98cc9e76509f84f832be9997fee0 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fix failure in reading power value during PowerOff stateMarri Devender Rao2018-02-151-10/+20
| | | | | | | | | D-Bus sensor object to read power value is not created during PowerOff state. Fixed to return 0 power value if sensor object is not present. Change-Id: Ibe340cab0483c7a711081197b932aaba0408d333 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* DCMI: Populate response buffer with power readingMarri Devender Rao2018-02-061-1/+26
| | | | | | | | | | Populate the IPMI response buffer with the power value read from the total_power sensor. Resolves openbmc/openbmc#2625 Change-Id: Ib494e40aa37aa16064a4471f79bd7f9d5c0e5c8c Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* DCMI: Read power value from the configured D-Bus object pathMarri Devender Rao2018-02-061-0/+71
| | | | | | | | | 1) Parse the power_reading JSON configuration file to get the D-Bus object path for the power reading. 2) Read the power reading value from the specified D-Bus object. Change-Id: I4b9f0703318e8db2c86d0b337e524eee6da33d08 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* dcmi: get temperature readings: read temp sensorsDeepak Kodihalli2018-02-011-5/+167
| | | | | | | | | | | This commit adds the code to read temperatures from various sensors. A JSON config file tells what D-Bus object(s) to look up for a specific temperature reading. Resolves openbmc/openbmc#2626 Change-Id: Ic357ec2a53ff250a2517d68defe5850ef353568a Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* dcmi : implement get temperature readingsDeepak Kodihalli2018-02-011-0/+116
| | | | | | | | | This commit implements the plumbing around the 'Get Temperature Readings' command. It doesn't read the temperatures from the relevant sensors. That code is coming up in a subsequent commit. Change-Id: I4514b65eb3ca65d52dd35185338a2c397e9a76ca Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* DCMI: Implement Get DCMI capabilities info command.Dhruvaraj Subhashchandran2018-01-311-0/+131
| | | | | | | | | | This commit adds ipmi changes for supporting the get DCMI capabilities command Resolves openbmc/openbmc#2618 Change-Id: I7d0e7c132f4a8d459351e025fa2bfca9fcf1340b Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Spelling fixesGunnar Mills2017-10-311-1/+1
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I78e9d126f19fd9fb2e3f2fa9fe8c2404dc505f82 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add DCMI Get/Set Management Controller Id StringVladislav Vovchenko2017-10-161-0/+134
| | | | | | | Resolves openbmc/openbmc#1855 Change-Id: I878c7bcb1ea8b46cd3e932b1cbb2290fe612f652 Signed-off-by: Vladislav Vovchenko <vlad.vovchenko93@gmail.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* dcmi: Put enum ipmi_netfn_sen_cmds inside namespaceRatan Gupta2017-08-111-15/+25
| | | | | | | | | The enum is defined in sensorhandler.h as well as here it may happen that some cpp will include both header files and it may lead to multiple definition error. Change-Id: I848de8cbde42831303493862a7bdf8966176b9d1 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* dcmi: Implement activate/deactivate power limitTom Joseph2017-07-281-0/+65
| | | | | | | Resolves openbmc/openbmc#1955 Change-Id: I4f97e3f22e9a36879dba56a06ae3c6bb5d34e34c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* dcmi: Implement set power limit commandTom Joseph2017-07-281-0/+65
| | | | | Change-Id: I6427a0715a4bba5e18a5e483309a23f8493ea370 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* dcmi: Refactor get power limit commandTom Joseph2017-07-281-52/+70
| | | | | Change-Id: I31755eaccb17c013fd2c1a3e43e7ec95a1947ba3 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Call mapper service with appropriate parametersAndrew Geissler2017-07-191-5/+4
| | | | | | | | | | | I obviously did not re-test my code after making this review comment. The parameters to getService() were in the wrong order. Resolves openbmc/openbmc#1990 Change-Id: Ia0cfe45f391d80dec6f47b28b99126bfc98f2d28 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* dcmi: get real power cap settingsAndrew Geissler2017-07-181-8/+86
| | | | | | | | Now that the user power cap settings are defined, provide them via the ipmi dcmi interface Change-Id: I46b0c3f006eee714c7f412f2aec4433e67aeb187 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* dcmi: asset-tag: Add API to write asset tag to the DBUS objectTom Joseph2017-07-181-0/+26
| | | | | Change-Id: Ia4bf3f99a865617535c65a023c8e697792cd43b4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* dcmi: asset-tag: Implement Set Asset tag commandTom Joseph2017-07-181-0/+65
| | | | | | | Resolves openbmc/openbmc#1854 Change-Id: Iba00a732aa30fb60fc0b1550daec0e4055af74fa Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* dcmi: asset-tag: Implement the Get Asset Tag commandTom Joseph2017-07-181-0/+80
| | | | | Change-Id: Ic2fb1e707174ece63fbb758bf1422c2c4d95723b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* dcmi: asset-tag: Add API to read asset tag from dbusTom Joseph2017-07-181-1/+77
| | | | | Change-Id: I00958d4bb54896ea7d13aaffd7e0ebf3c20ef3de Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add privilege level for each IPMI commandTom2017-01-171-2/+4
| | | | | Change-Id: I07f160c6ea83dc91f46e21f263c4cf994aff081d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Allow out-of-tree buildsPatrick Williams2016-09-061-1/+1
| | | | | Change-Id: If4b97e65f63c3abbf23140dd97b9febe00b3be0d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Switch C++ source files to .cpp extensionMatthew Barth2016-08-081-0/+40
Change-Id: I495186b4afd58ec1e5d9d5c6472394f96541d17d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
OpenPOWER on IntegriCloud