* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* @(#)icu.s 5.1 (Berkeley) %G%
* Vector interrupt control section
_cpl: .long 15 # current priority level (all off)
_imen: .long 0xffff # interrupt mask enable (all off)
.globl _iml0 # masks off all interrupts
movw $0xffff,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
# sti # enable interrupts
.globl _iml1 # mask off all but irq0
.globl _spltty # block clists
movw $0xfffe,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
# sti # enable interrupts
.globl _iml8 # mask off all but irq0-1
movw $0xfffc,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
# sti # enable interrupts
.globl _iml9 # mask off all but irq0-1,8
.globl _iml2 # alias for PC hardware level 2
movw $0xfef8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
# sti # enable interrupts
.globl _iml10 # mask off all but irq0-1,8-9
movw $0xfcf8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml11 # mask off all but irq0-1,8-10
movw $0xf8f8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml12 # mask off all but irq0-1,8-11
movw $0xf0f8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml13 # mask off all but irq0-1,8-12
movw $0xe0f8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml14 # mask off all but irq0-1,8-13
movw $0xc0f8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
# sti # enable interrupts
.globl _iml15 # mask off all but irq0-1,8-14
movw $0x80f8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml3 # mask off all but irq0-1,8-15
movw $0x00f8,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml4 # mask off all but irq0-1,8-15,3
movw $0x00f0,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml5 # mask off all but irq0-1,8-15,3-4
movw $0x00e0,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml6 # mask off all but irq0-1,8-15,3-5
movw $0x00c0,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
.globl _iml7,_splsoftclock # mask off all but irq0-1,8-15,3-7
movw $0x0080,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
# sti # enable interrupts
.globl _imlnone # masks off no interrupts
movw $0,%ax # set new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level
movw 4(%esp),%ax # new priority level
orw _imen,%ax # mask off those not enabled yet
outb %al,$0x21 /* update icu's */
movzwl _cpl,%eax # return old priority
movw %dx,_cpl # set new priority level