Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
martin.joni(R)

17.04.2016, 16:14
 

DMA for Ethernet Controller (Announce)

Hello,

I'm actually struggling to set up DMA under current hardware.
I've a SOM 7567 Board which is X86 compatible.
I'm Programming Win32 using DPMI 0.9
I currently get it managed to Map BARs and I'm able to configure registers.

My problem is to get physical adressable memory which is DMA capable. As far as i know is need to get memory above 16MB due to Processos restriction (intel e3800).
But I failed to setup XMS oder VDS.

I'd appreciate if someone has new ideas or is familiar with this issue.

Best Regards
Jonathan

bretjohn(R)

Homepage E-mail

Rio Rancho, NM,
18.04.2016, 17:59

@ martin.joni

DMA for Ethernet Controller

I'm confused about exactly what you're doing.

First of all, why are you using Win32 and not just a "regular" DOS DPMI server? If you're running underneath Windows, you shouldn't need to access the Ethernet controller hardware directly -- just let Windows handle the networking for you.

Secondly, are you wanting to access something in the Ethernet hardware with DMA (like MMIO space), or are you wanting to allocate memory from DPMS that you can manipulate at will and also have the PCI bus read/write?

martin.joni(R)

19.04.2016, 21:23

@ bretjohn

DMA for Ethernet Controller

First of all, thanks for the interest in this topic.
> I'm confused about exactly what you're doing.
>
> First of all, why are you using Win32 and not just a "regular" DOS DPMI
> server? If you're running underneath Windows, you shouldn't need to access
> the Ethernet controller hardware directly -- just let Windows handle the
> networking for you.

I use DPMI with Wuschl's DOS extender.

>
> Secondly, are you wanting to access something in the Ethernet hardware with
> DMA (like MMIO space), or are you wanting to allocate memory from DPMS that
> you can manipulate at will and also have the PCI bus read/write?

I need Busmastering DMA capable Memory. Which means Physically contiguos, above 16mb(Intel e3800 restriction), no paging.

bretjohn(R)

Homepage E-mail

Rio Rancho, NM,
21.04.2016, 20:18

@ martin.joni

DMA for Ethernet Controller

I don't know specifically about the E3800, but I've been told by others that the 32-bit (linear) address provided by all known DPMI servers when you allocate memory is the same as the physical address. The physical address is all you need to know for DMA purposes. I don't use DPMI myself, so can't guarantee anything about it, though.

In PCI, it's not really DMA (in the same sense as a traditional DMA controller), but is called Bus Mastering. The PCI Bus temporarily grabs control of the address bus and to do its memory and I/O transfers, and then lets the other bus(ses) have control back again. There's a device called an Arbiter that makes sure only one thing has control of the address bus at a time. The only memory I know of that's not DMA/Bus-Mastering compatible is Shadow RAM, but sometimes even some Shadow RAM is compatible with DMA. AFAIK, Shadow RAM is almost always in the first MB of memory.

That's my understanding of how it all works. Someone please correct me if I'm wrong.

RayeR(R)

Homepage

CZ,
22.04.2016, 11:08

@ martin.joni

DMA for Ethernet Controller

I think that you can use teh same DPMI function as for VGA LFB mapping. Only difference is that LFB is memory region assigned to MMIO and you know the phys. addr. In your case you don't know exact address. There's probably some function to get memory map and you can check for some free region...
Or you can allocate a block of more than 16MB memory size and get it's physical start address. If the block is >16MB in size you can be sure that some part of this block will lie beyond 16MB phys. address and then use that part...

---
DOS gives me freedom to unlimited HW access.

Back to the board
Thread view  Mix view  Order
15115 Postings in 1359 Threads, 249 registered users, 17 users online (0 registered, 17 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum