Messages in this thread | | | From | "Raj, Ashok" <> | Subject | implementing mmap... | Date | Wed, 28 Jul 1999 09:16:23 -0700 |
| |
Hi
I have a pci card and has 2 BARS that i have mapped to kernel virtual using ioremap_nocache() and can access registers on board from kernel space now. I would like to export these to user space so that i can have some user level program access and use these registers for development purposes.
looks like mmap is way to go, but looking at some sample kernel code each has implemented something different thought i will check with you before...
when i call remap_page_range() 2nd arg says physical addr. iam getting confused here which addr to use.
pci_dev gives me a addr[0] say X.
i got kernel va Y using
Y = io_remap_nocache()
now to remap_page_range() would i pass the Y? or virt_to_phys(Y)? or should it be X?
Cheers, ashokr
Plug-and-Play is really nice, unfortunately it only works 50% of the time. To be specific the "Plug" almost always works. --unknown source
---------------------------------------------------------------------------- ------------- Ashok Raj Phone : (503)-677-6928 NGIO Division Fax : (503)-690-4302 Core Software Group email : ashok.raj@intel.com M/S : CO3-208 ---------------------------------------------------------------------------- -------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |