diff options
author | Ashutosh Singh <ashutosh.singh@arm.com> | 2015-11-06 17:01:06 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2015-11-12 17:07:37 +0000 |
commit | 9ed6f7e04d21a8ee0c1d86c506cb73dc09eb528d (patch) | |
tree | 72677e38f6d00bf60cae537c12fe675a0eb37c62 | |
parent | 05556f031862a0516b3aa9c7285f5f7993861138 (diff) |
ArmPkg/BdsLib: Increase fallback tftp buffer sizearmlt-20151123-001armlt-20151112-001armlt-15.1115.11
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 <ashutosh.singh@arm.com>
-rw-r--r-- | ArmPkg/Library/BdsLib/BdsFilePath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c index ff421754fe..04102366d5 100644 --- a/ArmPkg/Library/BdsLib/BdsFilePath.c +++ b/ArmPkg/Library/BdsLib/BdsFilePath.c @@ -1198,7 +1198,7 @@ BdsTftpLoadImage ( 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 @@ BdsTftpLoadImage ( 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.
//
|