worsley@ditmela.oz (Andrew Worsley) (05/18/89)
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 3 (of 10)."
# Contents: kerneldif/Btty.c.cdif kerneldif/at_wini.c.cdif
# kerneldif/axmakefile.cdi kerneldif/clock.c.cdif
# kerneldif/console.c.cdif kerneldif/const.h.cdif
# kerneldif/tty.c.cdif
# Wrapped by sys@besplex on Sun Mar 26 06:33:56 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'kerneldif/Btty.c.cdif' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/Btty.c.cdif'\"
else
echo shar: Extracting \"'kerneldif/Btty.c.cdif'\" \(2878 characters\)
sed "s/^X//" >'kerneldif/Btty.c.cdif' <<'END_OF_FILE'
X*** kernel-1.3B/tty.c Mon Jan 2 02:55:53 1989
X--- kernel/tty.c Thu Mar 9 21:23:34 1989
X***************
X*** 82,86 ****
X PRIVATE unsigned reply_count; /* counts tty_reply() calls */
X- PRIVATE unsigned tty_awake; /* nonzero after wakeup till do_int() exits */
X
X
X /*===========================================================================*
X--- 82,90 ----
X PRIVATE unsigned reply_count; /* counts tty_reply() calls */
X
X+ /* Test-and-set flag, set during tty_wakeup(). Remains set if do_int() is
X+ * scheduled until do_int() is finished.
X+ */
X+ PRIVATE int tty_awake;
X
X+
X /*===========================================================================*
X***************
X*** 790,794 ****
X mode = m_ptr->COUNT;
X! if (mode & R_BIT && tp->tty_inleft != 0 && caller == tp->tty_inproc)
X /* Process was reading when killed. Clean up input. */
X tty_icancel(tp);
X if (mode & W_BIT && tp->tty_outleft != 0 && caller == tp->tty_outproc)
X--- 794,800 ----
X mode = m_ptr->COUNT;
X! if (mode & R_BIT && tp->tty_inleft != 0 && caller == tp->tty_inproc) {
X /* Process was reading when killed. Clean up input. */
X tty_icancel(tp);
X+ tp->tty_inleft = 0;
X+ }
X if (mode & W_BIT && tp->tty_outleft != 0 && caller == tp->tty_outproc)
X***************
X*** 817,819 ****
X if ((status = send(replyee, &tty_mess)) != OK)
X! printf("\r\ntty_reply failed with status\r\n", status);
X ++reply_count;
X--- 823,825 ----
X if ((status = send(replyee, &tty_mess)) != OK)
X! printf("\r\ntty_reply failed with status %d\r\n", status);
X ++reply_count;
X***************
X*** 993,995 ****
X tp->tty_incount = 0;
X- tp->tty_inleft = 0;
X tp->tty_lfct = 0;
X--- 999,1000 ----
X***************
X*** 1091,1095 ****
X * completions. The timeout smooths slow terminal input.
X */
X
X! #define WAKEUP_TIMEOUT (HZ/20) /* adjust to taste, 1 for fast processor */
X
X--- 1096,1104 ----
X * completions. The timeout smooths slow terminal input.
X+ *
X+ * Wakeup_timeout and previous_events are probably deadwood (always use
X+ * timeout 1) but tty_awake is probably important to help avoid calling TTY
X+ * too often, apart from its locking function.
X */
X
X! #define WAKEUP_TIMEOUT (HZ/60) /* adjust to taste, 1 for fast processor */
X
X***************
X*** 1098,1106 ****
X
X! if (tty_events != 0 && !tty_awake) {
X if (tty_events >= EVENT_THRESHOLD || tty_events == previous_events ||
X --wakeup_timeout == 0) {
X- interrupt(TTY, &wakeup_mess);
X- tty_awake = TRUE;
X wakeup_timeout = WAKEUP_TIMEOUT;
X }
X previous_events = tty_events;
X--- 1107,1116 ----
X
X! if (tty_events != 0 && !test_and_set(&tty_awake)) {
X if (tty_events >= EVENT_THRESHOLD || tty_events == previous_events ||
X --wakeup_timeout == 0) {
X wakeup_timeout = WAKEUP_TIMEOUT;
X+ interrupt(TTY, &wakeup_mess);
X }
X+ else
X+ tty_awake = FALSE;
X previous_events = tty_events;
END_OF_FILE
if test 2878 -ne `wc -c <'kerneldif/Btty.c.cdif'`; then
echo shar: \"'kerneldif/Btty.c.cdif'\" unpacked with wrong size!
fi
# end of 'kerneldif/Btty.c.cdif'
fi
if test -f 'kerneldif/at_wini.c.cdif' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/at_wini.c.cdif'\"
else
echo shar: Extracting \"'kerneldif/at_wini.c.cdif'\" \(4503 characters\)
sed "s/^X//" >'kerneldif/at_wini.c.cdif' <<'END_OF_FILE'
X*** kernel-1.3/at_wini.c Thu Oct 6 21:07:07 1988
X--- kernel/at_wini.c Thu Mar 23 04:46:45 1989
X***************
X*** 191,193 ****
X phys_bytes usr_buf;
X! register int i, old_state;
X int r = 0;
X--- 191,193 ----
X phys_bytes usr_buf;
X! register int i;
X int r = 0;
X***************
X*** 215,220 ****
X receive(HARDWARE, &w_mess);
X- /* old_state = lock(); */
X- dma_read((unsigned)(usr_buf >> 4), (unsigned)(usr_buf & 0x0F));
X- /* restore(old_state); */
X- usr_buf += 0x200;
X if (win_results() != OK) {
X--- 215,216 ----
X***************
X*** 223,224 ****
X--- 219,222 ----
X }
X+ port_read(WIN_REG1, usr_buf, (phys_bytes) SECTOR_SIZE);
X+ usr_buf += SECTOR_SIZE;
X }
X***************
X*** 233,238 ****
X for (i=0; i<BLOCK_SIZE/SECTOR_SIZE; i++) {
X! /* old_state = lock(); */
X! dma_write((unsigned)(usr_buf >> 4), (unsigned)(usr_buf&0x0F));
X! /* restore(old_state); */
X! usr_buf += 0x200;
X receive(HARDWARE, &w_mess);
X--- 231,234 ----
X for (i=0; i<BLOCK_SIZE/SECTOR_SIZE; i++) {
X! port_write(WIN_REG1, usr_buf, (phys_bytes) SECTOR_SIZE);
X! usr_buf += SECTOR_SIZE;
X receive(HARDWARE, &w_mess);
X***************
X*** 260,265 ****
X
X! int i, r, old_state;
X
X /* Strobe reset bit low. */
X- old_state = lock();
X port_out(WIN_REG9, 4);
X--- 256,260 ----
X
X! int i, r;
X
X /* Strobe reset bit low. */
X port_out(WIN_REG9, 4);
X***************
X*** 268,270 ****
X port_out(WIN_REG9, wini[0].wn_ctlbyte & 0x0F);
X- restore(old_state);
X for (i = 0; i < MAX_WIN_RETRY && drive_busy(); i++)
X--- 263,264 ----
X***************
X*** 344,348 ****
X /*============================================================================*
X! * win_results *
X *============================================================================*/
X! PRIVATE win_results()
X {
X--- 338,342 ----
X /*============================================================================*
X! * old_win_results *
X *============================================================================*/
X! PRIVATE old_win_results()
X {
X***************
X*** 388,390 ****
X
X! register int i, old_state;
X int r;
X--- 382,384 ----
X
X! register int i;
X int r;
X***************
X*** 396,398 ****
X r = WIN_REG2;
X- old_state = lock();
X port_out(WIN_REG9, command[0]);
X--- 390,391 ----
X***************
X*** 400,402 ****
X port_out(r, command[i]);
X- restore(old_state);
X return(OK);
X--- 393,394 ----
X***************
X*** 422,425 ****
X /* Calculate the address off the parameters and copy them to buf */
X! address = ((long)segment << 4) + offset;
X! phys_copy(address, umap(proc_addr(WINCHESTER), D, (vir_bytes)buf, 16), 16L);
X
X--- 414,417 ----
X /* Calculate the address off the parameters and copy them to buf */
X! address = ((long)segment << HCLICK_SHIFT) + offset;
X! phys_copy(address, umap(cproc_addr(WINCHESTER), D, (vir_bytes)buf, 16), 16L);
X
X***************
X*** 433,436 ****
X /* Calculate the address off the parameters and copy them to buf */
X! address = ((long)segment << 4) + offset;
X! phys_copy(address, umap(proc_addr(WINCHESTER), D, (vir_bytes)buf, 16), 16L);
X
X--- 425,428 ----
X /* Calculate the address off the parameters and copy them to buf */
X! address = ((long)segment << HCLICK_SHIFT) + offset;
X! phys_copy(address, umap(cproc_addr(WINCHESTER), D, (vir_bytes)buf, 16), 16L);
X
X***************
X*** 440,442 ****
X /* Get the nummer of drives from the bios */
X! phys_copy(0x475L, umap(proc_addr(WINCHESTER), D, (vir_bytes)buf, 1), 1L);
X nr_drives = (int) *buf;
X--- 432,434 ----
X /* Get the nummer of drives from the bios */
X! phys_copy(0x475L, umap(cproc_addr(WINCHESTER), D, (vir_bytes)buf, 1), 1L);
X nr_drives = (int) *buf;
X***************
X*** 516,517 ****
X--- 508,510 ----
X wn->wn_low = *(long *)&buf[offset];
X+ #ifdef STUPID_WINI_ADJUST
X if ((wn->wn_low % (BLOCK_SIZE/SECTOR_SIZE)) != 0) {
X***************
X*** 521,522 ****
X--- 514,516 ----
X }
X+ #endif
X wn->wn_size = *(long *)&buf[offset + sizeof(long)] - adjust;
X***************
X*** 549,550 ****
X--- 543,561 ----
X ;
X+ }
X+
X+
X+ /*==========================================================================*
X+ * win_results *
X+ *==========================================================================*/
X+ PRIVATE int win_results()
X+ {
X+ /* Extract results from the controller after an operation, then reenable the
X+ * (slave) interrupt controller.
X+ */
X+
X+ int r;
X+
X+ r = old_win_results();
X+ cim_at_wini();
X+ return(r);
X }
END_OF_FILE
if test 4503 -ne `wc -c <'kerneldif/at_wini.c.cdif'`; then
echo shar: \"'kerneldif/at_wini.c.cdif'\" unpacked with wrong size!
fi
# end of 'kerneldif/at_wini.c.cdif'
fi
if test -f 'kerneldif/axmakefile.cdi' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/axmakefile.cdi'\"
else
echo shar: Extracting \"'kerneldif/axmakefile.cdi'\" \(8507 characters\)
sed "s/^X//" >'kerneldif/axmakefile.cdi' <<'END_OF_FILE'
X*** /dev/null Thu Oct 13 22:40:42 1988
X--- kernel/axmakefile Sat Mar 25 19:57:24 1989
X***************
X*** 0 ****
X--- 1,303 ----
X+ # Say 'make at' to make a kernel with the AT winchester driver.
X+ # Say 'make xt' to make a kernel with the XT winchester driver.
X+ # Say 'make' to make the default kernel.
X+ # Use the at kernel if you don't have a hard disk.
X+
X+ # Uncomment one of these 4 groups of defines for special kernels.
X+ # Protected mode may be defined for 8088 through 80386 processors, but only
X+ # 286's and 386's take advantage of it.
X+ # The posted version doesn't support DEBUGanything, PM3, or anything386.
X+
X+ # Protected mode.
X+ CPU = -Di8088 -Di80286 # -Di80386
X+ SPECOBJS = $(PM2OBJS) # $(PM3OBJS)
X+
X+ # Debugger and protected mode.
X+ # DEBUG_EARLY = -DDEBUG_EARLY
X+ # DEBUGGER = -DDEBUGGER
X+ # CPU = -Di8088 -Di80286 # -Di80386
X+ # SPECOBJS = $(DBOBJS) $(DB_PM2OBJS) $(PM2OBJS) #$(DB_PM3OBJS) $(PM3OBJS)
X+
X+ # Debugger.
X+ # DEBUG_EARLY = -DDEBUG_EARLY
X+ # DEBUGGER = -DDEBUGGER
X+ # CPU = i8088
X+ # SPECOBJS = $(DBOBJS)
X+
X+ # Ordinary kernel (1.3 with a few improvements).
X+ # CPU = -Di8088
X+
X+ # Futher, uncomment one of these 3 groups of defines to select the TTY driver.
X+
X+ # 1.3 TTY driver.
X+ C_RS232 = -DC_RS232_INT_HANDLERS
X+ OLD_TTY = -DOLD_TTY
X+
X+ # Bruce's TTY driver.
X+ # RS2 = rs2.o
X+
X+ # Bruce's TTY driver, but use the C interrupt handlers.
X+ # C_RS232 = -DC_RS232_INT_HANDLERS
X+
X+ # Further, uncomment one of these 2 groups of defines to select the
X+ # environment.
X+
X+ # Standard Minix.
X+ # CFLAGS include the following nonstandard ones.
X+ # -F: run cpp and cem sequentially (used when memory is tight)
X+ # -T.: put temporaries in working directory (when RAM disk is small)
X+ ASLD = -DASLD
X+ BIN = .
X+ CC = cc
X+ CFLAGS = $(CPPFLAGS) -F -T.
X+ END = /usr/lib/end.s
X+ LD = asld
X+ LIBS = /usr/lib/libc.a
X+ o = s
X+
X+ # Bruce's Minix.
X+ # BIN = /etc/system
X+ # CC = ecc
X+ # CFLAGS = $(CPPFLAGS)
X+ # LD = ld
X+ # LIBS = /local/lib/libc.a
X+ # o = o
X+ # .s.o:
X+ # $(CC) -c $*.s
X+ # VOID = -Dvoid=int
X+
X+ # Other defines for C.
X+ # AM_KERNEL = -DAM_KERNEL # Amoeba kernel (doesn't work)
X+ AUTO_BIOS = -DAUTO_BIOS=0 # for xt_wini.c, make it =1 if wanted
X+ # LINEWRAP = -DLINEWRAP # wrap lines at column 80
X+ # NO_HANDSHAKE = -DNO_HANDSHAKE # no hardware handshake for RS232
X+ # SPARE_VIDEO = -DSPARE_VIDEO_MEMORY # put mem from any 2nd vid card in map
X+ STUPID_WINI = -DSTUPID_WINI_ADJUST # skip odd 1st sector of partition
X+
X+ # Other defines for make.
X+ CPP = /lib/cpp
X+ CPPFLAGS = $(ASLD) $(AUTO_BIOS) $(AM_KERNEL) $(CPU) $(C_RS232) \
X+ $(DEBUG_EARLY) $(DEBUGGER) $(LINEWRAP) $(NO_HANDSHAKE) \
X+ $(OLD_TTY) $(SPARE_VIDEO) $(STUPID_WINI) $(VOID)
X+ LDFLAGS = -i
X+ START = mpx88.$o
X+ h = ../h
X+
X+ DB_PM2OBJS = db286.$o
X+ DB_PM3OBJS = db386.$o
X+ DBOBJS = db/int88.$o db/db.$o db/getline.$o db/io.$o db/keyboard.$o \
X+ db/lib88.$o db/pcio.$o db/sym.$o db/unasm.$o
X+ KEROBJS = main.$o tty.$o floppy.$o system.$o proc.$o clock.$o \
X+ memory.$o console.$o rs232.$o $(RS2) printer.$o table.$o \
X+ klib88.$o dmp.$o \
X+ exception.$o i8259.$o misc.$o
X+ PM2OBJS = mpx286.$o klib286.$o protect.$o
X+ PM3OBJS = mpx386.$o klib386.$o
X+ SOBJS = db286.s db386.s klib286.s klib386.s klib88.s \
X+ mpx286.s mpx386.s mpx88.s rs2.s
X+
X+ ATWINI = at_wini.$o
X+ XTWINI = xt_wini.$o
X+
X+ # Main thing to make. Swap the order of these if you prefer and XT kernel.
X+
X+ at: $(START) $(KEROBJS) $(SPECOBJS) $(ATWINI) $(LIBS) $(END)
X+ $(LD) $(LDFLAGS) -o $(BIN)/atkernel \
X+ $(START) $(SPECOBJS) $(KEROBJS) $(ATWINI) $(LIBS) $(END) \
X+ # -s > atkernel.sym
X+ # ast -X $(BIN)/atkernel atkernel.sym
X+ rm -f $(BIN)/kernel
X+ ln $(BIN)/atkernel $(BIN)/kernel
X+
X+ xt: $(START) $(KEROBJS) $(SPECOBJS) $(XTWINI) $(LIBS) $(END)
X+ $(LD) $(LDFLAGS) -o $(BIN)/xtkernel \
X+ $(START) $(KEROBJS) $(SPECOBJS) $(XTWINI) $(LIBS) $(END) \
X+ # -s > xtkernel.sym
X+ # ast -X $(BIN)/xtkernel xtkernel.sym
X+ rm -f $(BIN)/kernel
X+ ln $(BIN)/xtkernel $(BIN)/kernel
X+
X+ clean:
X+ rm -f $(START) $(DB_PM2OBJS) $(DB_PM3OBJS) $(KEROBJS) \
X+ $(PM2OBJS) $(PM3OBJS) $(SOBJS) \
X+ $(ATWINI) $(XTWINI
X+
X+ db286.o: db286.s
X+ $(CC) -c $*.s
X+ db286.s: $h/const.h const.h protect.h sconst.h sglo.h db286.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ db386.o: db386.s
X+ $(CC) -c $*.s
X+ db386.s: $h/const.h const.h protect.h sconst.h sglo.h db386.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ klib286.o: klib286.s
X+ $(CC) -c $*.s
X+ klib286.s: $h/const.h const.h protect.h sconst.h sglo.h klib286.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ klib386.o: klib386.s
X+ $(CC) -c $*.s
X+ klib386.s: $h/const.h const.h protect.h sconst.h sglo.h klib386.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ klib88.o: klib88.s
X+ $(CC) -c $*.s
X+ klib88.s: $h/const.h const.h sconst.h sglo.h klib88.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ mpx286.o: mpx286.s
X+ $(CC) -c $*.s
X+ mpx286.s: const.h protect.h sconst.h sglo.h mpx286.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ mpx386.o: mpx386.s
X+ $(CC) -c $*.s
X+ mpx386.s: const.h protect.h sconst.h sglo.h mpx386.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ mpx88.o: mpx88.s
X+ $(CC) -c $*.s
X+ mpx88.s: $h/const.h $h/com.h const.h sconst.h sglo.h mpx88.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ rs2.o: rs2.s
X+ $(CC) -c $*.s
X+ rs2.s: $h/const.h const.h sconst.h sglo.h rs2.x
X+ $(CPP) $(CPPFLAGS) $*.x | grep -v '^\#' > $*.s
X+
X+ clock.$o: const.h type.h $h/const.h $h/type.h
X+ clock.$o: $h/callnr.h
X+ clock.$o: $h/com.h
X+ clock.$o: $h/error.h
X+ clock.$o: $h/signal.h
X+ clock.$o: glo.h
X+ clock.$o: proc.h
X+
X+ console.$o: const.h type.h $h/const.h $h/type.h
X+ console.$o: $h/callnr.h
X+ console.$o: $h/com.h
X+ console.$o: $h/error.h
X+ console.$o: $h/sgtty.h
X+ console.$o: $h/signal.h
X+ console.$o: glo.h
X+ console.$o: proc.h
X+ console.$o: protect.h
X+ console.$o: tty.h
X+
X+ floppy.$o: const.h type.h $h/const.h $h/type.h
X+ floppy.$o: $h/callnr.h
X+ floppy.$o: $h/com.h
X+ floppy.$o: $h/error.h
X+ floppy.$o: glo.h
X+ floppy.$o: proc.h
X+
X+ dmp.$o: const.h type.h $h/const.h $h/type.h
X+ dmp.$o: $h/callnr.h
X+ dmp.$o: $h/com.h
X+ dmp.$o: $h/error.h
X+ dmp.$o: glo.h
X+ dmp.$o: proc.h
X+
X+ main.$o: const.h type.h $h/const.h $h/type.h
X+ main.$o: $h/boot.h
X+ main.$o: $h/callnr.h
X+ main.$o: $h/com.h
X+ main.$o: $h/error.h
X+ main.$o: $h/signal.h
X+ main.$o: glo.h
X+ main.$o: proc.h
X+
X+ memory.$o: const.h type.h $h/const.h $h/type.h
X+ memory.$o: $h/callnr.h
X+ memory.$o: $h/com.h
X+ memory.$o: $h/error.h
X+ memory.$o: glo.h
X+ memory.$o: proc.h
X+
X+ printer.$o: const.h type.h $h/const.h $h/type.h
X+ printer.$o: $h/callnr.h
X+ printer.$o: $h/com.h
X+ printer.$o: $h/error.h
X+ printer.$o: proc.h
X+ printer.$o: glo.h
X+
X+ proc.$o: const.h type.h $h/const.h $h/type.h
X+ proc.$o: $h/callnr.h
X+ proc.$o: $h/com.h
X+ proc.$o: $h/error.h
X+ proc.$o: glo.h
X+ proc.$o: proc.h
X+
X+ rs232.$o: const.h $h/const.h $h/type.h
X+ rs232.$o: $h/sgtty.h
X+ rs232.$o: tty.h
X+
X+ system.$o: const.h type.h $h/const.h $h/type.h
X+ system.$o: $h/boot.h
X+ system.$o: $h/callnr.h
X+ system.$o: $h/com.h
X+ system.$o: $h/error.h
X+ system.$o: $h/signal.h
X+ system.$o: glo.h
X+ system.$o: proc.h
X+ system.$o: protect.h
X+
X+ table.$o: const.h type.h $h/const.h $h/type.h $h/com.h
X+ table.$o: glo.h
X+ table.$o: proc.h
X+ table.$o: tty.h
X+
X+ tty.$o: const.h type.h $h/const.h $h/type.h
X+ tty.$o: $h/callnr.h
X+ tty.$o: $h/com.h
X+ tty.$o: $h/error.h
X+ tty.$o: $h/sgtty.h
X+ tty.$o: $h/signal.h
X+ tty.$o: glo.h
X+ tty.$o: proc.h
X+ tty.$o: tty.h
X+ tty.$o: ttymaps.h
X+
X+ at_wini.$o: const.h type.h $h/const.h $h/type.h
X+ at_wini.$o: $h/callnr.h
X+ at_wini.$o: $h/com.h
X+ at_wini.$o: $h/error.h
X+ at_wini.$o: proc.h
X+
X+ xt_wini.$o: const.h type.h $h/const.h $h/type.h
X+ xt_wini.$o: $h/callnr.h
X+ xt_wini.$o: $h/com.h
X+ xt_wini.$o: $h/error.h
X+ xt_wini.$o: proc.h
X+
X+ exception.$o: $h/const.h
X+ exception.$o: $h/type.h
X+ exception.$o: $h/signal.h
X+ exception.$o: const.h
X+ exception.$o: type.h
X+ exception.$o: glo.h
X+ exception.$o: proc.h
X+
X+ i8259.$o: $h/const.h
X+ i8259.$o: $h/type.h
X+ i8259.$o: $h/com.h
X+ i8259.$o: const.h
X+ i8259.$o: type.h
X+ i8259.$o: glo.h
X+ i8259.$o: proc.h
X+
X+ misc.$o: $h/const.h
X+ misc.$o: $h/type.h
X+ misc.$o: const.h
X+ misc.$o: type.h
X+ misc.$o: glo.h
X+
X+ protect.$o: $h/const.h
X+ protect.$o: $h/type.h
X+ protect.$o: const.h
X+ protect.$o: type.h
X+ protect.$o: glo.h
X+ protect.$o: proc.h
X+ protect.$o: protect.h
END_OF_FILE
if test 8507 -ne `wc -c <'kerneldif/axmakefile.cdi'`; then
echo shar: \"'kerneldif/axmakefile.cdi'\" unpacked with wrong size!
fi
# end of 'kerneldif/axmakefile.cdi'
fi
if test -f 'kerneldif/clock.c.cdif' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/clock.c.cdif'\"
else
echo shar: Extracting \"'kerneldif/clock.c.cdif'\" \(10602 characters\)
sed "s/^X//" >'kerneldif/clock.c.cdif' <<'END_OF_FILE'
X*** kernel-1.3/clock.c Thu Oct 20 13:14:50 1988
X--- kernel/clock.c Thu Mar 23 00:16:07 1989
X***************
X*** 3,5 ****
X *
X! * CLOCK_TICK: a clock interrupt has occurred
X * GET_TIME: a process wants the real time
X--- 3,5 ----
X *
X! * HARD_INT: a clock interrupt has occurred
X * GET_TIME: a process wants the real time
X***************
X*** 14,16 ****
X * |------------+----------+---------+---------|
X! * | CLOCK_TICK | | | |
X * |------------+----------+---------+---------|
X--- 14,16 ----
X * |------------+----------+---------+---------|
X! * | HARD_INT | | | |
X * |------------+----------+---------+---------|
X***************
X*** 41,43 ****
X #define SCHED_RATE (MILLISEC*HZ/1000) /* number of ticks per schedule */
X- #define FLUSH_MASK 07 /* bit mask used for flushing RS232 input */
X
X--- 41,42 ----
X***************
X*** 47,48 ****
X--- 46,48 ----
X #define IBM_FREQ 1193182L /* IBM clock frequency for setting timer */
X+ #define TIMER_COUNT (unsigned) (IBM_FREQ/HZ)/* count to load into timer */
X #define SQUARE_WAVE 0x36 /* mode for generating square wave */
X***************
X*** 52,53 ****
X--- 52,55 ----
X PRIVATE real_time next_alarm; /* probable time of next alarm */
X+ PRIVATE real_time pending_ticks; /* ticks seen by low level only */
X+ PRIVATE real_time realtime; /* real time clock */
X PRIVATE int sched_ticks = SCHED_RATE; /* counter: when 0, call scheduler */
X***************
X*** 56,58 ****
X PRIVATE int (*watch_dog[NR_TASKS+1])(); /* watch_dog functions to call */
X- extern int flush_flag; /* tells clock when to flush the tty buf */
X
X--- 58,59 ----
X***************
X*** 76,77 ****
X--- 77,83 ----
X
X+ lock();
X+ realtime += pending_ticks; /* transfer ticks from low level handler */
X+ pending_ticks = 0;
X+ unlock();
X+
X switch (opcode) {
X***************
X*** 80,82 ****
X case SET_TIME: do_set_time(&mc); break;
X! case CLOCK_TICK: do_clocktick(); break;
X default: panic("clock task got bad message", mc.m_type);
X--- 86,88 ----
X case SET_TIME: do_set_time(&mc); break;
X! case HARD_INT: do_clocktick(); break;
X default: panic("clock task got bad message", mc.m_type);
X***************
X*** 86,88 ****
X mc.m_type = OK;
X! if (opcode != CLOCK_TICK) send(mc.m_source, &mc);
X }
X--- 92,94 ----
X mc.m_type = OK;
X! if (opcode != HARD_INT) send(mc.m_source, &mc);
X }
X***************
X*** 114,116 ****
X rp->p_alarm = (delta_ticks == 0L ? 0L : realtime + delta_ticks);
X! if (proc_nr < 0) watch_dog[-proc_nr] = function;
X
X--- 120,122 ----
X rp->p_alarm = (delta_ticks == 0L ? 0L : realtime + delta_ticks);
X! if istaskp(rp) watch_dog[-proc_nr] = function;
X
X***************
X*** 118,120 ****
X next_alarm = MAX_P_LONG;
X! for (rp = &proc[0]; rp < &proc[NR_TASKS+NR_PROCS]; rp++)
X if(rp->p_alarm != 0 && rp->p_alarm < next_alarm)next_alarm=rp->p_alarm;
X--- 124,126 ----
X next_alarm = MAX_P_LONG;
X! for (rp = BEG_PROC_ADDR; rp < END_PROC_ADDR; rp++)
X if(rp->p_alarm != 0 && rp->p_alarm < next_alarm)next_alarm=rp->p_alarm;
X***************
X*** 153,155 ****
X {
X! /* This routine is called on every clock tick. */
X
X--- 159,161 ----
X {
X! /* This routine called on clock ticks when a lot of work needs to be done. */
X
X***************
X*** 157,167 ****
X register int t, proc_nr;
X- extern int pr_busy, pcount, cum_count, prev_ct;
X
X- /* To guard against race conditions, first copy 'lost_ticks' to a local
X- * variable, add this to 'realtime', and then subtract it from 'lost_ticks'.
X- */
X- t = lost_ticks; /* 'lost_ticks' counts missed interrupts */
X- realtime += t + 1; /* update the time of day */
X- lost_ticks -= t; /* these interrupts are no longer missed */
X-
X if (next_alarm <= realtime) {
X--- 163,165 ----
X***************
X*** 169,171 ****
X next_alarm = MAX_P_LONG; /* start computing next alarm */
X! for (rp = &proc[0]; rp < &proc[NR_TASKS+NR_PROCS]; rp++) {
X if (rp->p_alarm != (real_time) 0) {
X--- 167,169 ----
X next_alarm = MAX_P_LONG; /* start computing next alarm */
X! for (rp = BEG_PROC_ADDR; rp < END_PROC_ADDR; rp++) {
X if (rp->p_alarm != (real_time) 0) {
X***************
X*** 177,180 ****
X */
X! proc_nr = rp - proc - NR_TASKS;
X! if (proc_nr >= 0)
X cause_sig(proc_nr, SIGALRM);
X--- 175,177 ----
X */
X! if ( (proc_nr = proc_number(rp)) >= 0)
X cause_sig(proc_nr, SIGALRM);
X***************
X*** 192,210 ****
X
X- accounting(); /* keep track of who is using the cpu */
X-
X- /* If input characters are accumulating on an RS232 line, process them. */
X- if (flush_flag) {
X- t = (int) realtime; /* only low-order bits matter */
X- if ( (t & FLUSH_MASK) == 0) rs_flush(); /* flush tty input */
X- }
X-
X /* If a user process has been running too long, pick another one. */
X if (--sched_ticks == 0) {
X! if (bill_ptr == prev_ptr) sched(); /* process has run too long */
X sched_ticks = SCHED_RATE; /* reset quantum */
X prev_ptr = bill_ptr; /* new previous process */
X-
X- /* Check if printer is hung up, and if so, restart it. */
X- if (pr_busy && pcount > 0 && cum_count == prev_ct) pr_char();
X- prev_ct = cum_count; /* record # characters printed so far */
X }
X--- 189,195 ----
X
X /* If a user process has been running too long, pick another one. */
X if (--sched_ticks == 0) {
X! if (bill_ptr == prev_ptr) locksched(); /* process has run too long */
X sched_ticks = SCHED_RATE; /* reset quantum */
X prev_ptr = bill_ptr; /* new previous process */
X }
X***************
X*** 217,239 ****
X *===========================================================================*/
X! PRIVATE accounting()
X! {
X! /*
X! * Update user and system accounting times. Charge the current process for
X! * user time or system time. In addition, if the current proces (i.e.
X! * prev_proc, because cur_proc is always CLOCK) is a task, charge it too.
X! * This is just for the F1 display.
X! */
X
X- register struct proc *rp;
X
X- if (prev_proc >= LOW_USER) {
X- bill_ptr->user_time++; /* user time */
X- } else {
X- bill_ptr->sys_time++; /* system time */
X- rp = proc_addr(prev_proc);
X- if (prev_proc != IDLE) rp->sys_time++;
X- }
X- }
X-
X-
X #ifdef i8088
X--- 202,206 ----
X *===========================================================================*/
X! /* This is now done at the lowest level, in clock_handler(). */
X
X
X #ifdef i8088
X***************
X*** 246,256 ****
X
X- unsigned int count, low_byte, high_byte;
X-
X- count = (unsigned) (IBM_FREQ/HZ); /* value to load into the timer */
X- low_byte = count & BYTE; /* compute low-order byte */
X- high_byte = (count >> 8) & BYTE; /* compute high-order byte */
X port_out(TIMER_MODE, SQUARE_WAVE); /* set timer to run continuously */
X! port_out(TIMER0, low_byte); /* load timer low byte */
X! port_out(TIMER0, high_byte); /* load timer high byte */
X }
X #endif
X--- 213,301 ----
X
X port_out(TIMER_MODE, SQUARE_WAVE); /* set timer to run continuously */
X! port_out(TIMER0, TIMER_COUNT); /* load timer low byte */
X! port_out(TIMER0, TIMER_COUNT >> 8); /* load timer high byte */
X }
X #endif
X+
X+
X+ /*===========================================================================*
X+ * clock_handler *
X+ *===========================================================================*/
X+ PUBLIC clock_handler()
X+ {
X+ /* Switch context to do_clocktick if an alarm has gone off.
X+ * Also switch there to reschedule if the reschedule will do something.
X+ * This happens when
X+ * (1) quantum has expired
X+ * (2) current process received full quantum (as clock sampled it!)
X+ * (3) something else is ready to run.
X+ * Also call TTY and PRINTER and let them do whatever is necessary.
X+ *
X+ * Many global global and static variables are accessed here. The safety
X+ * of this must be justified. Most of them are not changed here:
X+ * k_reenter:
X+ * This safely tells if the clock interrupt is nested.
X+ * proc_ptr, bill_ptr:
X+ * These are used for accounting. It does not matter if proc.c
X+ * is changing them, provided they are always valid pointers,
X+ * since at worst the previous process would be billed.
X+ * next_alarm, realtime, sched_ticks, bill_ptr, prev_ptr,
X+ * rdy_head[USER_Q]:
X+ * These are tested to decide whether to call interrupt(). It
X+ * does not matter if the test is sometimes (rarely) backwards
X+ * due to a race, since this will only delay the high-level
X+ * processing by one tick, or call the high level unnecessarily.
X+ * The variables which are changed require more care:
X+ * rp->user_time, rp->sys_time:
X+ * These are protected by explicit locks in system.c. They are
X+ * not properly protected in dmp.c (the increment here is not
X+ * atomic) but that hardly matters.
X+ * pending_ticks:
X+ * This is protected by an explicit lock in clock.c. Don't
X+ * update realtime directly, since there are too many
X+ * references to it to guard conveniently.
X+ * sched_ticks, prev_ptr:
X+ * Updating these competes with similar code in do_clocktick().
X+ * No lock is necessary, because if bad things happen here
X+ * (like sched_ticks going negative), the code in do_clocktick()
X+ * will restore the variables to reasonable values, and an
X+ * occasional missed or extra sched() is harmless.
X+ *
X+ * Are these complications worth the trouble? Well, they make the system 15%
X+ * faster on a 5MHz 8088, and make task debugging much easier since there are
X+ * no task switches on an inactive system.
X+ */
X+
X+ register struct proc *rp;
X+
X+ /* Update user and system accounting times.
X+ * First charge the current process for user time.
X+ * If the current process is not the billable process (usually because it
X+ * is a task), charge the billable process for system time as well.
X+ * Thus the unbillable tasks' user time is the billable users' system time.
X+ */
X+ if (k_reenter != 0)
X+ rp = cproc_addr(HARDWARE);
X+ else
X+ rp = proc_ptr;
X+ ++rp->user_time;
X+ if (rp != bill_ptr)
X+ ++bill_ptr->sys_time;
X+
X+ ++pending_ticks;
X+ tty_wakeup(); /* possibly wake up TTY */
X+ pr_restart(); /* possibly restart printer */
X+
X+ if (next_alarm <= realtime + pending_ticks ||
X+ sched_ticks == 1 &&
X+ bill_ptr == prev_ptr && rdy_head[USER_Q] != NIL_PROC) {
X+ interrupt(CLOCK);
X+ return;
X+ }
X+
X+ if (--sched_ticks == 0) {
X+ /* If bill_ptr == prev_ptr, no ready users so don't need sched(). */
X+ sched_ticks = SCHED_RATE; /* reset quantum */
X+ prev_ptr = bill_ptr; /* new previous process */
X+ }
X+ }
END_OF_FILE
if test 10602 -ne `wc -c <'kerneldif/clock.c.cdif'`; then
echo shar: \"'kerneldif/clock.c.cdif'\" unpacked with wrong size!
fi
# end of 'kerneldif/clock.c.cdif'
fi
if test -f 'kerneldif/console.c.cdif' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/console.c.cdif'\"
else
echo shar: Extracting \"'kerneldif/console.c.cdif'\" \(3676 characters\)
sed "s/^X//" >'kerneldif/console.c.cdif' <<'END_OF_FILE'
X*** kernel-1.3/console.c Thu Oct 20 06:04:19 1988
X--- kernel/console.c Sun Mar 12 00:34:42 1989
X***************
X*** 13,14 ****
X--- 13,15 ----
X #include "proc.h"
X+ #include "protect.h"
X #include "tty.h"
X***************
X*** 20,23 ****
X /* Definitions used by the console driver. */
X- #define COLOR_BASE 0xB800 /* video ram paragraph for color display */
X- #define MONO_BASE 0xB000 /* video ram address for mono display */
X #define C_VID_MASK 0x3FFF /* mask for 16K video RAM */
X--- 21,22 ----
X***************
X*** 153,154 ****
X--- 152,154 ----
X */
X+ lock(); /* the buffer is shared with RS232 */
X if ( (k = tty_buf_count(tty_driver_buf)) < tty_buf_max(tty_driver_buf)) {
X***************
X*** 159,160 ****
X--- 159,161 ----
X tty_buf_count(tty_driver_buf)++; /* increment counter */
X+ unlock();
X
X***************
X*** 166,167 ****
X--- 167,169 ----
X /* Too many characters have been buffered. Discard excess. */
X+ unlock();
X port_out(INT_CTL, ENABLE); /* re-enable 8259A controller */
X***************
X*** 182,191 ****
X
X- extern char get_byte();
X int count;
X char c;
X! unsigned segment, offset, offset1;
X
X /* Loop over the user bytes one at a time, outputting each one. */
X! segment = (tp->tty_phys >> 4) & WORD_MASK;
X! offset = tp->tty_phys & OFF_MASK;
X offset1 = offset;
X--- 184,191 ----
X
X int count;
X char c;
X! unsigned long offset, offset1;
X
X /* Loop over the user bytes one at a time, outputting each one. */
X! offset = tp->tty_phys;
X offset1 = offset;
X***************
X*** 194,196 ****
X while (tp->tty_outleft > 0 && tp->tty_inhibited == RUNNING) {
X! c = get_byte(segment, offset); /* fetch 1 byte from user space */
X out_char(tp, c); /* write 1 byte to terminal */
X--- 194,196 ----
X while (tp->tty_outleft > 0 && tp->tty_inhibited == RUNNING) {
X! c = get_phys_byte(offset); /* fetch 1 byte from user space */
X out_char(tp, c); /* write 1 byte to terminal */
X***************
X*** 887,889 ****
X if (color) {
X! vid_base = COLOR_BASE;
X vid_mask = C_VID_MASK;
X--- 887,889 ----
X if (color) {
X! vid_base = COLOR_BASE >> HCLICK_SHIFT;
X vid_mask = C_VID_MASK;
X***************
X*** 892,894 ****
X } else {
X! vid_base = MONO_BASE;
X vid_mask = M_VID_MASK;
X--- 892,894 ----
X } else {
X! vid_base = MONO_BASE >> HCLICK_SHIFT;
X vid_mask = M_VID_MASK;
X***************
X*** 898,899 ****
X--- 898,904 ----
X
X+ #ifdef i80286
X+ if (processor >= 286)
X+ vid_base = color ? COLOR_SELECTOR : MONO_SELECTOR;
X+ #endif
X+
X if (ega) {
X***************
X*** 924,927 ****
X }
X- }
X
X /*===========================================================================*
X--- 929,934 ----
X }
X
X+ enable_irq(KEYBOARD_IRQ); /* safe now everything initialised! */
X+ }
X+
X /*===========================================================================*
X***************
X*** 1021 ****
X--- 1028,1050 ----
X }
X+
X+
X+ #ifndef DEBUGGER /* debugger already has it */
X+ /*==========================================================================*
X+ * scan_keyboard *
X+ *==========================================================================*/
X+ PUBLIC int scan_keyboard()
X+ {
X+ /* Fetch the character from the keyboard hardware and acknowledge it.
X+ * Code extracted from keyboard(). Keyboard() should call it instead.
X+ */
X+
X+ int code;
X+ int val;
X+
X+ port_in(KEYBD, &code); /* get the scan code for the key struck */
X+ port_in(PORT_B, &val); /* strobe the keyboard to ack the char */
X+ port_out(PORT_B, val | KBIT); /* strobe the bit high */
X+ port_out(PORT_B, val); /* now strobe it low */
X+ return code;
X+ }
X+ #endif /* DEBUGGER false - scan_keyboard() */
END_OF_FILE
if test 3676 -ne `wc -c <'kerneldif/console.c.cdif'`; then
echo shar: \"'kerneldif/console.c.cdif'\" unpacked with wrong size!
fi
# end of 'kerneldif/console.c.cdif'
fi
if test -f 'kerneldif/const.h.cdif' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/const.h.cdif'\"
else
echo shar: Extracting \"'kerneldif/const.h.cdif'\" \(7031 characters\)
sed "s/^X//" >'kerneldif/const.h.cdif' <<'END_OF_FILE'
X*** kernel-1.3/const.h Thu Oct 6 21:07:12 1988
X--- kernel/const.h Thu Mar 23 03:19:08 1989
X***************
X*** 3,49 ****
X #ifdef i8088
X- /* p_reg contains: ax, bx, cx, dx, si, di, bp, es, ds, cs, ss in that order. */
X- #define NR_REGS 11 /* number of general regs in each proc slot */
X- #define INIT_PSW 0x0200 /* initial psw */
X- #define INIT_SP (int*)0x0010 /* initial sp: 3 words pushed by kernel */
X
X! /* The following values are used in the assembly code. Do not change the
X! * values of 'ES_REG', 'DS_REG', 'CS_REG', or 'SS_REG' without making the
X! * corresponding changes in the assembly code.
X */
X! #define ES_REG 7 /* proc[i].p_reg[ESREG] is saved es */
X! #define DS_REG 8 /* proc[i].p_reg[DSREG] is saved ds */
X! #define CS_REG 9 /* proc[i].p_reg[CSREG] is saved cs */
X! #define SS_REG 10 /* proc[i].p_reg[SSREG] is saved ss */
X
X! #define VECTOR_BYTES 284 /* bytes of interrupt vectors to save */
X! #define MEM_BYTES 655360L /* memory size for /dev/mem */
X
X! /* Interrupt vectors */
X! #define DIVIDE_VECTOR 0 /* divide interrupt vector */
X! #define CLOCK_VECTOR 8 /* clock interrupt vector */
X! #define KEYBOARD_VECTOR 9 /* keyboard interrupt vector */
X! #define ETHER_VECTOR 11 /* ethernet interrupt vector */
X! #define SECONDARY_VECTOR 11 /* RS232 interrupt vector for port 2 */
X! #define RS232_VECTOR 12 /* RS232 interrupt vector for port 1 */
X! #define XT_WINI_VECTOR 13 /* xt winchester interrupt vector */
X! #define FLOPPY_VECTOR 14 /* floppy disk interrupt vector */
X! #define PRINTER_VECTOR 15 /* line printer interrupt vector */
X! #define SYS_VECTOR 32 /* system calls are made with int SYSVEC */
X! #define AT_WINI_VECTOR 118 /* at winchester interrupt vector */
X! #define PS_KEYB_VECTOR 0x71 /* keyboard interrupt vector for PS/2 */
X
X! /* The 8259A interrupt controller has to be re-enabled after each interrupt. */
X #define INT_CTL 0x20 /* I/O port for interrupt controller */
X #define INT_CTLMASK 0x21 /* setting bits in this port disables ints */
X! #define INT2_CTL 0xA0 /* I/O port for second interrupt controller */
X! #define INT2_MASK 0xA1 /* setting bits in this port disables ints */
X! #define ENABLE 0x20 /* code used to re-enable after an interrupt */
X! #define PCR 0x65 /* Planar Control Register */
X! #endif
X
X! #define K_STACK_BYTES 512 /* how many bytes for the kernel stack */
X
X! #define RET_REG 0 /* system call return codes go in this reg */
X! #define IDLE -999 /* 'cur_proc' = IDLE means nobody is running */
X!
X /* The following items pertain to the 3 scheduling queues. */
X--- 3,92 ----
X #ifdef i8088
X
X! #define INIT_PSW 0x0200 /* initial psw */
X! #define INIT_TASK_PSW 0x1200 /* initial psw for tasks (with IOPL 1) */
X!
X! /* Initial sp for mm, fs and init.
X! * 2 bytes for short jump
X! * 2 bytes unused
X! * 3 words for init_org[] used by fs only
X! * 3 words for real mode debugger trap
X! * 3 words for save and restart temporaries
X! * 3 words for interrupt
X! * Leave no margin, to flush bugs early.
X */
X! #define INIT_SP (2 + 2 + 3 * 2 + 3 * 2 + 3 * 2 + 3 * 2)
X
X! #define HCLICK_SHIFT 4 /* log2 of HCLICK_SIZE */
X! #define HCLICK_SIZE 16 /* hardware segment conversion magic */
X
X! #define ALIGNMENT 4 /* align large items to a multiple of this */
X! #define VECTOR_BYTES 284 /* bytes of interrupt vectors to save */
X!
X! /* Interrupt vectors defined/reserved by processor */
X! #define DIVIDE_VECTOR 0 /* divide error */
X! #define DEBUG_VECTOR 1 /* single step (trace) */
X! #define NMI_VECTOR 2 /* non-maskable interrupt */
X! #define BREAKPOINT_VECTOR 3 /* software breakpoint */
X! #define OVERFLOW_VECTOR 4 /* from INTO */
X
X! /* Fixed system call vector (the only software interrupt). */
X! #define SYS_VECTOR 32 /* system calls are made with int SYSVEC */
X!
X! /* Suitable irq bases for hardware interrupts. Reprogram the 8259(s) from
X! * the PC BIOS defaults since the BIOS doesn't respect all the processor's
X! * reserved vectors (0 to 31).
X! */
X! #define IRQ0_VECTOR 0x28 /* more or less arbitrary, but > 32 */
X! #define IRQ8_VECTOR 0x30 /* together for simplicity */
X!
X! /* Hardware interrupt numbers. */
X! #define CLOCK_IRQ 0
X! #define KEYBOARD_IRQ 1
X! #define CASCADE_IRQ 2 /* cascade enable for 2nd AT controller */
X! #define ETHER_IRQ 3 /* ethernet interrupt vector */
X! #define SECONDARY_IRQ 3 /* RS232 interrupt vector for port 2 */
X! #define RS232_IRQ 4 /* RS232 interrupt vector for port 1 */
X! #define XT_WINI_IRQ 5 /* xt winchester */
X! #define FLOPPY_IRQ 6 /* floppy disk */
X! #define PRINTER_IRQ 7
X! #define AT_WINI_IRQ 14 /* at winchester */
X! #define PS_KEYB_IRQ 9 /* keyboard interrupt vector for PS/2 */
X!
X! /* Hardware vector numbers. */
X! #define CLOCK_VECTOR ((CLOCK_IRQ & 0x07) + IRQ0_VECTOR)
X! #define KEYBOARD_VECTOR ((KEYBOARD_IRQ & 0x07) + IRQ0_VECTOR)
X! #define ETHER_VECTOR ((ETHER_IRQ & 0x07) + IRQ0_VECTOR)
X! #define SECONDARY_VECTOR ((SECONDARY_IRQ & 0x07) + IRQ0_VECTOR)
X! #define RS232_VECTOR ((RS232_IRQ & 0x07) + IRQ0_VECTOR)
X! #define XT_WINI_VECTOR ((XT_WINI_IRQ & 0x07) + IRQ0_VECTOR)
X! #define FLOPPY_VECTOR ((FLOPPY_IRQ & 0x07) + IRQ0_VECTOR)
X! #define PRINTER_VECTOR ((PRINTER_IRQ & 0x07) + IRQ0_VECTOR)
X! #define AT_WINI_VECTOR ((AT_WINI_IRQ & 0x07) + IRQ8_VECTOR)
X! #define PS_KEYB_VECTOR ((PS_KEYB_IRQ & 0x07) + IRQ8_VECTOR)
X!
X! /* 8259A interrupt controller ports. */
X #define INT_CTL 0x20 /* I/O port for interrupt controller */
X #define INT_CTLMASK 0x21 /* setting bits in this port disables ints */
X! #define INT2_CTL 0xA0 /* I/O port for second interrupt controller */
X! #define INT2_MASK 0xA1 /* setting bits in this port disables ints */
X
X! /* Magic numbers for interrupt controller. */
X! #define ENABLE 0x20 /* code used to re-enable after an interrupt */
X!
X! /* Sizes of memory tables. */
X! #define NR_MEMS 4 /* number of chunks of memory */
X
X! /* Magic memory locations and sizes. */
X! #define COLOR_BASE 0xB8000L /* base of color video memory */
X! #define COLOR_SIZE 0x8000L /* maximum usable color video memory */
X! #define MONO_BASE 0xB0000L /* base of mono video memory */
X! #define MONO_SIZE 0x8000L /* maximum usable mono video memory */
X!
X! /* Misplaced stuff */
X! #define PCR 0x65 /* Planar Control Register */
X!
X! #endif /* i8088 */
X!
X! #define K_STACK_BYTES 512 /* how many bytes for the kernel stack */
X!
X /* The following items pertain to the 3 scheduling queues. */
X***************
X*** 55 ****
X--- 98,104 ----
X #define printf printk /* the kernel really uses printk, not printf */
X+
X+ #if CLICK_SIZE >= HCLICK_SIZE
X+ #define click_to_hclick(n) ((n) << (CLICK_SHIFT - HCLICK_SHIFT))
X+ #else
X+ #define click_to_hclick(n) ((n) >> (HCLICK_SHIFT - CLICK_SHIFT))
X+ #endif
END_OF_FILE
if test 7031 -ne `wc -c <'kerneldif/const.h.cdif'`; then
echo shar: \"'kerneldif/const.h.cdif'\" unpacked with wrong size!
fi
# end of 'kerneldif/const.h.cdif'
fi
if test -f 'kerneldif/tty.c.cdif' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'kerneldif/tty.c.cdif'\"
else
echo shar: Extracting \"'kerneldif/tty.c.cdif'\" \(808 characters\)
sed "s/^X//" >'kerneldif/tty.c.cdif' <<'END_OF_FILE'
X*** kernel-1.3/tty.c Thu Oct 20 13:15:35 1988
X--- kernel/tty.c Sat Mar 11 20:11:53 1989
X***************
X*** 160,162 ****
X old_state = lock();
X! ptr = m_ptr->ADDRESS; /* pointer to accumulated char array */
X copy_ptr = tty_copy_buf; /* ptr to shadow array where chars copied */
X--- 160,162 ----
X old_state = lock();
X! ptr = tty_driver_buf; /* pointer to accumulated char array */
X copy_ptr = tty_copy_buf; /* ptr to shadow array where chars copied */
X***************
X*** 168,170 ****
X *copy_ptr++ = *ptr++; /* copy the array to safety */
X! ptr = m_ptr->ADDRESS;
X tty_buf_count(ptr) = 0; /* accumulation count set to 0 */
X--- 168,170 ----
X *copy_ptr++ = *ptr++; /* copy the array to safety */
X! ptr = tty_driver_buf;
X tty_buf_count(ptr) = 0; /* accumulation count set to 0 */
END_OF_FILE
if test 808 -ne `wc -c <'kerneldif/tty.c.cdif'`; then
echo shar: \"'kerneldif/tty.c.cdif'\" unpacked with wrong size!
fi
# end of 'kerneldif/tty.c.cdif'
fi
echo shar: End of archive 3 \(of 10\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 10 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Division of Information Technology (Melbourne), Phone +61 3 347 8644
C.S.I.R.O. Fax +61 3 347 8987
55 Barry St. Telex AA 152914
Carlton, Vic, 3053, Australia E-mail: worsley@ditmela.oz.au