Date: Sun, 29 Mar 1998 14:23:06 -0800 (PST) Message-Id: <199803292223.OAA18943@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: samir AT mindspring DOT com (Samir Barjoud), djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Allocate physical memory? Precedence: bulk At 12:29 3/28/1998 -0500, Samir Barjoud wrote: >In article <9pFc+WA$oMH1EwRj AT talula DOT demon DOT co DOT uk>, >Shawn AT talula DOT demon DOT co DOT uk says... >> I just wanted to check how practical this would actually be, and >> for now it seems like my best plan will be to develop the code under >> win95, and then once I have something working, either look at ways to >> make CWSDPMI support it myself, or start pestering you to add it! > >Why don't you use the "Fat DS" hack, which works under Win95 and DOS. >Sandmann has an example out there of how to use it to directly access >the VESA 2.0 linear frame buffer. If I understand you correctly, >you want to be able to do a PCI bus master transfer under both Win95 >and DOS. To do this you could allocate a suitably sized and aligned >buffer, anywhere in memory. You would then lock the allocated memory >and get its physical address. You can allocate suitably sized and aligned *linear* memory, yes. But the DPMI server will use the paging facilities of the 386 to map that to physical memory living somewhere that may be completely different. It need not even be contiguous in physical memory. The standard DPMI API does not, AFAIK, have any way to find the physical address of any particular page, and even if it did, you still couldn't get them all together. This is apparently what VDS does, but CWSDPMI doesn't support it (yet). Nate Eldredge eldredge AT ap DOT net