xref: /csrg-svn/sys/tahoe/align/Aprober.c (revision 45760)
1*45760Sbostic /*-
2*45760Sbostic  * Copyright (c) 1986 The Regents of the University of California.
3*45760Sbostic  * All rights reserved.
4*45760Sbostic  *
5*45760Sbostic  * This code is derived from software contributed to Berkeley by
6*45760Sbostic  * Computer Consoles Inc.
7*45760Sbostic  *
8*45760Sbostic  * %sccs.include.redist.c%
9*45760Sbostic  *
10*45760Sbostic  *	@(#)Aprober.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229624Ssam 
1345699Sbostic #include "align.h"
1429624Ssam 
1529624Ssam #define	PSL_USER	PSL_CURMOD
prober(infop)1629624Ssam prober(infop)	process_info *infop;
1729624Ssam /*
1829624Ssam /*	Probe read accessability.
1929624Ssam /*
2029624Ssam /*************************************/
2129624Ssam {
2229624Ssam 	register	long	Register_12;	/* Has to be first reg ! */
2329624Ssam 	register	long	Register_11;
2429624Ssam 	register	long	Register_10;
2529624Ssam 	register	long	Register_9;
2629624Ssam 
2729624Ssam 	Register_9 = operand(infop,0)->data & 1;	/* Required mode */
2829624Ssam 	if (psl & PSL_USER) Register_9 = 1;		/* user can't probe as
2929624Ssam 							 *  kernel ! */
3029624Ssam 	Register_10 = operand(infop,1)->address;	/* Base address */
3129624Ssam 	Register_11 = operand(infop,2)->data;		/* Length */
3229624Ssam 	Register_12=psl;
3329624Ssam 	Set_psl(r12);	/* restore the user psl */
3429624Ssam 	asm ("	prober	r9,(r10),r11");
3529624Ssam 	asm ("	movpsl	r12");
3629624Ssam 	New_cc (Register_12);
3729624Ssam }
38