From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 16580 invoked from network); 15 Mar 1999 17:28:06 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 15 Mar 1999 17:28:06 -0000 Received: from earth.terran.org (bryan@earth.terran.org [216.39.144.215]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA29905 for ; Mon, 15 Mar 1999 12:18:55 -0500 Received: from localhost (bryan@localhost) by earth.terran.org (8.8.7/8.8.9) with ESMTP id JAA15447; Mon, 15 Mar 1999 09:18:27 -0800 Date: Mon, 15 Mar 1999 09:18:27 -0800 (PST) From: "B. James Phillippe" To: Martin Ostermann cc: RedHat AXP list Subject: Re: Newbie to port-IO programming on Alpha In-Reply-To: <437lsjw0wk.fsf@comnets.rwth-aachen.de> Message-ID: Organization: terran.org/darkforest.org X-Subliminal-Message: Use Linux MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 15 Mar 1999, Martin Ostermann wrote: > On Sun, 14 Mar 1999 14:42:31 -0800 (PST), "B. James Phillippe" said: > > The kernel IO functions are the only IO functions, unless you write your > > own architecture-dependent version for every CPU you plan to support in > > your code. ... > Anyway, the CPU isn't the problem, but the glue logic, which is > different on about any Alpha system type. After all, that's the reason You're right. I thought you were talking about IO in general, and not just between Alpha systems. My mistake. > > There are no IO definitions in the standard library, and it > > This is wrong, there are IO functions in (g)libc for Linux/Alpha. The ... > Glibc on Linux/Alpha looks upon first use at /proc/cpuinfo, or > /etc/systype to determine the type of the system, and than uses a ..Ack... this sounds bogus. Seems like there must be a better way (not using the macro or inline version, and having the IO functions call into the kernel where they would always DTRT for that platform/system type). > > And what do you mean "if they compile at all"? > > Just what I said. There are '#ifdef KERNEL' constructs in those The point I made was the includes right away. I don't see how then the glibc header file is platform-independant then. > I don't have access to my Alpha right know, thus I cannot point to the > exact location of those definitions in (g)libc, but I guess you'll > find them if you look hard enough. I've looked, before and after receiving your email. I could not find them anywhere in glibc. When I compile a one-line program that includes and returns inb, nm shows the symbol unresolved (though the program compiles and executes normally). All that I can see in is that ioperm and iopl are declared as extern. This doesn't even make sense for Alpha, so I assume if those functions are defined in the glibc that they're noops geared only to aid in porting(?) cheers, -bp -- B. James Phillippe . bryan@terran.org Software Engineer, WGT Inc. . http://www.terran.org/~bryan