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 17 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,6 +1,6 @@
1
+#define PXENV_UNDI_SHUTDOWN	0x05
1 2
 #define	PXENV_STOP_UNDI		0x15
2 3
 #define PXENV_UNLOAD_STACK	0x70
3
-#define PXENV_STOP_BASE		0x76
4 4
 
5 5
 #define PXE_STACK_MAGIC		0x57ac	/* 'STac' */
6 6
 
@@ -138,13 +138,19 @@ find_undi_basemem_usage:
138 138
 	shrw	$6, %cx
139 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 150
  * Unload PXE base code
143 151
  *****************************************************************************
144 152
  */	
145 153
 unload_base_code:
146
-	movw	$PXENV_STOP_BASE, %bx
147
-	call	pxe_call
148 154
 	movw	$PXENV_UNLOAD_STACK, %bx
149 155
 	call	pxe_call
150 156
 	jnz	do_not_free_base_code

Loading…
Cancel
Save