strod@apollo.com (Eran Strod) (05/01/90)
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