/* Preserve registers */
pushw %ds
pushw %es
- pusha
-
- /* Issue UNDI API call */
+ pushw %fs
+ pushw %gs
+ pushal
+
+ /* Set up our segment registers */
movw %cs:rm_ds, %ax
movw %ax, %ds
+
+ /* Check that we have an UNDI entry point */
+ cmpw $0, undinet_entry_point
+ je chain
+
+ /* Issue UNDI API call */
movw %ax, %es
movw $undinet_params, %di
movw $PXENV_UNDI_ISR, %bx
pushw %di
pushw %bx
lcall *undinet_entry_point
+ cli /* Just in case */
addw $6, %sp
cmpw $PXENV_UNDI_ISR_OUT_OURS, funcflag
- jne chain
+ jne eoi
-ack: /* Record interrupt occurence */
+trig: /* Record interrupt occurence */
incb undiisr_trigger_count
- /* Send EOI */
+
+eoi: /* Send EOI */
movb $ICR_EOI_NON_SPECIFIC, %al
cmpb $IRQ_PIC_CUTOFF, undiisr_irq
jb 1f
lcall *undiisr_next_handler
exit: /* Restore registers and return */
- popa
+ popal
+ popw %gs
+ popw %fs
popw %es
popw %ds
iret