Revision: 18748
          http://sourceforge.net/p/edk2/code/18748
Author:   leiflindholm
Date:     2015-11-09 13:13:37 +0000 (Mon, 09 Nov 2015)
Log Message:
-----------
ArmPkg/BdsLib: Increase fallback tftp buffer size

When performing a tftp download from a server which does not support
rfc2349 transfer size option (such as netkit-tftpd), the existing code
falls back to allocating an 8MB buffer. Since this is insufficient for
an uncompressed AArch64 Linux kernel image, double the size to 16MB.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ashutosh Singh <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Library/BdsLib/BdsFilePath.c

Modified: trunk/edk2/ArmPkg/Library/BdsLib/BdsFilePath.c
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/BdsFilePath.c      2015-11-09 08:39:28 UTC 
(rev 18747)
+++ trunk/edk2/ArmPkg/Library/BdsLib/BdsFilePath.c      2015-11-09 13:13:37 UTC 
(rev 18748)
@@ -1198,7 +1198,7 @@
   if (Mtftp4GetFileSize (Mtftp4, AsciiFilePath, &FileSize) == EFI_SUCCESS) {
     TftpBufferSize = FileSize;
   } else {
-    TftpBufferSize = SIZE_8MB;
+    TftpBufferSize = SIZE_16MB;
   }
 
   TftpContext = AllocatePool (sizeof (BDS_TFTP_CONTEXT));
@@ -1209,7 +1209,7 @@
   TftpContext->FileSize = FileSize;
 
   for (; TftpBufferSize <= FixedPcdGet32 (PcdMaxTftpFileSize);
-         TftpBufferSize = (TftpBufferSize + SIZE_8MB) & (~(SIZE_8MB-1))) {
+         TftpBufferSize = (TftpBufferSize + SIZE_16MB) & (~(SIZE_16MB-1))) {
     //
     // Allocate a buffer to hold the whole file.
     //


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to