summaryrefslogtreecommitdiffstats
path: root/occ_status.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for sensorName field in yamlHEADmasterAlexander Filippov2019-04-101-5/+43
| | | | | | | | | | | | | | | We want to have ability to specify the human readable names for the OCC sensors. E.g. `CPU0_OCC` instead of `occ_4_0050`. This commit allows to specify a `sensorName` field in the YAML config for each sensor, and this name will be used in the sensor object DBus path. If the field is not specified, previous behavior will be used. Tested: the command `busctl tree org.open_power.OCC.Control --list` must show specified names. Change-Id: I2f05f7bf44120554ea07b9ee0aac9cfbd33ac376 Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
* Fix error attribute naming for Linux 5.0Eddie James2019-04-091-2/+3
| | | | | | | | | | | | There was a slight change to one of the error attributes as part of the OCC driver upstreaming process. This commit also adds unit tests for the error attributes. This required some refactoring to support the unit tests. Resolves openbmc/openbmc#3505 Signed-off-by: Eddie James <eajames@us.ibm.com> Change-Id: I665b46e44b18befc8a728f7246bcda82f1f1a71c
* clang-format: Update to match docs repoGunnar Mills2018-10-181-135/+129
| | | | | | | | | | Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting Change-Id: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Revert "Add Bus class to reset OCC bus driver"Eddie James2018-07-111-1/+0
| | | | | | | | | This reverts commit b5508d7a0fd9202c37cc02aea045f189e991dd09. The new SBEFIFO driver handles recovery on it's own, making this code unnecessary. Change-Id: I65dfb0ff4a67c6f7e225c6dcf68366768236f47a Signed-off-by: Eddie James <eajames@us.ibm.com>
* Add Bus class to reset OCC bus driverEddie James2018-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | For some systems, the OCC is accessed over the SBEFIFO, acting as a bus. If the SBE experiences a failure, the SBEFIFO driver is unable to recover. Therefore, the OCC control application must force a reset of the SBEFIFO driver when the OCC goes active. Add a Bus class and reset method to unbind and bind the appropriate SBEFIFO devices when the OCC devices are bound. Testing: Powered on the system successfully. Injected SBE error through a putscom. Without this fix, I intermittently saw SBEFIFO errors on the BMC after the injection. With the fix, I saw no errors despite ~20 iterations. Resolves openbmc/openbmc#3156 Change-Id: I0f9a230c57d0a3a7b59a874f62cdb1d93c6dcdfb Signed-off-by: Eddie James <eajames@us.ibm.com>
* Change occ-hwmon device namesEddie James2018-03-191-4/+4
| | | | | | | Device names changed in 4.13, so update them here. Change-Id: Ieb92f55499f3577dbfd737ea870a69dd4f351bc2 Signed-off-by: Eddie James <eajames@us.ibm.com>
* Only add presence watching when all OCCs are boundEddie James2017-12-201-0/+6
| | | | | | | | | | | | The OCC present count returns the number of OCCs in the system. Before we have bound the second OCC, this will be greater than the number of OCCs the Manager has counted as Active, resulting in a mismatch, causing an error. Resolves openbmc/openbmc#2733 Change-Id: Ia37a6b152fb073cf3044c601501903bcdfe9d3fe Signed-off-by: Eddie James <eajames@us.ibm.com>
* Add watches for throttling reported by the OCCEddie James2017-12-121-3/+8
| | | | | | | | | | | Add Error objects to watch the sysfs entries provided by the OCC hwmon driver that report various types of throttling. Also needed to add a boolean input to the Error callback interface. Resolves openbmc/openbmc#1821 Change-Id: I4425770a92ace0f73024b3dc4c577ce46957a62a Signed-off-by: Eddie James <eajames@us.ibm.com>
* Add OCC present count detection and watchEdward A. James2017-11-171-0/+4
| | | | | | | | | | | | | | | | Add a Presence child class of Error to handle detecting the number of OCCs available. Add an instance of this Presence class if the Device detects that it is the master OCC, since the number of present OCCs is only reported by the master OCC. When a change to the number of OCCs reported is detected, compare with the number of OCCs determined to be active by the Manager, and if there is a mismatch, follow the usual error path (reset OCC, etc). Partially resolves openbmc/openbmc#2285 See https://gerrit.openbmc-project.xyz/#/c/7843/ Change-Id: Idbaca52b307992d9b01fe15439ab746ef6d64397 Signed-off-by: Edward A. James <eajames@us.ibm.com>
* Set OccActive property on application startVishwanatha Subbanna2017-09-261-2/+9
| | | | | | | | | | | | | | | | | | | | | Host sends OCC active status command just once as part of power on operation and when that is sent, occ control application binds the device. As part of bind, a sysfs file gets created that would be used to communicate the occ error status back to user. If occ control application terminates and restarts, then it needs some way to set OccActive property and this commit adds that support. Solution is to check if the device is already bound by checking the presence of the OCC_HWMON_PATH/occ<number>-dev0 and set the property if found Fixes openbmc/openbmc#2238 Change-Id: I920b52e3970cc91af50b5bc68ead44c66eab8944 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Remove hub FSI scan which was part of OCC bindVishwanatha Subbanna2017-09-021-7/+0
| | | | | | | | Scanning hub FSI is now moved to a service file since it's needed prior to power on and hence this change is not needed. Change-Id: If2d0d8f5c7e1b405d6e858e0f2da8fc7b505cd86 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add I2C OCC support for P8 systemsLei YU2017-08-281-0/+6
| | | | | | | | | | | | | | P8 system uses I2C OCC and it uses different driver for occ-hwmon. Add `--enable-i2c-occ` configure option to enable the support. It searches i2c device names in sysfs to get all occ-hwmon devices and use the i2c device name to bind/unbind the driver. The occ control object path for I2C OCC hwmon becomes something like /org/open_power/control/3_0050, where 3_0050 is the i2c address. Change-Id: I8b9d8d4429c563528dc88fb2679b265c53d7a2d5 Signed-off-by: Lei YU <mine260309@gmail.com>
* Enable OCC error monitoringVishwanatha Subbanna2017-08-231-3/+28
| | | | | | | Fixes openbmc/openbmc#2165 Change-Id: I93f317a32c910f279003fa0fce6ae2d597f90312 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Call Hub FSI scan service prior to doing OCC bindVishwanatha Subbanna2017-08-111-0/+7
| | | | | | | | | | This is needed to make sure that the /dev/occ files are created that are needed to communicate with OCC device. Also, calling to this service is needed only when the first call to do OCC bind is received. Change-Id: I40466b8b74753b2f2366be385a8b066e912b32e4 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Reset OCC on error conditionVishwanatha Subbanna2017-08-021-1/+41
| | | | | | | | | | After detecting the error in the OCC, invokes OccReset command in Host Control dbus object with the sensor ID of the failing OCC Fixes openbmc/openbmc#1363 Change-Id: I608dbbb943d3b39d0709d6f350ab799e771a13e9 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Use generated occ to sensor ID mapVishwanatha Subbanna2017-08-021-1/+14
| | | | | Change-Id: I948cc33ef05c2c49353277f4d5df958012a9801f Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add support to watch for OCC errorsVishwanatha Subbanna2017-07-291-3/+10
| | | | | Change-Id: I98d95020a2d01e281e5c8efa825d6b4bd4c6c160 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add Support to do device bind and unbind based on OCC statusVishwanatha Subbanna2017-07-061-1/+20
| | | | | | | Fixes openbmc/openbmc#1698 Change-Id: Iaa33c3065b0358b62e3ec7e39d4b57c6b9d181e1 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Implement OCC status interfaceVishwanatha Subbanna2017-07-041-0/+48
Change-Id: I43822cb28bc2d23398fb09352c9876e169c666f7 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud