Thread View: fj.os.misc
1 messages
1 total messages
Started by Masahiro ISHII
Mon, 02 Nov 1992 15:54
i386/isa/{com.c,clock.c} patch
Author: Masahiro ISHII
Date: Mon, 02 Nov 1992 15:54
Date: Mon, 02 Nov 1992 15:54
131 lines
4381 bytes
4381 bytes
$@@P0f!w5~Bg(J.$@EE;R(J.$@;3ED8&$G$9!#(JRelease$@8eH/3P$7$?LdBjE@$=$N#7!#(J
EPSON$@%^%7%s$G(JRS232C$@$,F0$+$J$$$H$$$&%l%]!<%H$,$"$j$^$7$F!"D4::$7$?$H(J
$@$3$m!"%\!<%l!<%H$N@_Dj$G!"(Ji8253$@$N@_DjJ}K!$KLdBj$,$"$k$3$H$,$o$+$j$^$7(J
$@$?!#0J2<$N%Q%C%A$r$"$F$F!"%+!<%M%k$r:F9=@.$7$F$/$@$5$$!#(J
$@$^$?!"%b%G%`?.9f@~$N>uBV$N<hF@$G$7$g$&$b$J$$%_%9$r$7$F$$$?$N$G!"$=$l(J
$@$b$J$*$7$F$"$j$^$9!#(Jtip$@$r;HMQ$7$F$$$F!"(Jconnect$@$7$?$j!"$7$J$+$C$?$j$9$k(J
$@$N$,D>$C$F$$$k$H;W$$$^$9!#(J
$@$H$3$m$G!"(Jsystem clock$@$N<hF@$K$D$$$F$G$9$,!"(J0000:0501$@$N(J7bit$@L\$,(J1$@$N$H(J
$@$-(J8MHz$@!"(J0$@$N$H$-(J5MHz$@$K$J$C$F$$$k$H$$$&$3$H$G(J(ASCII$@=PHG(J:PC98$@%9!<%Q!<%F%/(J
$@%K%C%/(J)$@%3!<%G%#%s%0$7$F$$$^$7$?$,!"(JEPSON$@$G$O$I$&$+$o$+$i$J$$$N$G!"(JI/O
$@%]!<%H$r;2>H$9$k$h$&$K$7$^$7$?!#(J
uucp$@$J$I$r;HMQ$9$k$H!"(Jsilo: overflow $@$,$?$/$5$s$G$F!"<!$K5/F0$9$k$H(J
$@$-$K(Jhang up$@$7$?$j$9$k$H$$$&Js9p$b$"$j$^$9!#(Jsilo: overflow$@$O(Jcom.c$@$N9=B$(J
$@$r:,K\E*$KJQ$($J$$8B$j$I$&$7$h$&$b$J$$$h$&$G$9!#8=:_(Jsoftware$@$G(Jfifo$@$r<B(J
$@8=$G$-$k$h$&;n$_$F$$$^$9!#(J
------------------------------------------------------------------
$@5~ETBg3X(J $@EE;R9)3X@l96(J $@;3ED8&(J M2 ishii@kuee.kyoto-u.ac.jp $@@P0f@59((J
$@5~Bg%^%$%3%s%/%i%V(J ishii@kmc.kyoto-u.ac.jp
---- $@$3$3$+$i(J ---- cut here ---- $@$3$3$+$i(J ---- cut here ----
*** com.c.pc98-a Thu Oct 1 06:12:25 1992
--- com.c Sun Nov 1 07:27:13 1992
***************
*** 949,956 ****
break;
case DMGET:
! #if 1 /* debugged by M.Ishii 9/24 */
! bits = inb(com+com_msr);
#else
tmp = prev_siocmd[unit];
bits = 0;
--- 949,956 ----
break;
case DMGET:
! #if 1 /* debugged by M.Ishii 10/21 */
! bits = pc98_get_msr( com );
#else
tmp = prev_siocmd[unit];
bits = 0;
***************
*** 1289,1294 ****
--- 1289,1296 ----
{
int sysclock;
int counter;
+ int s;
+ int i;
if ( com != IO_COM1 ) {
/* ext. RS232C board: speed is determined by DIP switch */
***************
*** 1296,1304 ****
}
/* get system clock from port */
#if 1
! if (PC98_SYSTEM_PARAMETER(0x501)&0x80) {
#else
! if (inb(0x42) & 0x20) {
#endif
/* 8 MHz system & H98 */
sysclock = 8;
--- 1298,1308 ----
}
/* get system clock from port */
#if 1
! if ( PC98_SYSTEM_PARAMETER(0x501) & 0x08 ?
! /*HighReso*/ inb(0x63) & 0x01 :
! /*Normal*/ inb(0x42) & 0x20) {
#else
! if (PC98_SYSTEM_PARAMETER(0x501)&0x80) {
#endif
/* 8 MHz system & H98 */
sysclock = 8;
***************
*** 1309,1319 ****
}
counter = (sysclock == 5 ? 153600 : 124800) / speed;
/* set i8253 */
outb( 0x77, 0xb6 );
! DELAY(10);
outb( 0x75, counter & 0xff );
! DELAY(10);
outb( 0x75, (counter >> 8) & 0xff );
COMDEBUG2(printf( "[bps clock %d cnt %d]", sysclock, counter ));
}
--- 1313,1329 ----
}
counter = (sysclock == 5 ? 153600 : 124800) / speed;
/* set i8253 */
+ s = splhigh();
outb( 0x77, 0xb6 );
! for(i=0;i<5;i++){
! inb(0x5f);
! }
outb( 0x75, counter & 0xff );
! for(i=0;i<5;i++){
! inb(0x5f);
! }
outb( 0x75, (counter >> 8) & 0xff );
+ splx(s);
COMDEBUG2(printf( "[bps clock %d cnt %d]", sysclock, counter ));
}
*** clock.c.pc98-a Thu Oct 1 06:14:40 1992
--- clock.c Fri Oct 30 03:55:00 1992
***************
*** 66,72 ****
--- 66,78 ----
/* initialize 8253 clock */
#ifdef PC98
outb (IO_TIMER+3*2, 0x36); /* control register */
+ #if 1
+ if ( PC98_SYSTEM_PARAMETER(0x501) & 0x08 ?
+ /*HighReso*/ inb(0x63) & 0x01 :
+ /*Normal*/ inb(0x42) & 0x20) {
+ #else
if (PC98_SYSTEM_PARAMETER(0x501)&0x80) {
+ #endif
/* 8 MHz system */
outb (IO_TIMER, 1996800/hz); /* 1.9968 MHz */
outb (IO_TIMER, (1996800/hz)/256);
---- $@$3$3$^$G(J ---- cut here ---- $@$3$3$^$G(J ---- cut here ----
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads