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 * @(#)Aprobew.c 7.1 (Berkeley) 12/06/90 11*45760Sbostic */ 1229625Ssam 1345699Sbostic #include "align.h" 1429625Ssam 1529625Ssam #define PSL_USER PSL_CURMOD probew(infop)1629625Ssamprobew(infop) process_info *infop; 1729625Ssam /* 1829625Ssam /* Probe write accessability. 1929625Ssam /* 2029625Ssam /*************************************/ 2129625Ssam { 2229625Ssam register long Register_12; /* Has to be first reg ! */ 2329625Ssam register long Register_11; 2429625Ssam register long Register_10; 2529625Ssam register long Register_9; 2629625Ssam 2729625Ssam Register_9 = operand(infop,0)->data & 1; /* Required mode */ 2829625Ssam if (psl & PSL_USER) Register_9 = 1; /* user can't probe as 2929625Ssam * kernel ! */ 3029625Ssam Register_10 = operand(infop,1)->address; /* Base address */ 3129625Ssam Register_11 = operand(infop,2)->data; /* Length */ 3229625Ssam Register_12=psl; 3329625Ssam Set_psl(r12); /* restore the user psl */ 3429625Ssam asm (" probew r9,(r10),r11"); 3529625Ssam asm (" movpsl r12"); 3629625Ssam New_cc (Register_12); 3729625Ssam } 38