43 if (Stack->Operator ==
NULL) {
64 if (EFI_ERROR (Status)) {
94 IN VOID *DependencyExpression
97 DEPENDENCY_EXPRESSION_OPERAND *Iterator;
101 Iterator = DependencyExpression;
103 StackPtr = EvalStack;
106 switch (*(Iterator++)) {
117 if (StackPtr > &EvalStack[MAX_GRAMMAR_SIZE-1]) {
118 DEBUG ((DEBUG_DISPATCH,
" RESULT = FALSE (Underflow Error)\n"));
126 StackPtr->Operator = (
VOID *)Iterator;
127 Iterator = Iterator +
sizeof (
EFI_GUID);
128 DEBUG ((DEBUG_DISPATCH,
" PUSH GUID(%g) = %a\n", StackPtr->Operator,
IsPpiInstalled (PeiServices, StackPtr) ?
"TRUE" :
"FALSE"));
134 if (*(Iterator - 1) == EFI_DEP_AND) {
135 DEBUG ((DEBUG_DISPATCH,
" AND\n"));
137 DEBUG ((DEBUG_DISPATCH,
" OR\n"));
146 if (StackPtr < &EvalStack[2]) {
147 DEBUG ((DEBUG_DISPATCH,
" RESULT = FALSE (Underflow Error)\n"));
166 if (*(Iterator - 1) == EFI_DEP_AND) {
168 (StackPtr-1)->Result =
FALSE;
169 (StackPtr-1)->Operator =
NULL;
173 (StackPtr-1)->Result =
TRUE;
174 (StackPtr-1)->Operator =
NULL;
181 DEBUG ((DEBUG_DISPATCH,
" END\n"));
187 if (StackPtr != &EvalStack[0]) {
188 DEBUG ((DEBUG_DISPATCH,
" RESULT = FALSE (Underflow Error)\n"));
192 DEBUG ((DEBUG_DISPATCH,
" RESULT = %a\n",
IsPpiInstalled (PeiServices, StackPtr) ?
"TRUE" :
"FALSE"));
196 DEBUG ((DEBUG_DISPATCH,
" NOT\n"));
203 if (StackPtr < &EvalStack[1]) {
204 DEBUG ((DEBUG_DISPATCH,
" RESULT = FALSE (Underflow Error)\n"));
208 (StackPtr-1)->Result = (BOOLEAN) !
IsPpiInstalled (PeiServices, (StackPtr-1));
209 (StackPtr-1)->Operator =
NULL;
213 case (EFI_DEP_FALSE):
214 if (*(Iterator - 1) == EFI_DEP_TRUE) {
215 DEBUG ((DEBUG_DISPATCH,
" TRUE\n"));
217 DEBUG ((DEBUG_DISPATCH,
" FALSE\n"));
224 if (StackPtr > &EvalStack[MAX_GRAMMAR_SIZE-1]) {
225 DEBUG ((DEBUG_DISPATCH,
" RESULT = FALSE (Underflow Error)\n"));
234 if (*(Iterator - 1) == EFI_DEP_TRUE) {
235 StackPtr->Result =
TRUE;
237 StackPtr->Result =
FALSE;
240 StackPtr->Operator =
NULL;
245 DEBUG ((DEBUG_DISPATCH,
" RESULT = FALSE (Invalid opcode)\n"));
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
BOOLEAN PeimDispatchReadiness(IN EFI_PEI_SERVICES **PeiServices, IN VOID *DependencyExpression)
BOOLEAN IsPpiInstalled(IN EFI_PEI_SERVICES **PeiServices, IN EVAL_STACK_ENTRY *Stack)
#define DEBUG(Expression)