Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Martin Ostermann <ost@comnets.rwth-aachen.de>
Subject: Re: ioperm() and iopl()
Date: Tue, 18 Jun 1996 14:24:19 +0200	[thread overview]
Message-ID: <199606181224.OAA15059@fozzy.comnets.rwth-aachen.de> (raw)

>>>>> In article <Pine.LNX.3.91.960617095451.2573H-100000@elroy.redhat.com>, Erik Troan <ewt@redhat.com> writes:

>> When I use iopl() in an app, I'll get an runtime error, somewhat like
>> "Couldn't determine system type -- Maybe /etc/alpha_io_system symlink
>> is missing". Well, it is missing, but where is it supposed to point
>> to? I don't have libc sources hanging around to look it up, so it
>> would be neat if somebody could help me.

> That's broken. By default, it looks in /proc/cpuinfo. What does yours
> say?

Well, it contains a line like

	system type             : Jensen

as David suggested below.

>>>>> In article <199606171639.JAA27270@koala.azstarnet.com>, David Mosberger-Tang <davidm@AZStarNet.com> writes:

> Not particularly useful, is it? ;-) In other words: ioperm() and
> iopl() are non-portable and should be avoided whenever possible.  It
> just so happens that the Alpha PCs have an I/O system that looks
> identical to an x86 PC, which makes it easy to implement a meaningful
> iopl() and ioperm() in user-level.

Ok, so I have to do some calculations were ports are located in sparse
memory by myself, but that shouldn't be a problem.

Martin> When I use iopl() in an app, I'll get an runtime error,
Martin> somewhat like "Couldn't determine system type -- Maybe
Martin> /etc/alpha_io_system symlink is missing". Well, it is
Martin> missing, but where is it supposed to point to? I don't have
Martin> libc sources hanging around to look it up, so it would be
Martin> neat if somebody could help me.

> What does "cat /proc/cpuinfo" show?  I think you have a Jensen, so
> there should be a line like this:

> 	system type             : Jensen

> If not, you can force the right system type with:

> 	ln -s Jensen /etc/alpha_io_system

Hmm, /proc/cpuinfo is available and contains such a line. I
nevertheless made the link (You really meant this: a link pointing to
a (possibly nonexisting) file name Jensen? -- not a file containing a
line "Jensen?") and the message disappeared. However, iopl() returns
non-zero, which indicates failure, and I still get segmentation faults
upon using the ports. 

This was just for the record, I'll next try to allocate those ports
via normal memeory.

Thanks to both of you for your answers, Martin

-- 
Martin Ostermann                | mailto:ost@comnets.rwth-aachen.de
Communication Networks          | http://www.comnets.rwth-aachen.de/~ost
Aachen University of Technology | phoneto:++49/241/807917
Germany                         | faxto:++49/241/8890378

             reply	other threads:[~1996-06-18 12:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-18 12:24 Martin Ostermann [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-06-18 15:20 ioperm() and iopl() David Mosberger-Tang
1996-06-17 16:39 David Mosberger-Tang
1996-06-17 11:23 Martin Ostermann
1996-06-17 13:55 ` Erik Troan
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