static void emd_aseert_log_work_func(struct work_struct *data) { #if defined (CONFIG_MTK_AEE_FEATURE) char log[]="ExtMD exception\nMD:G*MT6261_S01*11C.unknown*0000/00/00 00:00\nAP:WG*MT6595_S00\n(MD)Debug"; EMD_MSG_INF("chr","Ext MD exception,%s\n",log); emd_aseert_log_wait_timeout = 1; wake_up_interruptible(&emd_aseert_log_wait); aed_md_exception((int *)log, sizeof(log), (int *)log, sizeof(log), log); #else EMD_MSG_INF("chr","Ext MD ASSERT -> RESET\n"); emd_aseert_log_wait_timeout = 1; wake_up_interruptible(&emd_aseert_log_wait); emd_request_reset(); #endif }
/* * @brief Trigger AEE exception red screen. * @param * aed_addr [in] address for get exceptiog log and md image. * aed_len [in] exception length. * aed_str [in] exception string show on the red screen. * @return * none. */ void eemcs_aed(char* ex_log_addr, unsigned int ex_log_len, char *aed_str) { #define AED_STR_LEN (512) int *md_img_addr = NULL; int md_img_len = 0; int info_str_len = 0; char buff[AED_STR_LEN]; char img_inf[MD_INFO_STR_LEN]=""; eemcs_get_md_info_str(img_inf); info_str_len = strlen(aed_str); info_str_len += strlen(img_inf); if(info_str_len > AED_STR_LEN){ buff[AED_STR_LEN-1] = '\0'; // Cut string length to AED_STR_LEN } snprintf(buff, AED_STR_LEN, "\n%s%s\n", aed_str, img_inf); #if defined (CONFIG_MTK_AEE_FEATURE) && defined (ENABLE_AEE_MD_EE) DBGLOG(EXPT, DBG, "aed_md_exception"); aed_md_exception((int const *)ex_log_addr, ex_log_len, md_img_addr, md_img_len, buff); #endif }