Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15671
6f19259b-4bc3-4df7-8a09-
765794883524
-Copyright (c) 1999 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
if (!EFI_ERROR (Status)) {\r
return EFI_SUCCESS;\r
}\r
if (!EFI_ERROR (Status)) {\r
return EFI_SUCCESS;\r
}\r
+ \r
+ //\r
+ // Free resources allocated in LaunchBaseCode\r
+ //\r
+ Undi16SimpleNetworkUnloadUndi (SimpleNetworkDevice);\r
}\r
\r
return EFI_NOT_FOUND;\r
}\r
\r
return EFI_NOT_FOUND;\r
/** @file\r
Helper Routines that use a PXE-enabled NIC option ROM.\r
\r
/** @file\r
Helper Routines that use a PXE-enabled NIC option ROM.\r
\r
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
InOutRegs.X.AX)\r
);\r
\r
InOutRegs.X.AX)\r
);\r
\r
+ if ((UndiLoaderTable->Status != 0) || (InOutRegs.X.AX != PXENV_EXIT_SUCCESS)) {\r
+ DEBUG ((DEBUG_NET, "LaunchBaseCode exits with error, RomAddress = 0x%X\n\r", RomAddress));\r
+ return EFI_ABORTED;\r
+ }\r
+\r
DEBUG ((DEBUG_NET, "Now returned from the UNDI code\n\r"));\r
\r
DEBUG ((DEBUG_NET, "After the call, we have...\n\r"));\r
DEBUG ((DEBUG_NET, "Now returned from the UNDI code\n\r"));\r
\r
DEBUG ((DEBUG_NET, "After the call, we have...\n\r"));\r
Pxe = (PXE_T *)(UINTN)((UndiLoaderTable->PXEptr.Segment << 4) + UndiLoaderTable->PXEptr.Offset);\r
SimpleNetworkDevice->Nii.Id = (UINT64)(UINTN) Pxe;\r
\r
Pxe = (PXE_T *)(UINTN)((UndiLoaderTable->PXEptr.Segment << 4) + UndiLoaderTable->PXEptr.Offset);\r
SimpleNetworkDevice->Nii.Id = (UINT64)(UINTN) Pxe;\r
\r
+ gBS->FreePool (Buffer);\r
+\r
- // FreePool (Buffer);\r
// paranoia - make sure a valid !PXE structure\r
//\r
if (CompareMem (Pxe->Signature, PXE_SIG, sizeof Pxe->Signature) != 0) {\r
// paranoia - make sure a valid !PXE structure\r
//\r
if (CompareMem (Pxe->Signature, PXE_SIG, sizeof Pxe->Signature) != 0) {\r