Date: Fri, 13 Oct 2000 17:01:35 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Corelli Marco Message-Id: <6480-Fri13Oct2000170135+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h CC: djgpp AT delorie DOT com In-reply-to: <39E70A59.1ABE9F69@gtwparc.padova.ccr.it> (message from Corelli Marco on Fri, 13 Oct 2000 15:12:57 +0200) Subject: Re: Accesing from 0xFFFF:F000 to 0xFFFF:FFFF physical memory address References: <39E5E00A DOT 39A80E46 AT gtwparc DOT padova DOT ccr DOT it> <7263-Thu12Oct2000193356+0300-eliz AT is DOT elta DOT co DOT il> <39E6C1EB DOT 58AED5F3 AT gtwparc DOT padova DOT ccr DOT it> <8011-Fri13Oct2000132503+0300-eliz AT is DOT elta DOT co DOT il> <39E70A59 DOT 1ABE9F69 AT gtwparc DOT padova DOT ccr DOT it> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Corelli Marco > Newsgroups: comp.os.msdos.djgpp > Date: Fri, 13 Oct 2000 15:12:57 +0200 > > Exiting due to signal SIGSEV > Page fault at eip=00003dba, error=0004 Okay, "Page Fault" means that you are trying to access an address that is not mapped into your program's address space. "error=0004" means you were trying to read from that address (this is consistent with the use of _farpeekb). This is explained further in section 12.2 of the FAQ. > fs : sel=00c7 base=fffc0000 limit=0003ffff Didn't you say in your original message that the address you wanted to map was at FFFC:0000 to FFFF:FFFF? Are those real-mode segment:offset addresses, or did you mean to say FFFC0000, a 32-bit physical address? There's a big difference between these two alternatives. The above setup of the FS register is correct for 32-bit physical address FFFC0000, but incorrect for FFFC:0000. > byte_read = _farpeekb ( selector, i ) ; Please tell what is the first value of i for which the program crashes. > __dpmi_physical_address_mapping( &mem ) ; > selector = __dpmi_allocate_ldt_descriptors ( 1 ) ; > __dpmi_set_segment_base_address ( selector, mem.address ) ; > __dpmi_set_segment_limit ( selector, mem.size - 1 ) ; Did all those functions succeed, or did some of them returned -1?