Physical memory access from kld
M. Warner Losh
imp at bsdimp.com
Mon Nov 21 16:21:22 GMT 2005
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
More information about the freebsd-hackers
mailing list