delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/30/01:51:33

From: "Marp" <marp AT 0 DOT 0 DOT 0 DOT 0>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Physical Address Mapping of PCI Memory Mapped Device
Date: Thu, 30 Nov 2000 01:41:39 -0500
Organization: MindSpring Enterprises
Lines: 44
Message-ID: <904spl$els$1@nntp9.atl.mindspring.net>
References: <3a2598dd DOT 102295453 AT news DOT connectnet DOT com>
NNTP-Posting-Host: 04.30.99.bc
X-Server-Date: 30 Nov 2000 06:40:53 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"John Vasquez" <jvasquez AT getntds DOT com> wrote in message
news:3a2598dd DOT 102295453 AT news DOT connectnet DOT com...
> I need to map the physical address of a PCI Device returned acquired
> from the PCI Configuration Space (badr0).
> I tried __dpmi_physical_address_mapping but it returns an error (-1).
> According to the notes in the DPMI specs. int 31h function 0800H -
> Pysical Address Mapping, "It is the caller's responsibility to
> allocate and initialize a descriptor for access to the memory." What
> does that mean? And

You must solve the problem of the failed address mapping call before you
need to worry about a descriptor. You should memset() the structure you pass
to it to 0, and fill in the required fields, then make the call. If it's
still failing, it may be because the dpmi server won't allow you to map that
address. It has the discresion to refuse the request and under WinNT it
always rejects them to protect the integrity of the system. If that's the
case you will have to use a different, less restrictive, OS to develop your
program.

>
> how do I do that?
>

See chapter 18.7 of the djgpp faq. It describes exactly what you need to do.
Ask more specific questions if you still don't understand. You can read it
online at http://www.delorie.com/djgpp/


> When I used int86 to call int 31h, the carry flag was set but ax was
> set to 8000h which does not correlate to an error code.
>

You should not be calling dpmi functions through int86(). That function is
provided to help port programs origionally written for real mode. Use the
__dpmi*() functions provided by the library instead.

> I'm going bald trying to figure this out.
>
> Heeelllllppp!!!!!
>
> John
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019