summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch/armv7/main.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-03-03 20:52:05 -0800
committerRonald G. Minnich <rminnich@gmail.com>2013-03-04 22:39:09 +0100
commit9907c6edeb2c30a9c243219803141f6c0fa91ae6 (patch)
tree1c7a921a3ca50b254e325e00dc22c636f10b18a8 /payloads/libpayload/arch/armv7/main.c
parent026bbda071161ad56822dceaabea03bceefac9ac (diff)
libpayload: Catch exceptions and print out an error message.
Give some indication what happened instead of just crashing. As part of setup, cause an exception and make sure that we get the right one, and that we recover correctly. Hence we have some assurance that if they really happen we can handle them. Built and booted into test payload on Snow. Saw the built in test function worked correctly. Artificially added code which got an exception and saw that the error information prints correctly. Change-Id: I2e0d022f090ee422fb988074fbb197afa2485caa Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2569 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/arch/armv7/main.c')
-rw-r--r--payloads/libpayload/arch/armv7/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/arch/armv7/main.c b/payloads/libpayload/arch/armv7/main.c
index 6b54b27fc6..93cfce5c63 100644
--- a/payloads/libpayload/arch/armv7/main.c
+++ b/payloads/libpayload/arch/armv7/main.c
@@ -27,6 +27,7 @@
* SUCH DAMAGE.
*/
+#include <arch/exception.h>
#include <libpayload.h>
unsigned int main_argc; /**< The argc value to pass to main() */
@@ -51,6 +52,8 @@ void start_main(void)
console_init();
#endif
+ exception_init();
+
/*
* Any other system init that has to happen before the
* user gets control goes here.