[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On I/O and memory address space



> Bob Goudreau <goudr...@dg-rtp.dg.com> wrote:
>> Ali Najafi <alinaj...@simei.aztech.com.sg> wrote:

>> Second way: Make all the registers I/O mapped...
>> ...
>> What I like to do is to map everything to memory. This is what PCI spec has
>> suggested and also seems quite natural and practical and also helps using
>> the bus bandwidth efficiently. It is also OK to map evrything to I/O space

>	Devices should always allow control functions to be mapped into
> 	Memory Space.

Please consider carefully whether the memory space copy should be
marked prefetchable or not.   There are a few considerations:

1. Registers with read side effects are usually a bad idea, but if you
have them, then they must be non-prefetchable.

2. If you want to do burst reads/or writes to your device from a host,
then the memory space should be marked prefetchable.

3. Prefetchable devices can incur extra overhead reading useless CSRs
(i.e. stuff that the host will later ignore). This is particularly bad
if the device "stops" a read transfer after each word as the bridge
will keep reading until it gets its cache line, thus incurring multiple
big latencies for the job (one for each word in the cache line when
software was expecting to spend only one total).

Also note that I/O space only devices are unlikely to work behind a
PCI-to-PCI bridge since the bridge ususally doesn't have enough address
space decoding to do the job.  The PCI-to-PCI bridge I/O space decoding
is frequently just enough to allow the PCI-to-ISA bridge to sit on the
secondary bus and not much more.

My preferred solution:

If burst traffic is ever desireable to the device, make three copies of
the CSRs, one in I/O space, one in Prefetchable Memory space and one in
Non-Prefetchable Memory space.  That way software can decide what it
wants and you don't have to make any hard decisions up-front.

If no burst traffic is interesting and the memory space consumed is
modest, then skip the prefetchable memory space.
------------
Steve Glaser				Digital Equipment Corporation
gla...@lkg.dec.com (or HPNLKG::GLASER)	550 King Street	LKG1-2/W6
+1.508.486.7212  FAX: +1.508.486.5279	Littleton, MA 01460-1289
y\J

Reply via email to