DMA and PCI

bridged with qdn.public.articles
Post Reply
Arunas Bytautas

DMA and PCI

Post by Arunas Bytautas » Wed Oct 10, 2001 3:40 pm

Hello,

it would be great to find an article how to work with dma and PCI under QNX.


with best Regards,

Arunas Bytautas

Mitchell Schoenbrun

Re: DMA and PCI

Post by Mitchell Schoenbrun » Thu Oct 11, 2001 12:12 am

Previously, Arunas Bytautas wrote in qdn.public.articles:
Hello,

it would be great to find an article how to work with dma and PCI under QNX.
It's not really a QNX issue however. If you are working
with 8 or 16 bit ISA DMA, then there is some sample code
around as to how each I/O port needs to be programmed. PCI
DMA is another animal entirely. Generally you need the
hardware specs for controller or device that will be doing
the DMA. Beyond that there are only two OS issues, getting
permission to do port I/O and finding out the REAL memory
addresses you need to program the DMA with.

--
Mitchell Schoenbrun --------- maschoen@pobox.com

Arunas Bytautas

Re: DMA and PCI

Post by Arunas Bytautas » Mon Oct 15, 2001 9:54 am

Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO885 ... ok/dma.htm
l

;)

"Mitchell Schoenbrun" <maschoen@pobox.com> wrote in message
news:Voyager.011010171217.7519A@schoenbrun.com...
Previously, Arunas Bytautas wrote in qdn.public.articles:
Hello,

it would be great to find an article how to work with dma and PCI under
QNX.

It's not really a QNX issue however. If you are working
with 8 or 16 bit ISA DMA, then there is some sample code
around as to how each I/O port needs to be programmed. PCI
DMA is another animal entirely. Generally you need the
hardware specs for controller or device that will be doing
the DMA. Beyond that there are only two OS issues, getting
permission to do port I/O and finding out the REAL memory
addresses you need to program the DMA with.

--
Mitchell Schoenbrun --------- maschoen@pobox.com


Mitchell Schoenbrun

Re: DMA and PCI

Post by Mitchell Schoenbrun » Mon Oct 15, 2001 6:51 pm

Previously, Arunas Bytautas wrote in qdn.public.articles:
I get error -404 when I click on this link.

Mitchell Schoenbrun --------- maschoen@pobox.com

Richard R. Kramer

Re: DMA and PCI

Post by Richard R. Kramer » Mon Oct 15, 2001 9:39 pm

In the original post, the "l" in "html" got wrapped off the line.

Mitchell Schoenbrun wrote:
Previously, Arunas Bytautas wrote in qdn.public.articles:
Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO885 ... ok/dma.htm

I get error -404 when I click on this link.

Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun

Re: DMA and PCI

Post by Mitchell Schoenbrun » Tue Oct 16, 2001 1:53 am

Same -404 error with or without the final l.


Previously, Richard R. Kramer wrote in qdn.public.articles:
In the original post, the "l" in "html" got wrapped off the line.

Mitchell Schoenbrun wrote:

Previously, Arunas Bytautas wrote in qdn.public.articles:
Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO885 ... ok/dma.htm

I get error -404 when I click on this link.

Mitchell Schoenbrun --------- maschoen@pobox.com
--
Mitchell Schoenbrun --------- maschoen@pobox.com

Ian Cannon

Re: DMA and PCI

Post by Ian Cannon » Tue Oct 16, 2001 8:59 am

Works for me with the l

Previously, Mitchell Schoenbrun wrote in qdn.public.articles:
Same -404 error with or without the final l.


Previously, Richard R. Kramer wrote in qdn.public.articles:
In the original post, the "l" in "html" got wrapped off the line.

Mitchell Schoenbrun wrote:

Previously, Arunas Bytautas wrote in qdn.public.articles:
Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO885 ... ok/dma.htm

I get error -404 when I click on this link.

Mitchell Schoenbrun --------- maschoen@pobox.com


--
Mitchell Schoenbrun --------- maschoen@pobox.com



Mitchell Schoenbrun

Re: DMA and PCI

Post by Mitchell Schoenbrun » Tue Oct 16, 2001 6:00 pm

