From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 14143 invoked from network); 16 Jul 1998 19:37:11 -0000 Received: from stefan.sime.com (193.228.80.247) by mail2.redhat.com with SMTP; 16 Jul 1998 19:37:11 -0000 Received: (from stefan@localhost) by stefan.sime.com (8.8.7/8.8.7) id VAA10343; Thu, 16 Jul 1998 21:15:33 +0200 Date: Thu, 16 Jul 1998 21:15:33 +0200 Message-Id: <199807161915.VAA10343@stefan.sime.com> From: Quant-X Alpha Linux Support To: lindahl@cs.virginia.edu CC: axp-list@redhat.com In-reply-to: <199807161753.NAA03081@cobra.cs.virginia.edu> (message from Greg Lindahl on Thu, 16 Jul 1998 13:53:01 -0400 (EDT)) Subject: Re: success with 2.0.35 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: Quant-X Alpha Linux Support Reply-To: Quant-X Alpha Linux Support Organization: Quant-X Service & Consulting Ges.m.b.H. X-Mailer: GNU Emacs 20.2.1 C-x m (X11 ; I; Linux 2.1.108 i586) References: <199807161753.NAA03081@cobra.cs.virginia.edu> Hi Greg ! > > Have you seen any problems ? > > Some intel people are reporting Adaptec problems. > > No problems yet, but I've only run 4 of them for 12 hours. The Adaptec problems reported to me are only boot-time problems. a) Hangup on a very special CD-ROM drive b) It fails sometime to dedect IBM (DCAS ?) disks. So you don't need to run them for 12 hours, just reboot them for 12 hours ;-} > BTW, Jay, the "clock" binary you distribute is not 100% reliable at > setting the clocks on my machines. It fails about 1% of the time. The > binary I have is dated April 2nd, that's the day I ftped it from > gatekeeper. I'm using [root@axp01 special]# ls -l clock-pc164-rh50 -rw-r--r-- 1 root root 12752 May 18 1996 clock-pc164-rh50 [root@axp01 special]# md5sum clock-pc164-rh50 a8e445a68c7e59f4a355dbe27b8f1c33 clock-pc164-rh50 [root@axp01 special]# here, I didn't found a problem. We want to fix all clock problem forever. One binary for all systems. I want to get rid of the "-A" option but I see no way to dedect SRM correctly because some people using (why ??) SRM+MILO. Jay also made a patch to get "clock" working on Ruffian boards, I attach the patch here because it's a short one and some people may want this now: Patch is against clock-1.1 SRPM from RH 5.1 CD --- clock-alpha.c.ORIG Thu Oct 9 11:29:15 1997 +++ clock-alpha.c Mon Jul 13 12:04:31 1998 @@ -153,6 +153,9 @@ /* Here the information for time adjustments is kept. */ #define ADJPATH "/etc/adjtime" +/* for BCD formart clock maintenance */ +#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) +#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10) /* used for debugging the code. */ #undef KEEP_OFF @@ -170,6 +173,7 @@ int universal = 0; int debug = 0; int arcit = 0; +int bcdit = 0; int clockport = 0x70; const char *pgm_name; @@ -298,6 +302,21 @@ cmos_write (11, (save_control | 0x80)); save_freq_select = cmos_read (10); /* stop and reset prescaler */ cmos_write (10, (save_freq_select | clockport)); + if (arcit) /* Alpha ARC console */ + tm->tm_year -= 80; + + if (!(cmos_read (11) & 0x04) || bcdit) { +#if 0 + printf("writing CMOS time in BCD format!\n"); +#endif + BIN_TO_BCD(tm->tm_sec); + BIN_TO_BCD(tm->tm_min); + BIN_TO_BCD(tm->tm_hour); + BIN_TO_BCD(tm->tm_wday); + BIN_TO_BCD(tm->tm_mday); + BIN_TO_BCD(tm->tm_mon); + BIN_TO_BCD(tm->tm_year); + } cmos_write (0, tm->tm_sec); cmos_write (2, tm->tm_min); @@ -305,8 +324,6 @@ cmos_write (6, tm->tm_wday + 3); cmos_write (7, tm->tm_mday); cmos_write (8, tm->tm_mon + 1); - if (arcit) /* Alpha ARC console */ - tm->tm_year -= 80; cmos_write (9, tm->tm_year); cmos_write (10, save_freq_select); @@ -441,7 +458,11 @@ /* Wait for fall.... (must try at least 2.228 ms) */ for (i = 0; i < 1000000; i++) +#ifdef __alpha__ + if (cmos_read (12) & 0x10) +#else /* __alpha__ */ if (!(cmos_read (10) & 0x80)) +#endif /* __alpha__ */ break; /* The purpose of the "do" loop is called "low-risk programming" */ @@ -457,6 +478,20 @@ tm.tm_year = cmos_read (9); } while (tm.tm_sec != cmos_read (0)); + + if (!(cmos_read (11) & 0x04) || bcdit) { +#if 0 + printf("reading CMOS time in BCD format!\n"); +#endif + BCD_TO_BIN(tm.tm_sec); + BCD_TO_BIN(tm.tm_min); + BCD_TO_BIN(tm.tm_hour); + BCD_TO_BIN(tm.tm_wday); + BCD_TO_BIN(tm.tm_mday); + BCD_TO_BIN(tm.tm_mon); + BCD_TO_BIN(tm.tm_year); + } + if (arcit) { /* Alpha ARC console */ tm.tm_year += 80; } else { -- Quant-X Service & Ph: (+43) 4212 6004-0 Consulting Ges.m.b.H. Fax: (+43) 4212 600420 http://www.quant-x.com Email: support@quant-x.com