Date: Fri, 1 Apr 2016 20:04:58 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Ryan Stone <rysto32@gmail.com> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: accessing a PCIe register from userspace through kmem or other ways ? Message-ID: <20160401170458.GV1741@kib.kiev.ua> In-Reply-To: <CAFMmRNxJDuQoC-YuwbaWkj7MGVw9UgPEANOX6bN=i8%2Bp_9vm5w@mail.gmail.com> References: <CA%2BhQ2%2BiU4odjhaNicFA4QjvSZR2OZOOy%2BFu4LTqsibdoK4M8zg@mail.gmail.com> <CAFMmRNxCHgRD4bUWwZiG%2B6HiLD2DxagFgHTGmH5jtRj%2BUEtJNA@mail.gmail.com> <CA%2BhQ2%2BjeyVFp-bHckuLtBQ1VBkk%2BA86EvUyC%2BCB2ZZFiye6k1g@mail.gmail.com> <5045119.GKNSyI10vh@ralph.baldwin.cx> <CAFMmRNxJDuQoC-YuwbaWkj7MGVw9UgPEANOX6bN=i8%2Bp_9vm5w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 01, 2016 at 12:48:24PM -0400, Ryan Stone wrote: > That is actually a really good question. I know that with some recent > BIOSes if I enabled allocating 64-bit addresses to BARs, the BAR would > actually be mapped outside of the range of /dev/mem. From a quick glance > at libpciaccess, I don't think that it handles this case. A specific > mechanism for allowing mmaping of BARs would be useful, I think. I am not sure what do you mean by 'outside of the range of /dev/mem'. IMO /dev/mem (not kmem) handles every possible physical address both for mmap(2) and for read(2)/write(2). For io interface there were some bugs, but they are believed to be fixed. I mean amd64.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160401170458.GV1741>