Question about mapin kernel function on the Sun 3x
Eran Strod
caspi!strod at apollo.com
Wed May 2 00:06:07 AEST 1990
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 at apollo.com
decwrl!decvax!cspi!strod
More information about the Comp.sys.sun
mailing list