Previously, Ian Cannon wrote in qdn.public.articles:
Works for me with the l
Ah hah. I've been having a continual problem with any URL that
ends in .org. I'm using Voyager and it appends .com to the domain
name. This sends me to the wrong place. Anyone know about this?

Mitchell
Previously, Mitchell Schoenbrun wrote in qdn.public.articles:
Same -404 error with or without the final l.


Previously, Richard R. Kramer wrote in qdn.public.articles:
In the original post, the "l" in "html" got wrapped off the line.

Mitchell Schoenbrun wrote:

Previously, Arunas Bytautas wrote in qdn.public.articles:
Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO885 ... ok/dma.htm

I get error -404 when I click on this link.

Mitchell Schoenbrun --------- maschoen@pobox.com


--
Mitchell Schoenbrun --------- maschoen@pobox.com





--
Mitchell Schoenbrun --------- maschoen@pobox.com

Michael D. Burkey

Re: DMA and PCI

Post by Michael D. Burkey » Wed Oct 17, 2001 7:08 pm

I read the article you mentioned and I think you are missing a VERY important point.

No such article can ever be done for a PCI DMA interface because PCI
DMA behaves completely differently (regardless of what OS it is under)
than ISA/EISA DMA.

Both ISA and EISA DMA work based upon an onboard DMA controller
on the motherboard. In essence, you load the controller up with a set of transfers
and memory ranges and start it operating. In essence, you have a nice, standardized
DMA controller with a well defined interface -- however it can not be optimized
for specific functionality and is rather slow.

PCI DMA by contrast, is strictly bus master DMA. Which is to say, all DMA
hardware (when there is any) exists on the PCI card itself. The PCI card simply
takes over the PCI bus and generates transactions itself. The problem is that
every PCI card has its own specific register set and design. Therefore there
is NO single standard for how PCI DMA operates, so writing a nice concise
document on it is basically impossible.

And to make matters worse, many cards do not have any bus master DMA
origination capability and I have seen quite a bit of variation in how well a card
works as the *target* of a bus master operation by another device. You
especially get into some weird issues when multiple DMA operations are
going on simultaneously between different devices. Some devices
*cough* sblive * cough* appear to ignore some of the latency and
arbitration requirements of the PCI bus and have caused problems
with other system devices (i.e. Via IDE controllers).

PCI DMA, when it works properly, is great. When it doesn't, it can be
your worst nightmare.

So, I guess the answer to your question on PCI DMA can be summed
up in one simple statement: Refer to the datasheet of the device in question.


