File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / d / memman / error_hdl.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

#include "definitions"

extern long *p_ptr, exp_par0, exp_par1, exp_par2, exp_par3;
char *Tname = "\n";		/* PTR to test name */

chk_pars(msg1)
char *msg1;
{	char *msg2;
	long *pcb_base, act_param;

	/* Check fault parameter words  */
	act_param = *p_ptr++;
	if (exp_par0 != act_param)
		{ msg2="** fault indicator (1st word) is not as expected !!\n"; 
		  pverr_handler(msg1,msg2,exp_par0,act_param); }
	act_param = *p_ptr++;
	if (exp_par1 != act_param)
		{ msg2="** virtual addr in 2nd parameter is not as expected\n"; 
		  pverr_handler(msg1,msg2,exp_par1,act_param); }
	act_param = *p_ptr++;
	if (exp_par2 != act_param)
		{ msg2="** PC in 3rd parameter word is not as expected\n"; 
		  pverr_handler(msg1,msg2,exp_par2,act_param); }
	act_param = (*p_ptr) & 0xffffffc0;  /* Mask out PSW flags */
	if (exp_par3 != act_param)
		{ msg2="** PSL in 4th parameter word is not as expected \n"; 
		  pverr_handler(msg1,msg2,exp_par3,act_param); }

}

pverr_handler(msg1,msg2,exp,act)
char *msg1, *msg2;
long exp, act;
{	

	writes(Tname);
	writes(msg1); writec('\n'); writes(msg2); writec('\n');
	writes("** Expected data : "); writeh(exp); writec('\n');
	writes("** Actual data   : "); writeh(act); writec('\n');
	asm("halt");
}



print_params()
{	
	long *param_ptr;

	param_ptr = p_ptr;
	writes("	Parameter 1 : "); writeh(*param_ptr++); writec('\n');
	writes("	Parameter 2 : "); writeh(*param_ptr++); writec('\n');
	writes("	Parameter 3 : "); writeh(*param_ptr++); writec('\n');
	writes("	Parameter 4 : "); writeh(*param_ptr); writec('\n');
	asm("halt");
}





unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.