Browse Source

Copy pxelinux's shutdown sequence: use UNLOAD_STACK without STOP_BASE,

and call UNDI_SHUTDOWN first to make sure the NIC is in a safe state.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
fbdebac5f4
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      src/arch/i386/prefix/pxeprefix.S

+ 9
- 3
src/arch/i386/prefix/pxeprefix.S View File

1
+#define PXENV_UNDI_SHUTDOWN	0x05
1
 #define	PXENV_STOP_UNDI		0x15
2
 #define	PXENV_STOP_UNDI		0x15
2
 #define PXENV_UNLOAD_STACK	0x70
3
 #define PXENV_UNLOAD_STACK	0x70
3
-#define PXENV_STOP_BASE		0x76
4
 
4
 
5
 #define PXE_STACK_MAGIC		0x57ac	/* 'STac' */
5
 #define PXE_STACK_MAGIC		0x57ac	/* 'STac' */
6
 
6
 
138
 	shrw	$6, %cx
138
 	shrw	$6, %cx
139
 	movw	%cx, undi_fbms_end
139
 	movw	%cx, undi_fbms_end
140
 
140
 
141
+/*****************************************************************************
142
+ * Leave NIC in a safe state
143
+ *****************************************************************************
144
+ */
145
+shutdown_nic:
146
+	movw	$PXENV_UNDI_SHUTDOWN, %bx
147
+	call	pxe_call
148
+
141
 /*****************************************************************************
149
 /*****************************************************************************
142
  * Unload PXE base code
150
  * Unload PXE base code
143
  *****************************************************************************
151
  *****************************************************************************
144
  */	
152
  */	
145
 unload_base_code:
153
 unload_base_code:
146
-	movw	$PXENV_STOP_BASE, %bx
147
-	call	pxe_call
148
 	movw	$PXENV_UNLOAD_STACK, %bx
154
 	movw	$PXENV_UNLOAD_STACK, %bx
149
 	call	pxe_call
155
 	call	pxe_call
150
 	jnz	do_not_free_base_code
156
 	jnz	do_not_free_base_code

Loading…
Cancel
Save