--------------------------------------------------------------------------
Michael Burkey (mailto:Michael.Burkey@Nexwarecorp.com)
Nexware Corp. (http://www.nexwarecorp.com)
Software Engineer
865.546.9998 x201

DMitri

Re: DMA and PCI

Post by DMitri » Tue Jan 22, 2002 12:21 pm

Talking about PCI vs ISA DMA . . . What if my PCI card doesn't have DMA
chip. Can I somehow use standard (ISA) DMA chip (8237 or whatever) to move
data from PCI card to memory?
Do you have any experience in that?

thanks
I read the article you mentioned and I think you are missing a VERY
important point.

No such article can ever be done for a PCI DMA interface because PCI
DMA behaves completely differently (regardless of what OS it is under)
than ISA/EISA DMA.

Both ISA and EISA DMA work based upon an onboard DMA controller
on the motherboard. In essence, you load the controller up with a set of
transfers
and memory ranges and start it operating. In essence, you have a nice,
standardized
DMA controller with a well defined interface -- however it can not be
optimized
for specific functionality and is rather slow.

PCI DMA by contrast, is strictly bus master DMA. Which is to say, all DMA
hardware (when there is any) exists on the PCI card itself. The PCI card
simply
takes over the PCI bus and generates transactions itself. The problem is
that
every PCI card has its own specific register set and design. Therefore
there
is NO single standard for how PCI DMA operates, so writing a nice concise
document on it is basically impossible.

And to make matters worse, many cards do not have any bus master DMA
origination capability and I have seen quite a bit of variation in how
well a card
works as the *target* of a bus master operation by another device. You
especially get into some weird issues when multiple DMA operations are
going on simultaneously between different devices. Some devices
*cough* sblive * cough* appear to ignore some of the latency and
arbitration requirements of the PCI bus and have caused problems
with other system devices (i.e. Via IDE controllers).

PCI DMA, when it works properly, is great. When it doesn't, it can be
your worst nightmare.

So, I guess the answer to your question on PCI DMA can be summed
up in one simple statement: Refer to the datasheet of the device in
question.


--------------------------------------------------------------------------
Michael Burkey
(mailto:Michael.Burkey@Nexwarecorp.com)
Nexware Corp. (http://www.nexwarecorp.com)
Software Engineer
865.546.9998 x201





Bill Caroselli

Re: DMA and PCI

Post by Bill Caroselli » Tue Jan 22, 2002 5:01 pm

I thought that burst mode transfers were pretty much a built in part of PCI,
assuming that the software enables it.

--
Bill Caroselli -- 1(626) 824-7983
Q-TPS Consulting
QTPS@EarthLink.net


"DMitri" <ivdal@yahoo.com> wrote in message news:a2jl8a$gmt$1@inn.qnx.com...
Talking about PCI vs ISA DMA . . . What if my PCI card doesn't have DMA
chip. Can I somehow use standard (ISA) DMA chip (8237 or whatever) to move
data from PCI card to memory?
Do you have any experience in that?

thanks

I read the article you mentioned and I think you are missing a VERY
important point.

No such article can ever be done for a PCI DMA interface because PCI
DMA behaves completely differently (regardless of what OS it is under)
than ISA/EISA DMA.

Both ISA and EISA DMA work based upon an onboard DMA controller
on the motherboard. In essence, you load the controller up with a set of
transfers
and memory ranges and start it operating. In essence, you have a nice,
standardized
DMA controller with a well defined interface -- however it can not be
optimized
for specific functionality and is rather slow.

PCI DMA by contrast, is strictly bus master DMA. Which is to say, all
DMA
hardware (when there is any) exists on the PCI card itself. The PCI card
simply
takes over the PCI bus and generates transactions itself. The problem is
that
every PCI card has its own specific register set and design. Therefore
there
is NO single standard for how PCI DMA operates, so writing a nice
concise
document on it is basically impossible.

And to make matters worse, many cards do not have any bus master DMA
origination capability and I have seen quite a bit of variation in how
well a card
works as the *target* of a bus master operation by another device. You
especially get into some weird issues when multiple DMA operations are
going on simultaneously between different devices. Some devices
*cough* sblive * cough* appear to ignore some of the latency and
arbitration requirements of the PCI bus and have caused problems
with other system devices (i.e. Via IDE controllers).

PCI DMA, when it works properly, is great. When it doesn't, it can be
your worst nightmare.

So, I guess the answer to your question on PCI DMA can be summed
up in one simple statement: Refer to the datasheet of the device in
question.



--------------------------------------------------------------------------
Michael Burkey
(mailto:Michael.Burkey@Nexwarecorp.com)
Nexware Corp. (http://www.nexwarecorp.com)
Software Engineer
865.546.9998 x201







DMitri

Re: DMA and PCI

Post by DMitri » Mon Jan 28, 2002 9:58 am

I don't get it. Is it "yes" or "no"?

Mitchell Schoenbrun

Re: DMA and PCI

Post by Mitchell Schoenbrun » Tue Jan 29, 2002 12:24 am

Previously, DMitri wrote in qdn.public.articles:
Talking about PCI vs ISA DMA . . . What if my PCI card doesn't have DMA
chip. Can I somehow use standard (ISA) DMA chip (8237 or whatever) to move
data from PCI card to memory?
Do you have any experience in that?
With a confidence level of %70 I think the answer is NO. I don't think the
ISA DMA hardware is or can be attached to a PCI card. If if it was,
DMA channels are not something you just get to do your bidding.
Your hardware has to implement handshaking with it. For a PCI card,
even if possible, there would be no logical reason to implement
this handshaking, as the PCI DMA would be available, and much
faster.



Mitchell Schoenbrun --------- maschoen@pobox.com

Post Reply

Return to “qdn.public.articles”