Question about common buffer DMA

Hi, all

I read a lot about common buffer DMA models recently and there is still
one thing I am not sure about. Hopefully someone here can share with me
your thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous
memory region for the communication between the device and the driver. I
am just thinking that, if we are using common buffer devices, the user
data would have to be copied from user-space memory to the common buffer
first, and then set the relative control structure in the common buffer
and program the hardware to initiate the real transfer. If that is the
case, wouldn’t it be much more slowly than doing a direct memory copy
since now we have to copy user data to common buffer before DMA transfer
is started every time? Is this some sort of downside of using common
buffer DMA?

By the way, I would be grateful is someone can recommend me some common
buffer DMA adapters and I would like to read its datasheet for the
implementation details. Thanks in advance for any of your
explanations!!!

Best regards,

Cody

Any busmaster PCI card can use common buffer DMA. Just look at the read or write request and analyze the MDL to see if there is more than one entry. If there is more than one, just copy the data to the common buffer and use an MDL that has only one entry. This is good to slow your driver down or just see how it works. Just never allow a MDL list of multiple pieces. You could do both in your driver and switch based upon a user IoCtl via a private device object so you can see how the two methods compare. I hope common buffer DMA devices are extremely rare or non-existant.
“Wu, Cody” wrote in message news:xxxxx@ntdev…
Hi, all

I read a lot about common buffer DMA models recently and there is still one thing I am not sure about. Hopefully someone here can share with me your thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous memory region for the communication between the device and the driver. I am just thinking that, if we are using common buffer devices, the user data would have to be copied from user-space memory to the common buffer first, and then set the relative control structure in the common buffer and program the hardware to initiate the real transfer. If that is the case, wouldn’t it be much more slowly than doing a direct memory copy since now we have to copy user data to common buffer before DMA transfer is started every time? Is this some sort of downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some common buffer DMA adapters and I would like to read its datasheet for the implementation details. Thanks in advance for any of your explanations!!!

Best regards,

Cody

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It
seems to me the common buffer dma is more frequently related to some
kind of third party hardwares. Most Pci Busmaster devices, tend to use
its own Dma engine to perform read/write operations and they can be
programmed easily with the physical address/transfer length pairs. So to
me they make better sense to be categorized as Packet Based Dma. Correct
me please if I am confusing some concepts here. Thanks!

Best regards,

Cody


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read
or write request and analyze the MDL to see if there is more than one
entry. If there is more than one, just copy the data to the common
buffer and use an MDL that has only one entry. This is good to slow
your driver down or just see how it works. Just never allow a MDL list
of multiple pieces. You could do both in your driver and switch based
upon a user IoCtl via a private device object so you can see how the two
methods compare. I hope common buffer DMA devices are extremely rare or
non-existant.

“Wu, Cody” wrote in message
news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there
is still one thing I am not sure about. Hopefully someone here can share
with me your thoughts on it.

I know common DMA buffers needs to allocate a physically
contiguous memory region for the communication between the device and
the driver. I am just thinking that, if we are using common buffer
devices, the user data would have to be copied from user-space memory to
the common buffer first, and then set the relative control structure in
the common buffer and program the hardware to initiate the real
transfer. If that is the case, wouldn’t it be much more slowly than
doing a direct memory copy since now we have to copy user data to common
buffer before DMA transfer is started every time? Is this some sort of
downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some
common buffer DMA adapters and I would like to read its datasheet for
the implementation details. Thanks in advance for any of your
explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Look on the OSR site. They have a practice board for PCI that can give you a good way to learn. You can try something different and see if it really works. I never worked with DMA devices directly, but there is the old system DMA such as the floppy uses. It is very limited and slow though if you have an 8088 CPU using the system DMA to copy memory is faster than the rep movsb/w instructions. Of course back then a 10 mhz DES chip was faster than a software implementation. That is no longer true. I suspect you can do 3DES in software faster than you can with a 10 mhz DES chip from that era. New DMA, also known as busmaster DMA can have common buffer limitations or not. Can the board handle multiple address/length pairs for a single read or write request. If not, then common buffer DMA is required because you can’t guarantee that the disk stack, for example, will only send a request that uses a single contiguous buffer.

Finding one of those cards may be hard, but as I indicated you can simulate having the bad card by using a good card. Since your email address is at Intel finding cards should be easy. Even using the MB IDE or SATA controllers would work. Just rewrite the driver to keep all MDLs to a single physical address/length pair and use a common buffer. You might want to use one common buffer per device and it should slow down things rather nicely.
“Wu, Cody” wrote in message news:xxxxx@ntdev…
Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It seems to me the common buffer dma is more frequently related to some kind of third party hardwares. Most Pci Busmaster devices, tend to use its own Dma engine to perform read/write operations and they can be programmed easily with the physical address/transfer length pairs. So to me they make better sense to be categorized as Packet Based Dma. Correct me please if I am confusing some concepts here. Thanks!

