Browse Source

Set up %ds *before* testing a value in our data segment (d'oh!).

Always send EOI; do not chain to BIOS's default interrupt handler.
They are just too unpredictable; at least VMware's seems to kill the
machine if you go anywhere near it.

Disable interrupts after return from PXENV_UNDI_ISR, just in case some
dumb PXE stack enables them.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
efd322091d
1 changed files with 11 additions and 6 deletions
  1. 11
    6
      src/arch/i386/drivers/net/undiisr.S

+ 11
- 6
src/arch/i386/drivers/net/undiisr.S View File

23
 	pushw	%es
23
 	pushw	%es
24
 	pusha
24
 	pusha
25
 
25
 
26
+	/* Set up our segment registers */
27
+	movw	%cs:rm_ds, %ax
28
+	movw	%ax, %ds
29
+
26
 	/* Check that we have an UNDI entry point */
30
 	/* Check that we have an UNDI entry point */
27
 	cmpw	$0, undinet_entry_point
31
 	cmpw	$0, undinet_entry_point
28
 	je	chain
32
 	je	chain
29
 	
33
 	
30
 	/* Issue UNDI API call */
34
 	/* Issue UNDI API call */
31
-	movw	%cs:rm_ds, %ax
32
-	movw	%ax, %ds
33
-	movw	%ax, %es
35
+	pushw	%ds
36
+	popw	%es
34
 	movw	$undinet_params, %di
37
 	movw	$undinet_params, %di
35
 	movw	$PXENV_UNDI_ISR, %bx
38
 	movw	$PXENV_UNDI_ISR, %bx
36
 	movw	$PXENV_UNDI_ISR_IN_START, funcflag
39
 	movw	$PXENV_UNDI_ISR_IN_START, funcflag
38
 	pushw	%di
41
 	pushw	%di
39
 	pushw	%bx
42
 	pushw	%bx
40
 	lcall	*undinet_entry_point
43
 	lcall	*undinet_entry_point
44
+	cli	/* Just in case */
41
 	addw	$6, %sp
45
 	addw	$6, %sp
42
 	cmpw	$PXENV_UNDI_ISR_OUT_OURS, funcflag
46
 	cmpw	$PXENV_UNDI_ISR_OUT_OURS, funcflag
43
-	jne	chain
47
+	jne	eoi
44
 	
48
 	
45
-ack:	/* Record interrupt occurence */
49
+trig:	/* Record interrupt occurence */
46
 	incb	undiisr_trigger_count
50
 	incb	undiisr_trigger_count
47
-	/* Send EOI */
51
+
52
+eoi:	/* Send EOI */
48
 	movb	$ICR_EOI_NON_SPECIFIC, %al
53
 	movb	$ICR_EOI_NON_SPECIFIC, %al
49
 	cmpb	$IRQ_PIC_CUTOFF, undiisr_irq
54
 	cmpb	$IRQ_PIC_CUTOFF, undiisr_irq
50
 	jb	1f
55
 	jb	1f

Loading…
Cancel
Save