summaryrefslogtreecommitdiffstats
path: root/include/fsp.h
Commit message (Collapse)AuthorAgeFilesLines
* fsp: Fix msg vaargs usageJoel Stanley2018-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | hw/fsp/fsp.c:1011:17: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] va_start(list, add_words); ^ hw/fsp/fsp.c:1007:59: note: parameter of type 'u8' (aka 'unsigned char') is declared here void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...) ^ [CC] platforms/ibm-fsp/apollo-pci.o hw/fsp/fsp.c:1026:17: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] va_start(list, add_words); ^ hw/fsp/fsp.c:1016:47: note: parameter of type 'u8' (aka 'unsigned char') is declared here struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u8 add_words, ...) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* sensors: Support reading u64 sensor valuesShilpasri G Bhat2018-02-211-1/+1
| | | | | | | | | | | | | This patch adds support to read u64 sensor values. This also adds changes to the core and the backend implementation code to make this API as the base call. Host can use this new API to read sensors upto 64bits. This adds a list to store the pointer to the kernel u32 buffer, for older kernels making async sensor u32 reads. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* nvram: Fix 'missing' nvram on FSP systems.Cyril Bur2017-11-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit ba4d46fdd9eb ("console: Set log level from nvram") wants to read from NVRAM rather early. This works fine on BMC based systems as nvram_init() is actually synchronous. This is not true for FSP systems and it turns out that the query for the console log level simply queries blank nvram. The simple fix is to wait for the NVRAM read to complete before performing any query. Unfortunately it turns out that the fsp-nvram code does not inform the generic NVRAM layer when the read is complete, rather, it must be prompted to do so. This patch addresses both these problems. This patch adds a check before the first read of the NVRAM (for the console log level) that the read has completed. The fsp-nvram code has been updated to inform the generic layer as soon as the read completes. The old prompt to the fsp-nvram code has been removed but a check to ensure that the NVRAM has been loaded remains. It is conservative but if the NVRAM is not done loading before the host is booted it will not have an nvram device-tree node which means it won't be able to access the NVRAM at all, ever, even after the NVRAM has loaded. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP: Disable PSI link whenever FSP tells OPAL about impending R/RVasant Hegde2017-10-111-1/+0
| | | | | | | | | | | | | Commit 42d5d047 fixed scenario where DPO has been initiated, but FSP went into reset before the CEC power down came in. But this is generic issue that can happen in normal shutdown path as well. Hence disable PSI link as soon as we detect FSP impending R/R. CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> CC: 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>
* fsp/tpo: Provide support for disabling TPO alarmVaibhav Jain2017-05-261-0/+1
| | | | | | | | | | | | | | | | | This patch adds support for disabling a preconfigured Timed-Power-On(TPO) alarm on FSP based systems. Presently once a TPO alarm is configured from the kernel it will be triggered even if its subsequently disabled. With this patch a TPO alarm can be disabled by passing y_m_d==hr_min==0 to fsp_opal_tpo_write(). A branch is added to the function to handle this case by sending FSP_CMD_TPO_DISABLE message to the FSP instead of usual FSP_CMD_TPO_WRITE message. The kernel is expected to call opal_tpo_write() with y_m_d==hr_min==0 to request opal to disable TPO alarm. Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP: Notify FSP of Platform Log ID after Host Initiated Reset ReloadStewart Smith2017-05-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trigging a Host Initiated Reset (when the host detects the FSP has gone out to lunch and should be rebooted), would cause "Unknown Command" messages to appear in the OPAL log. This patch implements those messages How to trigger FSP RR(HIR): $ putmemproc 300000f8 0x00000000deadbeef s1 k0:n0:s0:p00 ecmd_ppc putmemproc 300000f8 0x00000000deadbeef Log showing unknown command: / # cat /sys/firmware/opal/msglog | grep -i ,3 [ 110.232114723,3] FSP: fsp_trigger_reset() entry [ 188.431793837,3] FSP #0: Link down, starting R&R [ 464.109239162,3] FSP #0: Got XUP with no pending message ! [ 466.340598554,3] FSP-DPO: Unknown command 0xce0900 [ 466.340600126,3] FSP: Unhandled message ce0900 The message we need to handle is "Get PLID after host initiated FipS reset/reload". When the FSP comes back from HIR, it asks "hey, so, which error log explains why you rebooted me?". So, we tell it. Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hw/fsp: Do not queue SP and SPCN class messages during reset/reloadAnanth N Mavinakayanahalli2017-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* fsp: Don't recurse pollers in ibm_fsp_terminateStewart Smith2016-11-241-0/+7
| | | | | | | | | | | If we were to terminate in a poller, we'd call op_display() which called pollers which hit the recursive poller warning, which ended in not much fun at all. This patch will skip the running of pollers and instead run the FSP poller to set the op-panel display before attn. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP: Give up PSI link on shutdownAnanth N Mavinakayanahalli2015-12-011-0/+1
| | | | | | | | | 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>
* FSP: Handle DPO initiated CEC shutdown with FSP in RRAnanth N Mavinakayanahalli2015-11-121-0/+1
| | | | | | | | | | | 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>
* Move FSP specific abort() code to platform layerVasant Hegde2015-09-091-0/+3
| | | | | | | | | | | | | | | Presently abort() call sets up HID0, triggers attention and finally calls infinite for loop. FSP takes care of collecting required logs and reboots the system. This sequence is specific to FSP machine and it will not work on BMC based machine. Hence move FSP specific code to hw/fsp/fsp-attn.c. Note that this patch adds new parameter to abort call. Hence replaced _abort() by abort() in exception.c so that we can capture file info as well. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* fsp/ipmi: Add the in-band IPMI support for FSP systemsNeelesh Gupta2015-07-101-0/+6
| | | | | | | | | | | FSP implements the IPMI commands support that can be accessed over the mailbox interface from the host. The host needs to provide and receive the message/data bytes of the IPMI command in the TCE space in the KCS (Keyboard Controller Style) format. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* opal: Enable backup topology.Mahesh Salgaonkar2015-07-091-0/+9
| | | | | | | | | | | | | | | | | | | | | Whenever FSP makes any changes to backup topology as part of either routine hardware maintenance or fixing failed backup topology configuration, it sends out mailbox command xE6, s/c 0x06, mod 0, to enable/disable the backup topology. OPAL layer should keep itself up-to-date with accurate details of current topology configurations. This will help OPAL layer to successfully handle any TOD failover in future. The FSP can only request that the currently inactive (backup) topology be disabled or enabled. If the requested topology is currently the active topology, then fail this request with a 0xB8 (TOD topology in use) status as return code. For disable request, set the backup topology status as disabled. For enable request, scan all the available chips and find the new backup master chip by looking at TOD status register of each chip. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Preload VPD LID and set up fsp_lid_load() for async queued loadingStewart Smith2015-05-071-1/+2
| | | | | | | | This means VPD LID is already loaded before we start preloading kernel and initramfs LIDs, thus ensuring VPD doesn't have to wait for them to finish being read from FSP. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/LED: Add system attention indicator supportVasant Hegde2015-05-071-0/+12
| | | | | | | | | | | | | | | | SAI is controlled by FSP. This patch adds support to get/set this indicator. Also update OPAL interface so that playload can read/set this indicator. During init, we read this indicator state using MBOX command. OPAL uses MBOX interface to update this SAI. FSP sends update notification whenever there is change in SAI state (except for OPAL initiates updates). We use the notification to update cached SAI state. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP: Serialize FSP MBOX command declarationVasant Hegde2015-03-261-20/+20
| | | | | | | Improve code readability. No functionality changes. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* core: add a platform op to read sensorsCédric Le Goater2015-03-241-0/+2
| | | | | | | | | | This patch introduces an initial framework to define a sensor_read operation per platform. It also proposes a few helper routines to work on the sensor 'handler' which identifies a sensor and attribute in the OPAL_SENSOR_READ call. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Asynchronous LID/Resource loading for FSP systemsStewart Smith2015-03-241-0/+2
| | | | | | | | | | | | | | | This moves away from using fsp_sync_msg in fsp_fetch_data and instead using the platform hooks for start_preload_resource() to actually queue up a load and having the plumbing for checking if a resource is loaded yet. This gets rid of the "pollers called with locks held" warning we got heaps of previously. You can now boot some FSP systems without getting this warning at all. This also sets the stage for starting load of LIDs much earlier to when they're needed, improving boot time. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Change load_resource() API to be all about preloading.Stewart Smith2015-03-231-2/+2
| | | | | | | | | No functional changes in what happens, just have two calls, one for queueing preload the other for waiting until it has loaded. future patches will introduce platform specific queueing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/LEDS: Handle failure cases in set LED MBOX commandVasant Hegde2015-03-201-0/+4
| | | | | | | | | | | If set LED mbox command fails then we have to respond to FSP with apropriate status code. Moved MBOX response code to separate function so that we can just call that with different status code. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/LEDS: Add device tree nodesVasant Hegde2015-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a parent LED device node called 'led' under the root 'opal' device node. This also creates child device nodes under 'led' corresponding to all individual LEDs on the system whether it is an enclosure type or a descendant type with their location code as name. The location code information will be used by the host to enlist and access all the individual LEDs present on the system. The child LED device nodes also have the properties 'led-types' and 'led-loc' representing what kind of LEDs present on the same loation code and whether it is an enclosure type LED or a descendant type LED. Sample device tree output: ibm,opal { .. .. led { compatible = "ibm,opal-v3-led"; phandle = <0x1000006b>; linux,phandle = <0x1000006b>; U78C9.001.RST0027-P1-C1 { led-types = "identify", "fault"; led-loc = "descendent"; phandle = <0x1000006f>; linux,phandle = <0x1000006f>; }; <snip> }; }; Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: Move create_led_device_nodes to FSP platform.exit] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Refactor fsp-rtc.c to not call fsp_sync_msg (and thus pollers) with lock heldStewart Smith2015-03-061-0/+9
| | | | | | | | | | We introduce simple state machine, have liberal assert()s and very clearly indicate what's protected by the lock (everything). We also stop waiting for the initial RTC response on boot, which will ever so slightly speed up booting. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* core: Add subid to load_resource()Michael Neuling2015-02-171-1/+2
| | | | | | | | | | | | | | | This adds a subid to load_resource() so that sub-partitions can be accessed inside a PNOR partition. These sub-partitions follow the format used by the hostboot SBE image. The subid will match on the EC field of the SBE table of contents. If it's found, only that sub-partition is returned to the caller. Current partitions (kernel and ramfs) don't support sub-partitions. If caller tries to access a sub-partition within these, we fail the call. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/LEDS: Do not expose driver specific functionsVasant Hegde2015-02-131-4/+0
| | | | | | | Don't expose functions which are not used outside LED driver. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* rtc: Remove the not used prototypeNeelesh Gupta2015-01-221-2/+0
| | | | | | | | | This seem to be left behind during the previous commit for creating a generic interface of reading the cached tod on non-fsp systems. So, remove the old prototype fsp_rtc_get_cached_tod(). Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Enable warn_unused_result for fsp_fetch_data_queue()Vasant Hegde2014-12-101-1/+1
| | | | | | | | fsp_fetch_data_queue() internally calls fsp_queue_msg(). So ideally we should consume the result of this function. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Enable warn_unused_result for fsp_queue_msg()Stewart Smith2014-11-281-1/+1
| | | | | | | | | | | We now get a bunch of warnings of places where we should go and fix the code, yay! (acked in discussing thread on list) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
* Liberally sprinkle attribute((warn_unused_result)) around the placeStewart Smith2014-11-271-2/+2
| | | | | | None of these actually produce any warnings. My next patch will. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* platform: add a platform hook for loading external resourcesJeremy Kerr2014-10-301-0/+1
| | | | | | | | | | | | | | | | Currently, in core/init.c we do a fsp-specific load procedure to grab the kernel image. We'd like to do two things: allow other types of resources, and have paths for non-FSP platforms to perform loads. This change adds a platform-specific load_resource hook, and moves the currently loading code to fsp_load_resource. To allow other resource types, we add an identifier to indicate the type of resouce to load. Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* led: Handle all the FSP_MCLASS_INDICATOR class sub commandsAnshuman Khandual2014-10-151-0/+21
| | | | | | | | | | | | | | | | | | | Right now if any non-LED FSP_MCLASS_INDICATOR class sub command is received, we print it as an invalid sub command like the following which then eventually gets reported as an unhandled FSP message. [163022636453,5] FSPLED: Invalid FSP async sub command da1105 [163022638116,3] FSP: Unhandled message da1105 This patch defines the complete list of FSP_MCLASS_INDICATOR sub commands and handle them in the registered FSP async command client by sending a generic error acknowledgement to the FSP. Reported-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* dpo: Move the FSP async messagae handling into a separate fileAnshuman Khandual2014-08-131-0/+3
| | | | | | | | | This patch moves the DPO message handling from FSP core code into a separate file to make it more cleaner and to add OPAL interfaces in the subsequent patch. It does not change anything functionally. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* fsp/tpo: Enable Timed power on (TPO) supportMamatha Inamdar2014-08-131-0/+4
| | | | | | | | | | | | | | | This patch enabled TPO sequence handling in Sapphire. Timed power on notification comes from the user through set_poweron_time tool. After receiving a valid TPO from user, Sapphire sends a request to FSP through maibox command to set TPO. FSP will set TPO and power on the system as per the TPO set by the user. [ Removed global read_data, removed writing to NULL pointers, fixed a couple of memory leaks ... --BenH ] Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* ATTN: Set up attention area to handle attentionAruna Balakrishnaiah2014-08-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | At present CPU control area ntuple in SPIRA structure is NULL. ATTN component in Service Processor side checks for this field and if its empty, it logs hardcoded SRC (0xBB821410) and generates SYSDUMP. So we have 1 SRC for all failure (assert call) from OPAL side. This makes difficult to debug the issue. Service processor provides attention area interface (FIPS PHyp Attentions spec), so that we can pass SRC and user data (error message) to service processor. This will helps us identify different failures in OPAL. This patch enables attention area and provides interface (update_sp_attn_area()) to add src and user data (error message) through assert macro. Attention SRC format: 1st byte - Opal src type 2-4 bytes - Holds the address of the assert function call Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* epow: Fix mbox command encoding to remove FSP orphan responsesAnshuman Khandual2014-08-011-3/+3
| | | | | | | | | | | | This patch changes the EPOW related mbox commands encoding to make sure FSP message response structure is allocated. So that when the command returns from FSP, it can be handled appropriately and orphan response will not be logged. This also adds some more in-code documentation explaining why panel status request based handshaking is required with the FSP. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* epow: Enable Environment and Power Warning support in FSP machinesAnshuman Khandual2014-07-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | EPOW informs about the environmental and power situation regarding the system, so thet corrective action can be taken if required. Sapphire interacts in two distinct ways with respect to EPOW events with FSP. FSP sends notification regarding changes in system-panel status (classified as normal ,extended_1, extended_2 depending on information contained). These intimations carry details regarding the prevailing EPOW situation which triggered the notification in the first place. Sapphire can also query about these system-panel status synchronously with FSP, independent of these explicit notifications. This patch enables processing of these explicit FSP notifications related to EPOW events and map them to generic OPAL EPOW events which in turn get communicated to the host above. Host communication has been implemented with OPAL message event interface with OPAL_MSG_EPOW class messages. Host gets notified about the presence of valid EPOW status in the system and subsequently calls for the complete EPOW system status through an exclussive OPAL calls with the token OPAL_GET_EPOW_STATUS. This delivers the entire array of system EPOW status which can then be processed in the host kernel to be forwarded up the stack. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* DPO: Add support for Delayed Power Off sequence on FSP machinesAnshuman Khandual2014-07-251-0/+2
| | | | | | | | | | | | | | | | This enabled DPO sequence handling in Sapphire. Delayed power off notification comes from FSP when the user requests for it through either ASM interface or system front operation panel. After receiving a valid DPO init message from the FSP, Sapphire intimates the host through an OPAL message and then sends an acknowledgement message to the FSP for the last DPO. The host is required to shutdown all the guests, user space programs and then shutdown itself. The shutdown sequence of the host will eventually make the opal call OPAL_CEC_POWER_DOWN receiving which the Sapphire will send a shutdown command to the FSP. Sapphire has got 45 minutes from the time for the initial DPO message to this shutdown command to FSP failing which the FSP will assume that the DPO sequence was successfull both in Sapphire and host, hence force shutdown the system. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* FSP: Trigger HIR on more DISR indicationsAnanth N Mavinakayanahalli2014-07-251-0/+6
| | | | | | | | | | | | Per the Reboot and Reset/Reload HLDD, the following indicators in DISR warrant a HIR triggered recovery (in addition to unit check which we already handle): a. Runtime terminated b. Flash terminated Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* FSP: Rework the R/R state machineAnanth N Mavinakayanahalli2014-07-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a. Do not trigger PSI link down on DISR's RR bit set. b. Do trigger HIR if DISR's Unit Check bit is set. c. On fsp_mbx_err, trigger a HIR (very rare occurance). d. Use fsp_start_rr() when the DISR's RR bit is seen so all mbox activity is stopped when the FSP indicates an RR start. We do not bring the link down voluntarily on DISR's RR begin, pending a PSI interrupt, which actually triggers the link down. Per Dean Sanner, this is the right protocol to follow. The assumption is that a DISR RR bit set would cause a PSI interrupt 'soon'. One TODO is to figure out if this interrupt never arrives. The PSI interrupt does come through albeit after a short while: SURV: [ 1dc662ef7f] Sending the hearbeat command to FSP SURV: Received heartbeat acknowledge from FSP FSP #0: DISR stat change = 0x000000a1 FSP #0: FSP in Reset. Waiting for PSI interrupt FSPCON: Closed consoles on account of FSP reset/reload SURV: Disabling surveillance FSP: Closing NVRAM on account of FSP Reset FSP #0: HDES stat change = 0xffffffff PSI[0x000]: PSI mgmnt interrupt CR=0xfcf0d100c0000000 PSI: PSI Reported Error PSI: PSI Link Inactive Transition PSI: SEMR set to fff0fff00000 PSI[0x000]: Disabling link! PSI: PSIHB_CR (error bits) set to 68f0510040000000 PSI: starting link polling PSI: Spurious interrupt, attempting clear PSI[0x001]: Poll CR=0x00f0100000000000 PSI[0x000]: Poll CR=0x68f0100040000000 PSI[0x001]: Poll CR=0x00f0100000000000 PSI[0x000]: Poll CR=0x68f0100040000000 ... And we recover: PSI[0x000]: Poll CR=0x68f0100040000000 PSI[0x001]: Poll CR=0xccf0300000000000 PSI[0x001]: Found active link! PSI: stopping link polling FSP: Connected to FSP-A FSP #0: DISR stat change = 0x000000a9 FSP #0: DISR stat change = 0x00000281 FSP #0: Detected R&R complete, acking FSP #0: HDES stat change = 0x00000000 FSP #0: DISR stat change = 0x00000081 FSP: FSP assuming new role FSP: SP says Reset/Reload complete Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* opal: Replace fsp_poll() with a full run of all OPAL pollersBenjamin Herrenschmidt2014-07-081-3/+0
| | | | | | | | | Otherwise we don't handle surveillance and PSI link monitoring This should fix cases of surveillance timeouts during things like code update such as BZ109939 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* fsp: Remove unused fields in fsp_msgBenjamin Herrenschmidt2014-07-081-10/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-021-0/+755
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud