1. Enable Network stack to pass SCT, currently MNP, ARP, IP4, TCP4 and DHCP4 have passed SCT.

2. Enable Network stack to pass ICC build.
3. Sync Network library instances' module names with their filenames.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3692 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-08-23 02:19:41 +00:00
parent 4a8f7ccecc
commit 687a2e5f69
51 changed files with 211 additions and 172 deletions

View File

@@ -291,8 +291,12 @@ IpChecksum2 (
)
{
UINT32 Sum;
UINT16 HeaderChecksum;
UINT16 MessageChecksum;
Sum = (UINT16)~IpChecksum (Header, HeaderLen) + (UINT16)~IpChecksum (Message, MessageLen);
HeaderChecksum = (UINT16)~IpChecksum (Header, HeaderLen);
MessageChecksum = (UINT16)~IpChecksum (Message, MessageLen);
Sum = HeaderChecksum + MessageChecksum;
//
// in case above carried
@@ -1350,7 +1354,7 @@ BcStart (
Status = gBS->AllocatePool (
EfiBootServicesData,
BUFFER_ALLOCATE_SIZE,
&Private->TransmitBufferPtr
(VOID **) &Private->TransmitBufferPtr
);
if (!EFI_ERROR (Status)) {
@@ -1364,7 +1368,7 @@ BcStart (
Status = gBS->AllocatePool (
EfiBootServicesData,
BUFFER_ALLOCATE_SIZE,
&Private->ReceiveBufferPtr
(VOID **) &Private->ReceiveBufferPtr
);
if (!EFI_ERROR (Status)) {
@@ -1379,7 +1383,7 @@ BcStart (
Status = gBS->AllocatePool (
EfiBootServicesData,
256,
&Private->TftpErrorBuffer
(VOID **) &Private->TftpErrorBuffer
);
if (EFI_ERROR (Status)) {
@@ -1389,7 +1393,7 @@ BcStart (
return EFI_OUT_OF_RESOURCES;
}
Status = gBS->AllocatePool (EfiBootServicesData, 256, &Private->TftpAckBuffer);
Status = gBS->AllocatePool (EfiBootServicesData, 256, (VOID **) &Private->TftpAckBuffer);
if (EFI_ERROR (Status)) {
gBS->FreePool (Private->TftpErrorBuffer);
@@ -1473,7 +1477,6 @@ BcStop (
//
// Lock the instance data
//
EFI_PXE_BASE_CODE_MODE *PxebcMode;
EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr;
EFI_SIMPLE_NETWORK_MODE *SnpModePtr;
EFI_STATUS StatCode;
@@ -1495,7 +1498,6 @@ BcStop (
EfiAcquireLock (&Private->Lock);
PxebcMode = Private->EfiBc.Mode;
SnpPtr = Private->SimpleNetwork;
SnpModePtr = SnpPtr->Mode;
@@ -1875,7 +1877,7 @@ BcSetParameters (
if (SendGuidPtr != NULL) {
if (*SendGuidPtr) {
if (PxeBcLibGetSmbiosSystemGuidAndSerialNumber (&TmpGuid, &SerialNumberPtr) != EFI_SUCCESS) {
if (PxeBcLibGetSmbiosSystemGuidAndSerialNumber (&TmpGuid, (CHAR8 **) &SerialNumberPtr) != EFI_SUCCESS) {
return EFI_INVALID_PARAMETER;
}
}
@@ -2395,7 +2397,7 @@ InitializeBCDriver (
InitArpHeader ();
OptionsStrucInit ();
return EFI_SUCCESS;
return Status;
}
/* eof - bc.c */

View File

@@ -338,7 +338,7 @@ SendRequest (
Status = gBS->AllocatePool (
EfiBootServicesData,
SnpMode->MediaHeaderSize + sizeof (ARP_PACKET),
&Private->ArpBuffer
(VOID **) &Private->ArpBuffer
);
if (EFI_ERROR (Status)) {

View File

@@ -214,7 +214,7 @@ OptionsStrucInit (
CopyMem (DHCPOpStart.DhcpClassIdentifier.Data.UndiMajor, "yyy", sizeof ("yyy"));
CopyMem (DHCPOpStart.DhcpClassIdentifier.Data.UndiMinor, "xxx", sizeof ("xxx"));
DHCPOpStart.End[0] = OP_END;
};
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@@ -883,7 +883,7 @@ Parse (
} else if (!RxBufPtr->OpAdds.PktOptAdds[OP_DHCP_BOOTFILE_IX - 1] && RxBufPtr->u.Dhcpv4.file[0]) {
RxBufPtr->OpAdds.PktOptAdds[OP_DHCP_BOOTFILE_IX - 1] = (DHCPV4_OP_STRUCT *) (RxBufPtr->u.Dhcpv4.file - sizeof (DHCPV4_OP_HEADER));
RxBufPtr->OpAdds.PktOptAdds[OP_DHCP_BOOTFILE_IX - 1]->Header.Length = (UINT8) AsciiStrLen (RxBufPtr->u.Dhcpv4.file);
RxBufPtr->OpAdds.PktOptAdds[OP_DHCP_BOOTFILE_IX - 1]->Header.Length = (UINT8) AsciiStrLen ((CHAR8 *) RxBufPtr->u.Dhcpv4.file);
}
LocalPtr.OpPtr = RxBufPtr->OpAdds.PktOptAdds[OP_DHCP_CLASS_IDENTIFIER_IX - 1];
@@ -3169,13 +3169,11 @@ BcSetPackets (
{
EFI_PXE_BASE_CODE_MODE *PxebcMode;
EFI_STATUS Status;
EFI_STATUS StatCode;
PXE_BASECODE_DEVICE *Private;
//
// Lock the instance data and make sure started
//
StatCode = EFI_SUCCESS;
if (This == NULL) {
DEBUG ((DEBUG_ERROR, "BC *This pointer == NULL"));

View File

@@ -555,7 +555,7 @@ TftpRwReq (
//
u = Buffer;
u->ReqStr.OpCode = HTONS (Req);
TotalLen = sizeof (Mode) + sizeof (u->ReqStr.OpCode) + (Len = 1 + AsciiStrLen (FilenamePtr));
TotalLen = sizeof (Mode) + sizeof (u->ReqStr.OpCode) + (Len = 1 + AsciiStrLen ((CHAR8 *) FilenamePtr));
CopyMem (u->ReqStr.FileName, FilenamePtr, Len);
Ptr = (UINT8 *) (u->ReqStr.FileName + Len);
@@ -567,7 +567,7 @@ TftpRwReq (
CopyMem (Ptr, BlockSizeOp, sizeof (BlockSizeOp));
UtoA10 (*PacketSizePtr, Ptr + sizeof (BlockSizeOp));
TotalLen += (Len = 1 + AsciiStrLen (Ptr + sizeof (BlockSizeOp)) + sizeof (BlockSizeOp));
TotalLen += (Len = 1 + AsciiStrLen ((CHAR8 *) (Ptr + sizeof (BlockSizeOp))) + sizeof (BlockSizeOp));
Ptr += Len;
}
@@ -1387,7 +1387,7 @@ TftpInfo (
(UINT16) ReplyLen,
BufferSizePtr,
Offset,
(INT8 *) &u,
(UINT8 *) &u,
ServerIpPtr,
&ServerReplyPort,
&Private->EfiBc.Mode->StationIp,
@@ -1899,7 +1899,7 @@ PxeBcMtftp (
Status = gBS->AllocatePool (
EfiBootServicesData,
BUFFER_ALLOCATE_SIZE,
&BufferPtrLocal
(VOID **) &BufferPtrLocal
);
if (EFI_ERROR (Status) || BufferPtrLocal == NULL) {

View File

@@ -374,7 +374,6 @@ DoPrompt (
if (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key) == EFI_NOT_READY) {
UINT8 Buffer[512];
UINTN BufferSize;
EFI_STATUS Status;
BufferSize = sizeof Buffer;
@@ -1036,7 +1035,6 @@ DownloadFile (
if (Private->EfiBc.Mode->BisSupported && Private->EfiBc.Mode->BisDetected && Private->EfiBc.Mode->PxeBisReplyReceived) {
UINT64 CredentialLen;
UINTN BlockSize;
UINT8 CredentialFilename[256];
UINT8 *op;
VOID *CredentialBuffer;
@@ -1327,6 +1325,12 @@ LoadFile (
BOOLEAN NewMakeCallback;
EFI_STATUS Status;
EFI_STATUS TempStatus;
//
// The following line is only used for passing ICC build.
//
DEBUG ((EFI_D_INFO, "FilePath = %x\n", FilePath));
//
//
//