summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: Implement initialized using the new dbus interfaceWilliam A. Kennington III2018-02-213-0/+24
| | | | | | | | | This makes it possible for the phosphor-host-ipmi or any other watchdog managing daemon to report to the caller that the watchdog was not configured if the phosphor-watchdog daemon restarts for any reason. Change-Id: Iae3a8554c2f5d1cb89368f3ce14b3d44922599c0 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Rewrite using sdbusplusWilliam A. Kennington III2018-02-214-180/+221
| | | | | Change-Id: I730317954819859d23fdaca7336f19f5c5b0c107 Signed-off-by: William A. Kennington III <wak@google.com>
* Add Get Repository Info CommandDhruvaraj Subhashchandran2018-02-162-0/+45
| | | | | | | | | | Adding support for Get Repository Info command, which returns information about the SDR repository. resolves openbmc/openbmc#2614 Change-Id: Id1219de8021b5403a775ad6e8577dbc8edfc60cb Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* dcmi: get sensor info: read configDeepak Kodihalli2018-02-162-4/+90
| | | | | | | | | | 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-163-46/+241
| | | | | | | | | | | | 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>
* watchdog: Reorganize header and function namesWilliam A. Kennington III2018-02-153-108/+109
| | | | | | | | This is a refactoring of names + header cleanup and has no functional change. Change-Id: Ie90fded80b6a26927f56bb342993193530b8b8ef Signed-off-by: William A. Kennington III <wak@google.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>
* Fix the typoRatan Gupta2018-02-131-7/+7
| | | | | Change-Id: I5eff36514969ca7e301578f0913b5da250b426c9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* FRU: Change the type code to ASCIIRatan Gupta2018-02-131-2/+15
| | | | | | | | | | | | | | | In board and product area format there is type and length field for each field. 6-7 bit of typelength field specifies the type and first five bits specify the length.a eg:- Board Manufacturer type/length byte followed by actual number of bytes defined in first five bits of type length of Board Manufacturer field. Change-Id: Iaaf608cc93829fb1dd8d0c54a49bd467a7cadbea Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* FRU: Fix the area offset calculation of Read FRU Data responseRatan Gupta2018-02-131-8/+16
| | | | | | | | Common header contains the offset of areas This commit fixes the offset calculation. Change-Id: Iba002d1832063a329df43834d4e30d359ecaf7b0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* FRU: Fix response for Read FRU Data CommandRatan Gupta2018-02-131-3/+11
| | | | | | | | 1) Add the count field as part of read fru command response. 2) Fix in copying the data from the offset. Change-Id: I2eaa76e82179ad65ba3af0f1795aeec40e68a0fc Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* SDR: Adding fru records as part of Get SDR commandRatan Gupta2018-02-133-14/+201
| | | | | | | | | | | Currently Get SDR only responds with physical/virtual sensor records,it doesn't support for FRU records,This commit adds the support for FRU records. Resolves openbmc/openbmc#2776 Change-Id: I34edfa892b32f4e866cf0c084d97c2f3482d40f4 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Inventory:- making changes in the mako and the C++ structureRatan Gupta2018-02-124-110/+139
| | | | | | | | | As fru yaml would be having extra properties like entityID,entityInstance so changes were needed to make the change in the corresponding c++ structure. Change-Id: I314d1556cf07a3e212996615c1cd2f28fb6d9bba Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* apphandler.cpp: fix-up 80 charsPatrick Venture2018-02-091-38/+104
| | | | | | | Cleaned up lines to address lines >80 chars. Change-Id: I2aa8ebb91f4af875275fb00f7444698e89c53b89 Signed-off-by: Patrick Venture <venture@google.com>
* DCMI: Add Get Power Reading command to whitelist configurationMarri Devender Rao2018-02-071-0/+1
| | | | | Change-Id: I88a5a1281199447163bf8d5c6e011ec3191d21c6 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Add Control.FanPwm as interface.Patrick Venture2018-02-071-0/+1
| | | | | | Change-Id: I20c2c162a28b7aabf14ae17ae2f456a6b10e0e6b Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Kun Yi <kunyi@google.com>
* watchdog: Consistently return errors for dbus failuresWilliam A. Kennington III2018-02-062-4/+19
| | | | | | | | | This adds return codes for all of the dbus failures which inform the host that it should retry the IPMI command as dbus related errors should be ephemeral. Change-Id: I090f488535625a996347677a0c8addbdff0996c0 Signed-off-by: William A. Kennington III <wak@google.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-063-0/+118
| | | | | | | | | 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: fix max temperature constantDeepak Kodihalli2018-02-061-1/+1
| | | | | | | | Change the max temperature constant from 128 (degrees C) to 127, because the temperature is represented with 7 bits (the 8th bit being the sign). Change-Id: I43d2edf8235ca69a4f31a72949079601c38355b1 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Support Get Sensor Thresholds CommandDhruvaraj Subhashchandran2018-02-065-0/+220
| | | | | | | | | Adding support for sensor thresholds command Resolves openbmc/openbmc#2624 Change-Id: I904c1b18c8709bceb7ecb7eec6e8e42e1f51525a Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* dcmi: get temperature readings: read temp sensorsDeepak Kodihalli2018-02-012-5/+192
| | | | | | | | | | | 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-013-0/+199
| | | | | | | | | 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>
* sensor: Modify the Get sensor reading commandTom Joseph2018-01-311-8/+11
| | | | | | | | | | | a) Scanning is enabled for all sensors, otherwise ipmitool would report the sensors as disabled. b) Correct the error handling scenario which will occur when the D-Bus object is not present or error occurs when reading the D-Bus property. Change-Id: I49535663a242305ab02a67f8f5998647cfee7eee Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* DCMI: Implement Get DCMI capabilities info command.Dhruvaraj Subhashchandran2018-01-313-0/+194
| | | | | | | | | | 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>
* sensor: Modify Get Device SDR command implementationTom Joseph2018-01-302-14/+22
| | | | | | | | | | a) Specify the sensor name deduction in the yaml b) Entity ID and entity instance is populated c) Sensor owner is set to BMC address, since all the sensors are present on the BMC. Change-Id: I7b64c48ad1dbd386e12b20af459e40baf0d97cd4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Populate entity id, instance and sensor name callbackTom Joseph2018-01-303-4/+20
| | | | | Change-Id: Ie7bf403ae15d9b1a70216aab0c57362c3d4240e7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Add support for multiple sensor naming patternTom Joseph2018-01-303-0/+71
| | | | | Change-Id: Ibf58d4a4f5a2783a9152f4b5f685e28ef527c5e2 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Increase timeout for host to respond to attentionsAndrew Geissler2018-01-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenBMC is dealing with some performance issues right after a reboot. Systemd does almost too good a job at parallelizing all of the services which causes a 6X hit on the processor during the initial boot once mapper is ready. In situations where the BMC is rebooted when the host is up, this performance issue coupled with errors queued up by the host to send down to the BMC, can cause OpenBMC to exceed its current 3 second timeout for attentions. This initial message from OpenBMC to the host is done to check if the host is running. If the message times out then it's assumed the host is not running which causes all sorts of issues for the system. Testing has shown it can take up to 10 seconds for the path to complete. Given the uncertainty of future performance, the unknowns on how many errors the host may have queued up, and the minimal impact a larger timeout has, this commit is increasing the timeout to 30 seconds. Resolves openbmc/openbmc#2832 Change-Id: I0d1baf601b6441a149e786e1f5de607862d86a52 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Remove unwarranted call to free()Deepak Kodihalli2018-01-291-1/+0
| | | | | | | | | | | Do not free() the pointer allocated by sd_bus_message_read(), because systemd will free that once the message is unreferenced. The free() in question here was causing an ipmid core dump. Resolves openbmc/openbmc#2846. Change-Id: I118f6947e7292b68744d0034c72572e4dcb99f01 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* watchdog: Fix enabled value typeWilliam A. Kennington III2018-01-291-1/+1
| | | | | | | | | | | | | | When deserializing a bool with sd_bus_message_read, it expects the storage of the passed in container to be 4 bytes. A bool is not guaranteed to be this large and will cause sd_bus_message_read to scribble on the stack. Change enabled to int to guarantee enough space to deserialize the result. For reference libsystemd is doing: *(int*) p = !!*(uint8_t*) q; Change-Id: Ic299e303fcb70941757c453a7b4f643337220afb Signed-off-by: William A. Kennington III <wak@google.com>
* Add Get System GUID command to whitelist configurationMarri Devender Rao2018-01-251-0/+1
| | | | | Change-Id: I476a5ac2d645792f5ec8cceca9f094724b2c0422 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* watchdog: Implement error on reset of disabled watchdogWilliam A. Kennington III2018-01-242-1/+31
| | | | | | | | | This enables the host to recover when the BMC resets or the daemon loses state for some reason. A well formed host will resend the SetTimeout command if it encounters this error code. Change-Id: Ib5fd50ac3ad83ef820f0209354aa8f084a563995 Signed-off-by: William A. Kennington III <wak@google.com>
* Add channel-gen.cpp to compilation unitsTom Joseph2018-01-242-8/+11
| | | | | | | | | The commit c01edf283dca792d1eecedd5c03b69b7eebb6f23 in phosphor-host-ipmid had introduced a breaking change. This commit would fix that. Change-Id: Id3aa18bcc3b7f054b8c659916896de146064d8bb Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add sensor entry for power supply redundancy enabled.Dhruvaraj Subhashchandran2018-01-222-1/+36
| | | | | | | | | | | IPMI to dbus lookup contained only mapping for PS redundancy disabled, adding the mapping for enabled. Changing the PS redundancy sensor type from D8 to CA. Resolves openbmc/openbmc#2810 Change-Id: I2399ce76a168f63f6a4528cff8aa397ef12d5e1e Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* DCMI : Implement Get System GUID commandMarri Devender Rao2018-01-192-0/+75
| | | | | | | | | | | Implemented IPMI Get System GUID command. It reads data from the DBUS object which is in RFC4122(MSB) format and converts to LSB format and returns. Resolves openbmc/openbmc#2620 Change-Id: I95f0aa596695bf1f903b4c2cc1d64df80bdd3de9 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* LANConf: Minor FixesRatan Gupta2018-01-171-12/+9
| | | | | | | | | | | 1) Get the interface mode of the system if it is not given so that we can set the same interface mode as it was before. 2) Removed the unnecessary condition of getting the VLAN. Resolves openbmc/openbmc#2738 Change-Id: I1658fbf78627e7cc1c7e1e5875964ed30c58d6dc Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* multiple-channel configuration via yamlPatrick Venture2018-01-177-13/+101
| | | | | | | | | Handles converting a yaml file mapping IPMI channel to ethernet device and using this instead of a hard-coded map. Change-Id: Iedfe7cb52a2d0663b9c8a0f6f9d37fe733b63a58 Signed-off-by: Patrick Venture <venture@google.com>
* Get Device ID - JSONDavid Cobbley2018-01-042-59/+93
| | | | | | | | | | | | | | This reads in all the get device ID parameters via a JSON file in the rootfs. Using a file in the rootfs will give much more flexibility to consumers of openbmc. Each ODM can simply bbappend their dev_id.json with their own specific get device ID info in. Now you can compile in the required info at build time, or modify during run time if needed. It also does not require any additional compilers/scripts to generate a yaml file. Change-Id: I44dfda54fa1762f88973ad709bf7a50bf32e492d Signed-off-by: David Cobbley <david.j.cobbley@linux.intel.com>
* Add chassis identify ipmi command.James Feist2017-12-132-2/+118
| | | | | | | | | Add command with support for chassis identify. Resolves openbmc/openbmc#2621 Change-Id: Ie656b71eba68141117838363456c6e075225e3e6 Signed-off-by: James Feist <james.feist@linux.intel.com>
* multiple channel configuration supportPatrick Venture2017-12-127-103/+220
| | | | | | | | | | | | | | Previously, the ipmi daemon only supported eth0 and hard-coded it to channel 1. This allows one to map via a configuration. The channel number provided is checked against a configuration to retrieve the ethernet device identifier, e.g. eth0. Tested: Ran on a quanta-q71l and was able to properly set MAC, IP, Netmask, Gateway IP, and then verified the data was set for the eth1 via `ip addr show eth1`. Change-Id: I92f63188297304e9454fd0d6fe32bc6cf84bb181 Signed-off-by: Patrick Venture <venture@google.com>
* Update .gitignoreTom Joseph2017-12-121-0/+1
| | | | | Change-Id: I062c27173e0279759ca14fb49304e5a54ac35dbe Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensorhandler: allow preconfigured unit and scaleEmily Shaffer2017-12-103-22/+46
| | | | | | | | | | | Allow specifying the scale and unit for a sensor in the YAML configuration. This can save clock time by no longer requiring the daemon to reach out to the sensor owner for the information. Change-Id: I5f63286fc32fb9d64ebab7d86d1dbb7ff40591f4 Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Patrick Venture <venture@google.com>
* ipmisensor.cpp: Fix msg from "Undetermine" to "Undetermined"Adriana Kobylak2017-12-051-1/+1
| | | | | Change-Id: If647149928f9bafb0e0c2cfa33485b3f46328733 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* IPMI device ID command mismatch with BMC current side issue fix.Dinesh Chinari2017-12-051-32/+66
| | | | | | | | | | Revisited convert_version sub routine. It should now work for also v1.x.y strings, e.g: ibm-v1.99.10-113-g65edf7d-r3-0-g9e4f715. Resolves: openbmc/openbmc#1480 Signed-off-by: Dinesh Chinari <chinari@us.ibm.com> Change-Id: I5acf028a907af8a1a3bbecd6709bcbac45c877e1
* sensor: Modify the service lookup for set sensor commandTom Joseph2017-12-041-6/+4
| | | | | | | | | | | With the current implementation of the generated code for the sensors, the object path corresponding to the sensor is present. But lookup was done again for the object path which was unnecessary. The current change would would only lookup the service implementing the object path and the interface corresponding to the sensor. Change-Id: I185bc49f6387428d62ab0e5cb8326497837aa67f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Document OpenBMC OEM Extension NumberingPeter Hanson2017-11-301-0/+172
| | | | | | | | Includes table of OpenBMC OEM Extension command codes, and describes message layout of I2C extension. Change-Id: Idafce7959348fca1e072c0bad09b58bf6c6931ab Signed-off-by: Peter Hanson <peterh@google.com>
* Fix the getLan configRatan Gupta2017-11-284-32/+36
| | | | | | | | | | | | | | | We did the filtering during IPAddress parameter to avoid link local address but left it for subnetMask and vlan parameter. With the introduction of zeroconfig IP we have multiIPaddress can exist on the interface. This commit introduces the filtering for subnetmask and vlan parameter also. Resolves openbmc/openbmc#2664 Change-Id: I244bfe8b9d7efbf55fc1b7051489a8a204182906 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* transporthandler: lan_set_in_progress to per channelPatrick Venture2017-11-222-23/+22
| | | | | | | | | The IPMI specification indicates that this value is per channel, therefore goes in the channelconfig object. Change-Id: Iab5861651518ac80d797faa9d9f092933cc1886e Signed-off-by: Patrick Venture <venture@google.com>
* transporthandler: minor cleanup unused variablesPatrick Venture2017-11-141-6/+0
| | | | | | | | | Simple cleanup to remove obj, ifc, and nwinterface varibles likely holdovers from before the refactor to using util methods. Change-Id: Icf55cdcbe8cb75a08d1d32df4f23112b142bf55b Signed-off-by: Patrick Venture <venture@google.com>
OpenPOWER on IntegriCloud