Date: Sat, 6 Apr 1996 07:39:27 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, rgrimes@GndRsh.aac.dev.com Cc: current@freebsd.org, jgreco@brasil.moneng.mei.com, nate@sri.MT.net, root@deadline.snafu.de Subject: Re: tty-level buffer overflows - what to do? Message-ID: <199604052139.HAA24517@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 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 <bsd.kmod.mk> --- mycall.c --- #include <sys/param.h> #include <sys/systm.h> #include <sys/exec.h> #include <sys/sysent.h> #include <sys/lkm.h> 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; } ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604052139.HAA24517>