TianoCore EDK2 master
Loading...
Searching...
No Matches
Locate.c File Reference
#include "PiSmmCore.h"

Go to the source code of this file.

Data Structures

struct  LOCATE_POSITION
 

Typedefs

typedef IHANDLE *(* CORE_GET_NEXT) (IN OUT LOCATE_POSITION *Position, OUT VOID **Interface)
 

Functions

IHANDLE * SmmGetNextLocateAllHandles (IN OUT LOCATE_POSITION *Position, OUT VOID **Interface)
 
IHANDLE * SmmGetNextLocateByRegisterNotify (IN OUT LOCATE_POSITION *Position, OUT VOID **Interface)
 
IHANDLE * SmmGetNextLocateByProtocol (IN OUT LOCATE_POSITION *Position, OUT VOID **Interface)
 
EFI_STATUS EFIAPI SmmLocateProtocol (IN EFI_GUID *Protocol, IN VOID *Registration OPTIONAL, OUT VOID **Interface)
 
EFI_STATUS EFIAPI SmmLocateHandle (IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *BufferSize, OUT EFI_HANDLE *Buffer)
 
EFI_STATUS EFIAPI SmmLocateHandleBuffer (IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *NumberHandles, OUT EFI_HANDLE **Buffer)
 

Variables

UINTN mEfiLocateHandleRequest = 0
 

Detailed Description

Locate handle functions

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

Definition in file Locate.c.

Typedef Documentation

◆ CORE_GET_NEXT

typedef IHANDLE *(* CORE_GET_NEXT) (IN OUT LOCATE_POSITION *Position, OUT VOID **Interface)

Definition at line 28 of file Locate.c.

Function Documentation

◆ SmmGetNextLocateAllHandles()

IHANDLE * SmmGetNextLocateAllHandles ( IN OUT LOCATE_POSITION *  Position,
OUT VOID **  Interface 
)

Routine to get the next Handle, when you are searching for all handles.

Parameters
PositionInformation about which Handle to search for.
InterfaceReturn the interface structure for the matching protocol.
Returns
An pointer to IHANDLE if the next Position is not the end of the list. Otherwise,NULL is returned.

Definition at line 46 of file Locate.c.

◆ SmmGetNextLocateByProtocol()

IHANDLE * SmmGetNextLocateByProtocol ( IN OUT LOCATE_POSITION *  Position,
OUT VOID **  Interface 
)

Routine to get the next Handle, when you are searching for a given protocol.

Parameters
PositionInformation about which Handle to search for.
InterfaceReturn the interface structure for the matching protocol.
Returns
An pointer to IHANDLE if the next Position is not the end of the list. Otherwise,NULL is returned.

Definition at line 130 of file Locate.c.

◆ SmmGetNextLocateByRegisterNotify()

IHANDLE * SmmGetNextLocateByRegisterNotify ( IN OUT LOCATE_POSITION *  Position,
OUT VOID **  Interface 
)

Routine to get the next Handle, when you are searching for register protocol notifies.

Parameters
PositionInformation about which Handle to search for.
InterfaceReturn the interface structure for the matching protocol.
Returns
An pointer to IHANDLE if the next Position is not the end of the list. Otherwise,NULL is returned.

Definition at line 83 of file Locate.c.

◆ SmmLocateHandle()

EFI_STATUS EFIAPI SmmLocateHandle ( IN EFI_LOCATE_SEARCH_TYPE  SearchType,
IN EFI_GUID *Protocol  OPTIONAL,
IN VOID *SearchKey  OPTIONAL,
IN OUT UINTN *  BufferSize,
OUT EFI_HANDLE *  Buffer 
)

Locates the requested handle(s) and returns them in Buffer.

Parameters
SearchTypeThe type of search to perform to locate the handles
ProtocolThe protocol to search for
SearchKeyDependant on SearchType
BufferSizeOn input the size of Buffer. On output the size of data returned.
BufferThe buffer to return the results in
Return values
EFI_BUFFER_TOO_SMALLBuffer too small, required buffer size is returned in BufferSize.
EFI_INVALID_PARAMETERInvalid parameter
EFI_SUCCESSSuccessfully found the requested handle(s) and returns them in Buffer.

Definition at line 271 of file Locate.c.

◆ SmmLocateHandleBuffer()

EFI_STATUS EFIAPI SmmLocateHandleBuffer ( IN EFI_LOCATE_SEARCH_TYPE  SearchType,
IN EFI_GUID *Protocol  OPTIONAL,
IN VOID *SearchKey  OPTIONAL,
IN OUT UINTN *  NumberHandles,
OUT EFI_HANDLE **  Buffer 
)

Function returns an array of handles that support the requested protocol in a buffer allocated from pool. This is a version of SmmLocateHandle() that allocates a buffer for the caller.

Parameters
SearchTypeSpecifies which handle(s) are to be returned.
ProtocolProvides the protocol to search by. This parameter is only valid for SearchType ByProtocol.
SearchKeySupplies the search key depending on the SearchType.
NumberHandlesThe number of handles returned in Buffer.
BufferA pointer to the buffer to return the requested array of handles that support Protocol.
Return values
EFI_SUCCESSThe result array of handles was returned.
EFI_NOT_FOUNDNo handles match the search.
EFI_OUT_OF_RESOURCESThere is not enough pool memory to store the matching results.
EFI_INVALID_PARAMETEROne or more parameters are not valid.

Definition at line 435 of file Locate.c.

◆ SmmLocateProtocol()

EFI_STATUS EFIAPI SmmLocateProtocol ( IN EFI_GUID *  Protocol,
IN VOID *Registration  OPTIONAL,
OUT VOID **  Interface 
)

Return the first Protocol Interface that matches the Protocol GUID. If Registration is pasased in return a Protocol Instance that was just add to the system. If Registration is NULL return the first Protocol Interface you find.

Parameters
ProtocolThe protocol to search for
RegistrationOptional Registration Key returned from RegisterProtocolNotify()
InterfaceReturn the Protocol interface (instance).
Return values
EFI_SUCCESSIf a valid Interface is returned
EFI_INVALID_PARAMETERInvalid parameter
EFI_NOT_FOUNDProtocol interface not found

Definition at line 194 of file Locate.c.

Variable Documentation

◆ mEfiLocateHandleRequest

UINTN mEfiLocateHandleRequest = 0

Definition at line 14 of file Locate.c.