OSDev.org
https://forum.osdev.org/

Writing to PCIe Device.
https://forum.osdev.org/viewtopic.php?f=13&t=37032
Page 1 of 1

Author:  I3ooI3oo [ Thu Jul 23, 2020 8:26 am ]
Post subject:  Writing to PCIe Device.

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.

Author:  Octocontrabass [ Wed Jul 29, 2020 8:54 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/