Date: Fri, 25 Jun 2010 10:31:51 -0700 From: Christopher Bowman <crb@chrisbowman.com> To: freebsd-hackers@freebsd.org Subject: PCI Express and drivers Message-ID: <AANLkTinMvJnvsmE6NvOKjtcAVn6JEl-kB-AjdWMpXpZd@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I have a Xilinx PCI Express board that has an on board PCIe interface macro. I intend to have an address space with memory and another with my devices control registers. I wish to program this board under FreeBSD. It would seem to me that the way to do this would be to write a driver that would allow me to map these two address spaces into a user process which could then directly interact with the device. In my case my board doesn't really support multiple users, and it doesn't really seem to make sense to me to put a lot of code in the kernel to create some sort of interface to allow multiple processes to interact with my device via some sort of syscall which would impose a lot of overhead in any case. By mapping the address ranges into a user process I can write user programs to drive the board without having to recompile and reboot the kernel each time I make a change, plus if I do something stupid and crash my user space process it shouldn't bring down the whole kernel. Am I thinking about this wrong? Is there some place I can go to read up on what I should be doing? If I am thinking about this correctly, then how does one map device memory into a user space process? How does one make sure that only one process has such a mapping? Thanks Christopher
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinMvJnvsmE6NvOKjtcAVn6JEl-kB-AjdWMpXpZd>