aboutsummaryrefslogtreecommitdiff
path: root/core/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-20Add fwts annotations for critical errorsStewart Smith1-0/+7
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-09Fix two sparse warnings on __stack_chk_guardStewart Smith1-1/+2
core/utils.c:25:35: warning: constant 0xdeadf00dbaad300d is so big it is unsigned long core/utils.c:25:15: warning: symbol '__stack_chk_guard' was not declared. Should it be static? Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-09platform: Add platform hook for terminate callVasant Hegde1-1/+3
Current abort() call works fine on FSP based system. We need different mechanism on BMC based machine. Hence introduce platform hook for terminate call. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-09Move FSP specific abort() code to platform layerVasant Hegde1-15/+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>
2015-07-06Disable bust_locks for general calls of abort()Alistair Popple1-2/+0
Currently bust_locks is set to true whenever abort() is called. This was done for the lock debugging code which calls abort() as its last step. If there is a locking error there is a good chance parts of the console code will be deadlocked (for example if it has a lock on the scom bus). However busting locks can cause problems, especially now that flash data is being read in parallel as this uses the LPC bus. Instead of getting a nice error message showing where the code aborted it is likely the message will go missing, or it will be garbled by the flash data. So instead of always busting locks make it so they're only busted if they're suspected of being broken. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-11Make abort() update sp attn area (like assert does)Stewart Smith1-2/+2
Gives better diagnostics in error logs/dumps Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-18Add symbolic backtraces and expose skiboot map to LinuxBenjamin Herrenschmidt1-0/+27
We use a double link technique, doing a first pass with a .o containing a dummy symbol map, then re-linking with a new .o Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-18Rename backtrace.c to stack.c and move stack related bitsBenjamin Herrenschmidt1-81/+0
... from util.c to stack.c Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-17Stack checking extensionsBenjamin Herrenschmidt1-2/+88
This patch adds: - Normal builds are done with -fstack-protector (we want to investigate using -fstack-protector-strong on gcc4.9 but for now we just use that - Build with STACK_CHECK=1 will use -fstack-protector-all and -pg and will check the stack in mcount Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-08Use PR_EMERG priority in assert() codepathStewart Smith1-0/+6
Moving assert_fail() out of libc and into core/utils.c so that we can sanely call prlog(PR_EMERG). We shorten it from three fputs calls down to one prlog() call. This may increase the number of cycles and stack usage for when we hit an assert, which may not be desirable. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-08Use PR_EMERG priority in (part of) assert()Stewart Smith1-1/+1
When handling assert and we're going to fail, get the message out with a high priority. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+59
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>