---------- Forwarded message ----------
From: 邓宁 <[email protected]>
Date: 2010/5/25
Subject: Re: [driver-discuss] How to check the physical address of a virtual
address in solaris driver?
To: John Martin <[email protected]>



I suspect that the way I was calling the driver is wrong. The return value
of the mapped address is 2135247942, which in big endian (Sparc !) systems
exactly matches the magic sequence of executable or object files.

My question is very similar to this guy:
http://72.5.124.102/thread.jspa?threadID=5116002&messageID=9403005

the driver of my pci device is in this PATH:

#define PATH "/dd/spmdriver"

int fd, i = 0; //file descriptor


volatile unsigned int *myDevice; //device pointer

printf("Opening device...\n");

fd = open(PATH, O_RDWR);

myDevice = (unsigned int *) mmap (NULL, LENGTH, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);


I suppose it opens the device, and then mmaps it into user space. Does it
not?


>
>
> --
> Regards
> Ning Deng
>
> School Of Computer Science and Technology
> Beijng Institute of Technology, China, 100081
> [email protected]
>
>


-- 
Regards
Ning Deng

School Of Computer Science and Technology
Beijng Institute of Technology, China, 100081
[email protected]




-- 
Regards
Ning Deng

School Of Computer Science and Technology
Beijng Institute of Technology, China, 100081
[email protected]
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to