TianoCore EDK2 master
Loading...
Searching...
No Matches
MnpDriver.c File Reference
#include "MnpDriver.h"
#include "MnpImpl.h"
#include "MnpVlan.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI MnpDestroyServiceDataEntry (IN LIST_ENTRY *Entry, IN VOID *Context)
 
EFI_STATUS EFIAPI MnpDestroyServiceChildEntry (IN LIST_ENTRY *Entry, IN VOID *Context)
 
EFI_STATUS EFIAPI MnpDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI MnpDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI MnpDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
 
EFI_STATUS EFIAPI MnpServiceBindingCreateChild (IN EFI_SERVICE_BINDING_PROTOCOL *This, IN OUT EFI_HANDLE *ChildHandle)
 
EFI_STATUS EFIAPI MnpServiceBindingDestroyChild (IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
 
EFI_STATUS EFIAPI MnpDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding
 

Detailed Description

Implementation of driver entry point and driver binding protocol.

Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file MnpDriver.c.

Function Documentation

◆ MnpDestroyServiceChildEntry()

EFI_STATUS EFIAPI MnpDestroyServiceChildEntry ( IN LIST_ENTRY Entry,
IN VOID *  Context 
)

Callback function which provided by user to remove one node in NetDestroyLinkList process.

Parameters
[in]EntryThe entry to be removed.
[in]ContextPointer to the callback context corresponds to the Context in NetDestroyLinkList.
Return values
EFI_SUCCESSThe entry has been removed successfully.
OthersFail to remove the entry.

Definition at line 57 of file MnpDriver.c.

◆ MnpDestroyServiceDataEntry()

EFI_STATUS EFIAPI MnpDestroyServiceDataEntry ( IN LIST_ENTRY Entry,
IN VOID *  Context 
)

Callback function which provided by user to remove one node in NetDestroyLinkList process.

Parameters
[in]EntryThe entry to be removed.
[in]ContextPointer to the callback context corresponds to the Context in NetDestroyLinkList.
Return values
EFI_SUCCESSThe entry has been removed successfully.
OthersFail to remove the entry.

Definition at line 34 of file MnpDriver.c.

◆ MnpDriverBindingStart()

EFI_STATUS EFIAPI MnpDriverBindingStart ( 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]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver is added to ControllerHandle.
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle.
EFI_OUT_OF_RESOURCESFailed to allocate memory for Mnp Service Data.
OthersThis driver does not support this device.

Definition at line 145 of file MnpDriver.c.

◆ MnpDriverBindingStop()

EFI_STATUS EFIAPI MnpDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer  OPTIONAL 
)

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_ERRORThe device could not be stopped due to a device error.

Definition at line 305 of file MnpDriver.c.

◆ MnpDriverBindingSupported()

EFI_STATUS EFIAPI MnpDriverBindingSupported ( 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]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
OthersThis driver does not support this device.

Definition at line 88 of file MnpDriver.c.

◆ MnpDriverEntryPoint()

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

The entry point for Mnp driver which installs the driver binding and component name protocol on its ImageHandle.

Parameters
[in]ImageHandleThe image handle of the driver.
[in]SystemTableThe system table.
Return values
EFI_SUCCESSThe driver binding and component name protocols are successfully installed.
OthersOther errors as indicated.

Definition at line 666 of file MnpDriver.c.

◆ MnpServiceBindingCreateChild()

EFI_STATUS EFIAPI MnpServiceBindingCreateChild ( IN EFI_SERVICE_BINDING_PROTOCOL This,
IN OUT EFI_HANDLE ChildHandle 
)

Creates a child handle with a set of I/O services.

Parameters
[in]ThisProtocol instance pointer.
[in,out]ChildHandlePointer to the handle of the child to create. If it is NULL, then a new handle is created. If it is not NULL, then the I/O services are added to the existing child handle.
Return values
EFI_SUCCESSThe protocol was added to ChildHandle.
EFI_INVALID_PARAMETERChildHandle is NULL.
EFI_OUT_OF_RESOURCESThere are not enough resources available to create the child.
OthersThe child handle was not created.

Definition at line 430 of file MnpDriver.c.

◆ MnpServiceBindingDestroyChild()

EFI_STATUS EFIAPI MnpServiceBindingDestroyChild ( IN EFI_SERVICE_BINDING_PROTOCOL This,
IN EFI_HANDLE  ChildHandle 
)

Destroys a child handle with a set of I/O services.

The DestroyChild() function does the opposite of CreateChild(). It removes a protocol that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed.

Parameters
[in]ThisPointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
[in]ChildHandleHandle of the child to destroy.
Return values
EFI_SUCCESSThe protocol was removed from ChildHandle.
EFI_UNSUPPORTEDChildHandle does not support the protocol that is being removed.
EFI_INVALID_PARAMETERChildHandle is NULL.
EFI_ACCESS_DENIEDThe protocol could not be removed from the ChildHandle because its services are being used.
OthersThe child handle was not destroyed.

Definition at line 546 of file MnpDriver.c.

Variable Documentation

◆ gMnpDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding
Initial value:
= {
0xa,
}
#define NULL
Definition: Base.h:319
EFI_STATUS EFIAPI MnpDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: MnpDriver.c:88
EFI_STATUS EFIAPI MnpDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
Definition: MnpDriver.c:305
EFI_STATUS EFIAPI MnpDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
Definition: MnpDriver.c:145

Definition at line 13 of file MnpDriver.c.