As written, if the if the UNDI ISR call clobbers the upper halves of
any of the GPRs (which by convention it is permitted to do, and by
paranoia should be expected to do) then nothing in the interrupt
handler will recover the state.
Additionally, save/restore %fs and %gs out of sheer paranoia - it's a
cheap enough operation, and may prevent problems due to poorly written
UNDI stacks.
/* Preserve registers */
pushw %ds
pushw %es
/* Preserve registers */
pushw %ds
pushw %es
+ pushw %fs
+ pushw %gs
+ pushal
/* Set up our segment registers */
movw %cs:rm_ds, %ax
/* Set up our segment registers */
movw %cs:rm_ds, %ax
je chain
/* Issue UNDI API call */
je chain
/* Issue UNDI API call */
movw $undinet_params, %di
movw $PXENV_UNDI_ISR, %bx
movw $PXENV_UNDI_ISR_IN_START, funcflag
movw $undinet_params, %di
movw $PXENV_UNDI_ISR, %bx
movw $PXENV_UNDI_ISR_IN_START, funcflag
lcall *undiisr_next_handler
exit: /* Restore registers and return */
lcall *undiisr_next_handler
exit: /* Restore registers and return */
+ popal
+ popw %gs
+ popw %fs