From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199606181224.OAA15059@fozzy.comnets.rwth-aachen.de> Date: Tue, 18 Jun 1996 14:24:19 +0200 From: Martin Ostermann Subject: Re: ioperm() and iopl() >>>>> In article , Erik Troan 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 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