2.Add MSG_IPv4_DP and MSG_IPv6_DP into boot type of BDS_EFI_MESSAGE_MAC_BOOT.
3.Change the file header format of inf file and remove the MNP dependency.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9799
6f19259b-4bc3-4df7-8a09-
765794883524
EFI_HANDLE *BlockIoHandles;\r
EFI_BLOCK_IO_PROTOCOL *BlkIo;\r
UINTN Index;\r
EFI_HANDLE *BlockIoHandles;\r
EFI_BLOCK_IO_PROTOCOL *BlkIo;\r
UINTN Index;\r
- UINTN NumberNetworkHandles;\r
- EFI_HANDLE *NetworkHandles;\r
+ UINTN NumOfLoadFileHandles;\r
+ EFI_HANDLE *LoadFileHandles;\r
UINTN FvHandleCount;\r
EFI_HANDLE *FvHandleBuffer;\r
EFI_FV_FILETYPE Type;\r
UINTN FvHandleCount;\r
EFI_HANDLE *FvHandleBuffer;\r
EFI_FV_FILETYPE Type;\r
//\r
// Parse Network Boot Device\r
//\r
//\r
// Parse Network Boot Device\r
//\r
- NumberNetworkHandles = 0;\r
+ NumOfLoadFileHandles = 0;\r
- // Search MNP Service Binding protocol for UEFI network stack\r
+ // Search Load File protocol for PXE boot option.\r
//\r
gBS->LocateHandleBuffer (\r
ByProtocol,\r
//\r
gBS->LocateHandleBuffer (\r
ByProtocol,\r
- &gEfiManagedNetworkServiceBindingProtocolGuid,\r
+ &gEfiLoadFileProtocolGuid,\r
- &NumberNetworkHandles,\r
- &NetworkHandles\r
+ &NumOfLoadFileHandles,\r
+ &LoadFileHandles\r
- if (NumberNetworkHandles == 0) {\r
- //\r
- // MNP Service Binding protocol not found, search SNP for EFI network stack\r
- //\r
- gBS->LocateHandleBuffer (\r
- ByProtocol,\r
- &gEfiSimpleNetworkProtocolGuid,\r
- NULL,\r
- &NumberNetworkHandles,\r
- &NetworkHandles\r
- );\r
- }\r
- for (Index = 0; Index < NumberNetworkHandles; Index++) {\r
+ for (Index = 0; Index < NumOfLoadFileHandles; Index++) {\r
UnicodeSPrint (Buffer, sizeof (Buffer), L"%d", Index);\r
UnicodeSPrint (Buffer, sizeof (Buffer), L"%d", Index);\r
- BdsLibBuildOptionFromHandle (NetworkHandles[Index], BdsBootOptionList, Buffer);\r
+ BdsLibBuildOptionFromHandle (LoadFileHandles[Index], BdsBootOptionList, Buffer);\r
- if (NumberNetworkHandles != 0) {\r
- FreePool (NetworkHandles);\r
+ if (NumOfLoadFileHandles != 0) {\r
+ FreePool (LoadFileHandles);\r
\r
UpdatedDevicePath = DevicePath;\r
//\r
\r
UpdatedDevicePath = DevicePath;\r
//\r
- // Locate MNP Service Binding protocol for UEFI network stack first\r
+ // Locate Load File Protocol for PXE boot option first\r
- Status = gBS->LocateDevicePath (&gEfiManagedNetworkServiceBindingProtocolGuid, &UpdatedDevicePath, &Handle);\r
- if (EFI_ERROR (Status)) {\r
- //\r
- // MNP Service Binding protocol not found, search SNP for EFI network stack\r
- //\r
- UpdatedDevicePath = DevicePath;\r
- Status = gBS->LocateDevicePath (&gEfiSimpleNetworkProtocolGuid, &UpdatedDevicePath, &Handle);\r
- }\r
+ Status = gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &UpdatedDevicePath, &Handle);\r
if (EFI_ERROR (Status)) {\r
//\r
// Device not present so see if we need to connect it\r
if (EFI_ERROR (Status)) {\r
//\r
// Device not present so see if we need to connect it\r
//\r
// This one should work after we did the connect\r
//\r
//\r
// This one should work after we did the connect\r
//\r
- Status = gBS->LocateDevicePath (&gEfiManagedNetworkServiceBindingProtocolGuid, &UpdatedDevicePath, &Handle);\r
- if (EFI_ERROR (Status)) {\r
- UpdatedDevicePath = DevicePath;\r
- Status = gBS->LocateDevicePath (&gEfiSimpleNetworkProtocolGuid, &UpdatedDevicePath, &Handle);\r
- }\r
+ Status = gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &UpdatedDevicePath, &Handle);\r
\r
case MSG_MAC_ADDR_DP:\r
case MSG_VLAN_DP:\r
\r
case MSG_MAC_ADDR_DP:\r
case MSG_VLAN_DP:\r
+ case MSG_IPv4_DP:\r
+ case MSG_IPv6_DP:\r
BootType = BDS_EFI_MESSAGE_MAC_BOOT;\r
break;\r
\r
BootType = BDS_EFI_MESSAGE_MAC_BOOT;\r
break;\r
\r
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;\r
EFI_DEVICE_PATH_PROTOCOL *LastDeviceNode;\r
EFI_BLOCK_IO_PROTOCOL *BlockIo;\r
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;\r
EFI_DEVICE_PATH_PROTOCOL *LastDeviceNode;\r
EFI_BLOCK_IO_PROTOCOL *BlockIo;\r
- EFI_LOAD_FILE_PROTOCOL *LoadFile;\r
\r
TempDevicePath = DevPath;\r
LastDeviceNode = DevPath;\r
\r
//\r
\r
TempDevicePath = DevPath;\r
LastDeviceNode = DevPath;\r
\r
//\r
- // Check if it's a valid boot option for network boot device\r
- // Check if there is MNP Service Binding Protocol or SimpleNetworkProtocol\r
- // installed. If yes, that means there is the network card there.\r
+ // Check if it's a valid boot option for network boot device.\r
+ // Check if there is EfiLoadFileProtocol installed. \r
+ // If yes, that means there is a boot option for network.\r
//\r
Status = gBS->LocateDevicePath (\r
//\r
Status = gBS->LocateDevicePath (\r
- &gEfiManagedNetworkServiceBindingProtocolGuid,\r
+ &gEfiLoadFileProtocolGuid,\r
&TempDevicePath,\r
&Handle\r
);\r
&TempDevicePath,\r
&Handle\r
);\r
- if (EFI_ERROR (Status)) {\r
- TempDevicePath = DevPath;\r
- Status = gBS->LocateDevicePath (\r
- &gEfiSimpleNetworkProtocolGuid,\r
- &TempDevicePath,\r
- &Handle\r
- );\r
- }\r
if (EFI_ERROR (Status)) {\r
//\r
// Device not present so see if we need to connect it\r
if (EFI_ERROR (Status)) {\r
//\r
// Device not present so see if we need to connect it\r
TempDevicePath = DevPath;\r
BdsLibConnectDevicePath (TempDevicePath);\r
Status = gBS->LocateDevicePath (\r
TempDevicePath = DevPath;\r
BdsLibConnectDevicePath (TempDevicePath);\r
Status = gBS->LocateDevicePath (\r
- &gEfiManagedNetworkServiceBindingProtocolGuid,\r
+ &gEfiLoadFileProtocolGuid,\r
&TempDevicePath,\r
&Handle\r
);\r
&TempDevicePath,\r
&Handle\r
);\r
- if (EFI_ERROR (Status)) {\r
- TempDevicePath = DevPath;\r
- Status = gBS->LocateDevicePath (\r
- &gEfiSimpleNetworkProtocolGuid,\r
- &TempDevicePath,\r
- &Handle\r
- );\r
- }\r
}\r
\r
if (!EFI_ERROR (Status)) {\r
}\r
\r
if (!EFI_ERROR (Status)) {\r
- //\r
- // Check whether LoadFile protocol is installed\r
- //\r
- Status = gBS->HandleProtocol (Handle, &gEfiLoadFileProtocolGuid, (VOID **)&LoadFile);\r
- if (!EFI_ERROR (Status)) {\r
- if (!IsDevicePathEnd (TempDevicePath)) {\r
- //\r
- // LoadFile protocol is not installed on handle with exactly the same DevPath\r
- //\r
- return FALSE;\r
- }\r
+ if (!IsDevicePathEnd (TempDevicePath)) {\r
+ //\r
+ // LoadFile protocol is not installed on handle with exactly the same DevPath\r
+ //\r
+ return FALSE;\r
+ }\r
- if (CheckMedia) {\r
- //\r
- // Test if it is ready to boot now\r
- //\r
- if (BdsLibNetworkBootWithMediaPresent(DevPath)) {\r
- return TRUE;\r
- }\r
- } else {\r
+ if (CheckMedia) {\r
+ //\r
+ // Test if it is ready to boot now\r
+ //\r
+ if (BdsLibNetworkBootWithMediaPresent(DevPath)) {\r
+ } else {\r
+ return TRUE;\r
+ } \r
# \r
# General BDS defines and produce general interfaces for platform BDS driver including:\r
# 1) BDS boot policy interface;\r
# 2) BDS boot device connect interface;\r
# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.\r
# \r
# \r
# General BDS defines and produce general interfaces for platform BDS driver including:\r
# 1) BDS boot policy interface;\r
# 2) BDS boot device connect interface;\r
# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.\r
# \r
-# Copyright (c) 2007 - 2009, Intel Corporation. <BR>\r
+# Copyright (c) 2007 - 2010, Intel Corporation. <BR>\r
# All rights reserved. This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# All rights reserved. This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
# \r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
# \r
\r
[Defines]\r
INF_VERSION = 0x00010005\r
\r
[Defines]\r
INF_VERSION = 0x00010005\r
\r
[Protocols]\r
gEfiSimpleFileSystemProtocolGuid # PROTOCOL CONSUMES\r
\r
[Protocols]\r
gEfiSimpleFileSystemProtocolGuid # PROTOCOL CONSUMES\r
- gEfiManagedNetworkServiceBindingProtocolGuid # PROTOCOL CONSUMES\r
gEfiLoadFileProtocolGuid # PROTOCOL CONSUMES\r
gEfiSimpleTextOutProtocolGuid # PROTOCOL CONSUMES\r
gEfiPciIoProtocolGuid # PROTOCOL CONSUMES\r
gEfiLoadFileProtocolGuid # PROTOCOL CONSUMES\r
gEfiSimpleTextOutProtocolGuid # PROTOCOL CONSUMES\r
gEfiPciIoProtocolGuid # PROTOCOL CONSUMES\r
/** @file\r
BDS library definition, include the file and data structure\r
\r
/** @file\r
BDS library definition, include the file and data structure\r
\r
-Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Protocol/LoadedImage.h>\r
#include <Protocol/Cpu.h>\r
#include <Protocol/SimpleFileSystem.h>\r
#include <Protocol/LoadedImage.h>\r
#include <Protocol/Cpu.h>\r
#include <Protocol/SimpleFileSystem.h>\r
-#include <Protocol/ManagedNetwork.h>\r
#include <Protocol/LoadFile.h>\r
#include <Protocol/DebugPort.h>\r
#include <Protocol/DevicePath.h>\r
#include <Protocol/LoadFile.h>\r
#include <Protocol/DebugPort.h>\r
#include <Protocol/DevicePath.h>\r