mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 15:23:42 +03:00
[efi] Disable SNP devices when running iPXE as the application
Some UEFI builds will set up a timer to continuously poll any SNP devices. This can drain packets from the network device's receive queue before iPXE gets a chance to process them. Use netdev_rx_[un]freeze() to explicitly indicate when we expect our network devices to be driven via the external SNP API (as we do with the UNDI API on the standard BIOS build), and disable the SNP API except when receive queue processing is frozen. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -22,6 +22,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#include <stdlib.h>
|
||||
#include <ipxe/init.h>
|
||||
#include <ipxe/efi/efi.h>
|
||||
#include <ipxe/efi/efi_snp.h>
|
||||
|
||||
/**
|
||||
* EFI entry point
|
||||
@@ -42,7 +43,8 @@ EFI_STATUS EFIAPI _efidrv_start ( EFI_HANDLE image_handle,
|
||||
initialise();
|
||||
startup();
|
||||
|
||||
/* Release network devices for use via SNP */
|
||||
efi_snp_release();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
REQUIRE_OBJECT ( efi_snp );
|
||||
|
||||
Reference in New Issue
Block a user