Date: Mon, 21 Nov 2005 09:19:10 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: dmitry@atlantis.dp.ua Cc: freebsd-hackers@freebsd.org Subject: Re: Physical memory access from kld Message-ID: <20051121.091910.105332203.imp@bsdimp.com> In-Reply-To: <20051118124856.F199@atlantis.atlantis.dp.ua> References: <20051118124856.F199@atlantis.atlantis.dp.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
I think that you'll want to use PCIB_READ_CONFIG. This function takes a pointer to a pci bridge device_t and can be used to read an arbitrary register in pci config space. PCIB_READ_CONFIG(pcib, b, s, f, n, w) b -- bus s -- slot f -- function n -- register to read w -- width to read This will help you access device on bus 0, slot 6, function 0. It will access the actual hardware, not the cached values like you have been doing in 4.x. Hope this helps. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051121.091910.105332203.imp>