From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,ad5a2829d4e01cd2 X-Google-Attributes: gidf5392,public X-Google-Thread: 111c93,ad5a2829d4e01cd2 X-Google-Attributes: gid111c93,public X-Google-Thread: fee84,ad5a2829d4e01cd2 X-Google-Attributes: gidfee84,public From: salamon@cmr.ncsl.nist.gov (Wayne J. Salamon) Subject: Re: ISA BUS, memory, and mmap Date: 1998/05/21 Message-ID: <6k1nlj$47j$1@news.nist.gov>#1/1 X-Deja-AN: 355290195 References: <6jv71p$53e$1@nnrp1.dejanews.com> <873ee4u1zf.fsf@bj2-64.rh.uchicago.edu> <6k1bls$404$1@nnrp1.dejanews.com> Followup-To: comp.unix.osf.osf1,comp.os.linux.development.system,comp.os.linux.alpha Organization: National Institute of Standards & Technology Newsgroups: comp.unix.osf.osf1,comp.os.linux.development.system,comp.os.linux.alpha lsr@snerd.ddns.org wrote: : Peter A Fein wrote: : > : > First, which OS are you using, as this is probably going to make a : > difference in how you access this memory. I don't know anything about : > OSF, but in linux, user programs can't access real memory locations : > b/c of virtual memory. You'd need to write a kernel-level driver : > which provided a user interface to the hardware. I have heard some : > talk of adding user-level direct adressing, but I don't believe it's : > going to be implemented any time soon. : > : > -- : I guess I should have been a little more specific in my request. I understand : virtual memory vs physical memory etc. My question should have been: If I : have an ISA card that is setup via jumpers for memory mapped IO beggining at : address 0xFC0000, can I use that address as the offset in the mmap function : call, or is there some translation that I must do. I'm interested in both : Linux and DEC OSF. Thanks. For Linux on Intel machines, it's fairly simple to write a device driver to map a card into user space. For a DEC Alpha, things are more complicated. DEC Unix (and OSF, I believe) do not support the mmap() call "officially". I have a driver for our card that maps the card into user space via mmap(). It may help you. The Linux driver is at ftp://cmr.ncsl.nist.gov/pub/multikron/mk_Linux.tar.Z, (for Intel machines), while the DEC Unix/Alpha driver is at ftp://cmr.ncsl.nist.gov/pub/multikron/mk_Alpha.tar.Z. For DEC Unix system, the user program doesn't access the card via the virtual address directly; there are some translation macros that must be used. These macros are in one of the include files in the tar file I gave above. Good luck, WJS -- ---------------------------------------------------------------------- | Wayne J. Salamon | National Institute of Standards & Technology | | Computer Scientist | Gaithersburg, MD 20899 | | wsalamon@nist.gov | | ----------------------------------------------------------------------