summaryrefslogtreecommitdiffstats
path: root/include/capp.h
Commit message (Collapse)AuthorAgeFilesLines
* capi: Handle HMI eventsChristophe Lombard2017-06-191-0/+19
| | | | | | | | | | | | Find the CAPP on the chip associated with the HMI event for PHB4. The recovery mode (re-initialization of the capp, resume of functional operations) is only available with P9 DD2. A new patch will be provided to support this feature. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* capi: Load capp microcodeChristophe Lombard2017-06-191-3/+18
| | | | | | | | | | | CAPP microcode flash download and CAPP upload for PHB4. A new file 'capp.c' is created to receive common capp code for PHB3 and PHB4. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* capi: Move phb3 capp registers to specialized filesChristophe Lombard2017-06-191-32/+0
| | | | | | | | | | | | | The definitions of the CAPP registers for PHB3 are moved in a specific file. The updated file capp.h will be used for the common functionalities about the CAPP for PHB3 and PHB4. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-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>
* hmi: Print CAPP FIR information when handling CAPP malfunction alertsAndrew Donnellan2017-03-161-2/+5
| | | | | | | | | | | | | 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>
* include/capp.h: add #include guardClaudio Carvalho2016-10-101-1/+6
| | | | | | | This adds #include guard for include/capp.h Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* phb3: Load CAPP ucode to both CAPP units on NaplesPhilippe Bergheaud2016-04-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Venice and Murano have only one capp unit, that can be mapped to phb0, phb1 or phb2. Naples has two capp units, that are statically mapped, capp unit 0 on phb0 and capp unit 1 on phb1. The capp ucode must be loaded once onto each capp unit. This patch replaces the boolean chip->capp_ucode_loaded by a bitmap, and sets the bit corresponding to the phb index to indicate that ucode has been loaded. The macro CAPP_UCODE_LOADED(chip, phb) returns the value of the phb index bit. The xscom register addresses of capp unit 0 are identical to the register addresses of the single capp unit of Venice and Murano. The addresses of the Naples capp unit 1 are equal to the addresses of capp unit 0 + 0x180. This patch introduces the macro PHB3_CAPP_REG_OFFSET(p), that returns the following xscom register address offsets: 0x0 for the Venice capp unit 0x0 for the Murano capp unit 0x0 for Naples capp unit 0 0x180 for Naples capp unit 1 The offset is added to the register address at each xscom_write, in order to operate on the right capp unit. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Configure CAPP timebase.Philippe Bergheaud2015-07-101-0/+2
| | | | | | | | Extend the OPAL call phb3_set_capi_mode to configure CAPP timebase. Inform Linux with the device tree property "ibm,capp-timebase-sync. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* capi: Make microcode lid parsing code endian safeMichael Neuling2015-02-231-30/+37
| | | | | | | | | | | | The current CAPP microcode lid parsing code assumes skiboot is running big endian which may not always be the case. This rewrites the lid parsing code to be endian safe. It also cleans up the code a bunch. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* phb3/capi: Add capp recovery to phb3Ryan Grimm2014-09-301-0/+2
| | | | | | | | | | | | | | | | | | | Add a flag indicating the CAPP unit is in recovery. When a capp recoverable malfunction HMI comes in, the HMI handler will call into phb3_set_capp_recovery, which will put set the flag and send the event to Linux. EEH will call phb3_next_error which will tell it the phb is fenced. EEH will then call into sapphire to reinitialize the phb which contains steps 3-5 of capp recovery procedure. The code increases wait time of PERST to 1s to ensure fpga download is complete before polling linkup. EEH will then rebind the cxl driver and it will complete recovery once it initializes and turns snoops on, steps 7-8, completing capp recovery procedure. Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* phb3/capi: Initialize capp regs with field values.Ryan Grimm2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | FLUSH_SUE_STATE_MAP change fixes a problem with recovery. We were using an old lab value that marked PTE entries in a shared state. After recovery, PTE entries were getting flushed out to memory with an SUE, resulting in a machine check. The new value means PTE entries are dropped on recovery. For, APC_MASTER_PB_CTRL spec says to use initfile value and bit 3 should be set. Initfile missing bit 3 so do a RMW. Bit 3 enables CAPP combined response. CAPP_EPOCH_TIMER_CTRL enables epoch timers and the recovery timer when recovery is enabled. Also relax epoch timer period mask due to a bug. TRANSPORT_CONTROL reg set bit 37 - rfs_benign_ptr_data in addition to spec value. Should be set in initifile in future. Rename APC_MASTER_CONFIG to APC_MASTER_CAPI_CTRL to match workbook name. Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* phb3: Parse capp microcode lid if lid header in memory.Ryan Grimm2014-07-081-0/+9
| | | | | | | | | bml load and older firmware loads do not place the lid header in memory. Newer firmware versions do. Look for lid header eyecatcher and if not found try ucode eyecatcher to support bml and older firmware. Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-021-0/+62
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud