Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
efd322091d
1 muutettua tiedostoa jossa 11 lisäystä ja 6 poistoa
  1. 11
    6
      src/arch/i386/drivers/net/undiisr.S

+ 11
- 6
src/arch/i386/drivers/net/undiisr.S Näytä tiedosto

@@ -23,14 +23,17 @@ undiisr:
23 23
 	pushw	%es
24 24
 	pusha
25 25
 
26
+	/* Set up our segment registers */
27
+	movw	%cs:rm_ds, %ax
28
+	movw	%ax, %ds
29
+
26 30
 	/* Check that we have an UNDI entry point */
27 31
 	cmpw	$0, undinet_entry_point
28 32
 	je	chain
29 33
 	
30 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 37
 	movw	$undinet_params, %di
35 38
 	movw	$PXENV_UNDI_ISR, %bx
36 39
 	movw	$PXENV_UNDI_ISR_IN_START, funcflag
@@ -38,13 +41,15 @@ undiisr:
38 41
 	pushw	%di
39 42
 	pushw	%bx
40 43
 	lcall	*undinet_entry_point
44
+	cli	/* Just in case */
41 45
 	addw	$6, %sp
42 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 50
 	incb	undiisr_trigger_count
47
-	/* Send EOI */
51
+
52
+eoi:	/* Send EOI */
48 53
 	movb	$ICR_EOI_NON_SPECIFIC, %al
49 54
 	cmpb	$IRQ_PIC_CUTOFF, undiisr_irq
50 55
 	jb	1f

Loading…
Peruuta
Tallenna