Best regards,

Cody

------------------------------------------------------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read or write request and analyze the MDL to see if there is more than one entry. If there is more than one, just copy the data to the common buffer and use an MDL that has only one entry. This is good to slow your driver down or just see how it works. Just never allow a MDL list of multiple pieces. You could do both in your driver and switch based upon a user IoCtl via a private device object so you can see how the two methods compare. I hope common buffer DMA devices are extremely rare or non-existant.

“Wu, Cody” wrote in message news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there is still one thing I am not sure about. Hopefully someone here can share with me your thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous memory region for the communication between the device and the driver. I am just thinking that, if we are using common buffer devices, the user data would have to be copied from user-space memory to the common buffer first, and then set the relative control structure in the common buffer and program the hardware to initiate the real transfer. If that is the case, wouldn’t it be much more slowly than doing a direct memory copy since now we have to copy user data to common buffer before DMA transfer is started every time? Is this some sort of downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some common buffer DMA adapters and I would like to read its datasheet for the implementation details. Thanks in advance for any of your explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

We just implemented Common Buffer DMA in our KMDF driver and it was
very simple. We just allocated the common buffer and configured our
PCI chip to use it’s logical address for DMA transfers. In our case
we only transfer data one way and don’t need any scatter/gather type
functionality. It is more efficient to bus master the data directly
from the PCI bus to system memory rather than using the CPU. You do
have memcpy from the common buffer to a user buffer, but that is
extremely fast since the data is already in system memory (400mhz vs
33Mhz for example). AFAIK there is no way to DMA directly to user
allocated buffer, and even if you could it doesn’t sound safe.

-z

At 09:50 PM 10/7/2006, you wrote:

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma.
It seems to me the common buffer dma is more frequently related to
some kind of third party hardwares. Most Pci Busmaster devices, tend
to use its own Dma engine to perform read/write operations and they
can be programmed easily with the physical address/transfer length
pairs. So to me they make better sense to be categorized as Packet
Based Dma. Correct me please if I am confusing some concepts here. Thanks!

Best regards,
Cody


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the
read or write request and analyze the MDL to see if there is more
than one entry. If there is more than one, just copy the data to
the common buffer and use an MDL that has only one entry. This is
good to slow your driver down or just see how it works. Just never
allow a MDL list of multiple pieces. You could do both in your
driver and switch based upon a user IoCtl via a private device
object so you can see how the two methods compare. I hope common
buffer DMA devices are extremely rare or non-existant.
“Wu, Cody” <mailto:xxxxxxxxxx@intel.com> wrote in
>message news:xxxxxnews:xxxxx@ntdev…
>Hi, all
>
>I read a lot about common buffer DMA models recently and there is
>still one thing I am not sure about. Hopefully someone here can
>share with me your thoughts on it.
>
>I know common DMA buffers needs to allocate a physically contiguous
>memory region for the communication between the device and the
>driver. I am just thinking that, if we are using common buffer
>devices, the user data would have to be copied from user-space
>memory to the common buffer first, and then set the relative control
>structure in the common buffer and program the hardware to initiate
>the real transfer. If that is the case, wouldn’t it be much more
>slowly than doing a direct memory copy since now we have to copy
>user data to common buffer before DMA transfer is started every
>time? Is this some sort of downside of using common buffer DMA?
>
>By the way, I would be grateful is someone can recommend me some
>common buffer DMA adapters and I would like to read its datasheet
>for the implementation details. Thanks in advance for any of your
>explanations!!!
>
>Best regards,
>Cody
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer</news:xxxxx></mailto:xxxxx>

A good board can directly DMA to a user buffer even if it is not physically contigious memory. That is how you get decent thruput from mass storage devices. Servers with UltraScsi 320 all use SG (scatter/gather) lists. If you had to slow down mass storage transfers while reading or writing through a single or even several common buffers, it would be fatal to performance. I haven’t checked the WHQL requirements for DMA hardware, but it may be that you can’t get a logo if the device doesn’t support S/G.

wrote in message news:xxxxx@ntdev…
We just implemented Common Buffer DMA in our KMDF driver and it was very simple. We just allocated the common buffer and configured our PCI chip to use it’s logical address for DMA transfers. In our case we only transfer data one way and don’t need any scatter/gather type functionality. It is more efficient to bus master the data directly from the PCI bus to system memory rather than using the CPU. You do have memcpy from the common buffer to a user buffer, but that is extremely fast since the data is already in system memory (400mhz vs 33Mhz for example). AFAIK there is no way to DMA directly to user allocated buffer, and even if you could it doesn’t sound safe.

-z

