projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make kernel includes standard
[unix-history]
/
usr
/
src
/
sys
/
i386
/
isa
/
icu.h
diff --git
a/usr/src/sys/i386/isa/icu.h
b/usr/src/sys/i386/isa/icu.h
index
8f4864b
..
3a6451d
100644
(file)
--- a/
usr/src/sys/i386/isa/icu.h
+++ b/
usr/src/sys/i386/isa/icu.h
@@
-7,12
+7,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)icu.h 5.6 (Berkeley) %G%
- */
-
-/*
- * AT/386 Interrupt Control constants
- * W. Jolitz 8/89
+ * @(#)icu.h 5.9 (Berkeley) %G%
*/
#ifndef __ICU__
*/
#ifndef __ICU__
@@
-42,12
+37,16
@@
extern unsigned short netmask; /* group of interrupts masked with splimp() */
*/
/* Mask a group of interrupts atomically */
*/
/* Mask a group of interrupts atomically */
-#define INTR(unit,mask,offst) \
- pushl $
0
; \
+#define INTR
_HEAD
(unit,mask,offst) \
+ pushl $
offst
; \
pushl $ T_ASTFLT ; \
pushal ; \
pushl $ T_ASTFLT ; \
pushal ; \
- push %ds ; \
- push %es ; \
+ movb $0x20,%al ; \
+
+#define INTR_TAIL(unit,mask,offst) \
+ outb %al,$ IO_ICU1 ; \
+ pushl %ds ; \
+ pushl %es ; \
movw $0x10, %ax ; \
movw %ax, %ds ; \
movw %ax,%es ; \
movw $0x10, %ax ; \
movw %ax, %ds ; \
movw %ax,%es ; \
@@
-59,28
+58,30
@@
extern unsigned short netmask; /* group of interrupts masked with splimp() */
orw mask ,%ax ; \
movw %ax,_cpl ; \
orw _imen,%ax ; \
orw mask ,%ax ; \
movw %ax,_cpl ; \
orw _imen,%ax ; \
- NOP ; \
outb %al,$ IO_ICU1+1 ; \
outb %al,$ IO_ICU1+1 ; \
- NOP ; \
movb %ah,%al ; \
outb %al,$ IO_ICU2+1 ; \
movb %ah,%al ; \
outb %al,$ IO_ICU2+1 ; \
- NOP ; \
- inb $0x84,%al ; \
- sti
+ sti ;
+
+#define INTR1(unit,mask,offst) \
+ INTR_HEAD(unit,mask,offst) \
+ INTR_TAIL(unit,mask,offst)
+
+#define INTR2(unit,mask,offst) \
+ INTR_HEAD(unit,mask,offst) \
+ outb %al,$ IO_ICU2 ; \
+ INTR_TAIL(unit,mask,offst)
+
+
/* Interrupt vector exit macros */
/* First eight interrupts (ICU1) */
#define INTREXIT1 \
/* Interrupt vector exit macros */
/* First eight interrupts (ICU1) */
#define INTREXIT1 \
- movb $0x20,%al ; \
- outb %al,$ IO_ICU1 ; \
jmp doreti
/* Second eight interrupts (ICU2) */
#define INTREXIT2 \
jmp doreti
/* Second eight interrupts (ICU2) */
#define INTREXIT2 \
- movb $0x20,%al ; \
- outb %al,$ IO_ICU1 ; \
- outb %al,$ IO_ICU2 ; \
jmp doreti
#endif
jmp doreti
#endif