Message-ID: From: yjtseng To: djgpp AT delorie DOT com, nate AT cartsys DOT com, dj AT delorie DOT com Cc: yjtseng AT micron DOT com Subject: cwsdpr0.exe 4/15/99 Date: Thu, 15 Apr 1999 11:08:39 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com So. May I make a bold conclusion that, in cwsdpmi.exe, the linear address will always equal the physical address even after going through the page directory and page table stuff (as you guys put it: it is the way set up by the dpmi host)? And if so, I should be able to get the physical address of any allocated memory through the linear base address in segment descriptor selected by its segment selector and then plus the offset, i.e., Physical address = _addr + offset, after __dpmi_get_segment_base_address (int _selector, unsigned long * _addr) is called, right? Should I breathe better now? Thanks Jay Yichang Tseng -----Original Message----- From: Nate Eldredge [SMTP:nate AT cartsys DOT com] Sent: April 14, 1999 4:06 PM To: djgpp AT delorie DOT com Subject: Re: cwsdpr0.exe 4/14/99 yjtseng wrote: > > All right, > > Now, fact: CR0=0x80000019 which means paging is on. If I maps physical > address 0xfb000000 to linear address using > __dpmi_physical_address_mapping(&mi) as shown in FAQ 18.7, the returned > linear address is 0xfb00000000 which the same as physical address > 0xfb000000. How can this be? It does not make sense, right? Unless the > paging mechanism is off, which is not true, as evidenced by CR0=0x80000019. > Since paging is used, shouldn't the linear address be different from the > physical address after Int 31H, function 0800H? Not necessarily. [(Over-)simplified explanation] Paging uses a scheme whereby each page in the linear address space has a page table entry, which contains an address in physical memory where the page actually resides. This may (as in your case) or may not be the same as the linear address. Essentially all paging does is provide a level of indirection between linear and physical memory. How the mapping works out is up to the DPMI server. -- Nate Eldredge nate AT cartsys DOT com