From nobody Mon May 6 19:25:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46771+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46771+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1567587545; cv=none; d=zoho.com; s=zohoarc; b=LFbPzEDHNE+/V/XFMymWNG5dkVojuL9W6gf8KRlkHZ5g3MoxVfh33BZS3L48g9/rwhNyR9X9ENAcXdFpckg6vCZKPXHBk6A5JxSqecEDeBvPRLL8fSQ+n2Jhsb2XCEd2zRLIft11pvh4DyabrtpXJO470thQPc+7ZJW2nyYexdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567587545; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=Lr4XT1OAsYdmL4Lrr8vEh7XjGJt5+1YhxWPHTMESBDQ=; b=QVhhciKADPKIjx72E98Zv7WvT1YCj7gQvqWm1NN3ZoMVgb5vj4g7ajdlo3XyQNyNqKi2ZgbJcCk+oJLFLQXAGhtwGsUFu+3XGicd2hEMninr6LcLoW3dWbka0SPrdk+puGUWaJ0bQPpksKQF72upB0bS3JqxZiuvDOaGQtOwv9c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46771+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1567587545833397.29246841317945; Wed, 4 Sep 2019 01:59:05 -0700 (PDT) Return-Path: X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Wed, 04 Sep 2019 01:59:04 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 01:59:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,465,1559545200"; d="scan'208";a="187556383" X-Received: from cchiu4-mobl1.gar.corp.intel.com ([10.5.215.135]) by orsmga006.jf.intel.com with ESMTP; 04 Sep 2019 01:59:03 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Laszlo Ersek Subject: [edk2-devel] [PATCH] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList Date: Wed, 4 Sep 2019 16:56:24 +0800 Message-Id: <20190904085624.14424-1-chasel.chiu@intel.com> Precedence: Bulk List-Unsubscribe: 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,chasel.chiu@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1567587545; bh=c4F7JgLoWMZ5mkf/ryUnuuxAMr+jqOd0gfw6CLy1Sjg=; h=Cc:Date:From:Reply-To:Subject:To; b=Y8qUVwmkUxjxzE6hlQPVXSVRdIbN9Gn1b2a8a17Xa8exm2XVmRqnHRS+DkYAT86HrAM tGA16Ke5UYw6p33QKYWM17gSWl2VCq+Jku1bOgDFmMkg2bu9rTKRfZQ+73cfgGcVBrk2Y gRDrUkBL+WbaqCQ5hsI8S1U30jMEUJh9zIw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2153 Current logic will skip searching EFI_PEI_CORE_FV_LOCATION_PPI when the PPI in PpiList having EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST flag, but platform may pass single PPI in PpiList that should be supported. Changed the logic to verify PpiList first before checking EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST flag. Test: Verified single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList and still can boot with the PeiCore specified by above PPI. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Chasel Chiu Reviewed-by: Eric Dong --- UefiCpuPkg/SecCore/SecMain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c index 66c952b897..6beb025b4b 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -238,9 +238,8 @@ SecStartupPhase2( // is enabled. // if (PpiList !=3D NULL) { - for (Index =3D 0; - (PpiList[Index].Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) !=3D = EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; - Index++) { + Index =3D 0; + do { if (CompareGuid (PpiList[Index].Guid, &gEfiPeiCoreFvLocationPpiGuid)= && (((EFI_PEI_CORE_FV_LOCATION_PPI *) PpiList[Index].Ppi)->PeiCoreF= vLocation !=3D 0) ) { @@ -261,7 +260,8 @@ SecStartupPhase2( CpuDeadLoop (); } } - } + Index++; + } while ((PpiList[Index].Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST= ) !=3D EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST); } // // If EFI_PEI_CORE_FV_LOCATION_PPI not found, try to locate PeiCore from= BFV. --=20 2.13.3.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46771): https://edk2.groups.io/g/devel/message/46771 Mute This Topic: https://groups.io/mt/33136208/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-