At 09:50 PM 10/7/2006, you wrote:

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It seems to me the common buffer dma is more frequently related to some kind of third party hardwares. Most Pci Busmaster devices, tend to use its own Dma engine to perform read/write operations and they can be programmed easily with the physical address/transfer length pairs. So to me they make better sense to be categorized as Packet Based Dma. Correct me please if I am confusing some concepts here. Thanks!

Best regards,
Cody

----------------------------------------------------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read or write request and analyze the MDL to see if there is more than one entry. If there is more than one, just copy the data to the common buffer and use an MDL that has only one entry. This is good to slow your driver down or just see how it works. Just never allow a MDL list of multiple pieces. You could do both in your driver and switch based upon a user IoCtl via a private device object so you can see how the two methods compare. I hope common buffer DMA devices are extremely rare or non-existant.

“Wu, Cody” wrote in message news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there is still one thing I am not sure about. Hopefully someone here can share with me your thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous memory region for the communication between the device and the driver. I am just thinking that, if we are using common buffer devices, the user data would have to be copied from user-space memory to the common buffer first, and then set the relative control structure in the common buffer and program the hardware to initiate the real transfer. If that is the case, wouldn’t it be much more slowly than doing a direct memory copy since now we have to copy user data to common buffer before DMA transfer is started every time? Is this some sort of downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some common buffer DMA adapters and I would like to read its datasheet for the implementation details. Thanks in advance for any of your explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

zeppelin@io.com wrote:

33Mhz for example). AFAIK there is no way to DMA directly to user
allocated buffer, and even if you could it doesn’t sound safe.

-z

GetScatterGatherList is the routine that gets you the proper addresses
for any given buffer. In our driver, the application passes buffers in
via IOCTLs that are marked ‘METHOD_IN_DIRECT’. This allows us to minimize

GetScatterGatherList is the routine that gets you the proper addresses
for any given buffer in your DMA situation. In our driver, the
application passes biffers in via IOCTLS that are ‘METHOD_IN_DIRECT’ and
METHOD_OUT_DIRECT (as appropriate). This means that I can program the
DMA controller in our board to move read/write directly to the user
buffers, minimizing overhead.

Common buffers are sometimes used to store the scatter/gather lists,
especially in situations where the device can be operated in a
‘continuous mode’, where you keep adding to the scatter gather list as
the transfer progresses. I’ve never written the driver for such a device.

Good luck!

The terminology around DMA isn’t the greatest because it mixes software programming model with how the DMA controller on the device works.

David is correct that any Busmastering PCI device should be able to do “common buffer” DMA as easily as it can do “packet-based” DMA. It’s all a matter of where the DMA controller is going to pickup data from - either a fixed common buffer location or a location per-request. If the controller can handle a per-request base/length pair (or a per-request SG list) then you can provide values which cause it to read from a location in the common buffer instead of providing values that cause it to read from the original request pages.

Composing data buffers in common buffer can be slower or faster depending on your hardware. For example, say your device can’t handle a non-page-aligned break in the middle of an SG list. Network drivers tend to get chained MDLs which consist of small non-aligned buffers (for the different network headers). To send the entire packet you would either need to program the device to transfer a chunk, then on the interrupt setup to transfer another chunk, or you’d need to compose a contiguous data blob in common-buffer to send the whole thing. At some point for every device with this problme there’s a buffer size at which composing the data in common buffer is faster than taking N interrupts to do a single transfer.

-p


From: xxxxx@lists.osr.com on behalf of Wu, Cody
Sent: Sat 10/7/2006 8:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It seems to me the common buffer dma is more frequently related to some kind of third party hardwares. Most Pci Busmaster devices, tend to use its own Dma engine to perform read/write operations and they can be programmed easily with the physical address/transfer length pairs. So to me they make better sense to be categorized as Packet Based Dma. Correct me please if I am confusing some concepts here. Thanks!

Best regards,

Cody


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read or write request and analyze the MDL to see if there is more than one entry. If there is more than one, just copy the data to the common buffer and use an MDL that has only one entry. This is good to slow your driver down or just see how it works. Just never allow a MDL list of multiple pieces. You could do both in your driver and switch based upon a user IoCtl via a private device object so you can see how the two methods compare. I hope common buffer DMA devices are extremely rare or non-existant.

