From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 60C61941EC5 for ; Wed, 21 Feb 2024 23:58:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qG9yvvCHTWJ0+5nJGtd/Abo/huGt+WChivE7vM8xZQM=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708559928; v=1; b=gKW7BaBouuJAPIRdC2yO2kpq6gkuyhRBSTlXqTnWC3T0dwCZt1dlL//iGSy+JRaARKOX7R/2 jqyXILc+lngYbiZLKBwYsfc6lEFg2iADqgt9uVe0rEZ+qSyNcgJFrwrhlyxWiDZ5DGNi/Tnwln1 rNqDgODm6H8orz6C6qdiert8= X-Received: by 127.0.0.2 with SMTP id 7dTUYY7687511xSHYBplxbxH; Wed, 21 Feb 2024 15:58:48 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.1740.1708559928210574800 for ; Wed, 21 Feb 2024 15:58:48 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267-tgHt_gU6PMKs8cFbzcgNgg-1; Wed, 21 Feb 2024 18:58:46 -0500 X-MC-Unique: tgHt_gU6PMKs8cFbzcgNgg-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D01473869147; Wed, 21 Feb 2024 23:58:45 +0000 (UTC) X-Received: from [10.39.192.46] (unknown [10.39.192.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E01140C94A7; Wed, 21 Feb 2024 23:58:45 +0000 (UTC) Message-ID: <0600b231-8baf-645a-a287-8d623f692bd8@redhat.com> Date: Thu, 22 Feb 2024 00:58:44 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] Peims are not gettting Dispatched in EagleStream Platform To: devel@edk2.groups.io, memristor2@proton.me References: From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Bl6HgC63wqIMNzu2ZXtzC34ux7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=gKW7BaBo; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 2/21/24 07:59, memristor2 via groups.io wrote: > Hi, > I am trying to build edk2-platforms for EagleStream Platform. The > problem I am facing now is that the Peims are not getting dispatched > when The PeiMain routine calls PeiDispatcher(). > After digging deeper into it it seems that the DepexSatisfied() routine > is always returning false. So I also checked this and realized that the > place that is returning false is inside the PeimDispatchReadiness > function: > ||​``` > case (EFI_DEP_END):        DEBUG ((DEBUG_DISPATCH, "  END\n")); >         StackPtr--; >         // >         // Check to make sure EvalStack is balanced.  If not, then there is >         // an error in the dependency grammar, so return > EFI_INVALID_PARAMETER. >         // >         if (StackPtr != &EvalStack[0]) { >   >           DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Underflow Error)\n")); >           return FALSE; >         } > >         DEBUG ((DEBUG_DISPATCH, "  RESULT = %a\n", > IsPpiInstalled (PeiServices, StackPtr) ? "TRUE" : "FALSE")); > >         return IsPpiInstalled (PeiServices, StackPtr); > ``` > It seems that when entering IsPpiInstalled StackPtr in always NULL. > Any thoughts on this? StackPtr being NULL seems extremely unlikely; it is supposed to point to elements of the EvalStack local array (or I guess one past the last element). Now, I can see two potential problems here: - your depex is malformed (for whatever reason), and the eval stack is not torn down entirely before reachig EFI_DEP_END. The code seems to handle that correctly, by returning FALSE. - your depex is malformed such that it immediately starts with an EFI_DEP_END. The code is actually buggy for that case, because it decrements StackPtr *first*, before comparing it against &EvalStack[0]. That decrement invokes undefined behavior. However, I assume in practice the behavior will be the same as in the previous paragraph. A NULL StackPtr value I cannot explain at all. Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115757): https://edk2.groups.io/g/devel/message/115757 Mute This Topic: https://groups.io/mt/104498510/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-