summaryrefslogtreecommitdiffstats
path: root/hw/fsp/fsp-op-panel.c
Commit message (Collapse)AuthorAgeFilesLines
* fsp: Don't recurse pollers in ibm_fsp_terminateStewart Smith2016-11-241-1/+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/op-panel: Fix out of bounds array access and #define display dimensionsSuraj Jitindar Singh2016-06-301-17/+13
| | | | | | | | | | | | | | | | | | In the function __opal_write_oppanel() coverity complains about an out of bounds array access. While the pointer is never actually dereferenced, this isn't immediately obvious from the code. Additionally the number and length of the lines on the operator panel display are hard coded into the function. While we are here we might as well move these into a #define statement. Rework the code in __opal_write_oppanel() where the message is copied into the buffer so that coverity won't complain about an out of bounds array access and so that it is line number and length agnostic (now relying on the #defined values). Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* errorlog: Deprecate elog callback parameterSamuel Mendoza-Jonas2015-07-311-2/+1
| | | | | | | | | | There are now no users of the call_out parameter and future users should use the log_append_msg() and log_append_data() functions, so remove all references to call_out. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Remove redundant includes of opal-api.hMichael Ellerman2015-04-011-1/+0
| | | | | | | | Now that opal.h includes opal-api.h, there are a bunch of files that include both but don't need to. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* fsp-op-panel: don't call fsp_sync_msg with lock heldStewart Smith2015-02-181-33/+45
| | | | | | | Use allocated fsp message in usual case, fall back to static one in the event of a fatal error. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Use __be64 annotations in opal.h for opal_sg_list and oppanel-lineStewart Smith2015-02-101-4/+8
| | | | | | | | | Now matches linux. Fix up all the fsp code using these structs to do the proper be64_to_cpu conversions so at least everything is annotated correctly. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Move skiboot internal things from opal.h to opal-api.hStewart Smith2015-02-061-0/+1
| | | | | | | | | | This is probably not the best collection of things in the world, but it means that opal.h is much closer to being directly usable by an OS. This triggers a bunch of #include fixes throughout the tree. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Don't run pollers when sending fsp msg for op panel op_display(FATAL)Stewart Smith2015-01-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got the following recursive lock crash: LOCK ERROR: Invalid recursive lock @0x30108108 (state: 0x0000000000000001) [315691375,0] Aborting! CPU 0000 Backtrace: S: 0000000031a03080 R: 0000000030013508 .backtrace+0x24 S: 0000000031a03100 R: 0000000030017128 .abort+0x64 S: 0000000031a03170 R: 0000000030015d34 .lock_error+0x54 S: 0000000031a031f0 R: 0000000030015de8 .lock+0x50 S: 0000000031a03270 R: 000000003004fc20 .elog_timeout_poll+0x28 <- take elog_write_lock S: 0000000031a03300 R: 0000000030017d48 .opal_run_pollers+0x54 S: 0000000031a03380 R: 0000000030043fdc .fsp_sync_msg+0x74 S: 0000000031a03410 R: 000000003004eaa0 .op_display+0xdc S: 0000000031a034c0 R: 0000000030015d08 .lock_error+0x28 <- printf"LOCK ERROR" S: 0000000031a03540 R: 0000000030015de8 .lock+0x50 <- S: 0000000031a035c0 R: 000000003002413c .rtc_cache_get+0x20 <- rtc_tod_lock INCORRECTLY KEPT LOCK S: 0000000031a03650 R: 000000003002421c .rtc_cache_get_datetime+0x24 S: 0000000031a03700 R: 0000000030023100 .create_pel_log+0x340 S: 0000000031a037f0 R: 000000003004f9dc .opal_send_elog_to_fsp+0x5c <- take elog_write_lock S: 0000000031a03880 R: 00000000300238b4 .log_simple_error+0xe0 S: 0000000031a03a10 R: 00000000300245c8 .__xscom_write+0xb8 S: 0000000031a03aa0 R: 00000000300248c0 .xscom_write+0x138 S: 0000000031a03b60 R: 000000003002af1c .occ_send_dummy_interrupt+0x34 S: 0000000031a03bd0 R: 0000000030017b9c .opal_update_pending_evt+0x68 <- take evt_lock S: 0000000031a03c60 R: 00000000300511c8 .update_opal_dump_notify+0x48 S: 0000000031a03cd0 R: 00000000300517f0 .add_dump_id_to_list+0xe8 S: 0000000031a03d80 R: 00000000300553e4 .ibm_fsp_init+0xd4 S: 0000000031a03e30 R: 00000000300140f0 .main_cpu_entry+0x3ec S: 0000000031a03f00 R: 0000000030002504 boot_entry+0x18c Which is wonderfully fascinating as there are *TWO* lock_error frames in the call stack, which means we lost the original error. This is because op_display() sends an FSP message with fsp_sync_msg() which runs opal_run_pollers() which ended up running a poller that tried to take a lock we already had when we ran into trouble. Basically, running pollers during this kind of fatal error handling is a bad idea. So, instead of doing that, just queue the FSP message and don't wait for a response (we don't really care about the response on a fatal error anyway). Additionally, move op_display() to *after* the printf call on the hope that printf ends up being a bit more foolproof than having to send FSP messages. Now, with this bug fixed, the correct lock_error() will be displayed. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* elog: Clean up error logging headersAlistair Popple2014-12-021-1/+1
| | | | | | | | | | | | | | | 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>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-021-0/+249
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud