summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/exception.h
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2013-12-11 00:23:15 -0800
committerMarc Jones <marc.jones@se-eng.com>2014-12-09 18:39:06 +0100
commit20cdb2439f7e76f78d2618220fc1a0061afd57cd (patch)
treeb5b21e423a0ed6c3138074bc6d8655d70443aba2 /payloads/libpayload/include/exception.h
parentc09cf0b7e17cc48576d09d3c48df8625ea5c990b (diff)
downloadcoreboot-20cdb2439f7e76f78d2618220fc1a0061afd57cd.tar.xz
libpayload: Make it possible to install callbacks for particular exceptions.
To support a GDB stub, it will be necessary to trap various exceptions which will be used to implement breakpoints, single stepping, etc. BUG=None TEST=Built and booted on Link with hooks installed and saw that they triggered when exceptions occurred. Built and booted on nyan. BRANCH=None Original-Change-Id: Iab659365864a3055159a50b8f6e5c44290d3ba2b Original-Signed-off-by: Gabe Black <gabeblack@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/179602 Original-Reviewed-by: Gabe Black <gabeblack@chromium.org> Original-Tested-by: Gabe Black <gabeblack@chromium.org> Original-Commit-Queue: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 8db0897b1ddad600e247cb4df147c757a8187626) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I5e7f724b99988cd259909dd3bd01166fa52317ec Reviewed-on: http://review.coreboot.org/7656 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload/include/exception.h')
-rw-r--r--payloads/libpayload/include/exception.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/payloads/libpayload/include/exception.h b/payloads/libpayload/include/exception.h
index 6d118e7ba6..1d9b832c07 100644
--- a/payloads/libpayload/include/exception.h
+++ b/payloads/libpayload/include/exception.h
@@ -30,8 +30,11 @@
#ifndef _EXCEPTION_H
#define _EXCEPTION_H
-#include <stdint.h>
+#include <arch/exception.h>
+
+typedef void (*exception_hook)(int type, struct exception_state *state);
void exception_init(void);
+void exception_install_hook(int type, exception_hook hook);
#endif