DMA and PCI

Hello,

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


with best Regards,

Arunas Bytautas

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

Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/dma.htm
l

:wink:

“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

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

Actually what I wanted was like :
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/dma.htm

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

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

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.ISO8859-1/books/developers-handbook/dma.htm

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

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

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.ISO8859-1/books/developers-handbook/dma.htm

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

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


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

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.ISO8859-1/books/developers-handbook/dma.htm

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

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

\

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

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.ISO8859-1/books/developers-handbook/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

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

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


\

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




\

I don’t get it. Is it “yes” or “no”?

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