/* 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. */
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. */
BOOLEAN IsPpiInstalled(IN EFI_PEI_SERVICES **PeiServices, IN EVAL_STACK_ENTRY *Stack)
{
  VOID        *PeiInstance;
  EFI_STATUS  Status;
  EFI_GUID    PpiGuid;
  if (Stack->Operator == NULL) {
    return Stack->Result;
  }
  CopyMem (&PpiGuid, Stack->Operator, sizeof (EFI_GUID));
  Status = PeiServicesLocatePpi (
             &PpiGuid,
             0,
             NULL,
             &PeiInstance
             );
  if (EFI_ERROR (Status)) {
    return FALSE;
  }
  return TRUE;
}