xref: /original-bsd/sys/tahoe/align/Aprober.c (revision c289d8ba)
1 /*-
2  * Copyright (c) 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Computer Consoles Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)Aprober.c	7.1 (Berkeley) 12/06/90
11  */
12 
13 #include "align.h"
14 
15 #define	PSL_USER	PSL_CURMOD
16 prober(infop)	process_info *infop;
17 /*
18 /*	Probe read accessability.
19 /*
20 /*************************************/
21 {
22 	register	long	Register_12;	/* Has to be first reg ! */
23 	register	long	Register_11;
24 	register	long	Register_10;
25 	register	long	Register_9;
26 
27 	Register_9 = operand(infop,0)->data & 1;	/* Required mode */
28 	if (psl & PSL_USER) Register_9 = 1;		/* user can't probe as
29 							 *  kernel ! */
30 	Register_10 = operand(infop,1)->address;	/* Base address */
31 	Register_11 = operand(infop,2)->data;		/* Length */
32 	Register_12=psl;
33 	Set_psl(r12);	/* restore the user psl */
34 	asm ("	prober	r9,(r10),r11");
35 	asm ("	movpsl	r12");
36 	New_cc (Register_12);
37 }
38