summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Get the timestamp from the log entryTom Joseph2017-07-192-1/+41
| | | | | Change-Id: Id00f6e1e6f65c17babc5d06abe1b9fc39a4de8b8 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Make changes as per the new settings infrastructureRatan Gupta2017-07-192-255/+397
| | | | | | | | | | Host network config will be referring to xyz settings namespace. Resolves openbmc/openbmc#1678 Resolves openbmc/openbmc#556 Change-Id: I77e4b015595990b3f44733ff4977b462ddf9a70a Signed-off-by: Ratan Gupta <ratagupt@in.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-182-0/+32
| | | | | Change-Id: Ia4bf3f99a865617535c65a023c8e697792cd43b4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* dcmi: asset-tag: Implement Set Asset tag commandTom Joseph2017-07-182-0/+87
| | | | | | | 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-183-0/+109
| | | | | 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-183-13/+128
| | | | | Change-Id: I00958d4bb54896ea7d13aaffd7e0ebf3c20ef3de Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensorhandler: Add functionality to use m, b, b_exp from config.yamlEmily Shaffer2017-07-174-25/+48
| | | | | | Change-Id: I1b5b8a5e0e5abd74eadde494728f363cf1ca4ec6 Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sensorhandler: implement get SDREmily Shaffer2017-07-172-2/+544
| | | | | | Change-Id: I79dc59585c1f3008fc42e95a5a4792afd7268255 Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sensorhandler: add reserve_sdrEmily Shaffer2017-07-172-13/+43
| | | | | | Change-Id: I58300910e4cdb0c889e030615a034443816ae5db Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sensorhandler: add get_sdr_infoEmily Shaffer2017-07-172-2/+82
| | | | | | Change-Id: I13c82b62cec1c2f505fa81786fdc60cb38b2a636 Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Convert a log entry into a SEL recordTom Joseph2017-07-083-0/+83
| | | | | | | | | | | | Check the DBUS logging entry for callout associations, if there is a mapping between the inventory path and sensor number then populate the SEL record. Otherwise log a SEL against the sytem event sensor. Resolves openbmc/openbmc#1516 Change-Id: I516bdac70cf39260af1744a9cdb118d763009bd5 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Create IPMI SEL record from Logging DBUS EntryTom Joseph2017-07-083-1/+185
| | | | | | | | | | The Log Id, resolved field and the timestamp is read from the DBUS entry and mapped to the SEL record. The remaining fields are populated from the generated code which maps an association to the sensor number. Change-Id: I89c3862cf35efa1b9fb86de734431c8141143fb7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* generate map of phosphor-dbus fru propertiesMarri Devender Rao2017-06-266-2/+257
| | | | | | | | | | Reusing frup.hpp, example.yaml, fru-gen.py, writefru.mako.cpp from ipmi-fru-gen repository to generate map of frup properties. Generated map facilitates in reading data from the inventory. Change-Id: I6d6dbc55a340dd06b4639f8bded8cc09df815a59 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Reduce host shutdown timeout to 5 minutesAndrew Geissler2017-06-201-1/+1
| | | | | | | Resolves openbmc/openbmc#1823 Change-Id: I00fbf03561046be34fa8f1bd3039fbffe575737f Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Fix space and newline for boot policy printGeorge Keishing2017-06-161-1/+1
| | | | | | | Resolves openbmc/openbmc#1777 Change-Id: I78df77abeca8f37cc1cdb6ae8e1e2d4b3690dc52 Signed-off-by: George Keishing <gkeishin@in.ibm.com>
* Update watchdog command handler to use new watchdog daemonVishwanatha Subbanna2017-06-151-33/+67
| | | | | | | | | | Below IPMI commands in NetFn:0x06 are implemented and they need to use the services from new refactored watchdog daemon Command:0x22 and 0x24. Change-Id: I2f7b89aa8b35d08033ecab30b59440c023520390 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* sensorhandler: add missing pointer initializationPatrick Williams2017-06-131-1/+1
| | | | | | | | | | An uninitialized pointer was being sent to 'free' in cases where a dbus object was not found to back a sensor. Fixes openbmc/openbmc#1740. Change-Id: Iaa62bfe460c47f4a51a506b0219879f0b6d46dd4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Return the heartbeat command if queue is emptyAndrew Geissler2017-06-124-75/+4
| | | | | | | | | | | | | | There are numerous valid situations where the host interface queue may be empty, but the host has an active SMS_ATN. In these cases, ipmid should not log an error and abort but instead just return a default command. The default will be the heartbeat command since its basically a noop to the host. Resolves openbmc/openbmc#1750 Change-Id: I810bb0368c2cbd4aa99b6cf20d29eeefc8b312cd Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Call softoff dbus interface directlyAndrew Geissler2017-06-081-10/+17
| | | | | | | | | | | | | | | | | | | The host response can be extremely fast when requesting a soft power off. So fast in fact, that it may respond before the obmc mapper has registered the softoff dbus object and interface. When this happens, ipmid does not see softoff running so it goes down a different (and incorrect) shutdown path. This code change has the host response go directly to the softoff dbus interface (instead of using mapper). Once mapper is refactored in openbmc/openbmc#1661, this software can go back to using it. Resolves openbmc/openbmc#1743 Change-Id: I08df84783adef80c4eb91277d8d7aa6dc264730d Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Don't return error on SMS errorAndrew Geissler2017-06-064-70/+4
| | | | | | | | | | The state of the host is unknown when a host shutdown is requested. The defined behavior after asserting the SMS attention is to give the host a few seconds to respond. If there is no response then just continue with the shutdown. Change-Id: I7b25ddb572bd8dea9f6a3422997f53e5f38c7fc5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Create file to indicate host requested off/rebootAndrew Geissler2017-06-064-10/+69
| | | | | | | | | | Create a file to ensure the soft power off service is not run when the host is requesting a power off or reboot. There's no need to notify the host (i.e. soft power off) when they are initiating it. Change-Id: Ic9f8e7110d30f477ceae38bba9d684559d9503d3 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* sensorhandler: modify Get Sensor Reading to use dbus interfaceEmily Shaffer2017-06-062-0/+65
| | | | | Change-Id: Ice16bda6c151b0865f3fa6e8234b8e2456d5b887 Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
* sensorhandler: Fixes for dbus->type conversion.Emily Shaffer2017-06-061-1/+10
| | | | | | | This enables Get Type IPMI command. Change-Id: I2e7ec6320d5e6a8eeb6566c6a4389b77c49bc92a Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
* sensorhandler: Refactor find_openbmc_path to check sensor map firstEmily Shaffer2017-06-064-14/+54
| | | | | Change-Id: I846d538643af77705d5160bf4d9127f758b5c749 Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
* Remove tabs and fix indents in chassishandler.cppAndrew Geissler2017-06-011-185/+205
| | | | | | | Formatting only change Change-Id: Ide817b09af864adc20c090311e4b6083e3044212 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* sensorhandler: Refactor find_sensor to eliminate redundant callEmily Shaffer2017-05-193-18/+23
| | | | | | | | find_openbmc_path was being called within find_sensor as well as following find_sensor Change-Id: Ie94eab7afbe34f214a07bda49bfbce729b20f237 Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
* Makefile changes for generating inventory-sensor-gen.cppTom Joseph2017-05-193-2/+11
| | | | | | | | | Provide capability for the recipe to pass the config yaml as a configurable output. Fallback to inventory-sensor-example.yaml in case no config yaml is passed. Change-Id: I6a069b0925c3e4c4d56bd1c9767b8fadcdf433b4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Adding inventory-sensor-example.yamlTom Joseph2017-05-191-0/+340
| | | | | | | | This is an example config file which would be picked for out of tree build or the config file is not generated during build time. Change-Id: Iae0db42d5f2496673ac08eeb7a2cb052526b9fa6 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Write parser for inventory to sensor mapping yaml.Tom Joseph2017-05-193-0/+99
| | | | | | | | | | Write python-based parser for inventory-sensor.yaml. The parser generates inventory-sensor-gen.cpp, which is contains a map containing the inventory object path as key and the sensor related info as the value. Change-Id: Ib0e0f61f075b0ba777417a8032074c9b66b2eef7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Ensure softpoweroff application returns non-zero rc on failsAndrew Geissler2017-05-191-4/+6
| | | | | | | | This will ensure we follow the OnFailure= behavior defined within the shutdown target and properly power the system off on fails Change-Id: I4367602741ec06f32e5a39a21fccc914739fdda6 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Update softoff to support new host control interfaceAndrew Geissler2017-05-197-88/+180
| | | | | | | | | 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-098-25/+78
| | | | | | | On timeout, send error signal for all commands within the queue Change-Id: Ic995fd4b057bd83f121a3deec405a26e0991e9a2 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Update gitignore with new softoff and test filesAndrew Geissler2017-05-091-1/+8
| | | | | Change-Id: I36e59710b34b024926fe0a721b42eaea0d5e2447 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Support custom callback function on timer expirationAndrew Geissler2017-05-093-3/+117
| | | | | Change-Id: I39b32d608ef342d63c57cbc1902e927fb39861c7 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Add sd_event processing to host ipmid applicationAndrew Geissler2017-05-093-15/+32
| | | | | | | | In order to support the timer function, it's required to use the sd_event loop instead of sdbus loop Change-Id: I3a30fee1a21cbfadd0cbb5478bf46bea4b5ca0b8 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Enable multiple commands to be queued at onceAndrew Geissler2017-05-092-8/+31
| | | | | | | | With this commit, the control host interface allows multiple commands to be queued up and sent in a FIFO order to the host Change-Id: I76908d988608ef6dcc1d7f945c6c4a1c5c29e44b Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Implement basic queue for sending multiple commandsAndrew Geissler2017-05-0911-85/+187
| | | | | | | Sends dbus signal upon completion of command Change-Id: Ic507f35af0b38305eecd5558c55738f2d283aac5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Send the SMS attention to host when Execute calledAndrew Geissler2017-05-093-2/+39
| | | | | Change-Id: Id523470fcabf59cf2bda592cf1fe687ac44c3328 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Support for putting entries onto queueAndrew Geissler2017-05-091-2/+14
| | | | | Change-Id: I766cdfcaef7d5d000a9e216bc3307ea12c9ce2f8 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Register new Control.Host bus in ipmidAndrew Geissler2017-05-099-148/+70
| | | | | | | | This sets up the framework for future commits to implement the required interfaces and signals in Control.Host Change-Id: I43cd7d3047ed9cfbf1a01e7ba3a0310e9d47c307 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Compile new control host codeAndrew Geissler2017-05-095-0/+203
| | | | | | | | | | | | The purpose of this series of commits is to provide the ability for other services to communicate with the host. Specifically with this series, to be able to request the host power itself down or to simply check if the host is running. Change-Id: I0136467cd3f258fbed3e40e4b7269ed4d8a23e46 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Set the TurboAllowed sensor value correctly.Tom Joseph2017-05-041-1/+1
| | | | | | | | | | Set the TurboAllowed to True for an assertion event and set it to false for a deassertion event. Resolves openbmc/openbmc#1530 Change-Id: I3ee59e8770e75b02cdf83a956439f79779d2760c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* softoff: switch to 'report' error APIMarri Devender Rao2017-04-271-12/+4
| | | | | | | | | phosphor-logging now has an interface to avoid needing a try/catch to report an error in the same location it is discovered, so switch to using it. Change-Id: I96b6f3ec10b39f6ce3030b95f94768c00c3ad9d8 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* storageaddesel: switch to 'report' error APIMarri Devender Rao2017-04-271-11/+2
| | | | | | | | | phosphor-logging now has an interface to avoid needing a try/catch to report an error in the same location it is discovered, so switch to using it. Change-Id: I3feb36e41e8dd18a279b34508f8967a4f74485e4 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Add Sensor reading support for Power Cap.Jayanth Othayoth2017-04-181-0/+2
| | | | | Change-Id: I695c5a7e4da99b6ec1fe3045df91f483b6cad69c Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
* sensorhandler: removed un-needed sd_bus_refPatrick Williams2017-04-181-1/+1
| | | | | | | | sdbusplus's bus object has a change in semantics that no longer require a 'sd_bus_ref' call. See changes for openbmc/openbmc#1432. Change-Id: I6e953cfbd83abec1534e75b8fbf6c7e5b711ceb3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Cater for change in exception variable namesMarri Devender Rao2017-04-121-1/+1
| | | | | Change-Id: I9c723dd8c1c411c297906fcce635e32b3d8428cc Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Added gitignore for phosphor-host-ipmi repoAndrew Geissler2017-04-071-0/+50
| | | | | Change-Id: I86fc1cc21442a5675148fcb0aff34c8034af624a Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
OpenPOWER on IntegriCloud