SYSTEM vfs rs vm
;
};
+
+service edfictl
+{
+ ipc ALL;
+};
# define GCOV_BUFF_P m1_p1
# define GCOV_BUFF_SZ m1_i1
+/* Common fault injection ctl request to all processes. */
+#define COMMON_REQ_FI_CTL (COMMON_RQ_BASE+2)
+
/*===========================================================================*
* Messages for VM server *
*===========================================================================*/
} mess_linputdriver_input_event;
_ASSERT_MSG_SIZE(mess_linputdriver_input_event);
+typedef struct {
+ cp_grant_id_t gid;
+ size_t size;
+
+ uint8_t padding[48];
+} mess_lsys_fi_ctl;
+_ASSERT_MSG_SIZE(mess_lsys_fi_ctl);
+
+typedef struct {
+ int status;
+
+ uint8_t padding[52];
+} mess_lsys_fi_reply;
+_ASSERT_MSG_SIZE(mess_lsys_fi_reply);
+
typedef struct {
int what;
vir_bytes where;
mess_linputdriver_input_event m_linputdriver_input_event;
mess_lsys_getsysinfo m_lsys_getsysinfo;
+ mess_lsys_fi_ctl m_lsys_fi_ctl;
+ mess_lsys_fi_reply m_lsys_fi_reply;
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
mess_lsys_krn_schedule m_lsys_krn_schedule;
#define sef_signal_debug_begin sef_debug_begin
#define sef_signal_debug_end sef_debug_end
+/*===========================================================================*
+ * SEF Fault Injection *
+ *===========================================================================*/
+/* What to intercept. */
+#define INTERCEPT_SEF_FI_REQUESTS 1
+#define IS_SEF_FI_REQUEST(mp, status) \
+ (m_ptr->m_type == COMMON_REQ_FI_CTL)
+
+/* Fault injection tool support. */
+#define SEF_FI_ALLOW_EDFI 1
+
#if !defined(USE_LIVEUPDATE)
#undef INTERCEPT_SEF_LU_REQUESTS
#undef SEF_LU_DEBUG
sched_start.c \
sched_stop.c \
sef.c \
+ sef_fi.c \
sef_init.c \
sef_liveupdate.c \
sef_ping.c \
#endif
/* SEF Init prototypes. */
-#ifdef USE_COVERAGE
-EXTERN int do_sef_gcov_request(message *m_ptr);
-#endif
EXTERN int do_sef_rs_init(endpoint_t old_endpoint);
EXTERN int do_sef_init_request(message *m_ptr);
/* SEF Signal prototypes. */
EXTERN int do_sef_signal_request(message *m_ptr);
+/* SEF GCOV prototypes. */
+#ifdef USE_COVERAGE
+EXTERN int do_sef_gcov_request(message *m_ptr);
+#endif
+
+/* SEF Fault Injection prototypes. */
+EXTERN int do_sef_fi_request(message *m_ptr);
+
/*===========================================================================*
* sef_startup *
*===========================================================================*/
}
#endif
+#ifdef INTERCEPT_SEF_FI_REQUESTS
+ /* Intercept Fault injection requests. */
+ if(IS_SEF_FI_REQUEST(m_ptr, status)) {
+ if(do_sef_fi_request(m_ptr) == OK) {
+ continue;
+ }
+ }
+#endif
+
/* If we get this far, this is not a valid SEF request, return and
* let the caller deal with that.
*/
--- /dev/null
+
+#include "syslib.h"
+#include <assert.h>
+#include <minix/sysutil.h>
+
+EXTERN __attribute__((weak)) int edfi_ctl_process_request(void *ctl_request);
+
+/*===========================================================================*
+ * do_sef_fi_request *
+ *===========================================================================*/
+int do_sef_fi_request(message *m_ptr)
+{
+#if SEF_FI_ALLOW_EDFI
+ /* Forward the request to the EDFI fault injector, if linked in. */
+ if(edfi_ctl_process_request)
+ return edfi_ctl_process_request(m_ptr);
+#endif
+
+ return ENOSYS;
+}
+