From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5805b6e1b7c2b4af501845d5fb2cc973.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199610082238.RAA03531@system1.virginia.edu> Date: 08 Oct 1996 23:37:12 +0200 From: Martin Ostermann Subject: Re: redhat-4.0: /sbin/clock for the Jensen (again) David Mosberger writes: > Martin> Because of , 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 , you should get the > library versions. But it would be cleaner to include for > glibc. It was/is partially true: Only 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 ) #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