[Description]:
Problem with PXE boot to Windows Server 2008 install. The reason is that UdpRead and UdpWrite interfaces cannot work well with the same UDP instance. [Solution] Use separate instances for UDP Read and UDP write in UefiPxeBC module. [Impaction]: UefiPxeBcDxe and Udp4Dxe module. [Reference Info]: EDK tracker 1133 - Problem with PXE boot to Windows Server 2008 install. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5303 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2007, Intel Corporation
|
||||
Copyright (c) 2007 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -162,6 +162,56 @@ PxeBcCommonNotify (
|
||||
*((BOOLEAN *) Context) = TRUE;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
PxeBcConfigureUdpWriteInstance (
|
||||
IN EFI_UDP4_PROTOCOL *Udp4,
|
||||
IN EFI_IPv4_ADDRESS *StationIp,
|
||||
IN EFI_IPv4_ADDRESS *SubnetMask,
|
||||
IN EFI_IPv4_ADDRESS *Gateway,
|
||||
IN OUT UINT16 *SrcPort
|
||||
)
|
||||
{
|
||||
EFI_UDP4_CONFIG_DATA Udp4CfgData;
|
||||
EFI_STATUS Status;
|
||||
|
||||
ZeroMem (&Udp4CfgData, sizeof (Udp4CfgData));
|
||||
|
||||
Udp4CfgData.ReceiveTimeout = 1000;
|
||||
Udp4CfgData.TypeOfService = DEFAULT_ToS;
|
||||
Udp4CfgData.TimeToLive = DEFAULT_TTL;
|
||||
|
||||
CopyMem (&Udp4CfgData.StationAddress, StationIp, sizeof (*StationIp));
|
||||
CopyMem (&Udp4CfgData.SubnetMask, SubnetMask, sizeof (*SubnetMask));
|
||||
|
||||
Udp4CfgData.StationPort = *SrcPort;
|
||||
|
||||
//
|
||||
// Reset the instance.
|
||||
//
|
||||
Udp4->Configure (Udp4, NULL);
|
||||
|
||||
Status = Udp4->Configure (Udp4, &Udp4CfgData);
|
||||
if (!EFI_ERROR (Status) && (Gateway->Addr[0] != 0)) {
|
||||
//
|
||||
// basic configuration OK, need to add the default route entry
|
||||
//
|
||||
Status = Udp4->Routes (Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// roll back
|
||||
//
|
||||
Udp4->Configure (Udp4, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status) && (*SrcPort == 0)) {
|
||||
Udp4->GetModeData (Udp4, &Udp4CfgData, NULL, NULL, NULL);
|
||||
*SrcPort = Udp4CfgData.StationPort;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Convert number to ASCII value
|
||||
|
Reference in New Issue
Block a user