Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "B. James Phillippe" <bryan@terran.org>
To: Martin Ostermann <ost@comnets.rwth-aachen.de>
Cc: RedHat AXP list <axp-list@redhat.com>
Subject: Re: Newbie to port-IO programming on Alpha
Date: Mon, 15 Mar 1999 09:18:27 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.05.9903150855120.15396-100000@earth.terran.org> (raw)
In-Reply-To: <437lsjw0wk.fsf@comnets.rwth-aachen.de>

On 15 Mar 1999, Martin Ostermann wrote:

> On Sun, 14 Mar 1999 14:42:31 -0800 (PST), "B. James Phillippe" <bryan@terran.org> 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 <sys/io.h> includes <asm/io.h> 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
<sys/io.h> and returns inb, nm shows the symbol unresolved (though the
program compiles and executes normally).  All that I can see in <sys/io.h>
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


  reply	other threads:[~1999-03-15 17:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-14  3:36 Newbie to port-IO programming on Alpha Brendan Miller
1999-03-14  9:15 ` B. James Phillippe
1999-03-14 12:50   ` Martin Ostermann
1999-03-14 22:42     ` B. James Phillippe
1999-03-15  5:11       ` QuickCam supported on Alpha? (was: Newbie to port-IO programming on Alpha) Brendan Miller
1999-03-15 13:44         ` Christopher C Chimelis
1999-03-16 18:07         ` Philip Blundell
     [not found]         ` <E10MfXZ-0008AV-00@kings-cross.london.uk.eu.org>
1999-03-29  6:37           ` Brendan Miller
     [not found]             ` <E10RZUl-0007TN-00@fountain.nexus.co.uk>
1999-03-29 16:50               ` Brendan Miller
1999-03-29 17:10                 ` Phil Blundell
1999-03-30  3:11                   ` Brendan Miller
1999-03-30  8:58                     ` Phil Blundell
1999-04-06  5:19                       ` QuickCam supported on Alpha?2 Brendan Miller
1999-04-06  9:03                         ` Phil Blundell
1999-03-15  9:35       ` Newbie to port-IO programming on Alpha Martin Ostermann
1999-03-15 17:18         ` B. James Phillippe [this message]
1999-03-16 13:21           ` Maciej W. Rozycki
1999-03-16 17:25             ` B. James Phillippe
1999-03-16 18:07           ` Philip Blundell
1999-03-14  9:53 ` Bart Warmerdam
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