*BSD News Article 16956


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!decwrl!world!hd
From: hd@world.std.com (HD Associates)
Subject: baffled by inbs in INTR(..)
Message-ID: <C8DC66.9My@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 9 Jun 1993 19:15:41 GMT
Lines: 26

I was looking at the preamble for the ISRs in i386/isa/icu.h
the other day and was baffled by the inbs:

#define INTR(unit,mask,offst) \
    pushl   $0 ; \
    pushl   $ T_ASTFLT ; \
    pushal ; \
    nop ; \
    inb $0x84, %al ;    /* ... ASAP */ \
    movb    $0x20, %al ;    /* next, as soon as possible send EOI ... */ \
    outb    %al, $ IO_ICU1 ; /* ... so in service bit may be cleared ...*/ \
    inb $0x84, %al ;    /* ... ASAP */ \
    movb    $0x20, %al ;    /* likewise, the other one as well */ \
    outb    %al,$ IO_ICU2 ; \
    inb $0x84,%al ; \

(and so on)

It appears that each access to the PIC is bracketed by an inb to the
mystery (to me) port 0x84.

What is this, and what is the logic?  Is this a well known hack?  Is
this the I/O world's version of a NOP?

Peter Dufault
HD Associates