I am trying to write a interface to a PCIe device in FreeDos. I had a FPGA PCIe designed and produced. I have read everything I can find on the subject however I still can't write any code that actually does what I am expecting. The company that produced the card has provided me with a Linux test program. Using the linux program I can turn on an Isolated digital output and turn on a LED, so I know my card is wired and functioning.
My device is currently installed Bus = 2 device = 0 function =0 Bar0 = 0xF7c40000 and Bar1 = 0xf7c00000
If I could write 0x01 to offset 0x0202 the LED I have wired up should turn on.
While I know that dos is a 16bit OS I thought I could write 386 instructions in assembly to get this device functioning.
If anyone can point me in the write direction I would really appreciate it.
Writing to PCIe Device.
-
- Member
- Posts: 5512
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Writing to PCIe Device.
If you want your program to run on a variety of DOS configurations, you must use DPMI. I'm not familiar with the details, since DOS has been obsolete for more than 20 years.
If you're not worried about compatibility and just want something that will run in your installation of FreeDOS, I suggest using the XMS driver to enable A20 and then switching to either protected mode or unreal mode. From either of those modes, you can directly address your device's MMIO.
If you're not worried about compatibility and just want something that will run in your installation of FreeDOS, I suggest using the XMS driver to enable A20 and then switching to either protected mode or unreal mode. From either of those modes, you can directly address your device's MMIO.