summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* travis: add fedora28Stewart Smith2018-05-292-0/+8
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Add -Wno-stringop-truncation for GCC8Stewart Smith2018-05-292-1/+2
| | | | | | | This warning appears to not be particularly useful if you ever actually *want* to truncate a string. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* hdata/i2c.c: fix building with gcc8Stewart Smith2018-05-291-1/+1
| | | | | | | | | hdata/test/../i2c.c:200:1: error: alignment 1 of ‘struct host_i2c_hdr’ is less than 4 [-Werror=packed-not-aligned] } __packed; ^ Fixes: https://github.com/open-power/skiboot/issues/160 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* hdata/spira.c: fix iplparams feature name string handlingStewart Smith2018-05-291-1/+3
| | | | | | | | | | Fixes this gcc8 warning: hdata/test/../spira.c: In function ‘add_iplparams_features’: hdata/test/../spira.c:1209:38: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess] strncpy(name, feature->name, sizeof(feature->name)); ^ Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* core/test/run_mem_region: fix GCC8 compile errorStewart Smith2018-05-293-3/+3
| | | | | | | | error: ‘const’ attribute on function returning ‘void’ [-Werror=attributes] Fix by not putting the const attribute in the stub Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* hdata/tests/stubs.c: fix GCC8 warningStewart Smith2018-05-291-2/+2
| | | | | | | | | | hdata/test/stubs.c:112:11: error: ‘lock_caller’ alias between functions of incompatible types ‘void(void)’ and ‘_Bool(void)’ [-Werror=attribute-alias] NOOP_STUB(lock_caller); ^~~~~~~~~~~ We fix it by giving the correct prototype to our stub Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Add prepare_hbrt_update to hbrt interfacesDan Crowell2018-05-292-1/+15
| | | | | | | | | Add placeholder support for prepare_hbrt_update call into hostboot runtime (opal-prd) code. This interface is only called as part of a concurrent code update on a FSP based system. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 5.4.10 release notesStewart Smith2018-05-281-0/+58
| | | | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit aaa3e159cb2ce6baa3d4ca1a283c5f918944c18b) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 5.9.9 release notesStewart Smith2018-05-281-0/+27
| | | | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit 81e58346c8b8a9f85d7b116f2d3c1b6bc724daea) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 5.10.6 release notesStewart Smith2018-05-281-0/+48
| | | | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit 48e5e8be4612b4233b2e443c86fffa1997ab0799) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 6.0.4 release notesStewart Smith2018-05-281-0/+55
| | | | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit c55a54bbf38b6b3144105885e173ae7b6afab091) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* SLW: Remove stop1_lite and stop2_liteAkshay Adiga2018-05-241-28/+8
| | | | | | | | | | | | | | | | | | | | | | stop1_lite has been removed since it adds no additional benefit over stop0_lite. stop2_lite has been removed since currently it adds minimal benefit over stop2. However, the benefit is eclipsed by the time required to ungate the clocks Moreover, Lite states don't give up the SMT resources, can potentially have a performance impact on sibling threads. Since current OSs (Linux) aren't smart enough to make good decisions with these stop states, we're (temporarly) removing them from what we expose to the OS, the idea being to bring them back in a new DT representation so that only an OS that knows what to do will do things with them. Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> [stewart: add to explanation] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* platform/astbmc: Do not delete compatible propertyVasant Hegde2018-05-241-1/+2
| | | | | | | | | | | | P9 onwards OPAL is building device tree for BMC based system using HDAT. We are populating bmc/compatible node with bmc version. Hence do not delete this property. CC: Jeremy Kerr <jk@ozlabs.org> CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Add support for readline if it existsBalbir Singh2018-05-241-1/+14
| | | | | | | | | Add support for tclreadline package if it is present. This patch loads the package and uses it when the simulation stops for any reason. Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* core/console: fix deadlock when printing with console lock heldNicholas Piggin2018-05-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some debugging options will print while the console lock is held, which is why the console lock is taken as a recursive lock. However console_write calls __flush_console, which will drop and re-take the lock non-recursively in some cases. Just set con_need_flush and return from __flush_console if we are holding the console lock already. This stack usage message (taken with this patch applied) could lead to a deadlock without this: CPU 0000 lowest stack mark 11768 bytes left pc=300cb808 token=0 CPU 0000 Backtrace: S: 0000000031c03370 R: 00000000300cb808 .list_check_node+0x1c S: 0000000031c03410 R: 00000000300cb910 .list_check+0x38 S: 0000000031c034b0 R: 00000000300190ac .try_lock_caller+0xb8 S: 0000000031c03540 R: 00000000300192e0 .lock_caller+0x80 S: 0000000031c03600 R: 0000000030012c70 .__flush_console+0x134 S: 0000000031c036d0 R: 00000000300130cc .console_write+0x68 S: 0000000031c03780 R: 00000000300347bc .vprlog+0xc8 S: 0000000031c03970 R: 0000000030034844 ._prlog+0x50 S: 0000000031c03a00 R: 00000000300364a4 .log_simple_error+0x74 S: 0000000031c03b90 R: 000000003004ab48 .occ_pstates_init+0x184 S: 0000000031c03d50 R: 000000003001480c .load_and_boot_kernel+0x38c S: 0000000031c03e30 R: 000000003001571c .main_cpu_entry+0x62c S: 0000000031c03f00 R: 0000000030002700 boot_entry+0x1c0 Reported-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* opal-prd: Do not error out on first failure for soft/hard offline.Mahesh Salgaonkar2018-05-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The memory errors (CEs and UEs) that are detected as part of background memory scrubbing are reported by PRD asynchronously to opal-prd along with affected memory ranges. hservice_memory_error() converts these ranges into page granularity before hooking up them to soft/hard offline-ing infrastructure. But the current implementation of hservice_memory_error() does not hookup all the pages to soft/hard offline-ing if any of the page offline action fails. e.g hard offline can fail for: - Pages that are not part of buddy managed pool. - Pages that are reserved by kernel using memblock_reserved() - Pages that are in use by kernel. But for the pages that are in use by user space application, the hard offline marks the page as hwpoison, sends SIGBUS signal to kill the affected application as recovery action and returns success. Hence, It is possible that some of the pages in that memory range are in use by application or free. By stopping on first error we loose the opportunity to hwpoison the subsequent pages which may be free or in use by application. This patch fixes this issue. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* AMI BMC: use 0x3a as OEM commandStewart Smith2018-05-241-1/+1
| | | | | | | | | | | | The 0x3a OEM command is for IBM commands, while 0x32 was for AMI ones. Sometime in the P8 timeframe, AMI BMCs were changed to listen for our commands on either 0x32 or 0x3a. Since 0x3a is the direction forward, we'll use that, as P9 machines with AMI BMCs probably also want these to work, and let's not bet that 0x32 will continue to be okay. Suggested-by: Joseph Reynolds <jrey@us.ibm.com> Suggested-by: Maury Zipse <zipse@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* libflash/blocklevel.c: Remove unused store to ecc_lenBalbir singh2018-05-241-1/+1
| | | | | | | | Caught by scan-build. We rewrite ecc_len with a different value prior to use Signed-off-by: Balbir singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* libflash/blocklevel_write: Fix missing error handlingBalbir singh2018-05-241-0/+2
| | | | | | | | Caught by scan-build, we seem to trap the errors in rc, but not take any recovery action during blocklevel_write. Signed-off-by: Balbir singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* mbox/flash: Remove dead codeBalbir singh2018-05-241-3/+0
| | | | | | | | Caught by scan-build, attn is passed in by value and modified but not read after that. Signed-off-by: Balbir singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* check for NULL input string in is_sai_loc_codeBalbir singh2018-05-241-2/+5
| | | | | | | | | Caught by scan-build, also constant-ify the input parameter. Signed-off-by: Balbir singh <bsingharora@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Fix strtok for previous tokens being NULLBalbir singh2018-05-241-1/+4
| | | | | | | | Caught by scan-build. If the stored token nxtTok is already NULL, don't dereference src Signed-off-by: Balbir singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* cpu: Cleanup clearing of doorbells on P9Benjamin Herrenschmidt2018-05-241-4/+5
| | | | | | | | | | | | | | | | | We currently do a rather pointless msgclr prior to setting in_sleep/in_idle (with no ordering guarantee which isn't great). We also do the final msgsync/msgclr after setting in_sleep/in_idle back to false which while probably ok, isn't that great, we should do msgsync first thing when waking up. Finally, do p9_dbell_receive() before skip_sleep. So take out the first msgclr, swap the final p9_dbell_receive() and add a sync() for good measure and match what p8 does. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* cpu: Use STOP1 on POWER9 for idle/sleep inside OPALBenjamin Herrenschmidt2018-05-241-4/+4
| | | | | | | | | | | | The current code requests STOP3, which means it gets STOP2 in practice. STOP2 has proven to occasionally be unreliable depending on FW version and chip revision, it also requires a functional CME, so instead, let's use STOP1. The difference is rather minimum for something that is only used a few seconds during boot. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* fsp/console: Always establish OPAL console API backendBenjamin Herrenschmidt2018-05-241-2/+3
| | | | | | | | | | | | | | | | | Currently we only call set_opal_console() to establish the backend used by the OPAL console API if we find at least one FSP serial port in HDAT. On systems where there is none (IPMI only), we fail to set it, causing the console code to try to use the dummy console causing an assertion failure during boot due to clashing on the device-tree node names. So always set it if an FSP is present Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* cpu: Do an isync after setting LPCRBenjamin Herrenschmidt2018-05-243-0/+6
| | | | | | | | This is required by the architecture and the implementations, I've observed failures to wake up on big cores without this. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* cpu: Remove duplicate setting of LPCRBenjamin Herrenschmidt2018-05-241-1/+0
| | | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* p8-i2c: Remove force resetOliver O'Halloran2018-05-221-135/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Force reset was added as an attempt to work around some issues with TPM devices locking up their I2C bus. In that particular case the problem was that the device would hold the SCL line down permanently due to a device firmware bug. The force reset doesn't actually do anything to alleviate the situation here, it just happens to reset the internal master state enough to make the I2C driver appear to work until something tries to access the bus again. On P9 systems with secure boot enabled there is the added problem of the "diagostic mode" not being supported on I2C masters A,B,C and D. Diagnostic mode allows the SCL and SDA lines to be driven directly by software. Without this force reset is impossible to implement. This patch removes the force reset functionality entirely since: a) it doesn't do what it's supposed to, and b) it's butt ugly code Additionally, turn p8_i2c_reset_engine() into p8_i2c_reset_port(). There's no need to reset every port on a master in response to an error that occurred on a specific port. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* libstb/i2c-driver: Bump max timeoutOliver O'Halloran2018-05-221-1/+2
| | | | | | | | | | | We have observed some TPMs clock streching the I2C bus for signifigant amounts of time when processing commands. The same TPMs also have errata that can result in permernantly locking up a bus in response to an I2C transaction they don't understand. Using an excessively long timeout to prevent this in the field. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* hdata: Add TPM timeout workaroundOliver O'Halloran2018-05-221-0/+10
| | | | | | | | | | | | Set the default timeout for any bus containing a TPM to one second. This is needed to work around a bug in the firmware of certain TPMs that will clock strech the I2C port the for up to a second. Additionally, when the TPM is clock streching it responds to a STOP condition on the bus by bricking itself. Clearing this error requires a hard power cycle of the system since the TPM is powered by standby power. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* p8-i2c: Allow a per-port default timeoutOliver O'Halloran2018-05-221-7/+13
| | | | | | | | Add support for setting a default timeout for the I2C port to the device-tree. This is consumed by skiboot. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* doc/opal-api: flesh out return-codes documentationStewart Smith2018-05-221-2/+14
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* doc/opal-power-shift-ratio: fix table formattingStewart Smith2018-05-221-4/+7
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* doc: Further document development and release processStewart Smith2018-05-228-12/+136
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* astbmc: Set romulus BMC type to OpenBMCSamuel Mendoza-Jonas2018-05-221-1/+1
| | | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* capi: Add a comment for the Transport Control RegisterChristophe Lombard2018-05-221-1/+5
| | | | | | | | | | | | | | | | | The transport control register needs to be loaded in two steps: Once the register values have been set, we have to write bit 63 to a '1', which loads the register values into the ci store buffer logic. Bit 63 always reads back as a zero but to load the ci store buffer values in capp the transition of 0 to 1 of bit 63 must be seen. A new comment is added in the code to avoid confusion and to precise the feature of this register. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Vaibhav Jain <vaibhav@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 6.0.2 release notesStewart Smith2018-05-181-0/+23
| | | | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit e05b3fb62d44e840a2818afc738ce3bc7afea092) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* cpu: Clear PCR SPR in opal_reinit_cpus()Michael Neuling2018-05-182-0/+2
| | | | | | | | | | Currently if Linux boots with a non-zero PCR, things can go bad where some early userspace programs can take illegal instructions. This is being fixed in Linux, but in the mean time, we should cleanup in skiboot also. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 6.0.1 release notesStewart Smith2018-05-161-0/+29
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* OpenBMC: use 0x3a as OEM command for partial add eselStewart Smith2018-05-161-1/+1
| | | | | | | | | | | | It turns out this is the IBM way to do this and we (OPAL) were just never really told about the change. So, with the best public docs that are available being Hostboot source, let's make the change! See https://github.com/open-power/hostboot/blob/8e05a4399b/src/include/usr/ipmi/ipmiif.H#L115 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Add location code to NPU2 HMI loggingBalbir Singh2018-05-151-8/+14
| | | | | | | | | | | | | | | | The current HMI error message does not specifiy where the HMI error occured. The original error message was NPU: FIR#0 FIR 0x0080100000000000 mask 0x009a48180f01ffff The enhanced error message is NPU2: [Loc: UOPWR.0000000-Node0-Proc0] P:0 FIR#0 FIR 0x0000100000000000 mask 0x009a48180f03ffff Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot 6.0 release notesStewart Smith2018-05-111-0/+1027
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* p9dsu: detect variant in init only if probe fails to found.Pridhiviraj Paidipeddi2018-05-111-2/+8
| | | | | | | | | | | | | Currently the slot table init happens twice in both probe and init functions due to the variant detection logic called with in-correct condition check. Fixes: d32ddea9 ("p9dsu: detect p9dsu variant even when hostboot doesn't tell us") Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> [stewart: renanem variant-detected to p9dsu-riser-detected] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* phb4: Print WOF registers on fence detectRussell Currey2018-05-111-1/+7
| | | | | | | | | | Without the WOF registers it's hard to figure out what went wrong first, so print those when we print the FIRs when a fence is detected. Suggested-by: Mike Perez <perezma@us.ibm.com> Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Vaibhav Jain <vaibhav@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* core/opal: Fix recursion check in opal_run_pollers()Vaibhav Jain2018-05-111-5/+10
| | | | | | | | | | | | | | | | | An earlier commit introduced a counter variable poller_recursion to limit to the number number of error messages shown when opal_pollers are run recursively. However the check for the counter value was placed in a way that the poller recursion was only detected first 16 times and then allowed afterwards. This patch fixes this by moving the check for the counter value inside the conditional branch with some re-factoring so that opal_poller recursion is not erroneously allowed after poll_recursion is detected first 16 times. Fixes: b6a729e118f4 ("Limit number of Poller recursion detected errors to display") Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* skiboot v6.0-rc2 release notesStewart Smith2018-05-091-0/+154
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* travis: Require Ubuntu 18.04 to pass, fix on ppc64leStewart Smith2018-05-093-7/+10
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Update default stop-state-disable mask to cut only stop11Vaidyanathan Srinivasan2018-05-091-1/+1
| | | | | | | | | | | | | | | Stability improvements in microcode for stop4/stop5 are available in upstream hcode images. Stop4 and stop5 can be safely enabled by default. Use ~0xE0000000 to cut all but stop0,1,2 in case there are any issues with stop4/5. example: nvram -p ibm,skiboot --update-config opal-stop-state-disable-mask=0x1FFFFFFF Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* hmi: Fix clearing HMER on debug triggerMichael Neuling2018-05-091-0/+1
| | | | | | | | | | | | | | | In the recent patch: eddff9bf40 hmi: Clear unknown debug trigger I rebased the code from an older skiboot before the HMI rework. When I did this, I missed the handled flag. Without this the HMER is not cleared properly and the HMI keeps happening. This properly sets the handled flag and hence clears the HMER bit. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ibm,firmware-versions: add hcode to device treeStewart Smith2018-05-091-1/+1
| | | | | | | | op-build commit 736a08b996e292a449c4996edb264011dfe56a40 added hcode to the VERSION partition, let's parse it out and let the user know. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
OpenPOWER on IntegriCloud