aboutsummaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2015-09-04 16:55:11 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-09 15:43:50 +1000
commita1db4ec5b9741eaf237481aff92ef2afa61bda48 (patch)
treecff0258a36cae19f80246297f1da8f94722feac0 /libc/include
parent960bd711b2381f4a31048884955b9715d51ea6ea (diff)
downloadskiboot-a1db4ec5b9741eaf237481aff92ef2afa61bda48.zip
skiboot-a1db4ec5b9741eaf237481aff92ef2afa61bda48.tar.gz
skiboot-a1db4ec5b9741eaf237481aff92ef2afa61bda48.tar.bz2
Move FSP specific abort() code to platform layer
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>
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/assert.h5
-rw-r--r--libc/include/stdlib.h9
2 files changed, 4 insertions, 10 deletions
diff --git a/libc/include/assert.h b/libc/include/assert.h
index 68f01ab..2c49fd7 100644
--- a/libc/include/assert.h
+++ b/libc/include/assert.h
@@ -13,13 +13,8 @@
#ifndef _ASSERT_H
#define _ASSERT_H
-extern void update_sp_attn_area(const char *msg);
-
#define assert(cond) \
do { if (!(cond)) { \
- update_sp_attn_area(__FILE__ \
- ":" stringify(__LINE__) \
- ":" stringify(cond)); \
assert_fail(__FILE__ \
":" stringify(__LINE__) \
":" stringify(cond)); } \
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 68ca386..b4f1c38 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -25,11 +25,10 @@ unsigned long int strtoul(const char *nptr, char **endptr, int base);
long int strtol(const char *nptr, char **endptr, int base);
int rand(void);
-void __attribute__((noreturn)) _abort(void);
-#define abort() do { \
- update_sp_attn_area("abort():" __FILE__ \
- ":" stringify(__LINE__)); \
- _abort(); \
+void __attribute__((noreturn)) _abort(const char *msg);
+#define abort() do { \
+ _abort("abort():" __FILE__ \
+ ":" stringify(__LINE__)); \
} while(0)