OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/LoadedImage.h>
#include "HandleParsingMin.h"
Go to the source code of this file.
Functions | |
STATIC EFI_STATUS | InternalShellInitHandleList (VOID) |
UINTN EFIAPI | InternalConvertHandleToHandleIndex (IN CONST EFI_HANDLE TheHandle) |
STATIC EFI_STATUS EFIAPI | ParseHandleDatabaseByRelationshipWithType (IN CONST EFI_HANDLE DriverBindingHandle OPTIONAL, IN CONST EFI_HANDLE ControllerHandle OPTIONAL, IN UINTN *HandleCount, OUT EFI_HANDLE **HandleBuffer, OUT UINTN **HandleType) |
EFI_STATUS EFIAPI | InternalParseHandleDatabaseByRelationship (IN CONST EFI_HANDLE DriverBindingHandle OPTIONAL, IN CONST EFI_HANDLE ControllerHandle OPTIONAL, IN CONST UINTN Mask, IN UINTN *MatchingHandleCount, OUT EFI_HANDLE **MatchingHandleBuffer OPTIONAL) |
Variables | |
STATIC HANDLE_INDEX_LIST | mHandleList |
Provides interface to shell functionality for shell commands and applications.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
Copyright 2016-2018 Dell Technologies.
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HandleParsingMin.c.
UINTN EFIAPI InternalConvertHandleToHandleIndex | ( | IN CONST EFI_HANDLE | TheHandle | ) |
Function to retrieve the human-friendly index of a given handle. If the handle does not have a index one will be automatically assigned. The index value is valid until the termination of the shell application.
[in] | TheHandle | The handle to retrieve an index for. |
0 | A memory allocation failed. |
Definition at line 89 of file HandleParsingMin.c.
EFI_STATUS EFIAPI InternalParseHandleDatabaseByRelationship | ( | IN CONST EFI_HANDLE DriverBindingHandle | OPTIONAL, |
IN CONST EFI_HANDLE ControllerHandle | OPTIONAL, | ||
IN CONST UINTN | Mask, | ||
IN UINTN * | MatchingHandleCount, | ||
OUT EFI_HANDLE **MatchingHandleBuffer | OPTIONAL ) |
Gets all the related EFI_HANDLEs based on the single EFI_HANDLE and the mask supplied.
This function will scan all EFI_HANDLES in the UEFI environment's handle database and return all the ones with the specified relationship (Mask) to the specified controller handle.
If both DriverBindingHandle and ControllerHandle are NULL, then ASSERT. If MatchingHandleCount is NULL, then ASSERT.
If MatchingHandleBuffer is not NULL upon a sucessful return the memory must be caller freed.
[in] | DriverBindingHandle | Handle to a object with Driver Binding protocol on it. |
[in] | ControllerHandle | Handle to a device with Device Path protocol on it. |
[in] | Mask | Mask of what relationship(s) is desired. |
[in] | MatchingHandleCount | Poitner to UINTN specifying number of HANDLES in MatchingHandleBuffer. |
[out] | MatchingHandleBuffer | On a sucessful return a buffer of MatchingHandleCount EFI_HANDLEs and a terminating NULL EFI_HANDLE. |
EFI_SUCCESS | The operation was sucessful and any related handles are in MatchingHandleBuffer; |
EFI_NOT_FOUND | No matching handles were found. |
EFI_INVALID_PARAMETER | A parameter was invalid or out of range. |
Definition at line 431 of file HandleParsingMin.c.
STATIC EFI_STATUS InternalShellInitHandleList | ( | VOID | ) |
Function to initialize the file global mHandleList object for use in vonverting handles to index and index to handle.
EFI_SUCCESS | The operation was successful. |
Definition at line 36 of file HandleParsingMin.c.
STATIC EFI_STATUS EFIAPI ParseHandleDatabaseByRelationshipWithType | ( | IN CONST EFI_HANDLE DriverBindingHandle | OPTIONAL, |
IN CONST EFI_HANDLE ControllerHandle | OPTIONAL, | ||
IN UINTN * | HandleCount, | ||
OUT EFI_HANDLE ** | HandleBuffer, | ||
OUT UINTN ** | HandleType ) |
Gets all the related EFI_HANDLEs based on the mask supplied.
This function scans all EFI_HANDLES in the UEFI environment's handle database and returns the ones with the specified relationship (Mask) to the specified controller handle.
If both DriverBindingHandle and ControllerHandle are NULL, then ASSERT. If MatchingHandleCount is NULL, then ASSERT.
If MatchingHandleBuffer is not NULL upon a successful return the memory must be caller freed.
[in] | DriverBindingHandle | The handle with Driver Binding protocol on it. |
[in] | ControllerHandle | The handle with Device Path protocol on it. |
[in] | MatchingHandleCount | The pointer to UINTN that specifies the number of HANDLES in MatchingHandleBuffer. |
[out] | MatchingHandleBuffer | On a successful return, a buffer of MatchingHandleCount EFI_HANDLEs with a terminating NULL EFI_HANDLE. |
[out] | HandleType | An array of type information. |
EFI_SUCCESS | The operation was successful, and any related handles are in MatchingHandleBuffer. |
EFI_NOT_FOUND | No matching handles were found. |
EFI_INVALID_PARAMETER | A parameter was invalid or out of range. |
Definition at line 180 of file HandleParsingMin.c.
STATIC HANDLE_INDEX_LIST mHandleList |
Definition at line 22 of file HandleParsingMin.c.