Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 1998 13:07:51 -0800 (PST)
From:      Vinay Bannai <bannai@best.com>
To:        dg@root.com
Cc:        bmcgover@cisco.com, hackers@FreeBSD.ORG
Subject:   Re: Mapping phyical memory in to the PCI address range...
Message-ID:  <199802112107.NAA21942@shell6.ba.best.com>
In-Reply-To: <199802111920.LAA21000@implode.root.com> from David Greenman at "Feb 11, 98 11:20:28 am"

next in thread | previous in thread | raw e-mail | index | archive | help
According to David Greenman:
> >This question may be somewhat ill formed. Hopefully, I'll make myself clear.
> >
> >I'm looking at taking the Cyclades driver, and moving the I/O buffers that are
> >normally in the on-board RAM of the card, and possibly moving them to be
> >within the physical RAM of the PC. 
> >
> >Cyclades supports this to some levels (although they never tried it). 
> >Apparently, the big requirement is the ability to lock down the physical
> >memory for the buffers, and then manipulate this memory in such a way as
> >it can be seen by devices on the PCI bus, su that the card's processor can
> >DMA to it.
> >
> >The questions I have are:
> >
> >1 - Does FreeBSD support the ability to map system memory so its available
> >to the PCI bus. Also, what is the proper procedure for determining the
> >physical address of this memory, and locking it in such a way as to always
> >be available to the card.
> 
>    The PCI devices have access to all of the PC's memory via DMA. The CPU can
> also access the PCI device's memory if it is mapped. I'm familiar with the
> PLX 9060 and it's a bit quirky, but not that difficult to setup DMA. See the
> fxp driver for an example of a driver that does PCI DMA.

Yup. Most of the PCI chipsets like PLX, let you setup the registers to do
I/O map or memory map for the host to see. This becomes crucial if it is a
intelligent I/O card which needs to mmap a certain section of the host
memory to the locat host on the card.

> 
> >2 - Would it really be worthwhile pursuing this endeavor? After all, a 1-2%
> >gain on moving a single character really isn't a big win. However 25+%
> >very well might be.
> 

It all depends on the size of the DMA transfers. Setting up the DMA
registers needs PCI bus access. PCI bus access tend to introduce latency
specially when there are multiple bus masters. For small transfers, I
would desist using DMA...

Vinay
-- 
Vinay Bannai                     E-mail: bannai@best.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe hackers" in the body of the message



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