[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: access PCI memory from DOS
- To: pci-sig@znyx.com
- Subject: Re: access PCI memory from DOS
- From: Ivor Bowden <ivor@peritek.com>
- Date: Tue, 03 Jul 2001 10:02:46 -0700
- Old-X-Envelope-From: ivor@peritek.com
- Old-X-Envelope-To: <pci-sig@znyx.com>
- Resent-Date: Tue, 3 Jul 2001 10:17:58 -0700
- Resent-From: pci-sig@znyx.com
- Resent-Message-ID: <jujTHD.A.KZD.6vfQ7@electra>
- Resent-Sender: pci-sig-request@znyx.com
I don't know how to write a device driver,
but I access PCI memory from DOS a lot,
it is pretty easy.
I use the djgpp DOS port of the gnu C compiler
http://www.delorie.com/djgpp/
I use the int86(0x1a) routines for getting the
PCI addresses, setting config registers, etc. and
__dpmi_physical_address_mapping
__dpmi_allocate_ldt_descriptors
__dpmi_set_segment_base_address
__dpmi_set_segment_limit
for getting memory selectors
and
the _farpeek and _farpoke routiens
for memory access.
You need to have a DPMI server. I think that is already
on a W98 system, but for DOS you can use cwsdpmi.exe,
freely available. This method does not work on an NT system.
Let me know if you have any more questions.
-Ivor
At 10:08 AM 7/3/01 +0200, you wrote:
> Dear,
>
> As we are a member of PCI-SIG, i think this is the best place to
>post my
> question :
> We have made a pci card that has an on board 128kb memory. I wrote a
>windows
> device driver to access the memory, and this works perfect.
>
> We now want to write a "DOS driver", so that we can access the
>memory in
> plain DOS.
>
> - Is this possible
> - Are there any C source codes available.
>
> I would appreciate any help!
>
> Thanks in advance,
>
> JOHan Hallez
> Sycron NV
> Tel +32 50 833 333
> Fax +32 50 833 399
>
>
>