aboutsummaryrefslogtreecommitdiff
path: root/include/fsp-elog.h
AgeCommit message (Collapse)AuthorFilesLines
2016-08-26FSP/ELOG: Remove redundant elog stateVasant Hegde1-1/+0
OPAL gets elog notification from service processor which contains log information. Once we get notification we start reading log data and change elog state to ELOG_STATE_FETCHING. Hence we don't need ELOG_STATE_FETCHED_INFO state. Lets remove this variable. Also in some places we have used this state after sending event information to host. Replace such usage with better state (ELOG_STATE_HOST_INFO). Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Improve elog event statesVasant Hegde1-0/+1
ELOG enables event notification once new log is available. And this will be disabled after host completes reading logs (it has to complete both fsp_opal_elog_info and fsp_opal_elog_read). Ideally we should disable notification as soon as host consumes event (after fsp_opal_elog_info). Also if host fails to call fsp_opal_elog_read (ex: situations like duplicate event), then we endup keeping notification forever. This patch introduces new ELOG state (ELOG_STATE_HOST_INFO). As soon as host consumes event elog will move to this new state so that event notification is disabled. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-21FSP/ELOG: Fix OPAL generated elog event notificationVasant Hegde1-0/+2
We use elog notifier to notify logs from multiple sources (FSP generated logs - fsp-elog-read.c and OPAL generated logs - fsp-elog-write.c). OPAL generated logs sets elog event bit whenever it has new logs to send to host. But it relies on fsp-elog-read.c to disable the event bit..which is wrong! This patch creates common function to enable/disable event notification. It will enable event notification if any of the source is ready to send error log to host and disables notification once it completes sending all errors to host. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02elog: Clean up error logging headersAlistair Popple1-187/+0
Commit cf6f4e8912d29fb89ce85c84834607065ad595a5 introduced a platform independent frontend for error logging. However it failed to move the generic parts of the fsp-elog.h header into the platform independent one, instead relying on the fact that up until now fsp-elog.h was included whenever a function needed to log errors. This patch moves the platform independent defines into the frontend header file (errorlog.h) and removes the include of the platform specific header in generic code paths. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-27Liberally sprinkle attribute((warn_unused_result)) around the placeStewart Smith1-5/+5
None of these actually produce any warnings. My next patch will. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-14i2c: Provide FFDC data in the driverNeelesh Gupta1-0/+8
Define SRCs of I2C component and interface with the existing skiboot 'errorlog' infrasturcute for commiting the logs. Add the i2c specific OPAL error codes to differentiate various types of errors during i2c operations. To ease debugging, dump the i2c register contents, 'master' and 'request' structure bits in case any error occured during transfer on the bus. Minor clean-ups as well. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-22fsp/elog: Create a logging frontendAlistair Popple1-10/+0
In order to support fsp-less machines we need to be able to log errors using a BMC or some other mechanism. Currently the error logging code is tightly coupled to the platform making it difficult to add different platforms. This patch factors out the generic parts of the error logging code in preparation for adding different logging backends. It also adds a generic mechanism for pre-allocating a specific number of objects. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-22fsp/elog: Separate the PEL log formatting functionsAlistair Popple1-148/+1
The PEL log format is not specific to the FSP. We plan to use the same format for OpenPOWER systems. This patch refactors the code into a platform agnostic file. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-10OCC: Change OCC timeout elog severityskiboot-2.1.1-fw810.20-1Vasant Hegde1-0/+1
Presently we are logging informational event if OCC timeout happens during boot. Change the severity to Unrecoverable Error. Also updated the elog description. Sample Output: |------------------------------------------------------------------------------| | Entry Id Commit Time SubSystem Committed by | | Platform Id State Event Severity Ascii Str | |------------------------------------------------------------------------------| | 0x53A530C8 10/09/2014 10:13:06 CEC Hardware Subsystem OC | | 0xB0000001 Sent to Hypervisor Unrecoverable Error BB82C013 | |------------------------------------------------------------------------------| Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-08-13attn: Add default attn src in the src sectionAruna Balakrishnaiah1-0/+4
Generating src dynamically results in: 1. Difficulty in documenting and for field people to understand. 2. It might also conflict with existing srcs. Hence add default SRC in SRC section. Assert function call address in hex word 2. errl -d <elog-entry-id>: .. | Reference Code : BB821410 | | Hex Words 2 - 5 : 30017610 00000000 00000000 00000000 | .. Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-31MDST: Improve error loggingVasant Hegde1-1/+3
Add informational event in add dump region path. Also change the severity of the existing elog event. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-25elog: Remove opal prefix from data structures in errorlog.hDeepthi Dharwar1-4/+4
Remove opal prefix from opal_* structures in errorlog.h Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-25elog: Move error log data structres from opal.h to new file errorlog.hDeepthi Dharwar1-0/+1
Currently, all the error log data structures needed to commit an error in PEL are declared in opal.h and are exposed to kernel. At present we do not have any infrastrucutre in the kernel to make use of these ABIs. Any changes to these strucutes in the future can potentially cause an ABI breakage. In order to avoid any breakage this patch moves all the error log data structures to a new errorlog.h file and deprecating the OPAL tokens for error-log write functionality calls only. Once the kernel support is added (anytime in future), one needs to move all of this back to opal.h and re-enable the OPAL tokens for the same. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-25elog: Support for re-sending Sapphire pending logs.Deepthi Dharwar1-0/+2
This patch adds support to re-send Sapphire logs to the host. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-25elog: Elog read side framework changes to read Sapphire logs.Deepthi Dharwar1-0/+7
This patch consists of elog-read framework changes to support pulling of Sapphire logs directly on to the host. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-25elog: Introduce new enum elog_head_state fields to indicate elog_info has ↵Deepthi Dharwar1-0/+13
been read. The host would first query OPAL about the error log format, size and log id and later make a call to read the complete log buffer from OPAL to host. This patch introduces a new elog_head_state to indicate that host has queried elog info before fetching the elog_buffer. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-25elog: Queue errors to be committed in FSP with timeout value.Deepthi Dharwar1-0/+3
This patch aims to queues all the OPAL errors to the FSP with a time-out value. If the error gets committed in FSP and an ack is recevied for the same within the time-out interval, then it is not reported in the host. Else on expiry of the time-out value the error is committed in the host. Currently the time-out value is set to 180 seconds. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-21elog: Update OPAL component IDsMamatha Inamdar1-86/+117
This patch is to update OPAL component IDs to ASCII string. Currenty on FSP error log parser tool display junk character for sapphire componenet IDs. This patch will fix the bug for parsing sapphire componenet IDs on FSP. For example for component CODEUPDATE(CU), currently we pass 0x1000 as the component ID, instead of passing 0x1000, we pass ASCII string of 'CU' i.e 0x4355. Note: the SRC's would still remain unaltered, and this would be only for display purpose Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+325
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>