Hi, in a driver that I'm trying to port, I want to remap some physical memory 
to a new virtual address. In Linux I simply used ioremap and I see there is an 
equivalent to remap device registers with the ddi_regs_map_setup() but what I 
want to remap is main memory.

I was thinking of a work around where by I call devmap_segmap() but I am not 
sure of two things.

Can I pass a kmem_alloc'd address for devmap_segmap's 'addrp' parameter? i.e. 
can an address that already has page table entries be used? If not then how do 
I generate a virtual address with no corresponding physical page? I guess the 
call to devmap_segmap expects such an empty page.

I'm also thinking of using my PCI driver's major and minor device number for 
the dev_t parameter of devmap_segmap. Is that fine?

Of course since devmap_segmap calls the drivers, segmap routine, in that 
routine I'll return the page frame number that I wish to remap.

Regards,
Bhaskar.
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to