2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

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.
This commit is contained in:
Michael Brown 2007-01-08 05:06:26 +00:00
parent 8f8af10b22
commit fbdebac5f4

View File

@ -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' */
@ -138,13 +138,19 @@ find_undi_basemem_usage:
shrw $6, %cx
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