X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Authentication-Warning: mcomail01.maxtor.com: iscan owned process doing -bs X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: Re: Obtaining the physical address of a pointer using PMODE Date: Wed, 16 Nov 2005 10:06:45 -0700 Message-ID: <71078E41DDE3E541B024832F34BC3D0DA3081D@cowexc03.corp.mxtr.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: Obtaining the physical address of a pointer using PMODE Thread-Index: AcXq0B/NMh5HXKwKR3CddGkEpbZFXQ== From: "Schumacher, Gordon" To: "DJGPP List \(E-mail\)" X-OriginalArrivalTime: 16 Nov 2005 17:06:46.0040 (UTC) FILETIME=[1FF87180:01C5EAD0] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id jAGH6msr021702 # From: "Roland Zitzke" # Sent: Tuesday, November 15, 2005 12:16 PM # To: djgpp AT delorie DOT com # Subject: Re: Obtaining the physical address of a pointer using PMODE # # Hi, # I read somewhere, that the pmode/dj extender has a fixed mapping of # pointers to physical memory. # Thus, if I write something like # unsigned char* p = malloc(1024); # how can I obtain the physical location of the data pointed to by p, # provided that I use pmode? # Background is that I need this to allocate a DMA buffer and I do not # necessarily need virtual memory in my application. # # Thanks and regards # Roland Try this thread: http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp/2001/04/13/12:21:37 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp/2001/04/14/01:01:55 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp/2001/05/09/17:04:12 http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp/2001/05/09/16:33:37 Charles Sandmann gave us some example code, and put it at ftp://clio.rice.edu/djgpp/cwsdma.zip. He was talking about cleaning it up and making it more publicized; I don't know if that ever happened. But hopefully that's a good start. If you get stuck, I still have the e-mail thread that went on when we were tackling this same problem.