From: Martin Ostermann <ost@comnets.rwth-aachen.de>
Subject: Re: redhat-4.0: /sbin/clock for the Jensen (again)
Date: 08 Oct 1996 23:37:12 +0200 [thread overview]
Message-ID: <0902e3a7be4e76aaf6af49f2a0644e84.axp-list@archive.invalid> (raw)
David Mosberger <davidm@AZStarNet.com> writes:
> Martin> Because of <asm/io.h>, the kernel i/o functions get used instead of
> Martin> the ones in glibc. Thus it only works on the i/o-architecture it was
> Martin> compiled on (or similar ones). But even if I compile it on my Jensen,
> Martin> it doesn't work. I need USE_DEV_PORT. I am going to take a look at it.
>
> I don't think that's true. Even with <asm/io.h>, you should get the
> library versions. But it would be cleaner to include <sys/io.h> for
> glibc.
It was/is partially true: Only <asm/jensen.h> lacked the following
#ifdef __KERNEL__ :
--- jensen.h.org Tue Nov 7 08:18:36 1995
+++ jensen.h Tue Oct 8 22:51:59 1996
@@ -95,6 +95,7 @@
set_hae(addr);
}
+#ifdef __KERNEL__
/*
* IO functions
*
@@ -258,6 +259,8 @@
#define outb(x, port) \
(__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
+
+#endif /* __KERNEL__ */
/*
* The Alpha Jensen hardware for some rather strange reason puts
But your right, at least some routines were taken from libc, because
otherwise it would work.
> The axp-diffs have some patches to rtc.c that are supposed to fix this
> problem. But I haven't heard from Miquel in a while, so I'm not sure
> whether it's all working.
>
> Martin> I see if I can clock working with glibc's i/o functions. Should be no
> Martin> problem.
>
> It should work, I agree. If not, maybe there is a bug in the glibc
> functions in which case a fix is definitively needed.
I looked at it: It's the Jensen's concept of "local" i/o
addresses. These are: (from <asm/jensen.h>)
#define __is_local(addr) ( \
/* keyboard */ (addr == 0x60 || addr == 0x64) || \
/* RTC */ (addr == 0x170 || addr == 0x171) || \
/* mb COM2 */ (addr >= 0x2f8 && addr <= 0x2ff) || \
/* mb LPT1 */ (addr >= 0x3bc && addr <= 0x3be) || \
/* mb COM2 */ (addr >= 0x3f8 && addr <= 0x3ff))
Glibc doesn't know about this, and I think it shouldn't, because this
would require runtime checking. Since anything but the RTC is kernel
controlled anyhow, I'd guess we ought to go for /dev/rtc, too.
But the short term solution is /dev/port, of cause.
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
--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null
next reply other threads:[~1996-10-08 21:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-08 21:37 Martin Ostermann [this message]
-- strict thread matches above, loose matches on Subject: below --
1996-10-08 21:37 redhat-4.0: /sbin/clock for the Jensen (again) Martin Ostermann
1996-10-08 20:34 David Mosberger
1996-10-08 20:08 Martin Ostermann
1996-10-08 15:11 David Mosberger-Tang
1996-10-08 8:44 Martin Ostermann
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