diff options
author | Michael Brown | 2007-01-08 06:06:26 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-08 06:06:26 +0100 |
commit | fbdebac5f4ad3c921fbee7091cec6f44db045c78 (patch) | |
tree | 2b506f0f1a4e78d72c1004141dd99a394620c747 | |
parent | New strategy: always stop both base code and UNDI. Always free base code (diff) | |
download | ipxe-fbdebac5f4ad3c921fbee7091cec6f44db045c78.tar.gz ipxe-fbdebac5f4ad3c921fbee7091cec6f44db045c78.tar.xz ipxe-fbdebac5f4ad3c921fbee7091cec6f44db045c78.zip |
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.
-rw-r--r-- | src/arch/i386/prefix/pxeprefix.S | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/arch/i386/prefix/pxeprefix.S b/src/arch/i386/prefix/pxeprefix.S index 28e2716e..a34bf5f8 100644 --- a/src/arch/i386/prefix/pxeprefix.S +++ b/src/arch/i386/prefix/pxeprefix.S @@ -1,6 +1,6 @@ +#define PXENV_UNDI_SHUTDOWN 0x05 #define PXENV_STOP_UNDI 0x15 #define PXENV_UNLOAD_STACK 0x70 -#define PXENV_STOP_BASE 0x76 #define PXE_STACK_MAGIC 0x57ac /* 'STac' */ @@ -139,12 +139,18 @@ find_undi_basemem_usage: movw %cx, undi_fbms_end /***************************************************************************** + * Leave NIC in a safe state + ***************************************************************************** + */ +shutdown_nic: + movw $PXENV_UNDI_SHUTDOWN, %bx + call pxe_call + +/***************************************************************************** * Unload PXE base code ***************************************************************************** */ unload_base_code: - movw $PXENV_STOP_BASE, %bx - call pxe_call movw $PXENV_UNLOAD_STACK, %bx call pxe_call jnz do_not_free_base_code |