libpayload arm64: Make exceptions work
BUG=chrome-os-partner:31634
BRANCH=None
TEST=test_exc generates and handles exceptions properly
Change-Id: If3ecab93be6d02942b52960ec97edc687bedf64b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bba2caae0bd436ba9e5215f5d8606ce8c4987c98
Original-Change-Id: I4abe8a0e426eab2532852179dbb32505353cd0a1
Original-Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/214609
Original-Tested-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: http://review.coreboot.org/8783
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/payloads/libpayload/arch/arm64/main.c b/payloads/libpayload/arch/arm64/main.c
index 864e3ca..6b45a01 100644
--- a/payloads/libpayload/arch/arm64/main.c
+++ b/payloads/libpayload/arch/arm64/main.c
@@ -37,13 +37,15 @@
unsigned int test_exc;
-int test_exception(void);
-int test_exception(void)
+static int test_exception(void)
{
- int a = 1;
- int b = 0;
+ uint64_t *a = (uint64_t *)0xfffffffff0000000ULL;
+
test_exc = 1;
- return a/b;
+
+ printf("%llx\n", *a);
+
+ return 0;
}
/**