aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-03-29Add skiboot 5.5.0-rc1 release notesskiboot-5.5.0-rc1Stewart Smith3-0/+865
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-27libflash: Fix pflash -iMichael Neuling1-2/+3
pflash -i is currently broken due to this commit commit 602dee4505cd0ceb5b69f056ec403f982b585791 Author: Cyril Bur <cyril.bur@au1.ibm.com> libflash/libffs: Rework libffs It's output doesn't correctly detect the last partition and continues printing forever. This fixes it by returning null when we don't find a partition in ffs_get_part(). Signed-off-by: Michael Neuling <mikey@neuling.org> Acked-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24opal-prd: Direct systemd to always restart opal-prdAnanth N Mavinakayanahalli1-0/+1
Always restart the opal-prd daemon, irrespective of why it stopped. Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external: Update xscom utils for type 1 indirect accessesMichael Neuling3-6/+27
Update get/putscom utils to support type 1 indirect access. Currently we do some (ugly) bit mangling so that we can fit a 64 bit scom address into the debugfs interface. The current code only shifts down the top bit (indirect bit). This patch changes it to shift down the whole top nibble so that the form of the indirection is also shifted. Also currently putscom always reads back the value. This causes a problem for form 1 which can only be written. This patch marks the form 1 as not readable and hence doesn't attempt the read back. The kernel debugfs scom driver doesn't do the bit mangling correctly. So for form1 to work correctly, the kernel debugfs scom driver needs updating. Existing scoms are forwards and backwards compatible with the kernel. (FWIW the kernel PRD scom interface doesn't need to be updated as it passes the whole 64 bit scom address without any bit mangling) Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24xscom: Add indirect form 1 scomsMichael Neuling2-2/+48
Add code to perform indirect form 1 scoms. POWER8 does form 0 only. POWER9 adds form 1. The form is determined from the address only. Hardware only allows writes for form 1. Only hostboot uses these scoms during IPL, so they are unused by skiboot currently. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24xscom: Harden indirect writesMichael Neuling1-0/+4
Indirect scoms can only set certain bits of data. Ensure only these are set when trying to write. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24xscom: Add POWER9 scom resetMichael Neuling1-3/+9
Add scom reset registers for POWER9. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24xscom: Abstract error recovery registersMichael Neuling1-3/+9
Abstract error recovery registers to get ready for POWER9. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external/ffspart: Add testsCyril Bur66-0/+440
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external/tests: Add a data directory for testsCyril Bur1-4/+7
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external/ffspart: Simple C program to be able to make an FFS partitionCyril Bur4-0/+527
A typical input file to generate something that current op-build would create: HBI,0x00010000,0x05a0000,EV,./bins/HBI.bin MVPD,0x05b0000,0x0090000,EF,./bins/MVPD.bin CVPD,0x0640000,0x0048000,EF,./bins/CVPD.bin DJVPD,0x688000,0x0048000,EF,./bins/DJVPD.bin HBD,0x006d0000,0x0060000,E,./bins/HBD.bin SBEC,0x0730000,0x0090000,EI,./bins/SBEC.bin SBE,0x007c0000,0x0048000,EI,./bins/SBE.bin ATTR_TMP,0x808000,0x8000,F,./bins/ATTR_TMP.bin ATTR_PERM,0x810000,0x8000,EF,./bins/ATTR_PERM.bin WINK,0x00818000,0x0120000,EV,./bins/WINK.bin GUARD,0x00938000,0x005000,EPF,./bins/GUARD.bin HBEL,0x0093d000,0x0024000,EF,./bins/HBEL.bin PAYLOAD,0x961000,0x100000,,./bins/skiboot.lid BOOTKERNEL,0xa61000,0xf00000,,./bins/petitboot.zImage NVRAM,0x01961000,0x90000,EPF,./bins/NVRAM.bin HBRT,0x019f1000,0x360000,EV,./bins/HBRT.bin OCC,0x001d51000,0x120000,E,./bins/OCC.bin FIRDATA,0x1e71000,0x3000,EF,./bins/FIRDATA.bin CAPP,0x001e74000,0x24000,E,./bins/CAPP.bin HBB,0x0001f67000,0x90000,EV,./bins/HBB.bin VERSION,0x1ff7000,0x1000,,./bins/VERSION2.bin Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24libffs: Understand how to create FFS partition TOCs and entries.Cyril Bur3-14/+393
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24libflash/libffs: Rework libffsCyril Bur3-200/+368
This patch attempts a rework of libffs to prepare it for future changes. Firstly the types are split in two: 1. Packed, big endian structures used to map exactly how the data is on flash. 2. CPU endian, sane valued, not packed structures used to manipulate FFS data. Secondly: The packed struct can use BE types so that in future tools like sparse can be run over the code to check for endian conversion bugs. Thirdly: defines of sizeof(struct ...) were removed for clarity. Finally: For ease of manipulation, the in memory FFS structures contain a linked list of entries as this will make addition and removal operations much easier. This patch should be invisible to consumers of libffs. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24core/init: Add hdat-map property to OPAL nodeMatt Brown1-0/+29
Exports the HDAT heap to the OS. This allows the OS to view the HDAT heap directly. This allows us to view the HDAT area without having to use getmemproc. Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24mambo: No need to explicitly look for env(SKIBOOT)Michael Ellerman1-3/+0
We don't need to explicitly check for the SKIBOOT environment variable, the existing code that does: mconfig boot_image SKIBOOT ../../skiboot.lid Will do that for us, using the content of SKIBOOT if it's set, otherwise falling back to ../../skiboot.lid. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-23homer : Enable HOMER region reservation for POWER9Shilpasri G Bhat1-8/+74
PBA BARs map various regions in HOMER memory used by STOP engines and OCC. Skip PBA BARs that have incomplete initialization and reserve the regions that are available in the system. Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-23slw: Define stop idle states for P9 DD1Shilpasri G Bhat1-4/+57
Only stop[0,1]_lite idle states are supported in DD1. And stop1 with ESL=EC=1 is used for CPU hotplug in DD1. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-20fast-reboot: remove CAPI checkAndrew Donnellan1-12/+0
Now that we can handle disabling CAPI mode on PHBs, we don't need to disable fast reboot if there's a CAPI mode PHB. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-20hw/phb3: add host sync notifier to trigger creset/CAPP disable on kexecAndrew Donnellan1-0/+40
To support kexec in Linux, we need to trigger a creset to disable CAPP mode on each PHB that has been attached to a CAPP. Add a host sync notifier, phb3_host_sync_reset(), that will be triggered by the opal_sync_host_reboot() call that Linux makes when "shutting down" a powernv system (this includes bringing the system down to prepare it for kexec). This notifier will trigger a creset only on PHBs that need it, and will poll regularly until the creset completes. This approach is somewhat hacky, as it's somewhat of an abuse of the host sync notifier system (IMHO), but it seems the most obvious way to ensure that the reset/CAPP disable occurs that will work with old kernel versions and not require additional support on the kernel side. Suggested-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-20hw/phb3: disable CAPI mode during complete resetAndrew Donnellan2-9/+141
When fast rebooting or kexec-ing a system with a PHB in CAPI mode, we need to return the PHB to regular PCIe mode. In order to do this, we have to reset a bunch of registers to their pre-CAPI-mode state. However, doing this while there is traffic going over the PCI link is dangerous and will generally cause a checkstop. As such, we want to do this while the PHB is fenced. Conveniently, during a complete reset we force a PHB fence, so this is a good opportunity to disable CAPI mode. When doing a complete reset, if the PHB is in CAPI mode, execute a sequence of SCOMs to reset PHB-related registers back to their regular, PCIe mode values. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-20fast-reboot: creset PHBs on fast rebootAndrew Donnellan1-0/+21
On fast reboot, perform a creset of all PHBs. This ensures that any PHBs that are fenced will be working after the reboot. A later patch will disable CAPI mode during cresets - as such, PHBs in CAPI mode will return to regular PCIe mode during a fast reboot. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-20core/pci: remove misleading fast reboot commentAndrew Donnellan1-2/+0
We have fast reboot now, so pci_reset() is no longer a "remnant" thereof. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16Makefile: Update clean target for stbMichael Neuling2-1/+6
stb leaves a bunch of files around even after clean. Fix this. Signed-off-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: use explicit TARGET rather than *.stb] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16lpc-mbox: Not existing is only an error on P9 and aboveStewart Smith1-1/+5
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16hw/slw: fix NOTICE/WARNING of idle states found/not-foundStewart Smith1-2/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Fix typo in a commentBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Move xive_provision_cpu() aroundBenjamin Herrenschmidt1-35/+35
More logical organisation of the code. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Always reset queue state in opal_xive_set_queue_info()Benjamin Herrenschmidt1-7/+13
We used to require an enable/disable transition, however that doesn't work well with how KVM does "upgrade" a queue so instead just always reset the queue state (queue pointer and generation) whenever a queue is reconfigured. Escalations are reset to "masked" when the queue is disabled. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: When an interrupt is freed, also clear its enabled map entryBenjamin Herrenschmidt1-0/+1
Otherwise we try to disable an invalid IVE during xive_reset() Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16phb4: Remove some unnecessary debug outputBenjamin Herrenschmidt1-5/+4
.. and update a comment while at it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Don't reconfigure and enable queues and VPs in exploitationBenjamin Herrenschmidt1-31/+56
When the OS calls opal_xive_reset() to switch to exploitation mode, we shouldn't re-enable all the queues and VPs. The OS will do it. Otherwise, we miss the enable/disable transition, thus failing to re-initialize the queue count and generation. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Refactor irq configurationBenjamin Herrenschmidt1-77/+59
Use a single common function for configuring an interrupt source that is called both by opal_set_xive() and opal_set_irq_configuration(), along with various internal users. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Don't expose a trigger page when none existBenjamin Herrenschmidt1-5/+3
Otherwise Linux might try to retrigger an escalation interrupt when doing an EOI which will checkstop Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Fix recursive locking bug in opal_xive_reset()Benjamin Herrenschmidt1-2/+3
The re-initialization of the per-CPU data structures must be done without holding the xive lock as it will be taken when needed by the functions being called. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Add opal_xive_sync() to sync IRQ sources and queuesBenjamin Herrenschmidt2-1/+53
For now support two sync options, source and target queue, we'll add sync'ing the presentation layer later. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16xive: Don't mess around with the ESB state when setting an IRQ configBenjamin Herrenschmidt1-4/+10
The host code needs to manage the ESB state in specific ways, it's not correct to blindly unmask the source when targetting for example, so let's not do that, the host will do it itself when appropriate. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16hmi: Print CAPP FIR information when handling CAPP malfunction alertsAndrew Donnellan2-2/+34
When diagnosing or debugging CAPP errors, it's rather useful to have the CAPP FIR, which often provides very helpful information. Print the CAPP FIR to the log when we handle a Malfunction Alert HMI for a CAPP error. Cc: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16hmi: refactor malfunction alert handlingAndrew Donnellan1-46/+42
The logic in decode_malfunction() is rather tricky to follow. Refactor the code to make it easier to follow. No functional change. Cc: Russell Currey <ruscur@russell.cc> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Cc: Ryan Grimm <grimm@linux.vnet.ibm.com> Cc: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Cc: Daniel Axtens <dja@axtens.net> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16getscom: Add chip info for P9.Pridhiviraj Paidipeddi1-0/+6
Took the cfam values from hw/xscom. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16zaius: Remove psi_set_external_irq_policy from platform initOliver O'Halloran1-1/+0
This function is specific to how Skiboot's P8 PSIHB driver. For P9 the PSIHB driver has been reworked completely and this doesn't do anything. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Acked-By: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16dts: add support for p9 coresCédric Le Goater1-0/+44
P9 cores have two DTS (the location unit is unknown to me for the moment) which have the same encoding than on the P8. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16dts: introduce a dts_keep_max() routineCédric Le Goater1-14/+19
This routine will also be used for reading the p9 core DTS and it saves a couple of lines in skiboot. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16dts: remove unused definesCédric Le Goater1-17/+6
Also move the definitions closer to the code using them. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16hw/fsp: Do not queue SP and SPCN class messages during reset/reloadAnanth N Mavinakayanahalli4-0/+32
During FSP R/R, the FSP is inaccessible and will lose state. Messages to the FSP are generally queued for sending later. It does seem like the FSP fails to process any subseuqent messages of certain classes (SP info -- ipmi) if it receives queued mbox messages it isn't expecting. In certain other cases (sensors), the FSP driver returns a default code (async completion) even though there is no known bound from the time of this error return to the actual data being available. The kernel driver keeps waiting leading to soft-lockup on the host side. Mitigate both these (known) cases by returning OPAL_BUSY so the host driver knows to retry later. With this change, the sensors command works fine when the FSP comes back. This version also resolves the remaining IPMI issues Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Tested-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16generic platform: If /bmc in device tree, attempt to init oneStewart Smith1-3/+40
For the most part, this gets us somewhere on some OpenPOWER systems before there's a platform file for that machine. Useful in bringup only, and marked as such with scary looking log messages. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-10fsp-leds: add missing \n in duplicate loc code error msgStewart Smith1-1/+1
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>
2017-03-09xive: Cleanup calls to set_xive backendsBenjamin Herrenschmidt1-6/+14
When interrupt sources provide a set_xive backend on P9 that means they have to do additional work to mask/unmask interrupts (typically due to issues in their ESB HW implementations). However, this never involves server targetting. Additionally there is confusion on what a "server number" means to a set_xive call due to the pre-P9 encoding, so let's not pass it at all, pass 0 instead. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-09xive: Log the address of the boot time tablesBenjamin Herrenschmidt1-0/+5
This can be handy when debugging Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-09hdat: Add __packed to all HDAT structures and workaround HB reserveBenjamin Herrenschmidt2-22/+24
Some HDAT structures aren't properly aligned. We were using __packed on some but not others and got at least one wrong (HB reserve). This adds it everywhere to avoid such problems. However this then triggers another problem where HB gives us a crazy range (0.256M) to reserve with no label, which triggers an assertion failure later on in mem_regions.c. So also add a test to skip any region starting at 0 until we can undertand that better and have it fixed one way or another. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-09asm: Add POWER9 case to init_shared_sprsBenjamin Herrenschmidt1-0/+24
For now, setup the HID and HMEER. We'll add more as we get good default values from HW. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>