aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18Drop support for p5ioc2Daniel Axtens12-2152/+5
p5ioc2 is used by approximately 2 machines in the world, and has never ever been a supported configuration. Not only is the code virtually unused and very tricky to test, but keeping it around is making life unnecessarily difficult: - It's more complexity to manage for things such as PCI slot support - It's more code for static analysis to cover, which means more time fixing bugs that affect no-one. - It's bloating every single install of skiboot for no benefit. - It's reducing coverage stats, which is sad. Drop p5ioc2. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-18Merge branch 'stable'Stewart Smith1-4/+1
2015-11-18fsp/fsp-rtc: Correctly report back errors to hostStewart Smith1-4/+1
When we got FSP_STATUS_TOD_RESET or similar, we would return OPAL_BUSY which would cause the Linux OPAL RTC driver to retry in a loop until we didn't say we're busy. The problem with this is that some errors, such as FSP_STATUS_TOD_RESET are, in fact, permanent until we (say) set the time explicitly, so no matter how hard that little linux driver tries, it's never going to break out of that loop. This fix is to fix our use of the state machine introduced way back in 6cf8b663e7d7cb1e827b6d9c90e694ea583f6f87 so that we return an error code to linux. Reported-by: Cédric Le Goater <clg@fr.ibm.com> Fixes: 6cf8b663e7d7cb1e827b6d9c90e694ea583f6f87 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Cédric Le Goater <clg@fr.ibm.com>
2015-11-17hw/bt: Ask the BMC for its BT interface capabilitiesCyril Bur2-3/+84
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Clear the fifo when an unknown response is receivedCyril Bur1-1/+23
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Remove state machine and use only B2H_ATN and H2B_ATN.Cyril Bur1-21/+7
Correct use of B2H_ATN and H2B_ATN means that we don't need to track states. The only caveat is that currently we use states to know if we need to send a message to the BMC, change this to simply seeing if the top message has been sent or not. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Convert retry_count to send_countCyril Bur1-6/+8
It is useful to know if a message has been sent at all, the counter used to retry sending can be used for this. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Improve debug printingCyril Bur1-19/+40
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> [stewart@linux.vnet.ibm.com: always have BT_Q_LOG called] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17slw: Remove overwrites for EX_PM_CORE_ECO_VRET and EX_PM_CORE_PFET_VRETShreyas B. Prabhu1-17/+0
Remove code where we overwrite EX_PM_CORE_ECO_VRET and EX_PM_CORE_PFET_VRET since they are being initialized in hostboot code. Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17lpc-rtc: zero out struct tm before readStewart Smith1-0/+2
Picked up by static analysis. Never in a billion years would this affect the real world. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17libfdt: add basic sanity check to fdt_open_intoStewart Smith1-0/+4
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17PCI: use define for wanting dynamic PHB id for pci_register_phbStewart Smith5-4/+5
No functional change, but static analysis showed up the oddity of something that is generally unsigned (opal_id) having a signed value assigned to it. Took the opportunity to use a define to increase readability. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17slw: don't be tricky with pointer mathStewart Smith1-3/+5
Mainly because this trips up some static analysis on resource usage and instead of having someone go back and prove it, add an assert and keep around a (no doubt optimized out) variable. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17libflash: fix resource leaks on errors in ffs_open_imageStewart Smith1-1/+5
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17pflash: Fix file descriptor leakStewart Smith1-0/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17Enable building pflash for coverity (travis)Stewart Smith2-1/+3
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16Enable -Werror for -WformatStewart Smith6-16/+64
We create our own inttypes.h to get the correct printf formatting for 64bit numbers. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16assert cpu < CPUS in core/test/run-trace.cStewart Smith1-2/+7
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16assert IPMI sensors < max we supportStewart Smith1-1/+4
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16assert cec_register(hub) hub_id is < MAX_IO_HUBSStewart Smith1-0/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16Make gard and pflash build arch specific files in pwdStewart Smith3-11/+17
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/gard: Clean after check to avoid leaving bad .o files aroundCyril Bur1-2/+6
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/gard: Add make distCyril Bur2-0/+21
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/gard: Make use of the common/ flash reading codeCyril Bur1-153/+11
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/gard: Add version informationCyril Bur5-6/+37
Method for recording version is identical to pflash. Uses the current skiboot version and any current repository state. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/tests: Add ability to strip version string from resultCyril Bur1-0/+6
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/gard: Update gard building to use external/common filesCyril Bur2-26/+44
This will enable building the gard tool on any arch which may prove useful for debug parsing of gard records in a binary file format Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/pflash: Fixup LDFLAGSCyril Bur2-4/+3
In order to be able to compile for something that isn't the default for the compiler one should be able to use CFLAGS and LDFLAGS on commandline. ie build a 64bit binary with a compiler which builds by default 32bit or the opposite endian for which the compiler is configured. Currently the common/rules.mk ignores LDFLAGS when it shouldn't and pflash sets LDFLAGS for something which only applies to the final link. This patch addresses both those issues. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/common: Don't just expect `sh` to be in $PATHCyril Bur1-1/+1
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/gard: Fix memory leakCyril Bur1-6/+13
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/common: Don't leak temporary filenameCyril Bur1-1/+2
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16Fix null checks in find_master_and_slave_occStewart Smith1-2/+2
Fixes: a804c1b2c13f Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13occ: hbrt: Change the OCC reset orderShilpasri G Bhat3-12/+75
Modify the OCC reset order such that master OCC is reset after the slave OCCs are reset. In Tuleta/Alpine systems 'proc0' will always be the master OCC, which has to be stopped last when FSP sends OCC_RESET command to Opal. This fixes BZ 119718, SW289036 Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13Merge branch 'stable'Stewart Smith2-1/+17
2015-11-13Add skiboot-5.1.11 release notesskiboot-5.1.11Stewart Smith1-0/+16
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13core: Check con_driver is not NULLSamuel Mendoza-Jonas1-1/+1
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13libflash: Provide an internal parity implementation, to remove libgcc dependencyJeremy Kerr2-4/+19
In commit 8f5b8616, we introduced a dependency on libgcc, for the __builtin_parityl() function in commit 6cfaa3ba. However, if we're building with a biarch compiler, we may not have a libgcc available. This commit removes the __builtin_parityl() call, and replaces with the equivalent instructions, and removes the dependency on libgcc. Although this is untested, I have confirmed that the __builtin_parityl() functions emits the same instructions (on power7 and power8, with gcc-4.9) as we're using in the parity() function. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> [stewart@linux.vnet.ibm.com: only use inline asm for skiboot build] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13Enable -fstack-protector-strong if supported by compilerStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13Remove unused scanf and variantsStewart Smith5-455/+3
We don't use scanf at all, so solve the bugs found by static analysis by just removing it. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-13Merge branch 'stable'Stewart Smith1-0/+34
2015-11-13Add skiboot-5.1.10 release notesskiboot-5.1.10Stewart Smith1-0/+34
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-12Add Nvlink documentation including device tree bindingsAlistair Popple2-0/+283
Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-12core/pci.c: Move device node fixups to happen after all devices are added to ↵Alistair Popple1-4/+19
the DT Commit 75e9440 (PCI: Trace device node from PCI device) introduced the ability for PCI devices to do fixups based on information added to the device tree as part of device initialisation. However that patch called the fixups during device initialisation meaning not all devices present in the system had been added to the device tree. Depending on device initialisation order this means some devices were not detected by the fixup code. This patch moves the calls to the fixup code until after all PCI devices have been added to the device tree. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-12Merge branch 'stable'Stewart Smith3-4/+19
2015-11-12FSP: Handle DPO initiated CEC shutdown with FSP in RRAnanth N Mavinakayanahalli3-4/+19
In a scenario where the DPO has been initiated, but the FSP then went into reset before the CEC power down came in, OPAL may not give up the link since it may never see the PSI interrupt. So, if we are in dpo_pending and an FSP reset is detected via the DISR, give up the PSI link voluntarily. Tested-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-12Merge branch 'stable'Stewart Smith1-0/+1
2015-11-12sensor: add a compatible propertyCédric Le Goater1-0/+1
OPAL needs an extra compatible property "ibm,opal-sensor" to make module autoload work smoothly in Linux for ibmpowernv driver. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-12Fix resource leak on crash (similar to 125f95e)Stewart Smith1-1/+3
The error paths here are a bit suspicious anyway as we're allocating memory in a failure path for having failed to allocate memory. One can hope that the memory allocated to display the error is less than the memory we attempted to allocate in the first place. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-11Fix endian flip in printf for FSP in hdata/fsp.cStewart Smith2-3/+4
Harmless for skiboot as we're BE. When building and running unit tests on LE though, we got an incorrect hw/software version for FSP hardware/software for hdata_to_dt test. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-11Add hdata_to_dt testStewart Smith7-11/+8767
This adds ~1000 lines of code to the coverage-report. We manipulate the log levels of a few messages that contain pointers so that a basic diff of the hdata_to_dt output is possible. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>