TianoCore EDK2 master
Loading...
Searching...
No Matches
Dependency.c File Reference
#include "PeiMain.h"
#include "Dependency.h"

Go to the source code of this file.

Functions

BOOLEAN IsPpiInstalled (IN EFI_PEI_SERVICES **PeiServices, IN EVAL_STACK_ENTRY *Stack)
 
BOOLEAN PeimDispatchReadiness (IN EFI_PEI_SERVICES **PeiServices, IN VOID *DependencyExpression)
 

Detailed Description

PEI Dispatcher Dependency Evaluator

This routine evaluates a dependency expression (DEPENDENCY_EXPRESSION) to determine if a driver can be scheduled for execution. The criteria to be scheduled is that the dependency expression is satisfied.

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

Definition in file Dependency.c.

Function Documentation

◆ IsPpiInstalled()

BOOLEAN IsPpiInstalled ( IN EFI_PEI_SERVICES **  PeiServices,
IN EVAL_STACK_ENTRY Stack 
)

This routine determines if a PPI has been installed. The truth value of a GUID is determined by if the PPI has been published and can be queried from the PPI database.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
StackReference to EVAL_STACK_ENTRY that contains PPI GUID to check
Return values
TRUEif the PPI is already installed.
FALSEif the PPI has yet to be installed.

Definition at line 31 of file Dependency.c.

◆ PeimDispatchReadiness()

BOOLEAN PeimDispatchReadiness ( IN EFI_PEI_SERVICES **  PeiServices,
IN VOID DependencyExpression 
)

This is the POSTFIX version of the dependency evaluator. When a PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on the evaluation stack. When that entry is popped from the evaluation stack, the PPI is checked if it is installed. This method allows some time savings as not all PPIs must be checked for certain operation types (AND, OR).

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
DependencyExpressionPointer to a dependency expression. The Grammar adheres to the BNF described above and is stored in postfix notation.
Return values
TRUEif it is a well-formed Grammar
FALSEif the dependency expression overflows the evaluation stack if the dependency expression underflows the evaluation stack if the dependency expression is not a well-formed Grammar.

Definition at line 92 of file Dependency.c.