aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-02-21dt: add /cpus/ibm, powerpc-cpu-features device tree bindingsNicholas Piggin9-1/+1391
This is a new CPU feature advertising interface that is fine-grained, extensible, aware of privilege levels, and gives control of features to all levels of the stack (firmware, hypervisor, and OS). The design and binding specification is described in detail in doc/. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [stewart: fix maybe-uninitialized warning from older GCC, doc cleanup] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-20phb3/phb4/p7ioc: Document supported TCE sizes in DTRussell Currey3-0/+15
Add a new property, "ibm,supported-tce-sizes", to advertise to Linux how big the available TCE sizes are. Each value is a bit shift, from smallest to largest. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-20phb4: Fix TCE page sizeRussell Currey1-4/+4
The page sizes for TCEs on P9 were inaccurate and just copied from PHB3, so correct them. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-20Revert "pci: Shared slot state synchronisation for hot reset"Russell Currey1-14/+0
An issue was found in shared slot reset where the system can be stuck in an infinite loop, pull the code out until there's a proper fix. This reverts commit 1172a6c57ff3c66f6361e572a1790cbcc0e5ff37. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-20hdata/iohub: Use only wildcard slots for pluggablesOliver O'Halloran1-1/+1
We don't want to cause a VID:DID check against pluggable devices, as they may use multiple devids. Narrow the condition under which VID:DID is listed in the dt, so that we'll end up creating a wildcard slot for these instead. Cc: stable # 5.9.x Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-18increase log verbosity in debug buildsStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-19Add -debug to version on DEBUG buildsStewart Smith1-1/+7
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-19cpu_wait_job: Correctly report time spent waiting for jobStewart Smith1-3/+3
Way back when, we got confused between timebase and ms, so let's just use ms and be done with it. Fixes: 514406fa44279996bfc9c85c1e4e53689d375e64 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-15skiboot v5.10-rc3 release notesv5.10-rc3Stewart Smith1-0/+148
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-14vas: Disable VAS/NX-842 on some P9 revisionsSukadev Bhattiprolu3-4/+58
VAS/NX-842 are not functional on some P9 revisions, so disable them in hardware and skip creating their device tree nodes. Since the intent is to prevent OS from configuring VAS/NX, we remove only the platform device nodes but leave the VAS/NX DT nodes under xscom (i.e we don't skip add_vas_node() in hdata/spira.c) Thanks to input from Michael Ellerman, Michael Neuling. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-14phb4: Only escalate freezes on MMIO load where necessaryRussell Currey1-1/+24
In order to work around a hardware issue, MMIO load freezes were escalated to fences on every chip. Now that hardware no longer requires this, restrict escalation to the chips that actually need it. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-14pflash: Fix makefile dependency issueStewart Smith1-3/+3
Otherwise we could end up trying to build files before the links are created. Let's use a heavy handed approach and not build *anything* until we have the links. Reported-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-14DT: Add "version" property under ibm, firmware-versions nodeVasant Hegde1-0/+20
First line of VERSION section in PNOR contains firmware version. Use that to add "version" property under firmware versions dt node. Sample output: -------------- root@xxx2:/proc/device-tree/ibm,firmware-versions# lsprop version "witherspoon-ibm-OP9_v1.19_1.94" .... ... Suggested-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13hw/phys-map: Add missing newline in log outputReza Arbab1-1/+1
The call to prlog() here is missing a \n. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13npu2: Disable TVT range check when in bypass modeAlistair Popple1-32/+7
On POWER9 the GPUs need to be able to access the MMIO memory space. Therefore the TVT range check needs to include the MMIO address space. As any possible range check would cover all of memory anyway this patch just disables the TVT range check all together when bypassing the TCE tables. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13hw/npu2: support creset of npu2 devicesBalbir Singh3-2/+22
creset calls in the hw procedure that resets the PHY, we don't take them out of reset, just put them in reset. Signed-off-by: Balbir Singh <bsingharora@gmail.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13core: hostservices: Remove redundant special wakeup codeShilpasri G Bhat1-161/+3
Use the generic dctl_{set/clear}_special_wakeup() in hostservices to assert and de-assert core special wakeup for P8 and remove the duplicated code. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13ATTN: Enable flush instruction cache bit in HID registerVasant Hegde1-1/+1
In P9, we have to enable "flush the instruction cache" bit along with "attn instruction support" bit to trigger attention. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13capi: Enable channel tag streaming for PHB in CAPP modeVaibhav Jain1-8/+4
We re-enable channel tag streaming for PHB in CAPP mode as without it PEC was waiting for cresp for each DMA write command before sending a new DMA write command on the Powerbus. This resulted in much lower DMA write performance than expected. The patch updates enable_capi_mode() to remove the masking of channel_streaming_en bit in PBCQ Hardware Configuration Register. Also does some re-factoring of the code that updates this register to use xscom_write_mask instead of xscom_read followed by a xscom_write. Cc: stable Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Christophe Lombard clombard@linux.vnet.ibm.com Acked-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13core/device.c: Fix dt_find_compatible_nodeAlistair Popple2-11/+39
dt_find_compatible_node() and dt_find_compatible_node_on_chip() are used to find device nodes under a parent/root node with a given compatible property. dt_next(root, prev) is used to walk the child nodes of the given parent and takes two arguments - root contains the parent node to walk whilst prev contains the previous child to search from so that it can be used as an iterator over all children nodes. The first iteration of dt_find_compatible_node(root, prev) calls dt_next(root, root) which is not a well defined operation as prev is assumed to be child of the root node. The result is that when a node contains no children it will start returning the parent nodes siblings until it hits the top of the tree at which point a NULL derefence is attempted when looking for the root nodes parent. Dereferencing NULL can result in undesirable data exceptions during system boot and untimely non-hilarious system crashes. dt_next() should not be called with prev == root. Instead we add a check to dt_next() such that passing prev = NULL will cause it to start iterating from the first child node (if any). Also add a unit test for this case to run-device.c. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13stb: Put correct label (for skiboot) into containerStewart Smith2-4/+10
Hostboot will expect the label field of the stb header to contain "PAYLOAD" for skiboot or it will fail to load and run skiboot. The failure looks something like this: 53.40896|ISTEP 20. 1 - host_load_payload 53.65840|secure|Secureboot Failure plid = 0x90000755, rc = 0x1E07 53.65881|System shutting down with error status 0x1E07 53.67547|================================================ 53.67954|Error reported by secure (0x1E00) PLID 0x90000755 53.67560| Container's component ID does not match expected component ID 53.67561| ModuleId 0x09 SECUREBOOT::MOD_SECURE_VERIFY_COMPONENT 53.67845| ReasonCode 0x1e07 SECUREBOOT::RC_ROM_VERIFY 53.67998| UserData1 : 0x0000000000000000 53.67999| UserData2 : 0x0000000000000000 53.67999|------------------------------------------------ 53.68000| Callout type : Procedure Callout 53.68000| Procedure : EPUB_PRC_HB_CODE 53.68001| Priority : SRCI_PRIORITY_HIGH 53.68001|------------------------------------------------ 53.68002| Callout type : Procedure Callout 53.68003| Procedure : EPUB_PRC_FW_VERIFICATION_ERR 53.68003| Priority : SRCI_PRIORITY_HIGH 53.68004|------------------------------------------------ Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Tested-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-13hw/occ: Fix fast-reboot crash in P8 platforms.Pridhiviraj Paidipeddi1-0/+2
commit 85a1de35cbe4 ("fast-boot: occ: Re-parse the pstate table during fast-boot" ) breaks the fast-reboot on P8 platforms while reiniting the OCC pstates. On P8 platforms OPAL adds additional two properties #address-cells and #size-cells under ibm,opal/power-mgmt/ DT node. While in fast-reboot same properties adding back to the same node results in Duplicate properties and hence fast-reboot fails with below traces. [ 541.410373292,5] OCC: All Chip Rdy after 0 ms [ 541.410488745,3] Duplicate property "#address-cells" in node /ibm,opal/power-mgt [ 541.410694290,0] Aborting! CPU 0058 Backtrace: S: 0000000031d639d0 R: 000000003001367c .backtrace+0x48 S: 0000000031d63a60 R: 000000003001a03c ._abort+0x4c S: 0000000031d63ae0 R: 00000000300267d8 .new_property+0xd8 S: 0000000031d63b70 R: 0000000030026a28 .__dt_add_property_cells+0x30 S: 0000000031d63c10 R: 000000003003ea3c .occ_pstates_init+0x984 S: 0000000031d63d90 R: 00000000300142d8 .load_and_boot_kernel+0x86c S: 0000000031d63e70 R: 000000003002586c .fast_reboot_entry+0x358 S: 0000000031d63f00 R: 00000000300029f4 fast_reset_entry+0x2c This patch fixes this issue by removing these two properties on P8 while doing OCC pstates re-init in fast-reboot code path. Fixes: 85a1de35cbe4 Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-09skiboot 5.10-rc2 release notesv5.10-rc2Stewart Smith1-0/+162
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08hw/npu2: Implement logging HMI actionsBalbir Singh3-1/+191
Log HMI errors as step 1. OS will need to deduce and interpret the HMI event. Signed-off-by: Balbir Singh <bsingharora@gmail.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08Fix FTBFS with -Werror=format-overflowFrédéric Bonnard1-1/+1
i2c.c fails to compile with gcc7 and -Werror=format-overflow used in Debian Unstable and Ubuntu 18.04 : i2c.c: In function ‘i2c_init’: i2c.c:211:15: error: ‘%s’ directive writing up to 255 bytes into a region of size 236 [-Werror=format-overflow=] dpath is supposed to store an entire path. Reported-by: Michel Normand <michel.mno@free.fr> Signed-off-by: Frédéric Bonnard <frediz@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08Update .gitignoreAndrew Donnellan1-0/+2
Add *.pyc (to catch doc/DtsLexer.pyc) and *.patch (to catch patch files we leave lying around). Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08core/exception: beautify exception handler, add MCE-involved registersNicholas Piggin4-3/+44
Print DSISR and DAR, to help with deciphering machine check exceptions, and improve the output a bit, decode NIP symbol, improve alignment, etc. Also print a specific header for machine check, because we do expect to see these if there is a hardware failure. Before: [ 0.005968779,3] *********************************************** [ 0.005974102,3] Unexpected exception 200 ! [ 0.005978696,3] SRR0 : 000000003002ad80 SRR1 : 9000000000001000 [ 0.005985239,3] HSRR0: 00000000300027b4 HSRR1: 9000000030001000 [ 0.005991782,3] LR : 000000003002ad80 CTR : 0000000000000000 [ 0.005998130,3] CFAR : 00000000300b58bc [ 0.006002769,3] CR : 40000004 XER: 20000000 [ 0.006008069,3] GPR00: 000000003002ad80 GPR16: 0000000000000000 [ 0.006015170,3] GPR01: 0000000031c03bd0 GPR17: 0000000000000000 [...] After: [ 0.003287941,3] *********************************************** [ 0.003561769,3] Fatal MCE at 000000003002ad80 .nvram_init+0x24 [ 0.003579628,3] CFAR : 00000000300b5964 [ 0.003584268,3] SRR0 : 000000003002ad80 SRR1 : 9000000000001000 [ 0.003590812,3] HSRR0: 00000000300027b4 HSRR1: 9000000030001000 [ 0.003597355,3] DSISR: 00000000 DAR : 0000000000000000 [ 0.003603480,3] LR : 000000003002ad68 CTR : 0000000030093d80 [ 0.003609930,3] CR : 40000004 XER : 20000000 [ 0.003615698,3] GPR00: 00000000300149e8 GPR16: 0000000000000000 [ 0.003622799,3] GPR01: 0000000031c03bc0 GPR17: 0000000000000000 [...] Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08core/init: manage MSR[ME] explicitly, always enableNicholas Piggin3-0/+46
The current boot sequence inherits MSR[ME] from the IPL firmware, and never changes it. Some environments disable MSR[ME] (e.g., mambo), and others can enable it (hostboot). This has two problems. First, MSR[ME] must be disabled while in the process of taking over the interrupt vector from the previous environment. Second, after installing our machine check handler, MSR[ME] should be enabled to get some useful output rather than a checkstop. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08core/utils: add snprintf_symbolNicholas Piggin3-16/+30
get_symbol is difficult to use. Add snprintf_symbol helper which prints a symbol into a buffer with length, and returns the number of bytes used, similarly to snprintf. Use this in the stack dumping code rather than open-coding it. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08fast-boot: occ: Re-parse the pstate table during fast-bootShilpasri G Bhat2-3/+23
OCC shares the frequency list to host by copying the pstate table to main memory in HOMER. This table is parsed during boot to create device-tree properties for frequency and pstate IDs. OCC can update the pstate table to present a new set of frequencies to the host. But host will remain oblivious to these changes unless it is re-inited with the updated device-tree CPU frequency properties. So this patch allows to re-parse the pstate table and update the device-tree properties during fast-reboot. OCC updates the pstate table when asked to do so using pstate-table bias command. And this is mainly used by WOF team for characterization purposes. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Tested-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08fast-reboot: move pci_reset error handling into fast-reboot codeNicholas Piggin3-8/+18
pci_reset() currently does a platform reboot if it fails. It should not know about fast-reboot at this level, so instead have it return an error, and the fast reboot caller will do the platform reboot. The code essentially does the same thing, but flexibility is improved. Ideally the fast reboot code should perform pci_reset and all such fail-able operations before the CPU resets itself and destroys its own stack. That's not the case now, but that should be the goal. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Acked-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08capi: Fix the max tlbi divider and the directory size.Christophe Lombard1-2/+3
Switch to 512KB mode (directory size) as we don’t use bit 48 of the tag in addressing the array. This mode is controlled by the Snoop CAPI Configuration Register. Set the maximum of the number of data polls received before signaling TLBI hang detect timer expired. The value of '0000' is equal to 16. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08npu2/tce: Fix page size checkingAlexey Kardashevskiy1-1/+3
The page size is encoded in the TVT data [59:63] as @shift+11 but the tce_kill handler does not do the math right; this fixes it. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08stb: Enforce secure boot if called before libstb initializedStewart Smith1-0/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08stb: Correctly error out when no PCR for resourceStewart Smith1-1/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08core/init: move imc catalog preload init after the STB init.Pridhiviraj Paidipeddi1-3/+3
As a safer side move the imc catalog preload after the STB init to make sure the imc catalog resource get's verified and measured properly during loading when both secure and trusted boot modes are on. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08libstb: fix failure of calling trusted measure without STB initialization.Pridhiviraj Paidipeddi1-0/+10
When we load a flash resource during OPAL init, STB calls trusted measure to measure the given resource. There is a situation when a flash gets loaded before STB initialization then trusted measure cannot measure properly. So this patch fixes this issue by calling trusted measure only if the corresponding trusted init was done. The ideal fix is to make sure STB init done at the first place during init and then do the loading of flash resources, by that way STB can properly verify and measure the all resources. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-08libstb: fix failure of calling cvc verify without STB initialization.Pridhiviraj Paidipeddi1-0/+9
Currently in OPAL init time at various stages we are loading various PNOR partition containers from the flash device. When we load a flash resource STB calls the CVC verify and trusted measure(sha512) functions. So when we have a flash resource gets loaded before STB initialization, then cvc verify function fails to start the verify and enforce the boot. Below is one of the example failure where our VERSION partition gets loading early in the boot stage without STB initialization done. This is with secure mode off. STB: VERSION NOT VERIFIED, invalid param. buf=0x305ed930, len=4096 key-hash=0x0 hash-size=0 In the same code path when secure mode is on, the boot process will abort. So this patch fixes this issue by calling cvc verify only if we have STB init was done. And also we need a permanent fix in init path to ensure STB init gets done at first place and then start loading all other flash resources. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-07libstb/tpm_chip: Add missing new line to print messages.Pridhiviraj Paidipeddi1-2/+2
Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-07libstb: increase the log level of verify/measure messages to PR_NOTICE.Pridhiviraj Paidipeddi2-2/+2
Currently libstb logs the verify and hash caluculation messages in PR_INFO level. So when there is a secure boot enforcement happens in loading last flash resource(Ex: BOOTKERNEL), the previous verify and measure messages are not logged to console, which is not clear to the end user which resource is verified and measured. So this patch fixes this by increasing the log level to PR_NOTICE. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-06skiboot v5.10-rc1 release notesv5.10-rc1Stewart Smith2-0/+1562
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30capi: Disable CAPP virtual machinesVaibhav Jain1-0/+1
When exercising more than one CAPI accelerators simultaneously in cache coherency mode, the verification team is seeing a deadlock. To fix this a workaround of disabling CAPP virtual machines is suggested. These 'virtual machines' let PSL queue multiple CAPP commands for servicing by CAPP there by increasing throughput. Below is the error scenario described by the h/w team: " With virtual machines enabled we had a deadlock scenario where with 2 or more CAPI's in a system you could get in a deadlock scenario due to cast-outs that are required break the deadlock (evict lines that another CAPI is requesting) get stuck in the virtual machine queue by a command ahead of it that is being retried by the same scenario in the other CAPI. " So this patch updates CAPP APC Master Powerbus control register during CAPP init to also set Bit(12) that disables CAPP virtual machines. This forces processing of CAPP commands from PSL one at a time and thereby preventing above mentioned deadlock scenario. Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30capi: Perform capp recovery sequence only when PBCQ is idleVaibhav Jain1-3/+4
Presently during a CRESET the CAPP recovery sequence can be executed multiple times in case PBCQ on the PEC is still busy processing in/out bound inflight transactions. This patch updates phb4_creset() to perform capp-recovery sequence via do_capp_recovery_scoms() only when PBCQ General Status Register reports no pending transactions. Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Christophe Lombard clombard@linux.vnet.ibm.com Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30hdata/vpd: Add vendor propertyVasant Hegde1-0/+5
ibm,vpd blob contains VN field. Use that to populate vendor property for various FRU's. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30sensors: occ: Skip power sensors with zero sample valueShilpasri G Bhat1-0/+21
APSS is not avialable on platforms like Zaius, Romulus where OCC can only measure Vdd (core) and Vdn (nest) power from the AVSbus reading. So all the sensors for APSS channels will be populated with 0. Different component power sensors like system, memory which point to the APSS channels will also be 0. As per OCC team (Martha Broyles) zero'ed power sensor means that the system doesnot have it. So this patch filters out these sensors. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30sensors: occ: Skip GPU sensors for non-gpu systemsShilpasri G Bhat1-0/+7
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30xive: Mask MMIO load/store to bad location FIRFrederic Barrat2-1/+9
For opencapi, the trigger page of an interrupt is mapped to user space. The intent is to write the page to raise an interrupt but there's nothing to prevent a user process from reading it, which has the infortunate consequence of checkstopping the system. Mask the FIR bit raised when an MMIO operation targets an invalid location. It's the recommendation from recent documentation and hostboot is expected to mask it at some point. In the meantime, let's play it safe. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30npu2-hw-procedures.c: Correct phy lane mappingAlistair Popple1-3/+3
Each nvlink device is associated with a particular group of OBUS lanes via a lane mask which is read from HDAT via the device-tree. However Skiboot's interpretation of lane mask was different to what is exported from the HDAT. Specifically the lane mask bits in the HDAT are encoded in IBM bit ordering for a 24-bit wide value. So for example in normal bit ordering lane-0 is represented by having lane-mask bit 23 set and lane-23 is represented by lane-mask bit 0. This patch alters the Skiboot interpretation to match what is passed from HDAT. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Reza Arbab <arbab@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30npu2-hw-procedures.c: Power up lanes during ntl resetAlistair Popple1-0/+13
Newer versions of Hostboot will not power up the NVLink PHY lanes by default. The phy_reset procedure already powers up the lanes but they also need to be powered up in order to access the DL. The reset_ntl procedure is called by the device driver to bring the DL out of reset and get it into a working state. Therefore we also need to add lane and clock power up to the reset_ntl procedure. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-01-30witherspoon: Fix VPD EEPROM typeOliver O'Halloran1-0/+20
There are userspace tools that update the planar VPD via the sysfs interface. Currently we do not get correct information from hostboot about the exact type of the EEPROM so we need to manually fix it up here. This needs to be done as a platform specific fix since there is not standardised VPD EEPROM type. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>