X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=efi-net-fix.patch;h=41872c001d2da17788408ef25884f1d264c5ee6b;hb=ef3736ee003f5c98c32dc03e73387c14adbb2fa6;hp=4cc5e13f6d630c216f3d0a4af89493174b33f4b9;hpb=9904b7cf2f29d452e4423d0224ee8a7a95f865c8;p=packages%2Fgrub2.git diff --git a/efi-net-fix.patch b/efi-net-fix.patch index 4cc5e13..41872c0 100644 --- a/efi-net-fix.patch +++ b/efi-net-fix.patch @@ -1,7 +1,30 @@ -diff -urNp grub-2.02-rc1.orig/grub-core/net/drivers/efi/efinet.c grub-2.02-rc1/grub-core/net/drivers/efi/efinet.c ---- grub-2.02-rc1.orig/grub-core/net/drivers/efi/efinet.c 2017-02-08 15:08:35.748315754 +0000 -+++ grub-2.02-rc1/grub-core/net/drivers/efi/efinet.c 2017-02-08 15:08:53.837315551 +0000 -@@ -330,6 +330,7 @@ grub_efi_net_config_real (grub_efi_handl +From 886d93184b894a29b0bef1f2467230a20c7a33ce Mon Sep 17 00:00:00 2001 +From: Mark Salter +Date: Tue, 8 Apr 2014 10:58:11 -0400 +Subject: [PATCH] reopen SNP protocol for exclusive use by grub + +While working with pxeboot of grub on an ARM platform, I noticed +very poor network performance while grub was loading a kernel +and initramfs. The performance during the loading of grub itself +seemed reasonable. Digging into the issue, I found that the UEFI +firmware was periodically polling for network packets while grub +was downloading files. This was causing timeouts and retries in +the grub network stack. + +The solution I found was to reopen the SNP protocol for exclusive +use. This forces UEFI to shutdown its use of SNP so that grub is +not competing for incoming packets. + +Signed-off-by: Mark Salter +--- + grub-core/net/drivers/efi/efinet.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c +index 2b344d6..a6e4c79 100644 +--- a/grub-core/net/drivers/efi/efinet.c ++++ b/grub-core/net/drivers/efi/efinet.c +@@ -223,6 +223,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, { struct grub_net_card *card; grub_efi_device_path_t *dp; @@ -9,7 +32,7 @@ diff -urNp grub-2.02-rc1.orig/grub-core/net/drivers/efi/efinet.c grub-2.02-rc1/g dp = grub_efi_get_device_path (hnd); if (! dp) -@@ -383,6 +384,21 @@ grub_efi_net_config_real (grub_efi_handl +@@ -250,6 +251,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, &pxe_mode->dhcp_ack, sizeof (pxe_mode->dhcp_ack), 1, device, path); @@ -31,3 +54,6 @@ diff -urNp grub-2.02-rc1.orig/grub-core/net/drivers/efi/efinet.c grub-2.02-rc1/g return; } } +-- +1.8.5.3 +