Mapping Kernel memory to user space

Ron Natalie ron at BRL-TGR.ARPA
Wed Nov 21 06:45:06 AEST 1984


Add these to the end of uba.c

maptouser(vaddress)
	caddr_t vaddress;
{

	Sysmap[(((unsigned)(vaddress))-0x80000000) >> 9].pg_prot = (PG_UW>>27);
}

unmaptouser(vaddress)
	caddr_t vaddress;
{

	Sysmap[(((unsigned)(vaddress))-0x80000000) >> 9].pg_prot = (PG_KW>>27);
}

and then call them from an IOCTL in the device driver.



More information about the Comp.unix.wizards mailing list