fix(serror): use custom argument for incrementing elr_elx
Add a custom argument to increment the elr_elx after handling SError.
In some cases, to prevent re-triggering the instruction, ELR needs
to be incremented by 4. In other cases, it may not be necessary.
This argument is passed to the handler, which then decides whether
to increment elr_elx by setting the passed argument accordingly after
handling the SError.
Change-Id: I404f3c5e24f894502a8d00c73649be0b2dd540fa
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
diff --git a/include/lib/aarch64/serror.h b/include/lib/aarch64/serror.h
index ac25f87..e6aa64f 100644
--- a/include/lib/aarch64/serror.h
+++ b/include/lib/aarch64/serror.h
@@ -7,8 +7,8 @@
#ifndef __SERROR_H__
#define __SERROR_H__
-typedef bool (*exception_handler_t)(void);
-void register_custom_serror_handler(exception_handler_t handler);
+typedef bool (*serr_exception_handler_t)(bool *incr_elr_elx);
+void register_custom_serror_handler(serr_exception_handler_t handler);
void unregister_custom_serror_handler(void);
#endif /* __SERROR_H__ */