summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Replace tabs with 4 spacesNagaraju Goruganti2018-04-182-136/+136
| | | | | | | replaced tabs with four spaces. Change-Id: Ib36bf7956a280921c45a7944a972c0f19fe39e5c Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Implement RMCP+ cipher parameters in Get LAN Config parametersTom Joseph2018-04-182-0/+74
| | | | | Change-Id: Ic78965be94b1ba31149a05a29c1a768f06b492e4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Reducing IPMI logging footprintAditya Saripalli2018-04-1818-222/+157
| | | | | | | | | | | | -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>
* Fix FRU BuildDate DBus/IPMI exportingAndres Oportus2018-04-171-4/+25
| | | | | | | | | | | | | | | | When BMC exports the date into DBUS it translates/expands the 3 bytes FRU format date into an easy to read string as in "2015-11-06 - 22:23:00", when exporting the DBUS date back to IPMI it needs to translate back this date into the 3 bytes FRU format, without this fix we get a build date in 1996 that is the epoch for the FRU date format. This change reconstructs the FRU date from the easy to read string for exporting into IPMI. Tested: Manual check that BuildDate from busctl and ipmitool match Resolves openbmc/openbmc#3013 Change-Id: I0fd1dd8f945f18b53c14bff321c9e233fdb2d742 Signed-off-by: Andres Oportus <andresoportus@google.com>
* Implement Get Channel Cipher Suites commandTom Joseph2018-04-165-0/+212
| | | | | Change-Id: I8c808ce7e2bbd3ae5e225573138d7e04871f1643 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensorhandler: changed mutabiltity error code in get sensorJayanth Othayoth2018-04-111-1/+1
| | | | | | | | Changed mutability handling error code in get sensor from IPMI_CC_SENSOR_INVALID to IPMI_CC_ILLEGAL_COMMAND Change-Id: I599de08e3d3bc6a9820ac3978f0a4d160f19f55e Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
* sensorhandler: Enable mutability based set functionJayanth Othayoth2018-04-113-0/+15
| | | | | | | Resolves openbmc/openbmc#2980 Change-Id: I67afd4e84ec96e5cfc2dd315604d70f41c67a438 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
* Fix error level lookupDeepak Kodihalli2018-04-111-17/+23
| | | | | | | | | | | | | | The mapping between an error level in the esel to a phosphor-logging error level was broken. This commit fixes it. This commits also specifies the error level while calling the error report() API, so that error D-Bus objects reflect the right error level (as per the esel). Resolves openbmc/openbmc#3014. Change-Id: I9891d468d98d169f73275a3693df4f3a2166001d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Handle sensors that can not be found in SystemManagerLei YU2018-04-101-1/+8
| | | | | | | | | | | | | | | | | When a sensor id is not managed in yaml the code tries to get it from legacy SystemManager; And when the sensor id can not be found in SystemManager, it returns empty path, and cause segment fault. This commit makes it return -EINVAL when path is empty, and thus the code will handle this case properly without crash. Resolves openbmc/openbmc#3062 Tested: Boot host without ipmid crash on Romulus. Change-Id: I4240b9be54824543b5e795e898330aeb02c5eb90 Signed-off-by: Lei YU <mine260309@gmail.com>
* README: Reword cleaning the repoGunnar Mills2018-04-101-1/+1
| | | | | | | Reworded cleaning the repo. The old wording did not make sense. Change-Id: I129faed7b8de5781c4f67e77be6122937e4a6e5d Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Revert "Revert "Add chassis identify ipmi command.""Tom Joseph2018-04-042-2/+118
| | | | | | | | | | This reverts commit 82feb17d0c244ed04b82b0fbed3c0a9456986a86. The fix for armv5 futures is provided in yocto 2.4 Resolves openbmc/openbmc#3010 Change-Id: Ifc7e224f6f1fa115e0299642e8866b82d6e4f38c
* utils: Add a class to cache service lookupsWilliam A. Kennington III2018-04-022-1/+101
| | | | | | | | | | | Currently we are doing interface + path -> service lookups for each ipmi command sent to the daemon. For many types of commands this is not ideal as the daemon is unlikely to change often at runtime. Implement a basic cache with the ability to invalidate the service name at any time. This is used by code in a future commit. Change-Id: I85b04dd17ac19e31d49070f289704b429bd1e577 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Cache service nameWilliam A. Kennington III2018-04-022-8/+10
| | | | | | | | | | | | | | | | | | | | | We have occasionally noticed that the watchdog will be enabled and then immediately trip upon booting of the BMC. This happens if the host is still running when the BMC is coming up. Digging into the issue we notice that the phosphor-mapper can be under very heavy load responding to all of the initial mapping requests from BMC daemons starting. This causes a delay in the phosphor-watchdog service name lookup during an attempt to reset the watchdog countdown. The lookup delay is so long that the watchdog ends up tripping before the reset is actually issued, causing the BMC to reset the host. Since we know that the watchdog will not be armed until the service resolves for the first time, we can reduce the dependence and pressure on the service mapper by caching the service name. Since it is the case that we want to keep issuing resets to the same daemon that was initially configured, we should have no worries about invalidating the cached service name. The name will be invalidated any time we encounter a dbus level error issuing a watchdog commmand. Change-Id: I303a39be997c2e57050b71efc8ef2e2cb27f8cf7 Signed-off-by: William A. Kennington III <wak@google.com>
* Fixed broken "fru read" commandNagaraju Goruganti2018-03-272-15/+23
| | | | | | | | | | | | | | | | Fixed below given two issues: 1.We are getting seg-fault due to incorrect format specifiers for log-entry. 2.When requested data count plus offset exceeds fruArea size, we through error, instead we can return remaining bytes. Tested: 1.Verified using below given command. ipmitool -I lanplus -C 3 -P 0penBmc -H <BMP_IP> fru read <fru_id> fru_file Resolves openbmc/openbmc#2893 Change-Id: Iecfe80ed7230b936eca86fd16208582ee7b4e09c 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>
* SetLan: Fix the IP address if partial data givenRatan Gupta2018-03-201-1/+1
| | | | | | | | | | | | Presently when partial lan data is given the code was not getting the correct IP object,it was getting the linklocal address. This defect was introduced due to this commit c7c1c3c. This commit fixes this problem. Change-Id: I8f6d915cd3e1757ba28394cd93f16396e087d4f7 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* SetLan: Apply the network changes once the timer expiresRatan Gupta2018-03-203-35/+73
| | | | | | | | | | | | Start the timer once the set in progress parameter set to set complete as part of Set LAN Configuration Parameters command. Resolves openbmc/openbmc#2932 Resolves openbmc/openbmc#2993 Change-Id: Ie6f3b331531da23c74fa44bb52fa1ddccffabd13 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Timer: Fix the timer expire property.Ratan Gupta2018-03-202-2/+4
| | | | | | | | | | | | | | | Presently when the call back associated with timer gets called then the expire property becomes true, which is correct as it tells the timer has expired and calls the callback. On the other hand it doesn't set the expire property to false when it starts the timer. This commit sets the expire property to false when startTimer function gets called. Change-Id: I0bb4fe3c375b2a73d214ba9ccbdf25f223b11449 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* SetLan: Move the setChannel access functionRatan Gupta2018-03-202-324/+325
| | | | | | | | | | | | | | | Move the function from app/channel.cpp to the transporthandler.cpp setChannel access is disabled now as the functionality to apply the network changes would be done through timer based approach. In later commit we would create this function as callback when the network timer expires. Change-Id: Ic128a47237b2ecdbc56267227105909f8886a862 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* setlan: Remove registration of handler for Set Channel AccessRatan Gupta2018-03-201-10/+0
| | | | | | | | | | | | | Presently through set channel access command we apply the network changes which is not a standard BMC implementation. It was decided that we should apply the network changes with the timer based approach. Timer based implementation would be done in later commits. This commit only removes the registration handler for set channel access command. Change-Id: Ic67c09d0f688d30be0fc7bfcda4f3290f89baf20 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* sensor: Refactor get sensor reading implementationTom Joseph2018-03-201-72/+75
| | | | | | | | | | Legacy sensors(org.openbmc) implementation is stubbed into a separate function for clarity. Sensor type lookup is needed to populate the reading for the legacy sensors, this was done for all the sensors. With this patch sensor type lookup is done only for the legacy sensors. Change-Id: Idd33e41669d8ad33529ad9ccdbed9d4da5ecda79 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Fix set sensor reading for analog sensorsTom Joseph2018-03-161-15/+9
| | | | | | | Tested: Set temperature sensor to sensor object Change-Id: I77b8dcd6f298ca7b09aac475c2e8da4af5825940 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Change the byte order for aux firmware revisionTom Joseph2018-03-161-4/+4
| | | | | | | | | | According to the specification, any generic utilities should display each byte as 2-digit hexadecimal numbers, with byte 13 displayed first as the most-significant byte. This patch corrects the byte order so that byte 13 represents the most-significant byte. Change-Id: Ie71d2af6a9e9f14c8d1d12cea7e45a57aa15a3dd Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Remove use of legacy inventory interfaceNagaraju Goruganti2018-03-122-105/+111
| | | | | | | | | | | | | | | | | | | Made below given changes: 1.With legacy code we used to read software version info from the system file: /etc/os-release, now with new updates we will read it from the s/w object which is implementing the interface "xyz.openbmc_project.Software.RedundancyPriority" interface. 2.Removed legacy code related to inventory(FRU) for sensors Tested: 1.Verified f/w version info using below given command >ipmitool mc info -I dbus 2.Verified get sensor type info using below given command >ipmitool raw 0x04 0x2f 0x02 -I dbus Resolves openbmc/openbmc#2870 Change-Id: I384bf4aaacd56f4a871833b533b2a8a68c489959 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Remove use of legacy bmc control interfaceNagaraju Goruganti2018-03-121-77/+36
| | | | | | | | | | | Tested: Tested using below given command for cold/warm resets >ipmitool mc reset [ warm | cold ] -I dbus Resolves openbmc/openbmc#2919 Change-Id: I15fc5ab53b7d8b2b17bc9fa8f3f2030e93bd0483 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* sensors: rework sensor assertionBrad Bishop2018-03-071-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch the sensor assertion logic would generate an invalid DBus message or undefined behavior in several scenarios. - A bit is both asserted and desasserted: A well behaving client won't do this but the existing logic would generate an invalid property-set message with signature ssvv. Rework the logic such that no dbus traffic occurs. - No bits are asserted: Results in an invalid message with signature ss. Rework such that no dbus traffic occurs. - Empty offset value map in configuration: Results in an invalid message with signature s. Rework such that no dbus traffic occurs. - Empty offset value map entry (either assert or deassert) in configuration: Results in an invalid variant signature. Rework such that no dbus traffic occurs. - The same bit is specified in the configuration for multiple properties or interfaces: Can result in invalid messages with a wide variety of signatures. Rework such that one message is sent for each property being updated. - Invalid bit specified in value map entry Results in undefined behavior calling bitset::test. Rework such that entries in the value map with invalid bits are ignored. Tested: Verified the OperatingSystemStatus sensor can be set by a BIOS Change-Id: I4df9472a8bdc9e44e98e1a963838da0912d10683 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Implement Get SDR and Reserve SDR repository commandTom Joseph2018-03-015-15/+36
| | | | | | | | | | | Both Get SDR and Reserve SDR repository command is same as Get Device SDR and Reserve Device SDR command respectively. So the same implementation is shared. Resolves openbmc/openbmc#2615 Change-Id: I64e37837bc5a616bed41a3ceff7d63033d88455c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Updates to the get device sdr command implementationTom Joseph2018-03-012-103/+43
| | | | | Change-Id: Ibf5989b144ebe4ec75bd8d42c1d1167d7b16ecda Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Refactor get sensor reading commandTom Joseph2018-03-012-60/+12
| | | | | | | | Use the functor in the generated yaml to get the sensor reading for analog sensors. Change-Id: I2535cd5015096c3e1e2baa5f9a865fc6b27e6875 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Refactor get sensor thresholds commandTom Joseph2018-03-013-119/+84
| | | | | | | | | | | | Using GetManagedObjects to get the thresholds could take upto 15~20 sec for the core temperatures. The time taken to fetch threshold properties via GetManagedObjects is proportional to the number of objects under the path. Since the dbus object path is available in the yaml it is performant to read the threshold properties directly. Change-Id: Ic22d8f4d73d8ce4eabdffd6fc7af23f73b981f66 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Add result exponent to the sensor yamlTom Joseph2018-03-013-4/+11
| | | | | | | | | | | Result exponent sets the decimal point location for the result before the linearization function is applied. This is different from the scale implemented by the sensors dbus objects. The scale is the scaling factor to get the value for the units specified for the sensor. Linearization is done after applying the scale on the raw sensor value. Change-Id: I76624c593bf6cdf40ec884c0ff0aceb58746732c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Revert "Add chassis identify ipmi command."Joel Stanley2018-02-282-118/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5bfbde351aabe2096de99ee959a8a2e50edcf84c. See https://github.com/openbmc/openbmc/issues/2740 for details. This commit causes ipmid to fail to load. From github user artemsen: > ipmid[995]: ERROR opening [/usr/lib/host-ipmid/libapphandler.so.0]: > /usr/lib/host-ipmid/libapphandler.so.0: undefined symbol: _ZTINSt13__future_base12_Result_baseE As reported by Lei: > This issue prevent all P8 systems (with ast2400) booting with latest > OpenBMC, because ipmid fails to load libapphandler.so and cause watchdog > will not be kicked and always timeout on power on. As suggested by James Feist: > We probably should just revert the changes until we update to yocto > 2.4 which has the newer version of GCC with the fix for armv5 futures > as the backport seemed to fail. Change-Id: I0059cc3f939c1e3e5f88531fcb14ae3faa451387 Tested: Booted a ast2400 machine and checked journal Signed-off-by: Joel Stanley <joel@jms.id.au>
* utils: Add missing functional includeBrad Bishop2018-02-271-0/+1
| | | | | | | | std::function is not found with a GCC 7.2 runtime. Tested: Built repository with GCC 7.2 Change-Id: I90d2585bb49973744bc62c68a5b10362478852c7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove unused variables.Nagaraju Goruganti2018-02-271-4/+0
| | | | | Change-Id: I9c8ea4fbf7421ceef1e509cb78dea7136fd0a94b Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* DCMI: Add get/set Configuration Parameters commandNagaraju Goruganti2018-02-222-0/+289
| | | | | | | | | | | | | | | | 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>
* watchdog: Implements the Watchdog Get CommandWilliam A. Kennington III2018-02-215-0/+125
| | | | | Change-Id: I2ba9fd0eeba4e828cafd1bcf6fe30e2322eaf99e Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Implement watchdog action settingWilliam A. Kennington III2018-02-213-7/+52
| | | | | | | | We now respect the action set during the SetTimeout command. This maps to one of the actions defined by the dbus Watchdog interface Change-Id: I4d13d2539a2d955a4340bf5f915ca6f3b694550a Signed-off-by: William A. Kennington III <wak@google.com>
* 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>
OpenPOWER on IntegriCloud