dmmartindale (04/08/83)
After spending some time with watmath and a logic analyzer on Wednesday, I believe I finally understand what causes the UBA to present a zero vector during an interrupt sequence. Briefly, it is caused by a feature of most of the DEC interrupt controllers. If one of these controllers sees a bus grant on the BG? line they are attached to (whether or not this particular device is requesting an interrupt) at the same time that NPR is asserted (low), it arbitrarily seizes the grant rather than passing it on to the device that was requesting it. Then when BBSY releases from the previous bus cycle, it simply releases SACK, releasing the bus. Since INTR is never asserted, the UBA never receives a vector to load into the BRRVR. At this point, the CPU is already in the UBA interrupt routine, and gets a zero back as the contents of the BRRVR. This behaviour (grant stealing) is a feature of the 8647 chip used in the KMC11 and DZ11 (always enabled), of the interrupt controller which is a part of the DUP11 (controlled by a jumper, but enabled by default), and of the M8211 interrupt controller card used in the older DEC hardware (controlled by a jumper, disabled in the DH11 at least). The reason for this extra logic is to allow the NPR request to be serviced with less delay. The frequency of zero vectors depends on how often a BG occurs at the same time as an NPR, which would be most frequent on a machine with much unibus DMA along with devices (such as DZ's) which interrupt frequently. Now, since this sort of behaviour is a designed-in feature of the hardware, why does 4.1BSD eventually decide to do a unibus reset when a maximum level of zero vectors is received, regardless of how long the machine is up? Is there any sort of problem that would manifest itself as a large number of zero vectors and which would be cured by a unibus reset? And if so, why isn't the criterion for doing the reset the occurrence of a large number of zero vectors per unit time, not just a large count since boot time? Dave Martindale