Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2003 16:57:52 -0700 (PDT)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        arch@freebsd.org
Subject:   Re: make /dev/pci really readable
Message-ID:  <200306162357.h5GNvr2O091991@www.ambrisko.com>
In-Reply-To: <200306162343.h5GNhdnl091211@www.ambrisko.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Ambrisko writes:
| Scott Long writes:
| | You should not always assume that reading PCI registers has no
| | side-effects.  It is certainly legal and possible for a PCI device to
| | detect the read request and alter the contents of the register (or some
| | other register) as a side effect, or change an internal state machine.
| | 'Fixing' the various bits to allow unpriviledged access to 'pciconf -r'
| | is dangerous since you would have to teach the system about every pci
| | device in existance and how to trap on registers that have side-effects.
| 
| I seem to recall reading some PCI chip spec. for a chip I was working on
| that did a reset on read of that register.  I can't recall which or where 
| so don't take this as fact but a distant memory.

I meant to add this but didn't ...

If the register could get cleared then the device driver could get hosed
and that would be bad.

This is what I was thinking about.

Doug A.



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