DOS ain't dead

DMA for Ethernet Controller (Announce)

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.

DMA for Ethernet Controller

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?

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?

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.

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...