TianoCore EDK2 master
Loading...
Searching...
No Matches
PxeBcDriver.c File Reference
#include "PxeBcImpl.h"

Go to the source code of this file.

Functions

EFI_HANDLE PxeBcGetNicByIp4Children (IN EFI_HANDLE ControllerHandle)
 
EFI_HANDLE PxeBcGetNicByIp6Children (IN EFI_HANDLE ControllerHandle)
 
VOID PxeBcDestroyIp4Children (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN PXEBC_PRIVATE_DATA *Private)
 
VOID PxeBcDestroyIp6Children (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN PXEBC_PRIVATE_DATA *Private)
 
EFI_STATUS PxeBcCheckIpv6Support (IN EFI_HANDLE ControllerHandle, IN PXEBC_PRIVATE_DATA *Private, OUT BOOLEAN *Ipv6Support)
 
EFI_STATUS PxeBcCreateIp4Children (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN PXEBC_PRIVATE_DATA *Private)
 
EFI_STATUS PxeBcCreateIp6Children (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN PXEBC_PRIVATE_DATA *Private)
 
EFI_STATUS EFIAPI PxeBcDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI PxeBcSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, IN UINT8 IpVersion)
 
EFI_STATUS EFIAPI PxeBcStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, IN UINT8 IpVersion)
 
EFI_STATUS EFIAPI PxeBcStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer, IN UINT8 IpVersion)
 
EFI_STATUS EFIAPI PxeBcIp4DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI PxeBcIp4DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI PxeBcIp4DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS EFIAPI PxeBcIp6DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI PxeBcIp6DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI PxeBcIp6DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 

Variables

EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp4DriverBinding
 
EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp6DriverBinding
 

Detailed Description

Driver Binding functions implementation for UefiPxeBc Driver.

(C) Copyright 2014 Hewlett-Packard Development Company, L.P.
Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PxeBcDriver.c.

Function Documentation

◆ PxeBcCheckIpv6Support()

EFI_STATUS PxeBcCheckIpv6Support ( IN EFI_HANDLE  ControllerHandle,
IN PXEBC_PRIVATE_DATA Private,
OUT BOOLEAN *  Ipv6Support 
)

Check whether UNDI protocol supports IPv6.

Parameters
[in]ControllerHandleController handle.
[in]PrivatePointer to PXEBC_PRIVATE_DATA.
[out]Ipv6SupportTRUE if UNDI supports IPv6.
Return values
EFI_SUCCESSGet the result whether UNDI supports IPv6 by NII or AIP protocol successfully.
EFI_NOT_FOUNDDon't know whether UNDI supports IPv6 since NII or AIP is not available.

Definition at line 453 of file PxeBcDriver.c.

◆ PxeBcCreateIp4Children()

EFI_STATUS PxeBcCreateIp4Children ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN PXEBC_PRIVATE_DATA Private 
)

Create the opened instances based on IPv4.

Parameters
[in]ThisPointer to EFI_DRIVER_BINDING_PROTOCOL.
[in]ControllerHandleHandle of the child to destroy.
[in]PrivateHandle Pointer to PXEBC_PRIVATE_DATA.
Return values
EFI_SUCCESSThe instances based on IPv4 were all created successfully.
OthersAn unexpected error occurred.

Definition at line 550 of file PxeBcDriver.c.

◆ PxeBcCreateIp6Children()

EFI_STATUS PxeBcCreateIp6Children ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN PXEBC_PRIVATE_DATA Private 
)

Create the opened instances based on IPv6.

Parameters
[in]ThisPointer to EFI_DRIVER_BINDING_PROTOCOL.
[in]ControllerHandleHandle of the child to destroy.
[in]PrivateHandle Pointer to PXEBC_PRIVATE_DATA.
Return values
EFI_SUCCESSThe instances based on IPv6 were all created successfully.
OthersAn unexpected error occurred.

Definition at line 882 of file PxeBcDriver.c.

◆ PxeBcDestroyIp4Children()

VOID PxeBcDestroyIp4Children ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN PXEBC_PRIVATE_DATA Private 
)

Destroy the opened instances based on IPv4.

Parameters
[in]ThisPointer to the EFI_DRIVER_BINDING_PROTOCOL.
[in]PrivatePointer to PXEBC_PRIVATE_DATA.