“Wu, Cody” wrote in message news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there is still one thing I am not sure about. Hopefully someone here can share with me your thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous memory region for the communication between the device and the driver. I am just thinking that, if we are using common buffer devices, the user data would have to be copied from user-space memory to the common buffer first, and then set the relative control structure in the common buffer and program the hardware to initiate the real transfer. If that is the case, wouldn’t it be much more slowly than doing a direct memory copy since now we have to copy user data to common buffer before DMA transfer is started every time? Is this some sort of downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some common buffer DMA adapters and I would like to read its datasheet for the implementation details. Thanks in advance for any of your explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I think it may already have been mentioned, but it bears repeating: there is
a standard design pattern where a common buffer is used to hold
scatter/gather list data blocks for the consumption of the DMA engine on the
PCI device. The PCI device reads the SGL from the common buffer and then
uses that information to perform data copies directly to (or from) user
buffers as indicated by the SGL. Implemented correctly, this arrangement can
give one a basically ‘hands free’ data transfer engine, with very few PCI
transactions consumed performing setup, and most operations performed
entirely from the device side of the bus.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Saturday, October 07, 2006 11:04 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read or
write request and analyze the MDL to see if there is more than one entry.
If there is more than one, just copy the data to the common buffer and use
an MDL that has only one entry. This is good to slow your driver down or
just see how it works. Just never allow a MDL list of multiple pieces. You
could do both in your driver and switch based upon a user IoCtl via a
private device object so you can see how the two methods compare. I hope
common buffer DMA devices are extremely rare or non-existant.

“Wu, Cody” wrote in message news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there is still one
thing I am not sure about. Hopefully someone here can share with me your
thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous memory
region for the communication between the device and the driver. I am just
thinking that, if we are using common buffer devices, the user data would
have to be copied from user-space memory to the common buffer first, and
then set the relative control structure in the common buffer and program the
hardware to initiate the real transfer. If that is the case, wouldn’t it be
much more slowly than doing a direct memory copy since now we have to copy
user data to common buffer before DMA transfer is started every time? Is
this some sort of downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some common
buffer DMA adapters and I would like to read its datasheet for the
implementation details. Thanks in advance for any of your explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi, Peter

Thanks very much for your clarification! Now I have a better idea about
what common buffer is.

Actually I have read the whole series of “About DMA” in your blog
already and only the part on Common Buffer puzzled me a little bit. I
have to say, these articles are really worth reading for anyone who is
interested in DMA principle & programming. My misunderstanding will all
be attributed to my rather lack of experiences in this field. :slight_smile:

So just as you have pointed out, common buffer DMA can mean three
different things based on how you use it (or may be not that different).

  1. It could be used as a pure data buffer in which case you can
    assemble little pieces of user data in the buffer and send them out as a
    whole. The outstanding example will be most NIC. Nearly all PCI
    Busmaster with DMA engine will support this mode.

  2. It could be used to hold a SG list but the actual data is never
    transferred here. There could be other control structures here anyway.
    This mode requires support from hardware.

  3. It could contain both space for data and control to fulfill
    some most advanced functionality. Ring buffer, for example, is one of
    many possibilities that this mode could be put to use. Once again, this
    is largely hardware dependent.

Is my understanding correct this time? Correct me please if I miss
anything. :wink:

Btw, for anyone interested in DMA, here is peter’s blog url which I
strongly recommend:
http://blogs.msdn.com/peterwie/archive/2006/02/27/540252.aspx

Best regards,

Cody


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Monday, October 09, 2006 1:42 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

The terminology around DMA isn’t the greatest because it mixes software
programming model with how the DMA controller on the device works.

David is correct that any Busmastering PCI device should be able to do
“common buffer” DMA as easily as it can do “packet-based” DMA. It’s all
a matter of where the DMA controller is going to pickup data from -
either a fixed common buffer location or a location per-request. If the
controller can handle a per-request base/length pair (or a per-request
SG list) then you can provide values which cause it to read from a
location in the common buffer instead of providing values that cause it
to read from the original request pages.

Composing data buffers in common buffer can be slower or faster
depending on your hardware. For example, say your device can’t handle a
non-page-aligned break in the middle of an SG list. Network drivers
tend to get chained MDLs which consist of small non-aligned buffers (for
the different network headers). To send the entire packet you would
either need to program the device to transfer a chunk, then on the
interrupt setup to transfer another chunk, or you’d need to compose a
contiguous data blob in common-buffer to send the whole thing. At some
point for every device with this problme there’s a buffer size at which
composing the data in common buffer is faster than taking N interrupts
to do a single transfer.

-p


From: xxxxx@lists.osr.com on behalf of Wu, Cody
Sent: Sat 10/7/2006 8:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It
seems to me the common buffer dma is more frequently related to some
kind of third party hardwares. Most Pci Busmaster devices, tend to use
its own Dma engine to perform read/write operations and they can be
programmed easily with the physical address/transfer length pairs. So to
me they make better sense to be categorized as Packet Based Dma. Correct
me please if I am confusing some concepts here. Thanks!

Best regards,

Cody


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read
or write request and analyze the MDL to see if there is more than one
entry. If there is more than one, just copy the data to the common
buffer and use an MDL that has only one entry. This is good to slow
your driver down or just see how it works. Just never allow a MDL list
of multiple pieces. You could do both in your driver and switch based
upon a user IoCtl via a private device object so you can see how the two
methods compare. I hope common buffer DMA devices are extremely rare or
non-existant.

“Wu, Cody” wrote in message
news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there
is still one thing I am not sure about. Hopefully someone here can share
with me your thoughts on it.

