/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:vtop.c 12.0$ */
/* $ACIS:vtop.c 12.0$ */
/* $Source: /ibm/acis/usr/sys/standca/RCS/vtop.c,v $ */

#ifndef lint
static char *rcsid = "$Header:vtop.c 12.0$";
#endif


#define MMU_VTOP     0x810083
#define MMU_REALADDR 0x810013

int err_flag;

vtop(where)
	register int *where;
{
	register int paddr;

	iow(MMU_VTOP, where);
	paddr = ior(MMU_REALADDR);
	if (paddr < 0) {
		err_flag++;
		printf("bad virtual address\n");
	}
	return (paddr < 0 ? -1 : paddr);
}

