2 ; Process a PXE interrupt
6 PXEIRQ_MAX equ 100 ; Max spurious interrupts in a timer tick
22 mov di,pxenv_undi_isr_buf
24 mov cx,pxenv_undi_isr_buf.size/2
29 mov byte [pxenv_undi_isr_buf.funcflag],PXENV_UNDI_ISR_IN_START
35 cmp word [pxenv_undi_isr_buf.funcflag],PXENV_UNDI_ISR_OUT_OURS
38 ; Its ours - set the flag for the return to PM.
39 ; We need to EOI this ourselves, so that the
40 ; leftover BC doesn't get control.
41 mov byte [pxe_irq_pending],1
42 inc dword [pxe_irq_count]
44 cmp byte [pxe_irq_vector], 8
45 mov al,0x20 ; Non-specific EOI
48 out 0xA0, al ; Secondary PIC
50 out 0x20,al ; Primary PIC
53 mov word [pxeirq_deadman],PXEIRQ_MAX
66 dec word [pxeirq_deadman]
81 mov word [pxeirq_deadman],PXEIRQ_MAX
84 ; Too many spurious interrupts, shut off the interrupts
85 ; and go to polling mode
87 mov al,[pxe_irq_vector]
99 or byte [pxe_need_poll],1
103 ; Emulate a PXE interrupt from the polling thread
115 mov bx,PXENV_UNDI_ISR
116 mov di,pxenv_undi_isr_buf
118 mov cx,pxenv_undi_isr_buf.size/2
123 mov byte [pxenv_undi_isr_buf.funcflag],PXENV_UNDI_ISR_IN_START
128 cmp word [pxenv_undi_isr_buf.funcflag],PXENV_UNDI_ISR_OUT_OURS
131 ; Its ours - set the flag for the return to PM.
132 ; We need to EOI this ourselves, so that the
133 ; leftover BC doesn't get control.
134 mov byte [pxe_irq_pending],1
150 .bufferlength: resw 1
156 .size equ $-pxenv_undi_isr_buf
160 pxeirq_deadman resw 1
163 pxe_irq_count resd 1 ; PXE IRQ counter
164 global pxe_irq_vector
165 pxe_irq_vector resb 1 ; PXE IRQ vector
166 global pxe_irq_pending
167 pxe_irq_pending resb 1 ; IRQ pending flag
169 pxe_need_poll resb 1 ; Bit 0 = need polling
170 ; Bit 1 = polling active