I know common DMA buffers needs to allocate a physically
contiguous memory region for the communication between the device and
the driver. I am just thinking that, if we are using common buffer
devices, the user data would have to be copied from user-space memory to
the common buffer first, and then set the relative control structure in
the common buffer and program the hardware to initiate the real
transfer. If that is the case, wouldn’t it be much more slowly than
doing a direct memory copy since now we have to copy user data to common
buffer before DMA transfer is started every time? Is this some sort of
downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some
common buffer DMA adapters and I would like to read its datasheet for
the implementation details. Thanks in advance for any of your
explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Just as a plug for OSR, I have taken several courses from them and Peter Viscarola is an expert at DMA. Take the advanced programming course and if you can take the standard programming course too since they do both in one week if you do the lecture form.
“Wu, Cody” wrote in message news:xxxxx@ntdev…
Hi, Peter

Thanks very much for your clarification! Now I have a better idea about what common buffer is.

Actually I have read the whole series of “About DMA” in your blog already and only the part on Common Buffer puzzled me a little bit. I have to say, these articles are really worth reading for anyone who is interested in DMA principle & programming. My misunderstanding will all be attributed to my rather lack of experiences in this field. J

So just as you have pointed out, common buffer DMA can mean three different things based on how you use it (or may be not that different).

1) It could be used as a pure data buffer in which case you can assemble little pieces of user data in the buffer and send them out as a whole. The outstanding example will be most NIC. Nearly all PCI Busmaster with DMA engine will support this mode.

2) It could be used to hold a SG list but the actual data is never transferred here. There could be other control structures here anyway. This mode requires support from hardware.

3) It could contain both space for data and control to fulfill some most advanced functionality. Ring buffer, for example, is one of many possibilities that this mode could be put to use. Once again, this is largely hardware dependent.

Is my understanding correct this time? Correct me please if I miss anything. :wink:

Btw, for anyone interested in DMA, here is peter’s blog url which I strongly recommend: http://blogs.msdn.com/peterwie/archive/2006/02/27/540252.aspx

Best regards,

Cody

------------------------------------------------------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Monday, October 09, 2006 1:42 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

The terminology around DMA isn’t the greatest because it mixes software programming model with how the DMA controller on the device works.

David is correct that any Busmastering PCI device should be able to do “common buffer” DMA as easily as it can do “packet-based” DMA. It’s all a matter of where the DMA controller is going to pickup data from - either a fixed common buffer location or a location per-request. If the controller can handle a per-request base/length pair (or a per-request SG list) then you can provide values which cause it to read from a location in the common buffer instead of providing values that cause it to read from the original request pages.

Composing data buffers in common buffer can be slower or faster depending on your hardware. For example, say your device can’t handle a non-page-aligned break in the middle of an SG list. Network drivers tend to get chained MDLs which consist of small non-aligned buffers (for the different network headers). To send the entire packet you would either need to program the device to transfer a chunk, then on the interrupt setup to transfer another chunk, or you’d need to compose a contiguous data blob in common-buffer to send the whole thing. At some point for every device with this problme there’s a buffer size at which composing the data in common buffer is faster than taking N interrupts to do a single transfer.

-p

------------------------------------------------------------------------------

From: xxxxx@lists.osr.com on behalf of Wu, Cody
Sent: Sat 10/7/2006 8:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It seems to me the common buffer dma is more frequently related to some kind of third party hardwares. Most Pci Busmaster devices, tend to use its own Dma engine to perform read/write operations and they can be programmed easily with the physical address/transfer length pairs. So to me they make better sense to be categorized as Packet Based Dma. Correct me please if I am confusing some concepts here. Thanks!

Best regards,

Cody

------------------------------------------------------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read or write request and analyze the MDL to see if there is more than one entry. If there is more than one, just copy the data to the common buffer and use an MDL that has only one entry. This is good to slow your driver down or just see how it works. Just never allow a MDL list of multiple pieces. You could do both in your driver and switch based upon a user IoCtl via a private device object so you can see how the two methods compare. I hope common buffer DMA devices are extremely rare or non-existant.

“Wu, Cody” wrote in message news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there is still one thing I am not sure about. Hopefully someone here can share with me your thoughts on it.

I know common DMA buffers needs to allocate a physically contiguous memory region for the communication between the device and the driver. I am just thinking that, if we are using common buffer devices, the user data would have to be copied from user-space memory to the common buffer first, and then set the relative control structure in the common buffer and program the hardware to initiate the real transfer. If that is the case, wouldn’t it be much more slowly than doing a direct memory copy since now we have to copy user data to common buffer before DMA transfer is started every time? Is this some sort of downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some common buffer DMA adapters and I would like to read its datasheet for the implementation details. Thanks in advance for any of your explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

