Path: utzoo!attcan!uunet!ns-mx!iowasp!deimos.cis.ksu.edu!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!rice!sun-spots-request From: caspi!strod@apollo.com (Eran Strod) Newsgroups: comp.sys.sun Subject: Question about mapin kernel function on the Sun 3x Keywords: SunOS Message-ID: <7291@brazos.Rice.edu> Date: 1 May 90 14:06:07 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 33 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 147, message 7 This code is meant to execute as part of a device driver for a memory mapped device on a Sun 3/470 (Sun 3X). However, I'm not able to see the device's memory. What is wrong with this mapin call? My device is located at 0x5e000000. Is the physpagenum argument wrong? I got this call working on a Sun3. *************************************************************** unsigned long kmx; struct pte *ppte; unsigned int vpagenum, physpagenum; int sizeinpages, access; int *access_AP; int value; kmx = rmalloc ( kernelmap, (long) 1 ); ppte = &Sysmap[kmx]; vpagenum = btoc((Sysbase)) + kmx; sizeinpages = 1; access = PG_V | PG_W ; access_AP = (int *) kmxtob ( kmx ); physpagenum = 0x5e000000 + 0x80000000; mapin (ppte, vpagenum, physpagenum, sizeinpages, access); if ( peek ( access_AP, &value ) != -1 ) printf ("Successfully mapped into the device\n"); *************************************************************** Eran Strod cspi\!strod@apollo.com decwrl!decvax!cspi!strod