bammi@dsrgsun.ces.cwru.edu (Jwahar R. Bammi) (03/13/89)
Here is a patch #1 for minixST Gcc kernel for people who retreived it from dsrgsun.ces.cwru.edu or received it on floppies. These diffs incorporate all the diffs that Howard Johnson posted on 03/12/89 for his rs232 driver and some minor cleanups. Thanks to howard johnson for the update. #!/bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #!/bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # README # kernel.cdiff # This archive created: Mon Mar 13 01:54:45 1989 # By: Jwahar R. Bammi(Case Western Reserve University) # Uucp: {decvax,sun,att}!cwjcc!dsrgsun!bammi # Csnet: bammi@dsrgsun.ces.CWRU.edu # Arpa: bammi@dsrgsun.ces.CWRU.edu # export PATH; PATH=/bin:$PATH echo shar: extracting "'README'" '(274 characters)' if test -f 'README' then echo shar: over-writing existing file "'README'" fi sed 's/^X//' << \SHAR_EOF > 'README' XEnclosed are diffs to atariST minix gcc based gkernel. Please apply Xthese diffs to files in gkernel/kernel. X XThese diffs incorporate all the diffs that Howard Johnson posted Xon 03/12/89 for his rs232 driver and some minor cleanups. X XThanks to howard johnson for the update. SHAR_EOF if test 274 -ne "`cat 'README' | wc -c`" then echo shar: error transmitting "'README'" '(should have been 274 characters)' fi echo shar: extracting "'kernel.cdiff'" '(16870 characters)' if test -f 'kernel.cdiff' then echo shar: over-writing existing file "'kernel.cdiff'" fi sed 's/^X//' << \SHAR_EOF > 'kernel.cdiff' X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:18 1989 X--- k_proto.h Mon Mar 13 00:32:22 1989 X*************** X*** 1,7 **** X--- 1,10 ---- X /* X * $Log: k_proto.h,v $ X+ * Revision 1.4 89/03/13 00:29:24 bammi X+ * cleanup. X+ * X * Revision 1.3 89/03/05 00:36:16 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.2 89/03/04 23:51:24 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X*************** X*** 80,90 **** X--- 83,97 ---- X void p_dmp(void); X void dmp_more(void); X void map_dmp(void); X void prname(int); X void set_name(int, char *); X+ #ifndef REG_DMP_KLUDGE X+ void reg_dmp(struct proc *); X+ #else X void reg_dmp(struct proc *, int); X+ #endif X void mem_dmp(char *, int); X void floppy_task(void); X void fd_timer(void); X #ifdef WANTMOUSE X void kbdsend(int); X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:30 1989 X--- rs232.c Mon Mar 13 00:32:25 1989 X*************** X*** 1,10 **** X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/rs232.c,v 1.3 89/03/05 00:36:31 bammi Exp $"; X #endif X /* X * $Log: rs232.c,v $ X * Revision 1.3 89/03/05 00:36:31 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.2 89/03/04 23:51:40 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X--- 1,13 ---- X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/rs232.c,v 1.4 89/03/13 00:29:31 bammi Exp $"; X #endif X /* X * $Log: rs232.c,v $ X+ * Revision 1.4 89/03/13 00:29:31 bammi X+ * added hcj patches of 03/12/89 X+ * X * Revision 1.3 89/03/05 00:36:31 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.2 89/03/04 23:51:40 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X*************** X*** 33,43 **** X #include "ring.h" X #include "k_proto.h" X X #define lbolt (realtime + lost_ticks) X #define RS232_DRAIN (1*HZ) /* time in ticks to drain */ X! #define RS232_BREAK 5 /* ticks */ X PUBLIC int dbg_flag = 0; X PRIVATE message commes; /* message used for console input chars */ X X PUBLIC struct ring rs232ring; X #define COM_OUT_SIZE 512 X--- 36,46 ---- X #include "ring.h" X #include "k_proto.h" X X #define lbolt (realtime + lost_ticks) X #define RS232_DRAIN (1*HZ) /* time in ticks to drain */ X! #define RS232_BREAK 12 /* ticks */ X PUBLIC int dbg_flag = 0; X PRIVATE message commes; /* message used for console input chars */ X X PUBLIC struct ring rs232ring; X #define COM_OUT_SIZE 512 X*************** X*** 44,54 **** X PRIVATE char com_out_buffer[COM_OUT_SIZE]; X X #define COM_IN_SIZE 512 X PRIVATE char com_in_buffer[COM_IN_SIZE]; X X! PRIVATE int rs232_o_flag = 0; X PRIVATE int Xmit_on = 0; X X extern struct tty_struct rstty_struct[]; X X #define T_BITS IA_TRDY X--- 47,57 ---- X PRIVATE char com_out_buffer[COM_OUT_SIZE]; X X #define COM_IN_SIZE 512 X PRIVATE char com_in_buffer[COM_IN_SIZE]; X X! PUBLIC int rs232_o_flag = 0; X PRIVATE int Xmit_on = 0; X X extern struct tty_struct rstty_struct[]; X X #define T_BITS IA_TRDY X*************** X*** 297,306 **** X--- 300,314 ---- X *===========================================================================*/ X X PUBLIC void siaint(which) X int which; /* 0=rrdy, 1=rerr, 2=trdy, 3=terr */ X { X+ #ifdef RS_DEBUG X+ if( dbg_flag != 0) { X+ printf("SIAINT(%d)\n",which); X+ } X+ #endif X switch(which) { X case 1: /* rerr */ X printf("sia_rerr\n\r"); X break; X case 3: /* terr */ X*************** X*** 380,390 **** X tp->tty_ioctl = ioctl; X MFP->mf_imra &= ~( IA_RRDY | IA_TRDY | IA_TERR | IA_RERR); X MFP->mf_tsr = 0; X tp->tty_inhead = tp->tty_inqueue; X tp->tty_intail = tp->tty_inqueue; X! tp->tty_mode = CRMOD | XTABS | ECHO; X tp->tty_erase = ERASE_CHAR; X tp->tty_kill = KILL_CHAR; X tp->tty_intr = INTR_CHAR; X tp->tty_quit = QUIT_CHAR; X tp->tty_xon = XON_CHAR; X--- 388,398 ---- X tp->tty_ioctl = ioctl; X MFP->mf_imra &= ~( IA_RRDY | IA_TRDY | IA_TERR | IA_RERR); X MFP->mf_tsr = 0; X tp->tty_inhead = tp->tty_inqueue; X tp->tty_intail = tp->tty_inqueue; X! tp->tty_mode = CRMOD | XTABS /* | ECHO */; X tp->tty_erase = ERASE_CHAR; X tp->tty_kill = KILL_CHAR; X tp->tty_intr = INTR_CHAR; X tp->tty_quit = QUIT_CHAR; X tp->tty_xon = XON_CHAR; X*************** X*** 438,447 **** X--- 446,460 ---- X * Initialize the timer D in the MFP 68901. X */ X int clock; X int clocka; X X+ #ifdef RS_DEBUG X+ if( dbg_flag != 0) { X+ printf("SET_TIMER(%d)\n",index); X+ } X+ #endif X clock = MFP->mf_tcdcr & 0x70; X for(;;) { X clocka = MFP->mf_tcdcr & 0x70; X if(clock != clocka) { X clock = clocka; X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:34 1989 X--- rstty.c Mon Mar 13 00:32:26 1989 X*************** X*** 1,10 **** X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/rstty.c,v 1.3 89/03/05 00:36:36 bammi Exp $"; X #endif X /* X * $Log: rstty.c,v $ X * Revision 1.3 89/03/05 00:36:36 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.2 89/03/04 23:51:45 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X--- 1,13 ---- X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/rstty.c,v 1.4 89/03/13 00:30:08 bammi Exp $"; X #endif X /* X * $Log: rstty.c,v $ X+ * Revision 1.4 89/03/13 00:30:08 bammi X+ * added hcj patches of 03/12/89. X+ * X * Revision 1.3 89/03/05 00:36:36 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.2 89/03/04 23:51:45 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X*************** X*** 105,114 **** X--- 108,118 ---- X PUBLIC int Need_rstimer = 0; X X #define DBG(x) printk(x); X X extern int dbg_flag; X+ extern int rs232_o_flag; X X /*===========================================================================* X * rs232_task * X *===========================================================================*/ X PUBLIC void rs232_task() X*************** X*** 122,131 **** X--- 126,137 ---- X rstty_init(); /* initialize */ X while (TRUE) { X receive(ANY, &rstty_mess); X /* we would rather be general here, but not enough info is avail USE 0 */ X tp = &rstty_struct[0]; X+ if(rs232_o_flag ==0 && rstty_mess.m_type != RS232_CLOSE) X+ rs232init(tp); X #ifdef RS_DEBUG X if(dbg_flag) X printf("rstty:m_type=%d,incount=%d blocked=%d wempty=%d\n\r", X rstty_mess.m_type, tp->tty_incount , Rs_blocked, Rs232_wempty); X #endif X*************** X*** 174,183 **** X--- 180,190 ---- X PRIVATE void do_open(tp, m_ptr) X register struct tty_struct *tp; /* pointer to tty struct */ X message *m_ptr; /* message containing pointer to char(s) */ X { X int minor; X+ (*tp->tty_open)(tp, m_ptr); X return; /* we do not know how to handle this and set pgrp also */ X } X X /*===========================================================================* X * do_odone * X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:37 1989 X--- stcon.c Mon Mar 13 00:32:28 1989 X*************** X*** 1,10 **** X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stcon.c,v 1.4 89/03/05 00:36:39 bammi Exp $"; X #endif X /* X * $Log: stcon.c,v $ X * Revision 1.4 89/03/05 00:36:39 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.3 89/03/04 23:51:50 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X--- 1,13 ---- X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stcon.c,v 1.5 89/03/13 00:30:29 bammi Exp $"; X #endif X /* X * $Log: stcon.c,v $ X+ * Revision 1.5 89/03/13 00:30:29 bammi X+ * added hcj (mail) patches of 03/12/89 X+ * X * Revision 1.4 89/03/05 00:36:39 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.3 89/03/04 23:51:50 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X*************** X*** 68,78 **** X p_dmp(); return; X case 2: /* PF2: print memory map */ X dmp_more(); X map_dmp(); return; X case 3: /* PF3: print regs user prog */ X! reg_dmp(bill_ptr, 0); return; /* ++jrb */ X case 6: /* PF6: ON/OFF dump tables on panic */ X STdoDump ^= 1; return; X #endif X #ifdef DEBOUT X case 4: /* PF4: ON/OFF console debugging */ X--- 71,81 ---- X p_dmp(); return; X case 2: /* PF2: print memory map */ X dmp_more(); X map_dmp(); return; X case 3: /* PF3: print regs user prog */ X! reg_dmp(bill_ptr); return; /* ++jrb */ X case 6: /* PF6: ON/OFF dump tables on panic */ X STdoDump ^= 1; return; X #endif X #ifdef DEBOUT X case 4: /* PF4: ON/OFF console debugging */ X*************** X*** 106,116 **** X PUBLIC void dump() { X #ifdef DEBDMP X if (STdoDump == 0) X return; X printf("dump\n"); X! reg_dmp(proc_ptr, 0); /* ++jrb */ X p_dmp(); X map_dmp(); X #endif X } X X--- 109,119 ---- X PUBLIC void dump() { X #ifdef DEBDMP X if (STdoDump == 0) X return; X printf("dump\n"); X! reg_dmp(proc_ptr); /* ++jrb */ X p_dmp(); X map_dmp(); X #endif X } X X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:40 1989 X--- stdiskclocks.cpp Mon Mar 13 00:32:29 1989 X*************** X*** 1,8 **** X #ifdef __RCS_ID__ X .data X! _rcsid: .ascii "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stdiskclocks.cpp,v 1.2 89/03/05 00:36:42 bammi Exp $" X .text X #endif X X #ifdef CLOCKS X .globl _rd1byte X--- 1,8 ---- X #ifdef __RCS_ID__ X .data X! _rcsid: .ascii "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stdiskclocks.cpp,v 1.3 89/03/13 00:30:49 bammi Exp $" X .text X #endif X X #ifdef CLOCKS X .globl _rd1byte X*************** X*** 178,188 **** X | 5-10 >>5 (3f) min 0-59 X | 11-15 >>11 (3f) hour 0-59 X | X _getsupra: X chan = -0x2 X! count= -0x4 X date = -0x6 X time = -0x8 X X link a6,#0xfff8 | 4e56 fff8 X jsr get_clock_channel | 4eb9 0000 01c8 X--- 178,188 ---- X | 5-10 >>5 (3f) min 0-59 X | 11-15 >>11 (3f) hour 0-59 X | X _getsupra: X chan = -0x2 X! count = -0x4 X date = -0x6 X time = -0x8 X X link a6,#0xfff8 | 4e56 fff8 X jsr get_clock_channel | 4eb9 0000 01c8 X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:43 1989 X--- stdmp.c Mon Mar 13 00:32:30 1989 X*************** X*** 1,10 **** X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stdmp.c,v 1.4 89/03/05 00:36:43 bammi Exp $"; X #endif X /* X * $Log: stdmp.c,v $ X * Revision 1.4 89/03/05 00:36:43 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.3 89/03/04 23:51:55 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X--- 1,13 ---- X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stdmp.c,v 1.5 89/03/13 00:31:20 bammi Exp $"; X #endif X /* X * $Log: stdmp.c,v $ X+ * Revision 1.5 89/03/13 00:31:20 bammi X+ * added hcj (mail) patches of 03/12/89 X+ * X * Revision 1.4 89/03/05 00:36:43 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.3 89/03/04 23:51:55 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X*************** X*** 12,21 **** X--- 15,25 ---- X * X */ X X #ifdef ATARI_ST X /* This file contains some dumping routines for debugging. */ X+ #define REG_DMP_KLUDGE X X #include "../h/const.h" X #include "../h/type.h" X #include "../h/callnr.h" X #include "../h/com.h" X*************** X*** 221,230 **** X--- 225,235 ---- X ); X } X X PUBLIC void reg_dmp(rp, dummy) X register struct proc *rp; X+ int dummy; X { X register i; X static char *regs[NR_REGS] = { X "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", X "a0", "a1", "a2", "a3", "a4", "a5", "a6" X*** /tmp/,RCSt1a09655 Mon Mar 13 01:48:54 1989 X--- stsia.c Mon Mar 13 00:32:35 1989 X*************** X*** 1,10 **** X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stsia.c,v 1.1 89/03/04 23:52:19 bammi Exp $"; X #endif X /* X * $Log: stsia.c,v $ X * Revision 1.1 89/03/04 23:52:19 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X * X * X */ X--- 1,13 ---- X #ifdef __RCS_ID__ X! static char rcsid[] = "$Header: /u5/mnx/gnu/gkernel/kernel/RCS/stsia.c,v 1.2 89/03/06 04:30:21 bammi Exp $"; X #endif X /* X * $Log: stsia.c,v $ X+ * Revision 1.2 89/03/06 04:30:21 bammi X+ * Added patches from second round of frans's updates. X+ * X * Revision 1.1 89/03/04 23:52:19 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X * X * X */ X*************** X*** 18,32 **** X X #include "../h/const.h" X #include "../h/type.h" X #include "../h/com.h" X X #include "staddr.h" X #include "stmfp.h" X #include "tty.h" X #include "k_proto.h" X- #define printf printk X X static int siastart(struct tty_struct *); X static void siaout(struct tty_struct *); X static void do_echo(void); X static void echo(struct tty_struct *, int); X--- 21,35 ---- X X #include "../h/const.h" X #include "../h/type.h" X #include "../h/com.h" X X+ #include "const.h" /* for printf */ X #include "staddr.h" X #include "stmfp.h" X #include "tty.h" X #include "k_proto.h" X X static int siastart(struct tty_struct *); X static void siaout(struct tty_struct *); X static void do_echo(void); X static void echo(struct tty_struct *, int); X*************** X*** 59,69 **** X PRIVATE message siames; X register unsigned char code; X register r; X struct tty_struct *tp; X X- tp = &tty_struct[SERIAL1]; X X switch (type & 0x00FF) X { X case 0x00: /* receive buffer full */ X char_put( siain(), SERIAL1, siabuf); X--- 62,71 ---- X*************** X*** 78,93 **** X break; X case 0x02: /* transmit buffer empty */ X if (echocnt > 0) X do_echo(); X else X! if (tp->tty_outleft > 0) X siaout(tp); X! else { X siames.m_type = TTY_O_DONE; X siames.TTY_LINE = SERIAL1; X interrupt(TTY, &siames); X } X break; X case 0x03: /* transmit error */ X code = MFP->mf_tsr; X if (code > 0x01 && code < 0x40) X--- 80,99 ---- X break; X case 0x02: /* transmit buffer empty */ X if (echocnt > 0) X do_echo(); X else X! { X! tp = &tty_struct[SERIAL1]; X! X! if (tp->tty_outleft > 0) X siaout(tp); X! else { X siames.m_type = TTY_O_DONE; X siames.TTY_LINE = SERIAL1; X interrupt(TTY, &siames); X+ } X } X break; X case 0x03: /* transmit error */ X code = MFP->mf_tsr; X if (code > 0x01 && code < 0x40) X*************** X*** 145,161 **** X siainit() X /* This routine initializes the RS232-interface */ X { X struct tty_struct *tp = &tty_struct[SERIAL1]; X X- #if 0 X- tty_struct[SERIAL1].tty_start = siastart; X- tty_struct[SERIAL1].tty_echo = echo; X- #else X tp->tty_start = siastart; X tp->tty_echo = echo; X- #endif X tp->tty_ispeed = B1200; X tp->tty_ospeed = B1200; X X siabuf[1] = MAX_OVERRUN; /* set up limit on keyboard buffering */ X MFP->mf_rsr = 0x01; X--- 151,162 ---- X*** /tmp/,RCSt1a09655 Mon Mar 13 01:49:03 1989 X--- tty.h Mon Mar 13 01:18:17 1989 X*************** X*** 1,7 **** X--- 1,11 ---- X /* X * $Log: tty.h,v $ X+ * Revision 1.5 89/03/13 01:16:24 bammi X+ * adjustment to type decl of tty_open in accordance with hcj patch to rstty.c X+ * now has second message * param. X+ * X * Revision 1.4 89/03/05 00:37:07 bammi X * Added patches from Howard Johnson. Third version of Gnukernel. X * X * Revision 1.3 89/03/04 23:52:33 bammi X * added patches from frans. Added frans rs232.Second version of Gnukernel X*************** X*** 62,72 **** X int (*tty_start)(struct tty_struct *); /* routine to start device output */ X void (*tty_echo)(struct tty_struct *, int); /* echo character and flush output */ X X #ifdef WANT_HCJ_RS232 X /* Open/Close section. */ X! void (*tty_open)(struct tty_struct *); /* device specific open */ X void (*tty_close)(struct tty_struct *); /* device specific close */ X int (*tty_ioctl)(struct tty_struct *, message *); /* device specific ioctl */ X #endif X X /* Terminal parameters and status. */ X--- 66,76 ---- X int (*tty_start)(struct tty_struct *); /* routine to start device output */ X void (*tty_echo)(struct tty_struct *, int); /* echo character and flush output */ X X #ifdef WANT_HCJ_RS232 X /* Open/Close section. */ X! void (*tty_open)(struct tty_struct *, message *); /* device specific open */ X void (*tty_close)(struct tty_struct *); /* device specific close */ X int (*tty_ioctl)(struct tty_struct *, message *); /* device specific ioctl */ X #endif X X /* Terminal parameters and status. */ SHAR_EOF if test 16870 -ne "`cat 'kernel.cdiff' | wc -c`" then echo shar: error transmitting "'kernel.cdiff'" '(should have been 16870 characters)' fi # End of shell archive exit 0 usenet: {decvax,sun}!cwjcc!dsrgsun!bammi jwahar r. bammi csnet: bammi@dsrgsun.ces.CWRU.edu arpa: bammi@dsrgsun.ces.CWRU.edu compuServe: 71515,155