Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Apr 2016 21:02:49 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com>
Subject:   Re: accessing a PCIe register from userspace through kmem or other ways ?
Message-ID:  <5009932.qXoZ6E4rhX@ralph.baldwin.cx>
In-Reply-To: <CAFMmRNzpOgBPsBezOyUZ_=qjCywfADx8MuJWdaWb_D%2B7UCmi7Q@mail.gmail.com>
References:  <CA%2BhQ2%2BiU4odjhaNicFA4QjvSZR2OZOOy%2BFu4LTqsibdoK4M8zg@mail.gmail.com> <9376230.YZMFsgSvTf@ralph.baldwin.cx> <CAFMmRNzpOgBPsBezOyUZ_=qjCywfADx8MuJWdaWb_D%2B7UCmi7Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, April 04, 2016 08:58:47 PM Ryan Stone wrote:
> On Mon, Apr 4, 2016 at 6:45 PM, John Baldwin <jhb@freebsd.org> wrote:
> 
> > I suspect Ryan might be referring to BARs outside of the DMAP which we
> > only populate to Maxmem IIRC.  /dev/mem should work for those.
> >
> 
> Unfortunately I no longer have access to the systems so I can't really
> confirm.  I had a debug tool that attempted to read PCI device registers
> through /dev/mem, and on these systems (which were running a 8.2
> derivative) the reads from /dev/mem failed with some kind of error.
> 
> The one detail that I do remember is that the errors started happening
> after we enabled the use of 64-bit BARs in the BIOS and the addresses
> assigned to the BARs were quite large -- I believe well beyond the bounds
> of real memory.

kib@ fixed /dev/mem to handle addresses beyond the direct map limit to use
temporary mappings instead of failing with EFAULT in 277051 which was only
committed to HEAD last January, so well after 8.2.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5009932.qXoZ6E4rhX>