When I talk about doing “common buffer DMA” as opposed to “packet based
DMA” or “slave mode DMA” or “scatter-gather DMA” I tend be talking about
#1.

But yes - those are the modes of using common buffer. To contain data,
to contain SG lists, and/or to contain control information.

Now don’t make the mistake of assuming they’re mutually exclusive J

-p

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Wu, Cody
Sent: Sunday, October 08, 2006 4:53 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

Hi, Peter

Thanks very much for your clarification! Now I have a better idea about
what common buffer is.

Actually I have read the whole series of “About DMA” in your blog
already and only the part on Common Buffer puzzled me a little bit. I
have to say, these articles are really worth reading for anyone who is
interested in DMA principle & programming. My misunderstanding will all
be attributed to my rather lack of experiences in this field. J

So just as you have pointed out, common buffer DMA can mean three
different things based on how you use it (or may be not that different).

  1. It could be used as a pure data buffer in which case you can
    assemble little pieces of user data in the buffer and send them out as a
    whole. The outstanding example will be most NIC. Nearly all PCI
    Busmaster with DMA engine will support this mode.

  2. It could be used to hold a SG list but the actual data is never
    transferred here. There could be other control structures here anyway.
    This mode requires support from hardware.

  3. It could contain both space for data and control to fulfill some
    most advanced functionality. Ring buffer, for example, is one of many
    possibilities that this mode could be put to use. Once again, this is
    largely hardware dependent.

Is my understanding correct this time? Correct me please if I miss
anything. :wink:

Btw, for anyone interested in DMA, here is peter’s blog url which I
strongly recommend:
http://blogs.msdn.com/peterwie/archive/2006/02/27/540252.aspx

Best regards,

Cody


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Monday, October 09, 2006 1:42 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

The terminology around DMA isn’t the greatest because it mixes software
programming model with how the DMA controller on the device works.

David is correct that any Busmastering PCI device should be able to do
“common buffer” DMA as easily as it can do “packet-based” DMA. It’s all
a matter of where the DMA controller is going to pickup data from -
either a fixed common buffer location or a location per-request. If the
controller can handle a per-request base/length pair (or a per-request
SG list) then you can provide values which cause it to read from a
location in the common buffer instead of providing values that cause it
to read from the original request pages.

Composing data buffers in common buffer can be slower or faster
depending on your hardware. For example, say your device can’t handle a
non-page-aligned break in the middle of an SG list. Network drivers
tend to get chained MDLs which consist of small non-aligned buffers (for
the different network headers). To send the entire packet you would
either need to program the device to transfer a chunk, then on the
interrupt setup to transfer another chunk, or you’d need to compose a
contiguous data blob in common-buffer to send the whole thing. At some
point for every device with this problme there’s a buffer size at which
composing the data in common buffer is faster than taking N interrupts
to do a single transfer.

-p


From: xxxxx@lists.osr.com on behalf of Wu, Cody
Sent: Sat 10/7/2006 8:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

Hi, David

Thanks for your reply.

Well, I doubt if any busmaster pci card can use common buffer dma. It
seems to me the common buffer dma is more frequently related to some
kind of third party hardwares. Most Pci Busmaster devices, tend to use
its own Dma engine to perform read/write operations and they can be
programmed easily with the physical address/transfer length pairs. So to
me they make better sense to be categorized as Packet Based Dma. Correct
me please if I am confusing some concepts here. Thanks!

Best regards,

Cody


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Sunday, October 08, 2006 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question about common buffer DMA

Any busmaster PCI card can use common buffer DMA. Just look at the read
or write request and analyze the MDL to see if there is more than one
entry. If there is more than one, just copy the data to the common
buffer and use an MDL that has only one entry. This is good to slow
your driver down or just see how it works. Just never allow a MDL list
of multiple pieces. You could do both in your driver and switch based
upon a user IoCtl via a private device object so you can see how the two
methods compare. I hope common buffer DMA devices are extremely rare or
non-existant.

“Wu, Cody” wrote in message
news:xxxxx@ntdev…

Hi, all

I read a lot about common buffer DMA models recently and there
is still one thing I am not sure about. Hopefully someone here can share
with me your thoughts on it.

I know common DMA buffers needs to allocate a physically
contiguous memory region for the communication between the device and
the driver. I am just thinking that, if we are using common buffer
devices, the user data would have to be copied from user-space memory to
the common buffer first, and then set the relative control structure in
the common buffer and program the hardware to initiate the real
transfer. If that is the case, wouldn’t it be much more slowly than
doing a direct memory copy since now we have to copy user data to common
buffer before DMA transfer is started every time? Is this some sort of
downside of using common buffer DMA?

By the way, I would be grateful is someone can recommend me some
common buffer DMA adapters and I would like to read its datasheet for
the implementation details. Thanks in advance for any of your
explanations!!!

Best regards,

Cody


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Wu, Cody wrote:

