From owner-freebsd-current Fri Apr 5 13:41:31 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA13988 for current-outgoing; Fri, 5 Apr 1996 13:41:31 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id NAA13955 for ; Fri, 5 Apr 1996 13:41:26 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id HAA24517; Sat, 6 Apr 1996 07:39:27 +1000 Date: Sat, 6 Apr 1996 07:39:27 +1000 From: Bruce Evans Message-Id: <199604052139.HAA24517@godzilla.zeta.org.au> To: bde@zeta.org.au, rgrimes@GndRsh.aac.dev.com Subject: Re: tty-level buffer overflows - what to do? Cc: current@freebsd.org, jgreco@brasil.moneng.mei.com, nate@sri.MT.net, root@deadline.snafu.de Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> No, the IRR isn't set. Only the ESL remembers the IRQ state, and >> it isn't active because there's no INTA. >Like I said bruce if there ain't no INTA this whole discussion is >pointless! FreeBSD has DIED if INTA does not occur at some time. INTA occurs when all the conditions for it are satisfied: 1) the edge sensitive latch isn't set. 2) there is at least one active unmasked IRQ. 3) cpu interrupts are enabled. >Simple fact of the mater is if someone asserts an IRx signal, then removes >that signal before an INTA cycle completes with 8259 will signal this as >an IRQ7 interrupt. Don't tell me again that INTA is not going to occur, >because if it is not going to occur FreeBSD has stopped running.... I'll tell you again. Try this lkm. The clock IRQ goes up and down several and isn't latched. There may be an INTA one instruction after interrupts are reenabled, but only if condition (2) is satisfied (it depends where the clock duty cycle is; IRQ0 is certainly unmasked). No IRQ7's are generated. This is easier to test in square wave mode. Then inb(0x20) & 1 is on precisely half the time. Bruce --- Makefile: --- BINDIR= /tmp SRCS= mycall.c KMOD= newsyscall_mod NOMAN= none CLEANFILES+= ${KMOD} .include --- mycall.c --- #include #include #include #include #include static int mycall(struct proc *p, void *uap, int *retval); static struct sysent newent = { 0, mycall, }; MOD_SYSCALL("newsyscall_mod", -1, &newent); extern int newsyscall_mod(struct lkm_table *lkmtp, int cmd, int ver); int newsyscall_mod(struct lkm_table *lkmtp, int cmd, int ver) { DISPATCH(lkmtp, cmd, ver, lkm_nullcmd, lkm_nullcmd, lkm_nullcmd) } static int mycall(struct proc *p, void *uap, int *retval) { int i; disable_intr(); /* Wait about 50-100 msec (lose 5-10 clock ticks). */ for (i = 0; i < 100 * 1000; i++) inb(0x20); enable_intr(); return 0; } ---