www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/19/10:30:17

Date: Thu, 19 Nov 1998 17:17:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: jjed AT hotmail DOT com
cc: djgpp AT delorie DOT com
Subject: Re: Physical address of linear memory (again)
In-Reply-To: <730otd$tad$1@nnrp1.dejanews.com>
Message-ID: <Pine.SUN.3.91.981119171324.29369F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 19 Nov 1998 jjed AT hotmail DOT com wrote:

> Actually I need to get the physical address of a buffer (allocated with
> malloc in protected mode) so I can program the PCI card to put data in it.

If that is what you need, then I think that's impossible.  The only way to
get at the physical address is to access the GDT and LDT tables.  Many
DPMI servers won't allow you to do that, since instructions that access
the descriptor tables are privilegded, i.e. they will cause your program
to GP fault.  I think CWSDPR0 is one server which will allow it, but even
then your code will be specific to the server, and CWSDPR0 disables
virtual memory. 

- Raw text -


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