TianoCore EDK2 master
Loading...
Searching...
No Matches
MnpDriver.h File Reference

Go to the source code of this file.

Data Structures

struct  MNP_DEVICE_DATA
 
struct  MNP_SERVICE_DATA
 

Macros

#define MNP_DEVICE_DATA_SIGNATURE   SIGNATURE_32 ('M', 'n', 'p', 'D')
 
#define MNP_DEVICE_DATA_FROM_THIS(a)
 
#define MNP_SERVICE_DATA_SIGNATURE   SIGNATURE_32 ('M', 'n', 'p', 'S')
 
#define MNP_SERVICE_DATA_FROM_THIS(a)
 
#define MNP_SERVICE_DATA_FROM_LINK(a)
 

Functions

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)
 

Variables

EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding
 

Detailed Description

Declaration of structures and functions for MnpDxe driver.

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

Definition in file MnpDriver.h.

Macro Definition Documentation

◆ MNP_DEVICE_DATA_FROM_THIS

#define MNP_DEVICE_DATA_FROM_THIS (   a)
Value:
CR ( \
(a), \
VlanConfig, \
MNP_DEVICE_DATA_SIGNATURE \
)
#define CR(Record, TYPE, Field, TestSignature)
Definition: DebugLib.h:659

Definition at line 90 of file MnpDriver.h.

◆ MNP_DEVICE_DATA_SIGNATURE

#define MNP_DEVICE_DATA_SIGNATURE   SIGNATURE_32 ('M', 'n', 'p', 'D')

Definition at line 33 of file MnpDriver.h.

◆ MNP_SERVICE_DATA_FROM_LINK

#define MNP_SERVICE_DATA_FROM_LINK (   a)
Value:
CR ( \
(a), \
Link, \
MNP_SERVICE_DATA_SIGNATURE \
)

Definition at line 127 of file MnpDriver.h.

◆ MNP_SERVICE_DATA_FROM_THIS

#define MNP_SERVICE_DATA_FROM_THIS (   a)
Value:
CR ( \
(a), \
ServiceBinding, \
MNP_SERVICE_DATA_SIGNATURE \
)

Definition at line 119 of file MnpDriver.h.

◆ MNP_SERVICE_DATA_SIGNATURE

#define MNP_SERVICE_DATA_SIGNATURE   SIGNATURE_32 ('M', 'n', 'p', 'S')

Definition at line 98 of file MnpDriver.h.

Function Documentation

◆ 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.

◆ 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
extern

Definition at line 13 of file MnpDriver.c.