1. Introduce PcdTftpBlockSize to let platform DSC customize block size.

2. Roll back the default block size to handle all link layers.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10803 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hhuan13
2010-08-18 00:47:26 +00:00
parent 5b9fc2f089
commit cfbc1a7537
4 changed files with 23 additions and 1 deletions

View File

@@ -347,7 +347,19 @@ EfiPxeBcStart (
return Status;
}
Private->BlockSize = 0x8000;
//
// Configure block size for TFTP as a default value to handle all link layers.
//
Private->BlockSize = (UINTN) (MIN (Private->Ip4MaxPacketSize, PXEBC_DEFAULT_PACKET_SIZE) -
PXEBC_DEFAULT_UDP_OVERHEAD_SIZE - PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE);
//
// If PcdTftpBlockSize is set to non-zero, override the default value.
//
if (PcdGet64 (PcdTftpBlockSize) != 0) {
Private->BlockSize = (UINTN) PcdGet64 (PcdTftpBlockSize);
}
Private->AddressIsOk = FALSE;
ZeroMem (Mode, sizeof (EFI_PXE_BASE_CODE_MODE));