linux-mips
[Top] [All Lists]

Re: Equivalent of ioperm / iopl in linux mips ?

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: Equivalent of ioperm / iopl in linux mips ?
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Mon, 22 Apr 2002 16:55:07 +0200 (MEST)
Cc: Wayne Gowcher <wgowcher@yahoo.com>, Linux-MIPS <linux-mips@oss.sgi.com>
In-reply-to: <Pine.GSO.3.96.1020422132125.7706C-100000@delta.ds2.pg.gda.pl>
Sender: owner-linux-mips@oss.sgi.com
On Mon, 22 Apr 2002, Maciej W. Rozycki wrote:
> On Sat, 20 Apr 2002, Geert Uytterhoeven wrote:
> > > Does anyone know how to implement ioperm / iopl type
> > > functionality on a mips system. Any example code would
> > > be appreciated.
> > 
> > Like on most architectures that use memory mapped I/O: mmap() the relevant
> > portion of /dev/mem and read/write to/from the mapped area.
> 
>  Hmm, I admit I haven't looked at this matter, but aren't
> in/out/ioperm/iopl implemented as library functions in glibc like for
> other architectures doing MMIO?  E.g. Alpha does this an it makes porting

Perhaps. Note that you still need some /proc magic to find out the correct
address to map. Or you can use /dev/ports.

> programs like XFree86 and SVGATextMode much more straightforward and less
> processor-specific.  That makes sense as they are not processor specific
> but rather bus-specific.  If we don't do that, we should.  For platforms
> without an (E)ISA or a PCI bus ioperm/iopl would simply return an error.

Yes indeed.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds


<Prev in Thread] Current Thread [Next in Thread>