Thanks very much for your clarification! Now I have a better idea
about what common buffer is.

Actually I have read the whole series of “About DMA” in your blog
already and only the part on Common Buffer puzzled me a little bit. I
have to say, these articles are really worth reading for anyone who is
interested in DMA principle & programming. My misunderstanding will
all be attributed to my rather lack of experiences in this field.

So just as you have pointed out, common buffer DMA can mean three
different things based on how you use it (or may be not that different).

  1. It could be used as a pure data buffer in which case you can
    assemble little pieces of user data in the buffer and send them out as
    a whole. The outstanding example will be most NIC. Nearly all PCI
    Busmaster with DMA engine will support this mode.

  2. It could be used to hold a SG list but the actual data is never
    transferred here. There could be other control structures here anyway.
    This mode requires support from hardware.

  3. It could contain both space for data and control to fulfill some
    most advanced functionality. Ring buffer, for example, is one of many
    possibilities that this mode could be put to use. Once again, this is
    largely hardware dependent.

Is my understanding correct this time? Correct me please if I miss
anything. :wink:

If I may throw my own uninvited comments in here…

“Common buffer DMA” is a software concept – it is a driver
implementation detail. You’ll never hear a hardware guy talking about
“common buffer DMA”.

In terms of hardware, a PCI bus-mastering DMA device either supports
scatter/gather, or it doesn’t. Those are the only two choices. If the
hardware does scatter/gather, then the driver doesn’t need to use a
common buffer (although it might still choose to do so). It can simply
lock the user’s buffer, and give the hardware (somehow) a list of the
actual physical addresses of its pages.

If the hardware does not do scatter/gather, then the driver writer has
to make a decision. The hardware STILL has to be given a physical
address, but usually only a SINGLE physical address per transfer. The
easiest way to handle it in a driver is to allocate a single buffer at
driver initialization time, lock it down, give that address to the
hardware, and then copy user data into and out of it. That single buffer
is what we in Windows call a “common buffer”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Just to put a bit finer point on it, “common buffer” just refers to memory
that is accessible to both the PCI device and the CPU. The PCI device will
access it through a bus logical address provided by the OS and programmed
into the hardware by the driver, and the CPU will use a system virtual
address to access the same physical pages in memory. The OS will handle
the VA to PA mapping, if any.

It’s up to the hardware and driver to agree on what’s in the “common
buffer”. It can be user data (driver does a memcpy <-> user buffer), SGL
(at least one bus logical address and length pair for a memory segment for
DMA, hardware transfers data directly <-> user buffer), control data
(hardware needs extra bits to tell it what to do with an SGL entry, for
example), or any combination of two of those, or all three.

Phil

Philip D. Barila

Seagate Technology LLC

(720) 684-1842


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts


Sent: Monday, October 09, 2006 12:44 PM

To: “Windows System Software Devs Interest List”

Subject: Re: [ntdev] Question about common buffer DMA

[snip]

“Common buffer DMA” is a software concept – it is a driver

implementation detail. You’ll never hear a hardware guy talking about

“common buffer DMA”.

[snip]

Hi, Tim

That’s good info. Thanks very much! :slight_smile:

Best regards,
Cody

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, October 10, 2006 2:44 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Question about common buffer DMA

Wu, Cody wrote:

Thanks very much for your clarification! Now I have a better idea
about what common buffer is.

Actually I have read the whole series of “About DMA” in your blog
already and only the part on Common Buffer puzzled me a little bit. I
have to say, these articles are really worth reading for anyone who is
interested in DMA principle & programming. My misunderstanding will
all be attributed to my rather lack of experiences in this field.

So just as you have pointed out, common buffer DMA can mean three
different things based on how you use it (or may be not that
different).

  1. It could be used as a pure data buffer in which case you can
    assemble little pieces of user data in the buffer and send them out as
    a whole. The outstanding example will be most NIC. Nearly all PCI
    Busmaster with DMA engine will support this mode.

  2. It could be used to hold a SG list but the actual data is never
    transferred here. There could be other control structures here anyway.
    This mode requires support from hardware.

  3. It could contain both space for data and control to fulfill some
    most advanced functionality. Ring buffer, for example, is one of many
    possibilities that this mode could be put to use. Once again, this is
    largely hardware dependent.

Is my understanding correct this time? Correct me please if I miss
anything. :wink:

If I may throw my own uninvited comments in here…

“Common buffer DMA” is a software concept – it is a driver
implementation detail. You’ll never hear a hardware guy talking about
“common buffer DMA”.

In terms of hardware, a PCI bus-mastering DMA device either supports
scatter/gather, or it doesn’t. Those are the only two choices. If the
hardware does scatter/gather, then the driver doesn’t need to use a
common buffer (although it might still choose to do so). It can simply
lock the user’s buffer, and give the hardware (somehow) a list of the
actual physical addresses of its pages.

If the hardware does not do scatter/gather, then the driver writer has
to make a decision. The hardware STILL has to be given a physical
address, but usually only a SINGLE physical address per transfer. The
easiest way to handle it in a driver is to allocate a single buffer at
driver initialization time, lock it down, give that address to the
hardware, and then copy user data into and out of it. That single buffer
is what we in Windows call a “common buffer”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi, Phil

Yes, I guess that’s the very original meaning of “common buffer”. Only
that most bus logic addresses I have seen so far simply means physical
address. Is there any exception to this norm? Thanks very much for your
help!

Btw, some people suggest that devices use virtual addresses too just
like CPU so further protection/isolation can be implemented. Is this the
intention for using “bus logic address” or is it close to that?

Best regards,
Cody

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Tuesday, October 10, 2006 4:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about common buffer DMA

Just to put a bit finer point on it, “common buffer” just refers to
memory
that is accessible to both the PCI device and the CPU. The PCI device
will
access it through a bus logical address provided by the OS and
programmed
into the hardware by the driver, and the CPU will use a system virtual
address to access the same physical pages in memory. The OS will handle
the VA to PA mapping, if any.

It’s up to the hardware and driver to agree on what’s in the “common
buffer”. It can be user data (driver does a memcpy <-> user buffer),
SGL
(at least one bus logical address and length pair for a memory segment
for
DMA, hardware transfers data directly <-> user buffer), control data
(hardware needs extra bits to tell it what to do with an SGL entry, for
example), or any combination of two of those, or all three.

Phil

Philip D. Barila

Seagate Technology LLC

(720) 684-1842


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts


Sent: Monday, October 09, 2006 12:44 PM

To: “Windows System Software Devs Interest List”

Subject: Re: [ntdev] Question about common buffer DMA

[snip]

“Common buffer DMA” is a software concept – it is a driver

implementation detail. You’ll never hear a hardware guy talking about

“common buffer DMA”.

[snip]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Wu, Cody wrote:

Yes, I guess that’s the very original meaning of “common buffer”. Only
that most bus logic addresses I have seen so far simply means physical
address. Is there any exception to this norm?

There are some systems where “bus addresses” are not the same as
“physical addresses”. The old Alpha machines used to be like this. I
am not aware of any x86 computers where this is true, but it is not
healthy to assume it.

Btw, some people suggest that devices use virtual addresses too just
like CPU so further protection/isolation can be implemented. Is this the
intention for using “bus logic address” or is it close to that?

I worked on one device that understood the format of the x86 page
tables, so that you gave it CR3 (the address of the page tables) and
virtual addresses and it did the remapping.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> There are some systems where “bus addresses” are not the same as

“physical addresses”. The old Alpha machines used to be like this. I
am not aware of any x86 computers where this is true, but it is not
healthy to assume it.

I heard some of the new x86 Mac’s are bus address != processor physical
address. Before we all take this as gospel truth, can anybody verify this? I
haven’t personally done any Windows DMA development on an x86 Mac, but the
person who told me seemed to be very familiar with the issue.

If you’re running under a virtual machine, bus address != OS’s belief of the
physical address and processor physical address may not equal OS’s belief of
physical address (as setting the page table base register (CR3??) is
trapped). Under a VM, the bus address may equal the processor physical
address, but not match the OS’s belief of the physical address.

I’m tending to use terminology like “bus physical address” and “processor
physical address” and “OS physical address” to distinguish between these.

  • Jan

From a hardware point of view they are standard PC’s. They main
variation is boot firmware (BIOS). Anything this else is OS implementation.

-z

At 07:42 PM 10/9/2006, you wrote:

I heard some of the new x86 Mac’s are bus address != processor physical
address. Before we all take this as gospel truth, can anybody verify this? I
haven’t personally done any Windows DMA development on an x86 Mac, but the
person who told me seemed to be very familiar with the issue.

  • Jan

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

“Bus logical address” means an address that is valid in the address space
on the bus. In most x86, that’s the same as physical address, but not
always. Systems with lots of PCI bridges can have multiple busses with the
same “bus logical address” mapped into different memory addresses. There
are a lot of other cases where the mapping is not 1 - 1.

Just stand on the notion that the OS gives you the addresses to program
your hardware with, use those address exclusively to program your hardware,
and it also gives you VAs to use from the CPU, use those addresses
exclusively to access the buffer directly from the CPU, and you should be
pretty safe.

Phil

Philip D. Barila

Seagate Technology LLC

(720) 684-1842


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of “Wu, Cody”


Sent: Monday, October 09, 2006 6:19 PM

To: “Windows System Software Devs Interest List”

Subject: RE: [ntdev] Question about common buffer DMA

[snip]

Btw, some people suggest that devices use virtual addresses too just

like CPU so further protection/isolation can be implemented. Is this the

intention for using “bus logic address” or is it close to that?

[snip]