aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-16Add skiboot-5.1.15 release notesskiboot-5.1.15Stewart Smith1-0/+9
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-11ipmi-sel: Fix memory leak in error pathVasant Hegde1-0/+1
Commit a5299ba2 dropped non-severe event from logging to BMC, but I forgot to releaes the error log structure. Fixes: a5299ba2 (IPMI: Only log events that needs attention) Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-09add skiboot-5.1.14 release notesskiboot-5.1.14Stewart Smith1-0/+20
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-02-23fsp: fix spelling of "advertise" in log messageAndrew Donnellan1-1/+1
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-02-23core: Add explicit 1:1 mappings in ranges propertiesSam Mendoza-Jonas1-5/+12
Currently skiboot adds an empty ranges property for each PCI bridge, representing a 1:1 mapping, which the kernel can later update if needed. However this does not appear to be the case, which leads to an issue in the kernel where the translation of assigned-addresses properties is mishandled and prematurely drops the PCI memory flags (ie. the first cell of an address). Instead, explicitly describe a 1:1 mapping in each bridge's ranges property, allowing assigned-addresses to be properly handled. Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-27Add skiboot-5.1.13 release notesskiboot-5.1.13Stewart Smith1-0/+43
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-27hmi: Identify the phb upon CAPI malfunction alertPhilippe Bergheaud1-1/+3
commit 2e4cc4dca8c0d31138adc52076b38d80c5a6bef0 upstream Find the phb index with capp_phb3_attached_mask. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21DT sorting testOliver O'Halloran5-46/+148
Moved the dt_dump() into test/dt_common.c so that it can be shared between hdata/test/hdata_to_dt.c and core/test/run-device.c run-device.c contains two tests, one basic sorting test and a generate-and-sort test. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: remove trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21hdata/test: Updated the hdata_to_dt test data for the new sorting behaviourOliver O'Halloran1-8906/+8725
Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21core/device.c: Sort nodes with name@unit names by unitOliver O'Halloran1-4/+52
When unflattening (or building from hdat) a device tree child nodes are added in the order in which they are encountered. For nodes that have a <basename>@<unit> style name with a common basename it is useful to have them in the tree sorted by the unit in ascending order. Currently this requires the source data to present them in sorted order, but this isn't always the case. This patch modifies the node insertion process to insert new nodes in the correct location so the list of child nodes is sorted. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: remove trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21hdata/hdata_to_dt.c: Also print node names.Oliver O'Halloran2-8648/+8995
Currently the hdata_to_dt script will only dump the node properties. This change adds a "node: <name>" line to the default output and adds the -t flag to only print the node names, without properties. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21sparse: fix incorrect type warnings in hdata/fsp.cStewart Smith1-3/+3
commit 5c3e642911ed217bc476478694281a89fe8ef73c upstream No changes in resulting code as skiboot is BE, but does silence the sparse warnings. hdata/fsp.c:67:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:67:9: expected unsigned int hdata/fsp.c:67:9: got restricted beint16_t const [usertype] hw_version hdata/fsp.c:68:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:68:9: expected unsigned int hdata/fsp.c:68:9: got restricted beint16_t const [usertype] sw_version hdata/fsp.c:103:46: warning: incorrect type in argument 1 (different base types) hdata/fsp.c:103:46: expected unsigned int [unsigned] [usertype] proc_chip_id hdata/fsp.c:103:46: got restricted beint32_t const [usertype] proc_chip_id Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21sparse: fix missing beXX_to_cpu() conversions in hdata/fsp.cStewart Smith1-5/+5
commit 7c2f38eff810fd2a84707ae15994e3188cfac834 upstream hdata/fsp.c:55:20: warning: restricted beint16_t degrades to integer hdata/fsp.c:62:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:85:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:85:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:100:9: warning: cast from restricted beint64_t hdata/fsp.c:144:27: warning: restricted beint16_t degrades to integer doesn't do anything currently as skiboot is BE Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21sparse: fix endian conversions in hdata/iohub.cStewart Smith1-7/+7
commit d6e3293cb1d794bf118aab334bb250ed12236956 upstream Since skiboot is all BE and hdat is BE, this changes nothing except for silencing the sparse warnings hdata/iohub.c:35:9: warning: incorrect type in initializer (different base types) hdata/iohub.c:35:9: expected unsigned int hdata/iohub.c:35:9: got restricted beint32_t const [usertype] buid_ext hdata/iohub.c:36:9: warning: incorrect type in argument 1 (different base types) hdata/iohub.c:36:9: expected unsigned int [unsigned] [usertype] proc_chip_id hdata/iohub.c:36:9: got restricted beint32_t const [usertype] proc_chip_id hdata/iohub.c:36:9: warning: incorrect type in argument 1 (different base types) hdata/iohub.c:36:9: expected unsigned int [unsigned] [usertype] proc_chip_id hdata/iohub.c:36:9: got restricted beint32_t const [usertype] proc_chip_id hdata/iohub.c:38:9: warning: incorrect type in initializer (different base types) hdata/iohub.c:38:9: expected unsigned int hdata/iohub.c:38:9: got restricted beint32_t const [usertype] gx_index hdata/iohub.c:39:9: warning: incorrect type in initializer (different base types) hdata/iohub.c:39:9: expected unsigned int hdata/iohub.c:39:9: got restricted beint32_t const [usertype] ec_level hdata/iohub.c:114:63: warning: incorrect type in argument 1 (different base types) hdata/iohub.c:114:63: expected unsigned short [unsigned] [usertype] slca_index hdata/iohub.c:114:63: got restricted beint16_t const [usertype] slca_index hdata/iohub.c:634:17: warning: incorrect type in argument 1 (different base types) hdata/iohub.c:634:17: expected restricted beint32_t [usertype] be_val hdata/iohub.c:634:17: got restricted beint16_t const [usertype] hub_num hdata/iohub.c:708:22: warning: incorrect type in assignment (different base types) hdata/iohub.c:708:22: expected unsigned int [unsigned] type hdata/iohub.c:708:22: got restricted beint32_t const [usertype] card_type Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21sparse: fix conversion of hdat slca_indexStewart Smith1-1/+1
commit 020a741ae22dd70a027918dbb738cb16fed3bb57 upstream No code changes as skiboot is BE. hdata/vpd.c:559:38: warning: incorrect type in argument 1 (different base types) hdata/vpd.c:559:38: expected unsigned short [unsigned] [usertype] slca_index hdata/vpd.c:559:38: got restricted beint16_t const [usertype] slca_index Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21sparse: fix beint32_t degrades to int in hdata/pcia.cStewart Smith1-1/+1
commit 54104305325788ec01695d4f58fb7379d8956a5d upstream hdata/pcia.c:32:37: warning: restricted beint32_t degrades to integer No resulting code change for skiboot as BE Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21Fix endian flip in printf for FSP in hdata/fsp.cStewart Smith2-3/+4
commit dfab2fb87c2d83e240a002e8829b525d10342df3 upstream 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>
2016-01-21Revive hdata_to_dt and make it work againStewart Smith2-18/+3
commit 27b49826e5f1d9c0008c0a5bf0953dd673a9b9e1 upstream Some functions were stubbed out which meant we hit assert rather than dumping out the device tree Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21Use VALGRIND callout rather than tricky malloc/memcpyStewart Smith1-3/+3
commit d04030556db4bb73151172ded3f279882e706dbd upstream The tricky memcpy trips up various static analysers and looks rather odd. The more correct thing to do is to ask valgrind to mark it as undefined. There's a call for that, and we depend on valgrind to run the test suite anyway, so we're not introducing a new dependency. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-21Enable -Werror for -WformatStewart Smith6-16/+64
commit 56bc1890b229072513788992d1d29b6f173c13de upstream 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>
2016-01-21Add hdata_to_dt testStewart Smith7-11/+8767
commit 6dc84bb65a3f51b97d2728a8fcdadacf8114293f upstream 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>
2016-01-15external/gard: Fix displaying 'cleared' gard recordsCyril Bur1-3/+33
When a garded component is replaced hostboot detects this and updates the gard partition. What hostboot does is set the record_id field to 0xFFFFFFFF but leaves the rest of the flash untouched, this has caused issues with the gard tool the thinking was that an entire record of all 0xFF bytes would signal not a valid record. This patch add rectifies this issue and `gard list` will no longer show any record with an id of 0xFFFFFFFF. Equivalent to 91cebdcd557dfc2dfc8050a34edb11a43facaf74 in master Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-14firestone: fix spacing in slot nameJeremy Kerr1-1/+1
The other SlotN names have no space. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> [stewart@linux.vnet.ibm.com: Cherry-picked to stable] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-12Add OPAL_CONSOLE_FLUSH to the OPAL APIRussell Currey6-23/+59
uart consoles only flush output when polled. The Linux kernel calls these pollers frequently, except when in a panic state. As such, panic messages are not fully printed unless the system is configured to reboot after panic. This patch adds a new call to the OPAL API to flush the buffer. If the system has a uart console (i.e. BMC machines), it will incrementally flush the buffer, returning if there is more to be flushed or not. If the system has a different console, the function will have no effect. This will allow the Linux kernel to ensure that panic message have been fully printed out. The existing synchronous flushing mechanism used in OPAL's shutdown and reboot routines has been refactored into a helper that repeatedly calls the new partial flush function. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-14external/opal-prd: Set initial size valueJeremy Kerr1-0/+1
We're not initialising 'size' in handle_prd_control_run_cmd. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-14external/common: Fix grammar in arch_flash error messageSamuel 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-12-04Add skiboot-5.1.12 release notesskiboot-5.1.12Stewart Smith1-0/+44
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-03opal-prd: display explicit message on IBM Power systemsCédric Le Goater1-0/+52
Today, when run on an IBM Power systems, opal-prd complains in syslog with a set of messages similar to these : opal-prd: CTRL: Starting PRD daemon opal-prd: I2C: Found Chip: 00000000 engine 1 port 0 opal-prd: I2C: Found Chip: 00000010 engine 1 port 0 opal-prd: CTRL: Listening on control socket /run/opal-prd-control opal-prd: FW: Can't open PRD device /dev/opal-prd: No such file or directory opal-prd: FW: Error initialising PRD channel opal-prd: CTRL: stopping PRD daemon Which are difficult to interpret for a person not initiated to Power firmware. The patch below detects if the platform has support for PRD by looking at the device tree property : /sys/firmware/devicetree/base/ibm,opal/diagnostics/compatible and stops opal-prd early in the main routine with an explicit message for the user. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-03Fix up extract-gcov for gcc > 4.8Stewart Smith2-11/+24
The story of extract-gcov is not necessarily a pleasant one, involving GCC internals, padding of data structures, differences in data structures that are designed to change whenever GCC wants to and a strong desire to not implement a VFS in skiboot or some other streaming interface (and associated userspace and other such blergh). This patch makes us be all explicit about padding in the structures, enabling -Wpadding for extract-gcov.c. We also get all strict over the size of things and add support for gcc 5.1, which added an extra counter. There is likely GCC hacking in my future to make this a lot less fragile. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-03external/pflash: Add (C) headerCyril Bur1-0/+16
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-02hello_world: don't link with libgccStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-02libflash: 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-12-01FSP: Give up PSI link on shutdownAnanth N Mavinakayanahalli3-0/+24
Since we are anyway on the way to standby and apparently the other hypervisor also does this. 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-19Merge branch 'update-2.1.1.1' into stableStewart Smith1-5/+19
2015-11-19hw/phb3: Flush cache line after updating P/Q bitsBenjamin Herrenschmidt1-5/+19
When doing an MSI EOI, we update the P and Q bits in the IVE. That causes the corresponding cache line to be dirty in the L3 which will cause a subsequent update by the PHB (upon recieving the next MSI) to get a few retries until it gets flushed. We can improve the situation (and thus performance) by doing a dcbf instruction to force a flush of the update we do in SW. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
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-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-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-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-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-09Free bl_prot_range on file_exit_close()Samuel Mendoza-Jonas1-0/+1
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-09console: Completely flush output buffer before power down and rebootRussell Currey4-1/+26
Completely flush the output buffer of the console driver before power down and reboot. Implements the flushing function for uart consoles, which includes the astbmc and rhesus platforms. Adds a new function, flush(), to the con_ops struct that allows each console driver to specify how their output buffers are flushed. In the cec_power_down and cec_reboot functions, the flush function of the driver is called if it exists. This fixes an issue where some console output is sometimes lost before power down or reboot in uart consoles. If this issue is also prevalent in other console types then it can be fixed later by adding a .flush to that driver's con_ops. Signed-off-by: Russell Currey <ruscur@russell.cc> [stewart@linux.vnet.ibm.com: reduce diff size, change flush function name] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-30add skiboot-5.1.9 release notesskiboot-5.1.9Stewart Smith1-0/+16
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-30Fix boot_test.sh script for chmod +x pflash if copyingStewart Smith1-0/+1
On some BMC firmware revisions, we need to copy over a pflash binary and we need to ensure that the executable bit is set. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-30opal/hmi: Signal PRD about NX unit checkstop.Mahesh Salgaonkar1-0/+11
On NX checkstop OPAL need to signal PRD about it by setting NXDMAENGFIR[38] bit. Otherwise PRD will not be able to do NX unit checkstop error analysis. NXDMAENGFIR[38] is a spare bit and used to report a software initiated attention for NX checkstop. The behavior of this bit and all FIR bits are documented in RAS spreadsheet. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-19add skiboot-5.1.8 release notesskiboot-5.1.8Stewart Smith1-0/+20
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-14opal/hmi: Fix the soft lockup issue on HMI for certain TB errors.Mahesh Salgaonkar2-1/+24
A while loop from wait_for_subcore_threads() function loops until one thread from each subcore completes the pre-cleanup task and sets a cleanup done bit. while (!(*(this_cpu()->core_hmi_state_ptr) & HMI_STATE_CLEANUP_DONE)) cpu_relax(); Without a memory barrier we see that the compiler optimizes the above while loop not to re-fetch the data from memory pointed by this_cpu()->core_hmi_state_ptr. This makes CPU to spin infinitely even though the other CPUs have modified the data causing soft lockup in kernel. There are two ways to fix this, 1) introduce volatile specifier to force re-read the fresh value from the memory. 2) Add barrier() call to cpu_relax(). Second approach will avoid similar bugs in future. This patch uses the second approach to fix this issue. This patch also introduces a timeout for the while loop to handle a worst situation where all other threads are badly stuck without setting a cleanup done bit. Under such situation timeout will help to avoid soft lockups and report failure to kernel. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: add explanation as to why we don't use timebase for timeout] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-13fix prerror() build failure in fsp-leds.cskiboot-5.1.7Stewart Smith1-1/+1
Fixes: 8f433d6cd4f92b4f878e5ddc414e2800a2fb7140 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-13Add skiboot-5.1.7 release notesStewart Smith1-0/+29
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>