long __gcc_shell_handler (struct chf$signal_array *sig_arr, struct chf$mech_array *mech_arr) { long ret; long (*user_handler) (struct chf$signal_array *, struct chf$mech_array *); user_handler = get_dyn_handler_pointer (mech_arr->chf$q_mch_frame); if (!user_handler) ret = SS$_RESIGNAL; else ret = user_handler (sig_arr, mech_arr); return ret; }
static void smm_handler(PUEFI_EXPL_SMM_SHELLCODE_CONTEXT context) { // tell to the caller that smm_handler() was executed context->smi_count += 1; if (context->user_handler) { UEFI_EXPL_SMM_HANDLER user_handler = (UEFI_EXPL_SMM_HANDLER)context->user_handler; // call external handler user_handler((void *)context->user_context); } return; }
static void smm_handler(PUEFI_EXPL_SMM_SHELLCODE_CONTEXT context) { if (context->ptr_addr) { // restore overwritten pointer *(unsigned long long *)context->ptr_addr = context->ptr_val; } // tell to the caller that smm_handler() was executed context->smi_count += 1; if (context->user_handler) { UEFI_EXPL_SMM_HANDLER user_handler = (UEFI_EXPL_SMM_HANDLER)context->user_handler; // call external handler user_handler((void *)context->user_context); } }