summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: install into bin instead of sbinHEADmasterPatrick Venture2019-04-042-2/+2
| | | | | | | Installs into bin instead of sbin per guidelines. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I506628bb9930c6930284f4183d492080e79dd5f0
* cleanupPCIE: Catch file_error::Open exceptionAnthony Wilson2019-04-011-13/+22
| | | | | | | | | | | | | | | | | The bus that is read may only show up at certain times, such as during poweron. It is not a fatal error condition if the bus is not available. So we will let it get logged to the journal, but not let it get committed in this case. Tested: It was an intermittent failure, but ran poweron/poweroff a few times and didn't see the error pop up again. Resolves: openbmc/openbmc#3510 Change-Id: I47629e5f27fb847aa0094f0757b1988f8e645ebc Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* build: pkg anti-pattern: use defaultsPatrick Venture2019-02-131-4/+4
| | | | | | | | Use the defaults in the pkg check where the default error message is sufficient to identify which package is missing. Change-Id: Ib3c000db8dc8c4f9efedb66464c86d8d8c25bacb Signed-off-by: Patrick Venture <venture@google.com>
* Don't create errors in cleanupPCIEMatt Spinler2019-02-051-1/+10
| | | | | | | | | | This code always just runs in the power off path, and at times it may be called when power is already off. In that case the FSI access would fail since the processor won't have power, so just catch the error and continue on. Change-Id: Ic02b17875763b0540edaaec47ee19846f305db72 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* In startHost, don't set bit 2 in scratch reg 8Matt Spinler2018-11-261-3/+0
| | | | | | | | | | This was keeping hostboot from using some default scratch register settings. Tested: Tested by HW team Change-Id: I1290acbabfa785e67a6038a3aadb7ececd9e1f7a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* p9: pcie-workaround: Add service file to repoAnthony Wilson2018-11-093-0/+31
| | | | | | | | | | | systemd unit file distribution is typically done by the application build process. Testing: Verified service runs after obmc-power-stop-pre and before op-power-stop. Change-Id: I1c4eb81430a3bcd7784011f5f8fe50aa058384f7 Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* p9: cleanupPcie: Run procedure on all CPUsAnthony Wilson2018-11-081-3/+5
| | | | | | | | Procedure should be run on all of the master and slave CPUs. Change-Id: I323519b059cfbe14ccd6145e22b1bdae4fd3d476 Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* p9: cleanupPcie: Correct line endingsAnthony Wilson2018-11-071-51/+51
| | | | | Change-Id: Ia8c516ca1a4ceca46a88c9de72cd765e3b2884c2 Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* Fix std::variant usageWilliam A. Kennington III2018-11-061-1/+1
| | | | | | | Converts usage of mapbox specific .get() to std::get() interface. Change-Id: I7a07bbad9bc7d3d79079325aed11353deaf9aa63 Signed-off-by: William A. Kennington III <wak@google.com>
* add .clang-formatPatrick Venture2018-11-0220-480/+532
| | | | | | | Add .clang-format for automatic style. Change-Id: I6d240009370179b5b8f1f646b0476a059ec6aa85 Signed-off-by: Patrick Venture <venture@google.com>
* s/copyright char/(C)/g to make compiler happyPatrick Venture2018-11-0212-14/+13
| | | | | | | Compiler complaining about the copyright characters. Change-Id: I6730a50a668899a33e9dfcc4accb67ee207a3f08 Signed-off-by: Patrick Venture <venture@google.com>
* Add cleanupPcie to openpower-proc-controlAnthony Wilson2018-10-262-0/+51
| | | | | | | | | | | | | | This disables the drivers and receiver in the PCIE root control 1 register as follows: BIT NAME VALUE 19 TP_RI_DC_B 0b0 20 TP_DI1_DC_B 0b0 21 TP_DI2_DC_B 0b0 This should be run on a power off. Change-Id: I6e027260f78a3fc451a45832f6f9bcf9afc8c3b9 Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* openpower-proc-control: use c++17Vernon Mauery2018-10-041-1/+1
| | | | | | | Update configure.ac to choose the c++17 standard Change-Id: Ic782f5ca1a8435ecce99a92c5261d98eeac23647 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add MAINTAINERS fileAndrew Jeffery2018-05-231-0/+46
| | | | | Change-Id: I0c89c6fc42956fab135aa4bb2eef538fcdab6c99 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* README: Reword cleaning the repoGunnar Mills2018-03-301-1/+1
| | | | | | | Reworded cleaning the repo. The old wording did not make sense. Change-Id: I422b3683f026e09980169aad90760c6beb3552a5 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Log istep info on watchdog timeoutspashabk-in2017-10-252-0/+152
| | | | | | | | 1. SBE istep info (cfam 2809) 2. HB istep info (cfam 283C) Change-Id: I67632c58fe1148b980791dc017e5c099107caae5 Signed-off-by: Shakeeb Pasha <shakeebbk@in.ibm.com>
* Add FSI scan procedureMatt Spinler2017-10-044-2/+152
| | | | | | | | | | | | | | | | | This procedure will perform both the FSI master and FSI hub scans. It replaces doing the scans by writing to sysfs using the echo command so that real errors can be created on failures. Currently the only way to tell if the master scan fails is by checking for missing sysfs files, and this code will do that by checking for the hub scan file. Change-Id: Id4b91592b8c8b9a5fc9f1a56f4d89e142a6c6b74 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fix makefile generator script when multiple typesMatt Spinler2017-10-041-4/+4
| | | | | | | | | | | | | | | | | | | The script takes the arguments: base-directory type1 type2..typeN Where the types are the directory names to find procedures in. However, when multiple types are passed in during the build, they actually show up as 1 parameter: base-directory "type1 type2..typeN" This change looks for all of the types in the second parameter. Change-Id: Ib45446346bd8814ca58d72057c18b0faf16f9152 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Use all phosphor-dbus-interfaces errorsMatt Spinler2017-10-049-1132/+91
| | | | | | | | | | Remove the local error definitions and use the ones in phosphor-dbus-interfaces instead as the ones there suit our purposes and it simplifies this repository to do so. Change-Id: I18428c496914153270ecb181e7193acd0e386e97 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Convert over to uint32_t for AttemptsLeftAndrew Geissler2017-08-192-4/+4
| | | | | | | | | | | I missed the fact that the type for the reboot attempts property changed when code was refactored to the new xyz.openbmc_project.Control.Boot.RebootAttempts object Resolves openbmc/openbmc#2178 Change-Id: I297d427b6fa5b9dc0077aab437548d53603c835f Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Boot from sbe side 0 when boot count is greater than 0Andrew Geissler2017-08-181-1/+1
| | | | | | | | | | | | | | | Recent code changes now decrement the boot count at the start of every boot. The sbe side select design is to boot from side 0 twice, then side 1 on the last attempt. Now that the boot count is decremented at the start of the boot (and the total boot count is 3), the software needs to use side 0 when the boot count is greater than or equal to 1. Resolves openbmc/openbmc#2169 Change-Id: Ic08bed34d58de3d40b742ce52ca83627976d8fee Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Move over to new AttempsLeft for reboot countAndrew Geissler2017-08-071-4/+5
| | | | | | | | | The reboot count sensor was moved to the xyz namespace and renamed. This commit moves over to using this new sensor for determining SBE boot side. Change-Id: I482ad677272a76608da04f3c9a7807d28d453797 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Fix FSI hub pathEdward A. James2017-07-061-1/+1
| | | | | | | | | Targeting wasn't picking up the second proc FSI master. Resolves openbmc/openbmc#1901 Change-Id: I5571c2291e2c555b64ab1b20520a4bf686267c0f Signed-off-by: Edward A. James <eajames@us.ibm.com>
* Don't run vcs workaround on non-dd10 chipsAndrew Geissler2017-06-092-0/+16
| | | | | | | | | | | | | | | | The VCS workaround is only required (and only make sense) on P9 DD1.0 based systems. This code does a check of the chip level and does not run the workaround if the chip is not DD1.0. The code will continue to run some of the other workarounds because although not required for non-dd10 chips, they do no harm. Resolves openbmc/openbmc#1695 Change-Id: I1409ca359ccff7b78a186211e4cd447cd753eda7 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Set SBE seeprom boot sideAndrew Geissler2017-06-015-5/+128
| | | | | | | | | | | | | | The default side for the SBE to boot from is side 0, which is indicated by a 0 in bit 17 of cfam 0x2808. When the boot count goes to 1 (the last before giving up), the start_host logic will switch over to side 1 for the SBE to boot from. Resolves openbmc/openbmc#1467 Change-Id: I61aa22939baa4cde38c8716429b6ca55f7c850bd Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Replacing runtime exceptions with elogDhruvaraj Subhashchandran2017-05-175-5/+251
| | | | | | | Resolves openbmc/openbmc#1323 Change-Id: Ia93d1f0036341c26fdc6c5e3133d4a05346090be Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Replace error strings with logging errors in device operationsDhruvaraj Subhashchandran2017-05-154-46/+75
| | | | | Change-Id: I0fc1c23e51a0233c18775ee712132dba7e4c7d7e Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Add error definitions for CFAM access fails.Dhruvaraj Subhashchandran2017-05-093-0/+853
| | | | | Change-Id: I2089c74456fb5857759f8870ed6818996f16c2c4 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Change FSI behavior for 4.10Edward A. James2017-04-274-11/+63
| | | | | | | | | Latest FSI code changes paths and endianness, so we need to update Targeting and flip the CFAM data endian when necessary. Also update the test case to use the new 4.10 path style. Change-Id: I35cdedf4b9723ee0f8291d0abf4467dbfd99b334 Signed-off-by: Edward A. James <eajames@us.ibm.com>
* P9 CFAM register override procedureMichael Tritz2017-04-144-2/+93
| | | | | | | | | This new procedure will allow users to provide P9 CFAM register overrides before the P9 SBE is started. Change-Id: If3658f9a6ede9a3682c4ed7888e9acb328c67709 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* New procedure to set synchronous FSI clock modeMatt Spinler2017-03-301-0/+48
| | | | | | | | | | This procedure is required when switching to external cronus mode which needs synchronous FSI clock mode set as opposed to the asynchronous mode required by the Open FSI driver. Change-Id: I509d113bd5cdadedb64b0275628f95572c21b0a3 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fix jenkins compile failureMatt Spinler2017-03-303-19/+29
| | | | | | | | | | | | | | | Jenkins just started complaining about a mismatch between an sprintf format and its type. This code will eventually be replaced by an elog, so is only temporary anyway. Also fixed unit test fails. With the newest location of the FSI slave directory, the path had to be updated in the testcases that model its structure. Change-Id: I46af324c25ea19d9ad31e9e9ce085b93f00cb1a9 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fix path for FSI slavesMatt Spinler2017-03-172-3/+3
| | | | | | | The FSI path moved for the 2nd processor. Change-Id: Ic462dc7648a68abc7de178e2312bc2368fc06d40 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Pass source dir into makefile generator scriptMatt Spinler2017-03-172-3/+7
| | | | | | | The script runs in build/, the source is in git/. Change-Id: I3f6804f3a83013bc0afe7bfba8da585d2fd24413 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add README.mdMatt Spinler2017-03-141-0/+12
| | | | | Change-Id: I117a3ee6895cfc195d04a4704476a40d8bc10028 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Have the Target class manage the file descriptorMatt Spinler2017-03-147-21/+42
| | | | | | | | The sysfs file descriptor will now stay open from first use until the Target class is destroyed. Change-Id: Ib9803a527115cc75ecc9a5351d1e748ccd54a993 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Conditional compilation of proceduresMatt Spinler2017-03-145-2/+40
| | | | | | | | Only compile in the procedures for chips specified during configure. Change-Id: Ie069f472b86bfbe8ad5d00bc6db8def573f86b4b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Register proceduresMatt Spinler2017-03-149-40/+131
| | | | | | | | | | For a procedure to be available to run, it needs to have a call to a REGISTER_PROCEDURE macro. This macro wraps a call to a Register class that adds the procedure to the list along with the name to call it. Change-Id: I20d02e8f004c1c726228469465ae89b60ee52d66 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Move procedures into separate files.Matt Spinler2017-03-143-30/+73
| | | | | | | | | | Procedures will now be in procedures/<chip>/. The next commit will have the procedures register themselves so they won't be in a hardcoded list. Change-Id: I0ff90afe2b51aaff25b5c25bf87070c820323e30 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fill in startHost and vcsWorkaround proceduresMatt Spinler2017-03-141-0/+66
| | | | | | | | These will replace /usr/bin/start_host.sh and /usr/bin/vcs_workaround.sh. Change-Id: I799da6d6052e72fb05760a115dfeb202416dc34d Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add code to access P9 CFAM registersMatt Spinler2017-03-144-0/+207
| | | | | Change-Id: Idd98d016f0d6a246b516b4850e887991c771ae16 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add FileDescriptor classMatt Spinler2017-03-143-0/+107
| | | | | | | | A simple class to wrap a file descriptor so it can be opened on construction and closed on destruction. Change-Id: I16d481fdc91e99720acd9cabff3a3a4690d8a573 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add gtest for Targeting classMatt Spinler2017-03-145-1/+143
| | | | | Change-Id: I10d00d56561c52c479052d2e04630cc326091aa0 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add Target and Targeting classesMatt Spinler2017-03-143-2/+209
| | | | | | | | These classes are used to target certain processors for operations. Change-Id: Iab7a9fc0f1b0a901963e4e899ded370435cfb418 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add startHost and vcsWorkaround stubsMatt Spinler2017-03-147-0/+206
| | | | | Change-Id: Id696a7735930806373c214da50660ee0ee830598 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Initial commitPatrick Williams2017-02-281-0/+201
OpenPOWER on IntegriCloud