OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:31 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Writing to PCIe Device.
PostPosted: Thu Jul 23, 2020 8:26 am 
Offline

Joined: Wed Jul 22, 2020 2:03 pm
Posts: 1
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.


Top
 Profile  
 
 Post subject: Re: Writing to PCIe Device.
PostPosted: Wed Jul 29, 2020 8:54 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], zaval and 48 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group