From: Prashant TR Newsgroups: comp.os.msdos.djgpp Subject: Re: __djgpp_map_physical_memory () isn't working help!!! Date: 13 Jun 2000 06:55:18 +0530 Organization: VSNL Lines: 26 Message-ID: References: NNTP-Posting-Host: 203.197.177.237 X-Trace: news.vsnl.net.in 960897436 3374 203.197.177.237 (13 Jun 2000 11:57:16 GMT) X-Complaints-To: postmaster AT news DOT vsnl DOT net DOT in NNTP-Posting-Date: 13 Jun 2000 11:57:16 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Chris Fought" writes: > O.K., I tried using __djgpp_map_physical_memory and it isn't working for me. > I am still trying to map in physical memory from a PCI device so that I can > grant user level acess to it. I checked info for this function and this is > what I find: > > int __djgpp_map_physical_memory(void *our_addr, unsigned long num_bytes, > unsigned long phys_addr); > > The PCI card that I am trying to map has 8 megs of RAM and it located at > 0x41000000. So I have tried doing the following: > > __djgpp_map_physical_memory ( 0x800000, 41000000); > > I know that this is missing the *our_addr argument, but I have tried placing > different values here without any luck (can someone please tell me what the > 'our_addr parameter is for (pleaseeeeeeee)). Are there one or more other > functions that I have to call to set up page tables??...can anyone > help....huge thanks in advance. The problem is the last argument value you've given there. 41000000. It should have been in Hex. And you're not allowed to setup your own pages. You've got to live with __djgpp_map_physical_memory.