mirror of
https://github.com/ipxe/ipxe
synced 2025-12-13 23:41:45 +03: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:
@@ -1,6 +1,6 @@
|
|||||||
|
#define PXENV_UNDI_SHUTDOWN 0x05
|
||||||
#define PXENV_STOP_UNDI 0x15
|
#define PXENV_STOP_UNDI 0x15
|
||||||
#define PXENV_UNLOAD_STACK 0x70
|
#define PXENV_UNLOAD_STACK 0x70
|
||||||
#define PXENV_STOP_BASE 0x76
|
|
||||||
|
|
||||||
#define PXE_STACK_MAGIC 0x57ac /* 'STac' */
|
#define PXE_STACK_MAGIC 0x57ac /* 'STac' */
|
||||||
|
|
||||||
@@ -138,13 +138,19 @@ find_undi_basemem_usage:
|
|||||||
shrw $6, %cx
|
shrw $6, %cx
|
||||||
movw %cx, undi_fbms_end
|
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 PXE base code
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*/
|
*/
|
||||||
unload_base_code:
|
unload_base_code:
|
||||||
movw $PXENV_STOP_BASE, %bx
|
|
||||||
call pxe_call
|
|
||||||
movw $PXENV_UNLOAD_STACK, %bx
|
movw $PXENV_UNLOAD_STACK, %bx
|
||||||
call pxe_call
|
call pxe_call
|
||||||
jnz do_not_free_base_code
|
jnz do_not_free_base_code
|
||||||
|
|||||||
Reference in New Issue
Block a user