Definition at line 107 of file PxeBcDriver.c.

◆ PxeBcDestroyIp6Children()

VOID PxeBcDestroyIp6Children ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN PXEBC_PRIVATE_DATA Private 
)

Destroy the opened instances based on IPv6.

Parameters
[in]ThisPointer to the EFI_DRIVER_BINDING_PROTOCOL.
[in]PrivatePointer to PXEBC_PRIVATE_DATA.

Definition at line 289 of file PxeBcDriver.c.

◆ PxeBcDriverEntryPoint()

EFI_STATUS EFIAPI PxeBcDriverEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The entry point for UefiPxeBc driver that installs the driver binding and component name protocol on its image.

Parameters
[in]ImageHandleThe Image handle of the driver.
[in]SystemTableThe system table.
Returns
EFI_SUCCESS
Others

Definition at line 1241 of file PxeBcDriver.c.

◆ PxeBcGetNicByIp4Children()

EFI_HANDLE PxeBcGetNicByIp4Children ( IN EFI_HANDLE  ControllerHandle)

Get the Nic handle using any child handle in the IPv4 stack.

Parameters
[in]ControllerHandlePointer to child handle over IPv4.
Returns
NicHandle The pointer to the Nic handle.

Definition at line 41 of file PxeBcDriver.c.

◆ PxeBcGetNicByIp6Children()

EFI_HANDLE PxeBcGetNicByIp6Children ( IN EFI_HANDLE  ControllerHandle)

Get the Nic handle using any child handle in the IPv6 stack.

Parameters
[in]ControllerHandlePointer to child handle over IPv6.
Returns
NicHandle The pointer to the Nic handle.

Definition at line 76 of file PxeBcDriver.c.

◆ PxeBcIp4DriverBindingStart()

EFI_STATUS EFIAPI PxeBcIp4DriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL 
)

Start this driver on ControllerHandle. This service is called by the EFI boot service ConnectController(). In order to make drivers as small as possible, there are a few calling restrictions for this service. ConnectController() must follow these calling restrictions. If any other agent wishes to call Start() it must also follow these calling restrictions.

Parameters
[in]ThisThe pointer to the driver binding protocol.
[in]ControllerHandleThe handle of device to be started.
[in]RemainingDevicePathOptional parameter used to pick a specific child device to be started.
Return values
EFI_SUCCESSThis driver is installed to ControllerHandle.
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle.
otherThis driver does not support this device.

Definition at line 1703 of file PxeBcDriver.c.

◆ PxeBcIp4DriverBindingStop()

EFI_STATUS EFIAPI PxeBcIp4DriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop this driver on ControllerHandle. This service is called by the EFI boot service DisconnectController(). In order to make drivers as small as possible, there are a few calling restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to stop driver on
[in]NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
[in]ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
OthersThis driver was not removed from this device.

Definition at line 1738 of file PxeBcDriver.c.

◆ PxeBcIp4DriverBindingSupported()

EFI_STATUS EFIAPI PxeBcIp4DriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL 
)

Test to see if this driver supports ControllerHandle. This service is called by the EFI boot service ConnectController(). In order to make drivers as small as possible, there are a few calling restrictions for this service. ConnectController() must follow these calling restrictions. If any other agent wishes to call Supported() it must also follow these calling restrictions.

Parameters
[in]ThisThe pointer to the driver binding protocol.
[in]ControllerHandleThe handle of device to be tested.
[in]RemainingDevicePathOptional parameter used to pick a specific child device to be started.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_UNSUPPORTEDThis driver does not support this device.

Definition at line 1669 of file PxeBcDriver.c.

◆ PxeBcIp6DriverBindingStart()

EFI_STATUS EFIAPI PxeBcIp6DriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL 
)

Start this driver on ControllerHandle. This service is called by the EFI boot service ConnectController(). In order to make drivers as small as possible, there are a few calling restrictions for this service. ConnectController() must follow these calling restrictions. If any other agent wishes to call Start() it must also follow these calling restrictions.

Parameters
[in]ThisThe pointer to the driver binding protocol.
[in]ControllerHandleThe handle of device to be started.
[in]RemainingDevicePathOptional parameter used to pick a specific child device to be started.
Return values
EFI_SUCCESSThis driver is installed to ControllerHandle.
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle.
otherThis driver does not support this device.

Definition at line 1807 of file PxeBcDriver.c.

◆ PxeBcIp6DriverBindingStop()

EFI_STATUS EFIAPI PxeBcIp6DriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop this driver on ControllerHandle. This service is called by the EFI boot service DisconnectController(). In order to make drivers as small as possible, there are a few calling restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to stop driver on
[in]NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
[in]ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
OthersThis driver was not removed from this device.

Definition at line 1842 of file PxeBcDriver.c.

◆ PxeBcIp6DriverBindingSupported()

EFI_STATUS EFIAPI PxeBcIp6DriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL 
)

Test to see if this driver supports ControllerHandle. This service is called by the EFI boot service ConnectController(). In order to make drivers as small as possible, there are a few calling restrictions for this service. ConnectController() must follow these calling restrictions. If any other agent wishes to call Supported() it must also follow these calling restrictions.

Parameters
[in]ThisThe pointer to the driver binding protocol.
[in]ControllerHandleThe handle of device to be tested.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to be started.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_UNSUPPORTEDThis driver does not support this device.

Definition at line 1773 of file PxeBcDriver.c.

◆ PxeBcStart()

EFI_STATUS EFIAPI PxeBcStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL,
IN UINT8  IpVersion 
)

Start this driver on ControllerHandle. This is the worker function for PxeBcIp4(6)DriverBindingStart.

Parameters
[in]ThisThe pointer to the driver binding protocol.
[in]ControllerHandleThe handle of device to be started.
[in]RemainingDevicePathOptional parameter used to pick a specific child device to be started.
[in]IpVersionIP_VERSION_4 or IP_VERSION_6.
Return values
EFI_SUCCESSThis driver is installed to ControllerHandle.
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle.
otherThis driver does not support this device.

Definition at line 1376 of file PxeBcDriver.c.

◆ PxeBcStop()

EFI_STATUS EFIAPI PxeBcStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer,
IN UINT8  IpVersion 
)

Stop this driver on ControllerHandle. This is the worker function for PxeBcIp4(6)DriverBindingStop.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to stop driver on.
[in]NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
[in]ChildHandleBufferList of Child Handles to Stop.
[in]IpVersionIP_VERSION_4 or IP_VERSION_6.
Return values
EFI_SUCCESSThis driver was removed ControllerHandle.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
OthersThis driver was not removed from this device

Definition at line 1542 of file PxeBcDriver.c.

◆ PxeBcSupported()

EFI_STATUS EFIAPI PxeBcSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath  OPTIONAL,
IN UINT8  IpVersion 
)

Test to see if this driver supports ControllerHandle. This is the worker function for PxeBcIp4(6)DriverBindingSupported.

Parameters
[in]ThisThe pointer to the driver binding protocol.
[in]ControllerHandleThe handle of device to be tested.
[in]RemainingDevicePathOptional parameter used to pick a specific child device to be started.
[in]IpVersionIP_VERSION_4 or IP_VERSION_6.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_UNSUPPORTEDThis driver does not support this device.

Definition at line 1299 of file PxeBcDriver.c.

Variable Documentation

◆ gPxeBcIp4DriverBinding

EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp4DriverBinding
Initial value:
= {
0xa,
}
#define NULL
Definition: Base.h:319
EFI_STATUS EFIAPI PxeBcIp4DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: PxeBcDriver.c:1703
EFI_STATUS EFIAPI PxeBcIp4DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: PxeBcDriver.c:1738
EFI_STATUS EFIAPI PxeBcIp4DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: PxeBcDriver.c:1669

Definition at line 14 of file PxeBcDriver.c.

◆ gPxeBcIp6DriverBinding

EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp6DriverBinding
Initial value:
= {
0xa,
}
EFI_STATUS EFIAPI PxeBcIp6DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: PxeBcDriver.c:1807
EFI_STATUS EFIAPI PxeBcIp6DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: PxeBcDriver.c:1773
EFI_STATUS EFIAPI PxeBcIp6DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: PxeBcDriver.c:1842

Definition at line 23 of file PxeBcDriver.c.