21CHAR16 mNetworkDeviceList[] = L
"_NDL";
44 Status =
gBS->LocateHandleBuffer (
ByProtocol, &gEfiManagedNetworkServiceBindingProtocolGuid,
NULL, &HandleCount, &Handles);
45 if (EFI_ERROR (Status)) {
51 while (HandleCount-- != 0) {
52 Status =
gBS->HandleProtocol (Handles[HandleCount], &gEfiDevicePathProtocolGuid, (VOID **)&SingleDevice);
53 if (EFI_ERROR (Status) || (SingleDevice ==
NULL)) {
57 TempDevicePath = Devices;
59 if (TempDevicePath !=
NULL) {
64 if (Devices !=
NULL) {
65 Status =
gRT->SetVariable (
100 OneConnected =
FALSE;
101 GetVariable2 (mNetworkDeviceList, &gEfiCallerIdGuid, (VOID **)&Devices,
NULL);
102 TempDevicePath = Devices;
103 while (TempDevicePath !=
NULL) {
106 if (!EFI_ERROR (Status)) {
113 if (Devices !=
NULL) {
163 return EFI_UNSUPPORTED;
166 if (DevicePath ==
NULL) {
174 Status =
gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, &Controller);
175 if (!EFI_ERROR (Status)) {
176 Status =
gBS->ConnectController (Controller,
NULL, DevicePath,
FALSE);
234 return EFI_UNSUPPORTED;
237 if (
CompareGuid (Class, &gEfiBootManagerPolicyConnectAllGuid)) {
242 if (
CompareGuid (Class, &gEfiBootManagerPolicyConsoleGuid)) {
246 if (
CompareGuid (Class, &gEfiBootManagerPolicyNetworkGuid)) {
250 return EFI_NOT_FOUND;
254 EFI_BOOT_MANAGER_POLICY_PROTOCOL_REVISION,
281 return gBS->InstallMultipleProtocolInterfaces (
283 &gEfiBootManagerPolicyProtocolGuid,
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
EFI_STATUS ConnectNetwork(VOID)
EFI_STATUS EFIAPI BootManagerPolicyConnectDeviceClass(IN EFI_BOOT_MANAGER_POLICY_PROTOCOL *This, IN EFI_GUID *Class)
EFI_STATUS ConnectAllAndCreateNetworkDeviceList(VOID)
EFI_STATUS EFIAPI BootManagerPolicyInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI BootManagerPolicyConnectDevicePath(IN EFI_BOOT_MANAGER_POLICY_PROTOCOL *This, IN EFI_DEVICE_PATH *DevicePath, IN BOOLEAN Recursive)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI GetNextDevicePathInstance(IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT UINTN *Size)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_RUNTIME_SERVICES * gRT
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
EFI_STATUS EFIAPI EfiBootManagerConnectAllDefaultConsoles(VOID)
EFI_STATUS EFIAPI EfiBootManagerConnectDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect, OUT EFI_HANDLE *MatchingHandle OPTIONAL)
VOID EFIAPI EfiBootManagerConnectAll(VOID)
EFI_TPL EFIAPI EfiGetCurrentTpl(VOID)
EFI_STATUS EFIAPI GetVariable2(IN CONST CHAR16 *Name, IN CONST EFI_GUID *Guid, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
#define EFI_VARIABLE_NON_VOLATILE