NetworkPkg/UefiPxeBcDxe: Use the specified MTFTP windowsize.

*v2: Since the new PCD (PcdPxeTftpWindowSize) was renamed/defined in
NetworkPkg instead of MdeModulePkg, this new version is to update the
consuming PXE driver.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=886

This patch is to use the specified MTFTP windowsize to benefit the PXE
download performance.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Shao Ming <ming.shao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
Jiaxin Wu 2018-09-14 15:49:23 +08:00
parent 2fff697f1e
commit 160b082e64
4 changed files with 121 additions and 35 deletions

View File

@ -849,7 +849,7 @@ EfiPxeBcMtftp (
VOID *Config; VOID *Config;
EFI_STATUS Status; EFI_STATUS Status;
EFI_PXE_BASE_CODE_IP_FILTER IpFilter; EFI_PXE_BASE_CODE_IP_FILTER IpFilter;
UINTN WindowSize;
if ((This == NULL) || if ((This == NULL) ||
(Filename == NULL) || (Filename == NULL) ||
@ -873,6 +873,11 @@ EfiPxeBcMtftp (
Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (This); Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (This);
Mode = Private->PxeBc.Mode; Mode = Private->PxeBc.Mode;
//
// Get PcdPxeTftpWindowSize.
//
WindowSize = (UINTN) PcdGet64 (PcdPxeTftpWindowSize);
if (Mode->UsingIpv6) { if (Mode->UsingIpv6) {
if (!NetIp6IsValidUnicast (&ServerIp->v6)) { if (!NetIp6IsValidUnicast (&ServerIp->v6)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -930,6 +935,7 @@ EfiPxeBcMtftp (
Config, Config,
Filename, Filename,
BlockSize, BlockSize,
(WindowSize > 1) ? &WindowSize : NULL,
BufferSize BufferSize
); );
@ -944,6 +950,7 @@ EfiPxeBcMtftp (
Config, Config,
Filename, Filename,
BlockSize, BlockSize,
(WindowSize > 1) ? &WindowSize : NULL,
BufferPtr, BufferPtr,
BufferSize, BufferSize,
DontUseBuffer DontUseBuffer
@ -976,6 +983,7 @@ EfiPxeBcMtftp (
Config, Config,
Filename, Filename,
BlockSize, BlockSize,
(WindowSize > 1) ? &WindowSize : NULL,
BufferPtr, BufferPtr,
BufferSize, BufferSize,
DontUseBuffer DontUseBuffer

View File

@ -19,7 +19,8 @@ CHAR8 *mMtftpOptions[PXE_MTFTP_OPTION_MAXIMUM_INDEX] = {
"blksize", "blksize",
"timeout", "timeout",
"tsize", "tsize",
"multicast" "multicast",
"windowsize"
}; };
@ -122,15 +123,17 @@ PxeBcMtftp6GetFileSize (
IN EFI_MTFTP6_CONFIG_DATA *Config, IN EFI_MTFTP6_CONFIG_DATA *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN OUT UINT64 *BufferSize IN OUT UINT64 *BufferSize
) )
{ {
EFI_MTFTP6_PROTOCOL *Mtftp6; EFI_MTFTP6_PROTOCOL *Mtftp6;
EFI_MTFTP6_OPTION ReqOpt[2]; EFI_MTFTP6_OPTION ReqOpt[3];
EFI_MTFTP6_PACKET *Packet; EFI_MTFTP6_PACKET *Packet;
EFI_MTFTP6_OPTION *Option; EFI_MTFTP6_OPTION *Option;
UINT32 PktLen; UINT32 PktLen;
UINT8 OptBuf[128]; UINT8 OptBuf[PXE_MTFTP_OPTBUF_MAXNUM_INDEX];
UINTN OptBufSize;
UINT32 OptCnt; UINT32 OptCnt;
EFI_STATUS Status; EFI_STATUS Status;
@ -140,6 +143,7 @@ PxeBcMtftp6GetFileSize (
Packet = NULL; Packet = NULL;
Option = NULL; Option = NULL;
PktLen = 0; PktLen = 0;
OptBufSize = PXE_MTFTP_OPTBUF_MAXNUM_INDEX;
OptCnt = 1; OptCnt = 1;
Config->InitialServerPort = PXEBC_BS_DOWNLOAD_PORT; Config->InitialServerPort = PXEBC_BS_DOWNLOAD_PORT;
@ -152,13 +156,22 @@ PxeBcMtftp6GetFileSize (
// Build the required options for get info. // Build the required options for get info.
// //
ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_TSIZE_INDEX]; ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_TSIZE_INDEX];
PxeBcUintnToAscDec (0, OptBuf, PXE_MTFTP_OPTBUF_MAXNUM_INDEX); PxeBcUintnToAscDec (0, OptBuf, OptBufSize);
ReqOpt[0].ValueStr = OptBuf; ReqOpt[0].ValueStr = OptBuf;
if (BlockSize != NULL) { if (BlockSize != NULL) {
ReqOpt[1].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX]; ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX];
ReqOpt[1].ValueStr = (UINT8 *) (ReqOpt[0].ValueStr + AsciiStrLen ((CHAR8 *) ReqOpt[0].ValueStr) + 1); ReqOpt[OptCnt].ValueStr = (UINT8 *) (ReqOpt[OptCnt-1].ValueStr + AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
PxeBcUintnToAscDec (*BlockSize, ReqOpt[1].ValueStr, PXE_MTFTP_OPTBUF_MAXNUM_INDEX - (AsciiStrLen ((CHAR8 *) ReqOpt[0].ValueStr) + 1)); OptBufSize -= (AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
PxeBcUintnToAscDec (*BlockSize, ReqOpt[OptCnt].ValueStr, OptBufSize);
OptCnt++;
}
if (WindowSize != NULL) {
ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_WINDOWSIZE_INDEX];
ReqOpt[OptCnt].ValueStr = (UINT8 *) (ReqOpt[OptCnt-1].ValueStr + AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
OptBufSize -= (AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
PxeBcUintnToAscDec (*WindowSize, ReqOpt[OptCnt].ValueStr, OptBufSize);
OptCnt++; OptCnt++;
} }
@ -250,6 +263,7 @@ PxeBcMtftp6ReadFile (
IN EFI_MTFTP6_CONFIG_DATA *Config, IN EFI_MTFTP6_CONFIG_DATA *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -257,9 +271,10 @@ PxeBcMtftp6ReadFile (
{ {
EFI_MTFTP6_PROTOCOL *Mtftp6; EFI_MTFTP6_PROTOCOL *Mtftp6;
EFI_MTFTP6_TOKEN Token; EFI_MTFTP6_TOKEN Token;
EFI_MTFTP6_OPTION ReqOpt[1]; EFI_MTFTP6_OPTION ReqOpt[2];
UINT32 OptCnt; UINT32 OptCnt;
UINT8 OptBuf[128]; UINT8 BlksizeBuf[10];
UINT8 WindowsizeBuf[10];
EFI_STATUS Status; EFI_STATUS Status;
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
@ -273,12 +288,20 @@ PxeBcMtftp6ReadFile (
} }
if (BlockSize != NULL) { if (BlockSize != NULL) {
ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX]; ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX];
ReqOpt[0].ValueStr = OptBuf; ReqOpt[OptCnt].ValueStr = BlksizeBuf;
PxeBcUintnToAscDec (*BlockSize, ReqOpt[0].ValueStr, PXE_MTFTP_OPTBUF_MAXNUM_INDEX); PxeBcUintnToAscDec (*BlockSize, ReqOpt[OptCnt].ValueStr, sizeof (BlksizeBuf));
OptCnt++; OptCnt++;
} }
if (WindowSize != NULL) {
ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_WINDOWSIZE_INDEX];
ReqOpt[OptCnt].ValueStr = WindowsizeBuf;
PxeBcUintnToAscDec (*WindowSize, ReqOpt[OptCnt].ValueStr, sizeof (WindowsizeBuf));
OptCnt++;
}
Token.Event = NULL; Token.Event = NULL;
Token.OverrideData = NULL; Token.OverrideData = NULL;
Token.Filename = Filename; Token.Filename = Filename;
@ -408,6 +431,7 @@ PxeBcMtftp6ReadDirectory (
IN EFI_MTFTP6_CONFIG_DATA *Config, IN EFI_MTFTP6_CONFIG_DATA *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -415,9 +439,10 @@ PxeBcMtftp6ReadDirectory (
{ {
EFI_MTFTP6_PROTOCOL *Mtftp6; EFI_MTFTP6_PROTOCOL *Mtftp6;
EFI_MTFTP6_TOKEN Token; EFI_MTFTP6_TOKEN Token;
EFI_MTFTP6_OPTION ReqOpt[1]; EFI_MTFTP6_OPTION ReqOpt[2];
UINT32 OptCnt; UINT32 OptCnt;
UINT8 OptBuf[128]; UINT8 BlksizeBuf[10];
UINT8 WindowsizeBuf[10];
EFI_STATUS Status; EFI_STATUS Status;
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
@ -431,9 +456,16 @@ PxeBcMtftp6ReadDirectory (
} }
if (BlockSize != NULL) { if (BlockSize != NULL) {
ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX]; ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX];
ReqOpt[0].ValueStr = OptBuf; ReqOpt[OptCnt].ValueStr = BlksizeBuf;
PxeBcUintnToAscDec (*BlockSize, ReqOpt[0].ValueStr, PXE_MTFTP_OPTBUF_MAXNUM_INDEX); PxeBcUintnToAscDec (*BlockSize, ReqOpt[OptCnt].ValueStr, sizeof (BlksizeBuf));
OptCnt++;
}
if (WindowSize != NULL) {
ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_WINDOWSIZE_INDEX];
ReqOpt[OptCnt].ValueStr = WindowsizeBuf;
PxeBcUintnToAscDec (*WindowSize, ReqOpt[OptCnt].ValueStr, sizeof (WindowsizeBuf));
OptCnt++; OptCnt++;
} }
@ -568,15 +600,17 @@ PxeBcMtftp4GetFileSize (
IN EFI_MTFTP4_CONFIG_DATA *Config, IN EFI_MTFTP4_CONFIG_DATA *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN OUT UINT64 *BufferSize IN OUT UINT64 *BufferSize
) )
{ {
EFI_MTFTP4_PROTOCOL *Mtftp4; EFI_MTFTP4_PROTOCOL *Mtftp4;
EFI_MTFTP4_OPTION ReqOpt[2]; EFI_MTFTP4_OPTION ReqOpt[3];
EFI_MTFTP4_PACKET *Packet; EFI_MTFTP4_PACKET *Packet;
EFI_MTFTP4_OPTION *Option; EFI_MTFTP4_OPTION *Option;
UINT32 PktLen; UINT32 PktLen;
UINT8 OptBuf[128]; UINT8 OptBuf[PXE_MTFTP_OPTBUF_MAXNUM_INDEX];
UINTN OptBufSize;
UINT32 OptCnt; UINT32 OptCnt;
EFI_STATUS Status; EFI_STATUS Status;
@ -586,6 +620,7 @@ PxeBcMtftp4GetFileSize (
Packet = NULL; Packet = NULL;
Option = NULL; Option = NULL;
PktLen = 0; PktLen = 0;
OptBufSize = PXE_MTFTP_OPTBUF_MAXNUM_INDEX;
OptCnt = 1; OptCnt = 1;
Config->InitialServerPort = PXEBC_BS_DOWNLOAD_PORT; Config->InitialServerPort = PXEBC_BS_DOWNLOAD_PORT;
@ -598,13 +633,22 @@ PxeBcMtftp4GetFileSize (
// Build the required options for get info. // Build the required options for get info.
// //
ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_TSIZE_INDEX]; ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_TSIZE_INDEX];
PxeBcUintnToAscDec (0, OptBuf, PXE_MTFTP_OPTBUF_MAXNUM_INDEX); PxeBcUintnToAscDec (0, OptBuf, OptBufSize);
ReqOpt[0].ValueStr = OptBuf; ReqOpt[0].ValueStr = OptBuf;
if (BlockSize != NULL) { if (BlockSize != NULL) {
ReqOpt[1].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX]; ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX];
ReqOpt[1].ValueStr = (UINT8 *) (ReqOpt[0].ValueStr + AsciiStrLen ((CHAR8 *) ReqOpt[0].ValueStr) + 1); ReqOpt[OptCnt].ValueStr = (UINT8 *) (ReqOpt[OptCnt-1].ValueStr + AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
PxeBcUintnToAscDec (*BlockSize, ReqOpt[1].ValueStr, PXE_MTFTP_OPTBUF_MAXNUM_INDEX - (AsciiStrLen ((CHAR8 *) ReqOpt[0].ValueStr) + 1)); OptBufSize -= (AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
PxeBcUintnToAscDec (*BlockSize, ReqOpt[OptCnt].ValueStr, OptBufSize);
OptCnt++;
}
if (WindowSize != NULL) {
ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_WINDOWSIZE_INDEX];
ReqOpt[OptCnt].ValueStr = (UINT8 *) (ReqOpt[OptCnt-1].ValueStr + AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
OptBufSize -= (AsciiStrLen ((CHAR8 *) ReqOpt[OptCnt-1].ValueStr) + 1);
PxeBcUintnToAscDec (*WindowSize, ReqOpt[OptCnt].ValueStr, OptBufSize);
OptCnt++; OptCnt++;
} }
@ -696,6 +740,7 @@ PxeBcMtftp4ReadFile (
IN EFI_MTFTP4_CONFIG_DATA *Config, IN EFI_MTFTP4_CONFIG_DATA *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -703,9 +748,10 @@ PxeBcMtftp4ReadFile (
{ {
EFI_MTFTP4_PROTOCOL *Mtftp4; EFI_MTFTP4_PROTOCOL *Mtftp4;
EFI_MTFTP4_TOKEN Token; EFI_MTFTP4_TOKEN Token;
EFI_MTFTP4_OPTION ReqOpt[1]; EFI_MTFTP4_OPTION ReqOpt[2];
UINT32 OptCnt; UINT32 OptCnt;
UINT8 OptBuf[128]; UINT8 BlksizeBuf[10];
UINT8 WindowsizeBuf[10];
EFI_STATUS Status; EFI_STATUS Status;
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
@ -719,9 +765,16 @@ PxeBcMtftp4ReadFile (
} }
if (BlockSize != NULL) { if (BlockSize != NULL) {
ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX]; ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX];
ReqOpt[0].ValueStr = OptBuf; ReqOpt[OptCnt].ValueStr = BlksizeBuf;
PxeBcUintnToAscDec (*BlockSize, ReqOpt[0].ValueStr, PXE_MTFTP_OPTBUF_MAXNUM_INDEX); PxeBcUintnToAscDec (*BlockSize, ReqOpt[OptCnt].ValueStr, sizeof (BlksizeBuf));
OptCnt++;
}
if (WindowSize != NULL) {
ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_WINDOWSIZE_INDEX];
ReqOpt[OptCnt].ValueStr = WindowsizeBuf;
PxeBcUintnToAscDec (*WindowSize, ReqOpt[OptCnt].ValueStr, sizeof (WindowsizeBuf));
OptCnt++; OptCnt++;
} }
@ -854,6 +907,7 @@ PxeBcMtftp4ReadDirectory (
IN EFI_MTFTP4_CONFIG_DATA *Config, IN EFI_MTFTP4_CONFIG_DATA *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -861,9 +915,10 @@ PxeBcMtftp4ReadDirectory (
{ {
EFI_MTFTP4_PROTOCOL *Mtftp4; EFI_MTFTP4_PROTOCOL *Mtftp4;
EFI_MTFTP4_TOKEN Token; EFI_MTFTP4_TOKEN Token;
EFI_MTFTP4_OPTION ReqOpt[1]; EFI_MTFTP4_OPTION ReqOpt[2];
UINT32 OptCnt; UINT32 OptCnt;
UINT8 OptBuf[128]; UINT8 BlksizeBuf[10];
UINT8 WindowsizeBuf[10];
EFI_STATUS Status; EFI_STATUS Status;
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
@ -877,9 +932,16 @@ PxeBcMtftp4ReadDirectory (
} }
if (BlockSize != NULL) { if (BlockSize != NULL) {
ReqOpt[0].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX]; ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_BLKSIZE_INDEX];
ReqOpt[0].ValueStr = OptBuf; ReqOpt[OptCnt].ValueStr = BlksizeBuf;
PxeBcUintnToAscDec (*BlockSize, ReqOpt[0].ValueStr, PXE_MTFTP_OPTBUF_MAXNUM_INDEX); PxeBcUintnToAscDec (*BlockSize, ReqOpt[OptCnt].ValueStr, sizeof (BlksizeBuf));
OptCnt++;
}
if (WindowSize != NULL) {
ReqOpt[OptCnt].OptionStr = (UINT8 *) mMtftpOptions[PXE_MTFTP_OPTION_WINDOWSIZE_INDEX];
ReqOpt[OptCnt].ValueStr = WindowsizeBuf;
PxeBcUintnToAscDec (*WindowSize, ReqOpt[OptCnt].ValueStr, sizeof (WindowsizeBuf));
OptCnt++; OptCnt++;
} }
@ -936,6 +998,7 @@ PxeBcTftpGetFileSize (
IN VOID *Config, IN VOID *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN OUT UINT64 *BufferSize IN OUT UINT64 *BufferSize
) )
{ {
@ -945,6 +1008,7 @@ PxeBcTftpGetFileSize (
(EFI_MTFTP6_CONFIG_DATA *) Config, (EFI_MTFTP6_CONFIG_DATA *) Config,
Filename, Filename,
BlockSize, BlockSize,
WindowSize,
BufferSize BufferSize
); );
} else { } else {
@ -953,6 +1017,7 @@ PxeBcTftpGetFileSize (
(EFI_MTFTP4_CONFIG_DATA *) Config, (EFI_MTFTP4_CONFIG_DATA *) Config,
Filename, Filename,
BlockSize, BlockSize,
WindowSize,
BufferSize BufferSize
); );
} }
@ -981,6 +1046,7 @@ PxeBcTftpReadFile (
IN VOID *Config, IN VOID *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -992,6 +1058,7 @@ PxeBcTftpReadFile (
(EFI_MTFTP6_CONFIG_DATA *) Config, (EFI_MTFTP6_CONFIG_DATA *) Config,
Filename, Filename,
BlockSize, BlockSize,
WindowSize,
BufferPtr, BufferPtr,
BufferSize, BufferSize,
DontUseBuffer DontUseBuffer
@ -1002,6 +1069,7 @@ PxeBcTftpReadFile (
(EFI_MTFTP4_CONFIG_DATA *) Config, (EFI_MTFTP4_CONFIG_DATA *) Config,
Filename, Filename,
BlockSize, BlockSize,
WindowSize,
BufferPtr, BufferPtr,
BufferSize, BufferSize,
DontUseBuffer DontUseBuffer
@ -1083,6 +1151,7 @@ PxeBcTftpReadDirectory (
IN VOID *Config, IN VOID *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -1094,6 +1163,7 @@ PxeBcTftpReadDirectory (
(EFI_MTFTP6_CONFIG_DATA *) Config, (EFI_MTFTP6_CONFIG_DATA *) Config,
Filename, Filename,
BlockSize, BlockSize,
WindowSize,
BufferPtr, BufferPtr,
BufferSize, BufferSize,
DontUseBuffer DontUseBuffer
@ -1104,6 +1174,7 @@ PxeBcTftpReadDirectory (
(EFI_MTFTP4_CONFIG_DATA *) Config, (EFI_MTFTP4_CONFIG_DATA *) Config,
Filename, Filename,
BlockSize, BlockSize,
WindowSize,
BufferPtr, BufferPtr,
BufferSize, BufferSize,
DontUseBuffer DontUseBuffer

View File

@ -20,7 +20,8 @@
#define PXE_MTFTP_OPTION_TIMEOUT_INDEX 1 #define PXE_MTFTP_OPTION_TIMEOUT_INDEX 1
#define PXE_MTFTP_OPTION_TSIZE_INDEX 2 #define PXE_MTFTP_OPTION_TSIZE_INDEX 2
#define PXE_MTFTP_OPTION_MULTICAST_INDEX 3 #define PXE_MTFTP_OPTION_MULTICAST_INDEX 3
#define PXE_MTFTP_OPTION_MAXIMUM_INDEX 4 #define PXE_MTFTP_OPTION_WINDOWSIZE_INDEX 4
#define PXE_MTFTP_OPTION_MAXIMUM_INDEX 5
#define PXE_MTFTP_OPTBUF_MAXNUM_INDEX 128 #define PXE_MTFTP_OPTBUF_MAXNUM_INDEX 128
#define PXE_MTFTP_ERROR_STRING_LENGTH 127 // refer to definition of struct EFI_PXE_BASE_CODE_TFTP_ERROR. #define PXE_MTFTP_ERROR_STRING_LENGTH 127 // refer to definition of struct EFI_PXE_BASE_CODE_TFTP_ERROR.
@ -48,6 +49,7 @@ PxeBcTftpGetFileSize (
IN VOID *Config, IN VOID *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN OUT UINT64 *BufferSize IN OUT UINT64 *BufferSize
); );
@ -74,6 +76,7 @@ PxeBcTftpReadFile (
IN VOID *Config, IN VOID *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer
@ -130,6 +133,7 @@ PxeBcTftpReadDirectory (
IN VOID *Config, IN VOID *Config,
IN UINT8 *Filename, IN UINT8 *Filename,
IN UINTN *BlockSize, IN UINTN *BlockSize,
IN UINTN *WindowSize,
IN UINT8 *BufferPtr, IN UINT8 *BufferPtr,
IN OUT UINT64 *BufferSize, IN OUT UINT64 *BufferSize,
IN BOOLEAN DontUseBuffer IN BOOLEAN DontUseBuffer

View File

@ -55,6 +55,7 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec
NetworkPkg/NetworkPkg.dec
[LibraryClasses] [LibraryClasses]
@ -107,5 +108,7 @@
[Pcd] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES
gEfiNetworkPkgTokenSpaceGuid.PcdPxeTftpWindowSize ## SOMETIMES_CONSUMES
[UserExtensions.TianoCore."ExtraFiles"] [UserExtensions.TianoCore."ExtraFiles"]
UefiPxeBcDxeExtra.uni UefiPxeBcDxeExtra.uni