Neatened up the AUTO_EOI conditionals. FAST_VECTOR() now saves & restores

the ES register, just to be on the safe side (since ES is used in some
locore routines).
This commit is contained in:
andrew 1993-06-27 05:15:06 +00:00
parent d9022f90d2
commit 4b741818d8

View File

@ -9,24 +9,25 @@
#define IRQ_BIT(irq_num) (1 << ((irq_num) % 8)) #define IRQ_BIT(irq_num) (1 << ((irq_num) % 8))
#define IRQ_BYTE(irq_num) ((irq_num) / 8) #define IRQ_BYTE(irq_num) ((irq_num) / 8)
#ifdef AUTO_EOI_1
#define ENABLE_ICU1 \ #define ENABLE_ICU1 \
movb $ICU_EOI,%al ; /* as soon as possible send EOI ... */ \ movb $ICU_EOI,%al ; /* as soon as possible send EOI ... */ \
FASTER_NOP ; /* ... ASAP ... */ \ FASTER_NOP ; /* ... ASAP ... */ \
outb %al,$IO_ICU1 /* ... to clear in service bit */ outb %al,$IO_ICU1 /* ... to clear in service bit */
#ifdef AUTO_EOI_1 #else /* AUTO_EOI_1 */
#undef ENABLE_ICU1 /* we now use auto-EOI to reduce i/o */ #define ENABLE_ICU1 /* we now use auto-EOI to reduce i/o */
#define ENABLE_ICU1
#endif #endif
#ifdef AUTO_EOI_2
#define ENABLE_ICU1_AND_2 \ #define ENABLE_ICU1_AND_2 \
movb $ICU_EOI,%al ; /* as above */ \ movb $ICU_EOI,%al ; /* as above */ \
FASTER_NOP ; \ FASTER_NOP ; \
outb %al,$IO_ICU2 ; /* but do second icu first */ \ outb %al,$IO_ICU2 ; /* but do second icu first */ \
FASTER_NOP ; \ FASTER_NOP ; \
outb %al,$IO_ICU1 /* then first icu */ outb %al,$IO_ICU1 /* then first icu */
#ifdef AUTO_EOI_2 #else /* AUTO_EOI_2 */
#undef ENABLE_ICU1_AND_2 /* data sheet says no auto-EOI on slave ... */ #define ENABLE_ICU1_AND_2 /* data sheet says no auto-EOI on slave ... /
#define ENABLE_ICU1_AND_2 /* ... but it works */ /* ... but it works */
#endif #endif
/* /*
@ -79,10 +80,10 @@
pushl %ecx ; \ pushl %ecx ; \
pushl %edx ; \ pushl %edx ; \
pushl %ds ; \ pushl %ds ; \
/* pushl %es ; know compiler doesn't do string insns */ \ pushl %es ; \
movl $KDSEL,%eax ; \ movl $KDSEL,%eax ; \
movl %ax,%ds ; \ movl %ax,%ds ; \
/* movl %ax,%es ; */ \ movl %ax,%es ; \
SHOW_CLI ; /* although it interferes with "ASAP" */ \ SHOW_CLI ; /* although it interferes with "ASAP" */ \
pushl $unit ; \ pushl $unit ; \
call handler ; /* do the work ASAP */ \ call handler ; /* do the work ASAP */ \
@ -91,7 +92,7 @@
incl _cnt+V_INTR ; /* book-keeping can wait */ \ incl _cnt+V_INTR ; /* book-keeping can wait */ \
COUNT_EVENT(_intrcnt_actv, id_num) ; \ COUNT_EVENT(_intrcnt_actv, id_num) ; \
SHOW_STI ; \ SHOW_STI ; \
/* popl %es ; */ \ popl %es ; \
popl %ds ; \ popl %ds ; \
popl %edx; \ popl %edx; \
popl %ecx; \ popl %ecx; \