From: Peter A Fein <p-fein@uchicago.edu>
Subject: Re: ISA BUS, memory, and mmap
Date: 1998/05/21 [thread overview]
Message-ID: <87zpgbwrj7.fsf@bj2-64.rh.uchicago.edu> (raw)
In-Reply-To: 6k1bls$404$1@nnrp1.dejanews.com
lsr@snerd.ddns.org writes:
> In article <873ee4u1zf.fsf@bj2-64.rh.uchicago.edu>,
> Peter A Fein <p-fein@uchicago.edu> wrote:
> >
> > lsr@snerd.ddns.org writes:
> >
> > > Greetings,
> > >
> > > I am writing a C program to access a card installed in a ISA slot in a DEC
> > > Alpha 500au workstation. The card is designed to be accessible via the
> memory
> > > bus and installs at memory address 0xFC0000 which is configurable via
> > > jumpers. The question is: Is this really the address that it will appear
> at,
> > > or is there some non obvious translation that needs to occur? Any info
> would
> > > be greatly appreciated. Thanks.
> >
> > 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.
> >
> > --
> > Peter Fein
> 773-834-6206
> > 1005 E. 60th St. Chicago, IL
> 60637
> > p-fein@uchicago.edu
> http://pfein.home.ml.org/
> >
>
> 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.
>
Ok. It's just that there seem to have been a number of "How do I
address memory directly, like under DOS?"-type requests lately. If
you check the manpage for mmap, it appears to indicate that you pass
it a base address, a length and some flags & it returns the address
you should use in your local space (ie, the one it mapped to). Other
posts seem to indicate that such programs need to be setuid root. Not
actually having used this stuff myself, I'm not the final authority
(but that's no reason no to conjecture. ;) ).
--
Peter Fein 773-834-6206
1005 E. 60th St. Chicago, IL 60637
p-fein@uchicago.edu http://pfein.home.ml.org/
prev parent reply other threads:[~1998-05-21 4:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-20 4:00 ISA BUS, memory, and mmap lsr
1998-05-20 4:00 ` Peter A Fein
1998-05-20 4:00 ` Robert Hyatt
1998-05-20 4:00 ` Linus Torvalds
1998-05-20 4:00 ` Peter A Fein
1998-05-21 4:00 ` lsr
1998-05-21 4:00 ` Wayne J. Salamon
1998-05-21 4:00 ` Peter A Fein [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox