aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-16Add skiboot 5.4.3 release notesskiboot-5.4.3Stewart Smith1-0/+18
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-22Makefile: Disable stack protector due to gcc problemsBenjamin Herrenschmidt1-3/+9
Depending on how it was built, gcc will use the canary from a global (works for us) or from the TLS (doesn't work for us and accesses random stuff instead). Fixing that would be tricky. There are talks of adding a gcc option to force use of globals, but in the meantime, disable the stack protector Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: add -fno-stack-protector] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit fe6f1f982b562ba855bb68fb51545f104078f546) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-22stack: Don't recurse into __stack_chk_failBenjamin Herrenschmidt1-2/+7
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit d7ffce9096d5a23ee4ff309910983d823e953bd2) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-22Makefile: Use -ffixed-r13Benjamin Herrenschmidt1-0/+1
We use r13 for our own stuff, make sure it's properly fixed Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit d45b9bc4f98dfeac3ce6ee906948b56944f6aa6b) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-22phb3: Lock the PHB on set_xive callbacksBenjamin Herrenschmidt1-0/+8
Those are called by the interrupts core and thus skip the locking implicit in the PCI opal calls. However IODA table access can be racy, so make sure we lock the PHB. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 55af871041a4b09e53013671450980bdb36f91e3) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-21arch_flash_arm: Don't assume mtd labels are shortJoel Stanley1-1/+1
pflash relies on arch_flash_arm parsing /proc/mtd to discover the pnor partition. It helpfully uses strcasestr so it can handle the string changing, which is what has happened as we moved to upstream compliant mtd device tree bindings. We currently have a string like this: dev: size erasesize name mtd0: 00060000 00001000 "u-boot" mtd1: 00020000 00001000 "u-boot-env" mtd2: 00280000 00001000 "kernel" mtd3: 001c0000 00001000 "initramfs" mtd4: 01740000 00001000 "rofs" mtd5: 00400000 00001000 "rwfs" mtd6: 02000000 00001000 "1e620000.flash-controller:flash@1" mtd7: 08000000 00001000 "1e630000.flash-controller:pnor@0" Unfortunately arch_flash_arm assumes the string will be at most 50 characters. That's right before the label we're looking for starts so we ignore that line and keep searching. Fix it by allowing for a 255 character line. Fixes: 48ab7ce09504 (external/pflash: Add --mtd) Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 7d6e73810dec029678a0d14a3f47485d4025520e) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-20Stop using 3-operand cmp[l][i] for latest binutilsAlexey Kardashevskiy1-2/+2
Since a5721ba270, binutils does not support 3-operand cmp[l][i]. This adds (previously optional) parameter L. Hre is the binutils commit: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=a5721ba270ddf860e0e5a45bba456214e8eac2be;hp=b82317dd347991288e4cca4772e951c672fca8cc Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 05cfe0d6a7cc998173319abb608e48ed5c49204e) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-14hw/phb3: fix error handling in complete resetAndrew Donnellan1-2/+1
During a complete reset, when we get a timeout waiting for pending transaction in state PHB3_STATE_CRESET_WAIT_CQ, we mark the PHB as permanently broken. Set the state to PHB3_STATE_FENCED so that the kernel can retry the complete reset. Reported-by: Pradipta Ghosh <pradghos@in.ibm.com> Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 7fe3de438b19545471d2fb72e54ed01a40b12706) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-02Add skiboot-5.4.2 release notesskiboot-5.4.2Stewart Smith1-0/+15
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-02i2c: Add nuvoton quirk, disallowing i2cdetect as it locks TPMStewart Smith3-0/+42
In TPM 2.0 Firmware 1.3.0.1 and 1.3.1.0 (at least) there exists a bug where if you send the wrong thing to the TPM it may lock the bus, with no way of recovery except powering the TPM off/on. On our current systems, the only way to power the TPM off/on is to pull the power on the system (*NOT* just power off/on to host from BMC). So, this patch adds the ability to do things to the i2c request really early on, well before it hits any hardware, such as quickly drop it. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 157468aeb16e9f50551ac9bc7d46887cba0e011f) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-02p8-i2c reset things manually in some error conditionsStewart Smith1-22/+157
It appears that our reset code wasn't entirely correct, and what we're meant to do is reset each port and wait for command complete. In the event where that fails, we can then bitbang things to recover to a state where at least the i2c engine isn't in a weird state. Practically, this means that "i2cdetect -y 10; i2cdetect -y 10" (where 10 is the bus where a TPM is attached, typically p8e1p2) doesn't hard lock the machine (things are still bad and you won't reboot successfully, but it's *better*). one downside to this patch is that we spend a *long* time in OPAL (tens of ms) when doing the reset. This is something that we really need to fix, as it's not at all nice. The full fix for this though will involve changing a decent chunk of the p8-i2c code, as we don't want to write *any* registers while doing this extended reset (while existing code checks status a bit later). Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit cf6ec98fe79c59fd5de5c5a77917913af8d2cede) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29add skiboot-5.4.1 release notesskiboot-5.4.1Stewart Smith1-0/+27
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: work out the polling time using mftb()Claudio Carvalho1-26/+45
Currently, the polling time is calculated by adding the sleep time to it. This calculates the polling time by taking timestamps with mftb() before calling the i2c-interface to send an i2c request to the tpm. Thus having a much more accurate polling time. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 5f0dfda6e5316aaf28fe1487cd5325806f060afa) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: handle errors after reading the tpm fifoClaudio Carvalho1-1/+11
This adds code to handle errors after reading the tpm fifo in tpm_read_fifo(). Fixes: 56ad053c3e8bf0764ad5878cb018f00a389d30cf Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 8aba3cbf84225a5bc666a071c84758328ca87e76) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: cleanup variables in tpm_read_fifo()Claudio Carvalho1-17/+11
The tpm_read_fifo() has unnecessary and not so intuitive variables. This cleans up these variables. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 9d68320aa66c5ea274b736a7f4f757c907353bc4) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: handle errors after writting the tpm fifoClaudio Carvalho1-2/+11
This adds code to handle errors after writting the tpm fifo in tpm_write_fifo(). Fixes: 56ad053c3e8bf0764ad5878cb018f00a389d30cf Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 0eb2fc7aa4fdd86876bf1663def0f91b1328b0be) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: cleanup variables in tpm_write_fifo()Claudio Carvalho1-27/+23
The tpm_write_fifo() has unnecessary and not so intuitive variables. This cleans up these variables. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 58b0b4e2dd2fbdfcb9c4fc892008dcc7f1e2d153) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: handle errors after writing sts.commandReady in step 5Claudio Carvalho1-1/+11
This adds code to handle errors after writting the sts.commandReady to release the tpm. Fixes: 56ad053c3e8bf0764ad5878cb018f00a389d30cf Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 300c734b628f73aa72e72d47139d7f53582d8b19) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: handle errors after writing sts.goClaudio Carvalho1-2/+11
This handles errors returned by the tpm-i2c interface after writing sts.go in tpm_transmit(). Fixes: 56ad053c3e8bf0764ad5878cb018f00a389d30cf Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 6f717d125733d1cc0aef5f8fca2229a861c144c6) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: handle errors after checking the tpm fifo statusClaudio Carvalho1-66/+86
The functions tpm_is_expecting() and tpm_is_data_avail() ignore the errors returned by the tpm-i2c interface. This adds code to handle erros after checking the tpm fifo status. The tpm_is_expecting() and tpm_is_data_avail() functions are replaced by tpm_wait_for_fifo_status(). Fixes: 56ad053c3e8bf0764ad5878cb018f00a389d30cf Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 454d0be05bcd1de6ea263c9b625a63a57a6098fc) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: return burst_count in tpm_read_burst_count()Claudio Carvalho1-21/+19
This returns burst_count as opposed to pass it as a parameter. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 71b88229c99c36ccfdbaaa50c851343f95c24320) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: isolate the code that handles the TPM_TIMEOUT_D timeoutClaudio Carvalho1-124/+95
TPM_TIMEOUT_D timeout is only related to burst_count polling. This moves the burstCount polling code to tpm_read_burst_count() in order to isolate the code that is related to TPM_TIMEOUT_D. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit cd5953d9191d508379792b3b09f00f307667984e) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: handle errors after reading sts.commandReadyClaudio Carvalho1-32/+50
This adds code to handle errors after reading sts.commandReady. The nested loop in tpm_poll_for_command_ready() is splitted in two functions. Fixes: 56ad053c3e8bf0764ad5878cb018f00a389d30cf Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 0ed70866198fcb47e689a22a9b8b432b740c351e) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: add tpm_status_read_byte()Claudio Carvalho1-9/+10
The tpm status register is read from multiple places by calling the tpm-i2c-interface. This adds the tpm_status_read_byte() to be the only function that directly calls the tpm-i2c interface to read the tpm status register Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 5154ff3b67019ccc2abe7b505357a9d1db8172cb) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: add tpm_check_status()Claudio Carvalho1-10/+16
This adds the tpm_check_status(), which makes the code more easy to read and also allows the use of a mask to check status. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 830717695a8bf4114cdffab3d40a3508c5b129b1) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-29tpm_i2c_nuvoton: rename defines to shorter namesClaudio Carvalho1-49/+44
This shorten some defines to better fit in 80 columms. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 1fdb77cc7dc9695a6d7bb1781a1514855a95a6ea) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24Limit number of "Poller recursion detected" errors to displayStewart Smith1-1/+5
In some error conditions, we could spiral out of control on this and spend all of our time printing the exact same backtrace. Limit it to 16 times, because 16 is a nice number. Cc: stable Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit b6a729e118f42dae88ebf70a09a7e2aa4f788fdc) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24slw: do SLW timer testing while holding xscom lockStewart Smith3-11/+44
We add some routines that let a caller get the xscom lock once and then do a bunch of xscoms while holding it. In some situations without this, it could take long enough to get the xscom lock that the 1ms timeout would expire and we'd falsely think the SLW timer didn't work when in fact it did. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit a5761fb4585520983716d17fdb33f04891cf0479) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24p8i2c: Use calculated poll_interval when booting OPALStewart Smith2-10/+18
Otherwise we'd default to 2seconds (TIMER_POLL) during boot on chips with a functional i2c interrupt, leading to slow i2c during boot (or hitting timeouts instead). Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 6c077e9ed08c7af7db56ef6f334d204f78e6de8d) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24tpm_i2c_interface: decouple rc from being done with i2c requestStewart Smith1-4/+14
This ensures the i2c subsystem is done with the i2c request before we continue. Since it handles timeouts, we don't have to here. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Tested-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 9c471e0e6eafca3b0f249b649e5cf8ac752bffd1) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24tpm_i2c_interface: set timeout before each requestStewart Smith1-1/+1
The i2c code manipulates req->timeout, so it has to be reset before re-sending. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Tested-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit dab67b5d19b0e004249d5a850e283823a0e60d40) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24i2c: Add i2c_run_req() to crank the state machine for a requestStewart Smith3-5/+35
Doing everything asynchronously is brilliant, it's exactly what we want to do. Except... the tpm driver wants to do things synchronously, which isn't so cool. For reasons that are not yet completely known, we spend an awful lot of time in the main thread *not* running pollers (potentially seconds), which doesn't bode well for I2C timeouts. Since the TPM measure is done in a secondary thread, we do *not* run pollers there either (as of 323c8aeb54bd4e0b9004091fcbb4a9daeda2f576 - which is roughly as of skiboot 2.1.1). But we still need to crank the i2c state machine, so we introduce a call to do just that. It will return how long the poll interval should be, so that we can time_wait() for a more appropriate time for whatever i2c implementation is sitting behind things. Without this, it was "easy" to get to a situation where the i2c state machine wasn't cranked at all, and you'd hit the i2c timeout (for the issued operation) before the poller to crank i2c was ever called. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Tested-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 441ddb9b4719a092bbbf81fcf775632f282a3fca) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24fsp: Don't recurse pollers in ibm_fsp_terminateStewart Smith3-1/+45
If we were to terminate in a poller, we'd call op_display() which called pollers which hit the recursive poller warning, which ended in not much fun at all. This patch will skip the running of pollers and instead run the FSP poller to set the op-panel display before attn. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 9fcb109218b1374a8caa3cac62e83fbedb1f7f2f) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11Add skiboot-5.4.0 release notesskiboot-5.4.0Stewart Smith1-0/+690
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11libstb: bump up the byte timeout for tpm i2c requestsClaudio Carvalho1-1/+1
This bumps up the byte timeout for tpm i2c requests from 10ms to 30ms. Some p8dtu systems are getting i2c request timeout. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11external/pflash: Perform the correct cleanupCyril Bur1-2/+2
If the -F flag is used then pflash uses a regular file as the flash. On cleanup pflash fails to tell arch_flash_close() if it had passed a filename to arch_flash_init() as such arch_flash_close() assumes that it needs to close the actual flash structure and not simply a file descriptor leading to a NULL dereference. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11p8dtu: change OPAL esel command to IBM 0x3aleoluo1-0/+8
Signed-off-by: Jim Yuan <jim.yuan@supermicro.com> [stewart@linux.vnet.ibm.com: Adapted to new bmc_platform functionality] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11Add SuperMicro p8dtu1u and p8dtu2u platformsleoluo2-1/+261
From: https://github.com/supermicro/p8dtu-op-build/blob/9e8242de579ce947a3d30df8b8ddb94584783f91/openpower/package/skiboot/skiboot-0001-add-p8dtu1u-and-p8dtu2u-mode-in-skiboot.patch Signed-off-by: Jim Yuan <jim.yuan@supermicro.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11Revert "core/ipmi: Set interrupt-parent property"Stewart Smith1-5/+1
This reverts commit d997e482705d9fdff8e25fcbe07fb56008f96ae1. A problem was found with pre 4.2 linux kernels where a spurious WARNING would be emitted. This change doesn't matter enough to scare users so we can just revert it. Warning was: [ 0.947741] irq: irq-62==>hwirq-0x3e mapping failed: -22 [ 0.947793] ------------[ cut here ]------------ [ 0.947838] WARNING: at kernel/irq/irqdomain.c:485 Reported-by: Pridhiviraj Paidipeddi <ppaidipe@in.ibm.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11libflash/libffs: Fix possible NULL dereferenceCyril Bur1-0/+2
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08add skiboot-5.4.0-rc4 release notesskiboot-5.4.0-rc4Stewart Smith1-0/+50
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08libflash/file: Use 64bit ioctl() to erase from MTDCyril Bur1-2/+2
While we'll 'never' have flash chips larger than 32bit, work was recently done to blocklevel for it to be 64bit compatible for other backends. Since there is a 64bit ioctl() lets use it. There is currently no known case where 32bit is not sufficient but this doesn't mean someone might not do something strange in the future. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08external/common: Add default erase chip implementationCyril Bur1-2/+18
Just blocklevel_erase() from zero to sizeof. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08external/common: Teach ARM code to erase 'mtd chips'Cyril Bur1-2/+11
Currently the arch flash code for all architectures can only perform chip erases if there is a real flash driver attached. With increasing use of MTD on both host and BMC this code needs to know how to behave of the backend of blocklevel is MTD. This patch teaches the ARM specific code to pass an erase for the full size of the chip down the stack. This can be optimised into a chip erase within the kernel. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08bmc_platform: fail PNOR access request if no bmc *before* we reserve itStewart Smith1-4/+3
Fixes: 5611389876a748e19b7593d4eb426ced7a6ed31f Reported-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08travis: allow failures of fedora24Stewart Smith1-0/+3
Because Fedora repositories are unreliable and we often get: Error: Failed to synchronize cache for repo 'updates' :( Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08Add BMC platform to enable correct OEM IPMI commandsStewart Smith10-15/+77
An out of tree platform (p8dtu) uses a different IPMI OEM command for IPMI_PARTIAL_ADD_ESEL. This exposed some assumptions about the BMC implementation in our core code. Now, with platform.bmc, each platform can dictate (or detect) the BMC that is present. We allow it to be set at runtime rather than purely statically in struct platform as it's possible to have differing BMC implementations on the one machine (e.g. AMI BMC or OpenBMC). Acked-by: Jeremy Kerr <jk@ozlabs.org> [stewart@linux.vnet.ibm.com: remove enum, update (C) years] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08hw/ipmi-sensor: Fix setting of firmware progress sensor properly.Pridhiviraj Paidipeddi1-2/+42
Currently Hostboot populates /bmc/sensors dt node and corresponding sensors only for BMC platforms, And for FSP platforms hostboot is not populating any fsp sensors(Management sensors) and also there is no firmware progress sensor exist in fsp platforms. Due to which OPAL incorrectly setting firmware status on a sensor id "00" which is not at all exist. On a FSP system: cat /sys/firmware/opal/msglog | grep -i setting [ 21.189204883,6] IPMI: setting fw progress sensor 00 to 07 [ 21.189559121,6] IPMI: setting fw progress sensor 00 to 13 cat /sys/firmware/opal/msglog | grep -i skiboot [ 84.127416495,5] SkiBoot skiboot-5.4.0-rc3 starting... On a BMC system: cat /sys/firmware/opal/msglog | grep -i setting [ 3.166286901,6] IPMI: setting fw progress sensor 05 to 14 [ 14.259153338,6] IPMI: setting fw progress sensor 05 to 07 [ 14.469070593,5] IPMI: Resetting boot count on successful boot [ 15.001210324,6] IPMI: setting fw progress sensor 05 to 13 So this patch fixes this incorrect setting on a fsp system, and also sets the sensor only if OPAL initialises ipmi sensors and corresponding sensor exists for a given sensor type in the device tree. After patch: On a FSP system: cat /sys/firmware/opal/msglog | grep -i setting On a BMC system: cat /sys/firmware/opal/msglog | grep -i setting [ 3.164859816,6] IPMI: setting fw progress sensor 05 to 14 [ 14.024941077,6] IPMI: setting fw progress sensor 05 to 07 [ 14.211514767,5] IPMI: Resetting boot count on successful boot [ 14.252554375,6] IPMI: setting fw progress sensor 05 to 13 Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: return OPAL_UNSUPPORTED on !sensors_present, make ipmi_sensor_type_present() static in ipmi-sensor.c] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08pflash: remove stray d in from info messageJoel Stanley1-1/+1
Fixes: 86640b032d79ff0 (pflash: Fix printf format warning) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-07boot_test: fix typo in console messageStewart Smith1-2/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>