示例#1
0
void
cpuexc_handler(void *p_excinf)
{
	ID		tskid;

	syslog(LOG_NOTICE, "CPU exception handler (p_excinf = %08p).", p_excinf);
	if (sns_ctx() != true) {
		syslog(LOG_WARNING,
					"sns_ctx() is not true in CPU exception handler.");
	}
	if (sns_dpn() != true) {
		syslog(LOG_WARNING,
					"sns_dpn() is not true in CPU exception handler.");
	}
	syslog(LOG_INFO, "sns_loc = %d sns_dsp = %d sns_tex = %d",
									sns_loc(), sns_dsp(), sns_tex());
	syslog(LOG_INFO, "xsns_dpn = %d xsns_xpn = %d",
									xsns_dpn(p_excinf), xsns_xpn(p_excinf));

	if (xsns_xpn(p_excinf)) {
		syslog(LOG_NOTICE, "Sample program ends with exception.");
		SVC_PERROR(ext_ker());
		assert(0);
	}

	SVC_PERROR(iget_tid(&tskid));
	SVC_PERROR(iras_tex(tskid, 0x8000U));
}
示例#2
0
void
cpuexc_handler(void *p_excinf)
{
	check_point(3);
	check_assert(xsns_xpn(p_excinf) == true);
	check_assert(xsns_dpn(p_excinf) == true);

#ifdef CANNOT_RETURN_CPUEXC
	check_finish(4);
#endif /* CANNOT_RETURN_CPUEXC */

	check_point(4);
}
void
cpuexc_handler(void *p_excinf)
{
	ER		ercd;

	switch (++cpuexc_count) {
	case 1:
		check_point(3);
		check_state_i(true, false, false, true, false);
		check_assert(xsns_xpn(p_excinf) == false);
		check_assert(xsns_dpn(p_excinf) == false);

		check_point(4);
		ercd = iact_tsk(TASK2);
		check_ercd(ercd, E_OK);
		ercd = iloc_cpu();
		check_ercd(ercd, E_OK);
		break;

	case 2:
		check_point(11);
		check_state_i(true, false, false, true, false);
		check_assert(xsns_xpn(p_excinf) == false);
		check_assert(xsns_dpn(p_excinf) == false);

		check_point(12);
		ercd = iras_tex(TASK1, 1U);
		check_ercd(ercd, E_OK);
		ercd = iloc_cpu();
		check_ercd(ercd, E_OK);
		break;

	default:
		check_point(0);
		break;
	}
}
void
cpuexc_handler(void *p_excinf)
{
	ER		ercd;

	check_point(3);
	check_state_i(true, false, true, true, false);
	check_assert(xsns_xpn(p_excinf) == false);
	check_assert(xsns_dpn(p_excinf) == true);

	check_point(4);
	ercd = iras_tex(TASK1, 1U);
	check_ercd(ercd, E_OK);
	ercd = iloc_cpu();
	check_ercd(ercd, E_OK);
}
示例#5
0
void ldr_data_abort_handler(void *p_excinf) {
	syslog(LOG_EMERG, "====================EXCEPTION DETECTED====================");
	syslog(LOG_EMERG, "Data abort exception occurs.");
	xlog_sys(p_excinf);

	ID tid;
	iget_tid(&tid);
	if (!xsns_xpn(p_excinf)) {
		syslog(LOG_EMERG, "Kill task (tid = %d) for recovery.", tid);
		ER ercd = iras_tex(tid, 1);
		assert(ercd == E_OK);
	} else {
		syslog(LOG_EMERG, "Fatal error (tid = %d), exit kernel.", tid);
		ext_ker();
	}
	syslog(LOG_EMERG, "==========================================================");
}
示例#6
0
void
cpuexc_handler(void *p_excinf)
{
    ER		ercd;

    check_point(4);
    check_state_i(true, true, true, true, false);
    check_assert(xsns_xpn(p_excinf) == true);
    check_assert(xsns_dpn(p_excinf) == true);

#ifdef CANNOT_RETURN_CPUEXC
    check_finish(5);
#endif /* CANNOT_RETURN_CPUEXC */

    check_point(5);
    ercd = iunl_cpu();
    check_ercd(ercd, E_OK);
}
示例#7
0
void
cpuexc_handler(void *p_excinf)
{
	ER		ercd;

	check_point(3);
	check_state_i(true, false, false, true, false);
	if (xsns_xpn(p_excinf) == true) {
		syslog_0(LOG_WARNING, "xsns_xpn returns true.");
	}
	check_assert(xsns_dpn(p_excinf) == true);

	check_point(4);
	ercd = iras_tex(TASK1, 1U);
	check_ercd(ercd, E_OK);
	ercd = iloc_cpu();
	check_ercd(ercd, E_OK);
}