From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from APC01-PSA-obe.outbound.protection.outlook.com (APC01-PSA-obe.outbound.protection.outlook.com [40.107.255.50]) by mx.groups.io with SMTP id smtpd.web10.81856.1684127908956159253 for ; Sun, 14 May 2023 22:18:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@insyde.com header.s=selector1 header.b=AQBFBXRI; spf=pass (domain: insyde.com, ip: 40.107.255.50, mailfrom: wendy.liao@insyde.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jxnH2aO94miM1xhWiH0QoJL91mc/Bkjn3b71y4oh3fqLlT2vjSgtXS7LUSfKIjsgHIVz2XOjwm7d2EcH3bIMP8mINKaZjLDoXqVqigmnIZ4xAOkD1vMiyXp449VA7EVC4LOYcaQfpNn007x8Ux8xxZ7ZLTKiBZiLjVeEv+0MUo1jxCp6X26CkBYree9I6kwp1m6Y5n/+VMVXs1hsrYF0wSrOAOCfc91PoXPyC/+a60dm5WqtfuWhIAFvHK+OLh5XEKKFvL584FV2L0w/v6chruV+6BRDakk3y0JsYZHb81xJyZCDKEUxzTSKiV1gGKGZ4QZ5LypUxl+aQ6Df4DwZTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xWXlsD8JKl6TBmW31KajMuDPXA710EotqI2wPA2t6vs=; b=JdCYzzWms05Mn9N46qS42Sxd7w1pe38fZNWHEnnkD910YrBPq2byUlSZ2lEoMPhY+WXi5rcSkN9XpsP+LKvdzrYGCwsWMW2lSK03p0gcKEmeJokiqFBVs7BPAk0v2B3GIvVhjLaDsr8Po+ECzFOq8nmiShOgu2SAcui2E0tR2Y9qeUXkQWCbBjFm5LIMVvZE9eRP5MRxQAZOC/rA0y/WqzgKu3AJPYe0ABgnnRXXsNczCqzBVh0ZiQ7aha27+Jl/6wejtRZh5BdnMdByyeKN0YZIpmVTRfFtgWQ7nnNvsZAxAm2BGnmDmmpKIv/iTDZdzeThbH4gV3wFU7T37T5/XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=insyde.com; dmarc=pass action=none header.from=insyde.com; dkim=pass header.d=insyde.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=insyde.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xWXlsD8JKl6TBmW31KajMuDPXA710EotqI2wPA2t6vs=; b=AQBFBXRIrzpERL+4SY7zj1RpSY8DCNzbRM4ely38YW1+AX3gKf/01+5anFFk6XQBeTTfoDrXxbPfmqJt8zZU1oBIQAfrok64YEkL66QT3A7PHqnHVKzrerghsD4nRehiUdt/71LvpMFRiO+QRG2BbF4WDieS/i/8JVCwnpQK8em4AR/ZdJizCyd7Td1uYYvTWRekCqiR3Ra4z3HQ2ayVTzBdAsoqgmJad5TQYjoUQ/5FuZhJJMebAUeZ4RjHgwdX/vzZbvswf52to30A+cNEdR2VUqNIaR+RHQZ3AEcDBlFUlWiOROvazawhL49ndiOfkUOigqv3KpbiWZChHL7kyw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=insyde.com; Received: from TY2PR02MB4446.apcprd02.prod.outlook.com (2603:1096:404:8008::11) by KL1PR02MB6500.apcprd02.prod.outlook.com (2603:1096:820:cc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.12; Mon, 15 May 2023 05:18:22 +0000 Received: from TY2PR02MB4446.apcprd02.prod.outlook.com ([fe80::dbd4:4017:1c57:23d7]) by TY2PR02MB4446.apcprd02.prod.outlook.com ([fe80::dbd4:4017:1c57:23d7%3]) with mapi id 15.20.6411.014; Mon, 15 May 2023 05:18:22 +0000 Message-ID: Date: Mon, 15 May 2023 13:18:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: =?UTF-8?B?UmU6IOWbnuWkjTog5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBNZGVNb2R1bGVQa2cvQ29yZS9QZWk6IHNldCBBcHJpb3JpQ291bnQ9MCBiZWZvcmUgd2Fsa2luZyB0aHJvdWdoIG5leHQgRlY=?= To: gaoliming , devel@edk2.groups.io CC: 'Leon Chen' , 'Tim Lewis' References: <009501d983a8$6295f740$27c1e5c0$@byosoft.com.cn> <50fc03ee-969b-49aa-3edd-e05c049c0b2e@insyde.com> <00cb01d983b3$d02f3680$708da380$@byosoft.com.cn> From: Wendy Liao In-Reply-To: <00cb01d983b3$d02f3680$708da380$@byosoft.com.cn> X-ClientProxiedBy: SG2PR03CA0099.apcprd03.prod.outlook.com (2603:1096:4:7c::27) To TY2PR02MB4446.apcprd02.prod.outlook.com (2603:1096:404:8008::11) Return-Path: wendy.liao@insyde.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY2PR02MB4446:EE_|KL1PR02MB6500:EE_ X-MS-Office365-Filtering-Correlation-Id: 370b479c-0ca3-471f-8af5-08db5503cd1d X-LD-Processed: 8c8c18f6-76e9-4eeb-9238-a7b3da7871d8,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VYGt0/bme7jKwF+FLveZQq7zaJLWI+wxU9einy0ELlPWF2UyOPeY6yauCSe1/jL/uNyzd3ZiXDJigl12eY5qvPd3DPjmnjQShST+xCUu61LeVfFpAwPJF5WzRkFG48gmDLjKpku+dSLXwlR62O0bOUExYVaYMHB8vFdZx//kzO99d2RUvJImxy1F7ZruTcpA8SmSe1cHziRs87WFS9GYb1/EG4G3f18VD3eKsCLUlWFpobaOY84vKb2PMN8qVcMKL7rnjxniZiECVKUrm/ycodCi50PU/eMEdHJQhCvqq3+4V3vCIlInNZ4fJI/OVfeDulH7Rbck8NRCmOTcvqP49XI1BGXyirXEFMPwx7pZCluDLRyuyR1yomxQ5q050iwEI55SjZd8Z1tlS/JSJrUBdUDwm73K2tkMCQ/CuBbDYX5FeqlwFgw1hEOaYUXjXub8G0TSNY6WJPvxWpcDrkhAtqdEQBvGnUvWDDQtNfnLIClPnsxOQ/6rgmdkh4mGt0vDLYmFMAqPByhGNHKfV1EoNsC12NR13zyVlHx2rHsI7Ok8X3Ha/KXlsKyc63+Wjumn/Ue5LX1csUH+0aFsK8GcW/eb46ZAI9Tg+1e4kUFKZMdGtH03oyLqiPq8VpGdIKf5xnjgR6jLuuy3RU9SyKhRg58Jkn/ni4PWQtXwgHqmVEU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY2PR02MB4446.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(366004)(346002)(396003)(39850400004)(136003)(451199021)(31686004)(66899021)(966005)(66556008)(66946007)(66476007)(4326008)(478600001)(6486002)(86362001)(316002)(54906003)(224303003)(36756003)(83380400001)(26005)(107886003)(186003)(6512007)(2616005)(6506007)(41300700001)(8936002)(5660300002)(44832011)(6666004)(2906002)(31696002)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3OZoICY2wREnAx9V69cpgWZRk9cjvg7nlXZsF8dpw6rNoRVtm7O7fSwez/TD?= =?us-ascii?Q?vinX8jTqoDzEiI0NMwNYTyv51nRbSE7mT+q7s8EMPaKkO4pF2sfde7Wp1+8o?= =?us-ascii?Q?rQhoK6YOEoVB+8p+jea9uMfkgRtf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ascii?Q?elU7W8p3Qkki+Af1pRb4zWJjsCNEWZQKRDVniT1YNoQ0aIzTC6F4x8wYpfhh?= =?us-ascii?Q?f8NZeM09S3XmSnssZGGHrhIJIjS6qiDTZ/Hl/VibyAwDqFYesdpFgmpYI8oe?= =?us-ascii?Q?16tKWyKUSZNR1ISDUREzuM8YJzQFfDLM7OEjY5L35mPZlvWmYt9QczOcOw5+?= =?us-ascii?Q?lbfym7pOGkJj7csvNDHUeUsizoPHVEkXiu+3sfFi0RJF0O7CG20havrIclIO?= =?us-ascii?Q?Pdb77BzCjqABXsGGFY35iNqj5zU1Np8wh0vwurL+j5541QcxhzGt9z4QUOMZ?= =?us-ascii?Q?SKlvku//7puUpwPyG5ikjW0eu7OSOZuCA0MA1fcMwCEBJMb7qlB1B12AZEnh?= =?us-ascii?Q?IotEIPO9uNISdXI0p66WZFLap+xhfh308+33qWMdbFL9lRU3DwLP43MHxdjc?= =?us-ascii?Q?+QLlKeg/fce4iFoJTPTPweLNaFh+OFbcLHpgjyhq4dTscYgRJ0Kfzd3ftXZc?= =?us-ascii?Q?CJ8Z7M4MGH6lVWrdnH1CYCA/H/DdNgVaOpU+2CNHPDeWpI5y5+SxNdg8jzOT?= =?us-ascii?Q?XxwkWmHN2yUCf00Opocs3MpnosaweKdszeih3cXQ?= X-OriginatorOrg: insyde.com X-MS-Exchange-CrossTenant-Network-Message-Id: 370b479c-0ca3-471f-8af5-08db5503cd1d X-MS-Exchange-CrossTenant-AuthSource: TY2PR02MB4446.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2023 05:18:22.4404 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8c8c18f6-76e9-4eeb-9238-a7b3da7871d8 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XvTDQDiAuxEsrsHVNmzWaLdcdPZz0CxspMBm3zQowvCHGRUKKO3bJakCUBJxWmCh/Oo9X2fXtIvdXdqKUoMDIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR02MB6500 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Liming, Merged https://github.com/tianocore/edk2/pull/4397 Thank you. Best Regards, Wendy Liao Insyde Software Corp. Phone: +886-2-6608-3688 Ext.8731 gaoliming =E6=96=BC 2023/05/11 =E4=B8=8A=E5=8D=88 10:53 =E5=AF=AB=E9=81=93: > Wendy: > I understand the problem now. Your fix is correct. Reviewed-by: Liming= Gao > > This is a bug fix. I suggest to merge it for this stable tag 202305. > > Thanks > Liming >> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- >> =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Wendy Liao >> via groups.io >> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=8811=E6=97=A5= 10:23 >> =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; devel= @edk2.groups.io >> =E6=8A=84=E9=80=81: 'Leon Chen' ; 'Tim Lewis' >> >> =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH] MdeModu= lePkg/Core/Pei: set >> AprioriCount=3D0 before walking through next FV >> >> Hi gaoliming, >> >> DiscoverPeimsAndOrderWithApriori () will not reset Private->AprioriCount >> to Zero when CoreFileHandle->ScanFv =3D TRUE. >> DiscoverPeimsAndOrderWithApriori () { >> ... >> if (CoreFileHandle->ScanFv) { >> Private->CurrentFvFileHandles =3D CoreFileHandle->FvFileHandles; >> return; >> } >> ... >> } >> After go through all FV and the last FV has one or more Apriori Peim, >> Private->AprioriCount will not be reset to 0 anymore. >> >> Scan loop 1 >> [FV1] >> Before DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D 0= , >> CoreFileHandle->ScanFv =3D FALSE >> After DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D >> 2, CoreFileHandle->ScanFv =3D TRUE >> [FV2] >> Before DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D 2= , >> CoreFileHandle->ScanFv =3D FALSE >> After DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D >> 0, CoreFileHandle->ScanFv =3D TRUE >> ... >> [FVn] >> Before DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D 0= , >> CoreFileHandle->ScanFv =3D FALSE >> After DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D >> 1, CoreFileHandle->ScanFv =3D TRUE >> >> Scan loop 2 >> [FV1] >> Before DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D 1= , >> CoreFileHandle->ScanFv =3D TRUE >> After DiscoverPeimsAndOrderWithApriori () : Private->AprioriCount =3D >> 1, CoreFileHandle->ScanFv =3D TRUE >> >> Best Regards, >> >> Wendy Liao >> Insyde Software Corp. >> Phone: +886-2-6608-3688 Ext.8731 >> >> gaoliming =E6=96=BC 2023/05/11 =E4=B8=8A=E5=8D=88 09:32 =E5=AF=AB=E9=81= =93: >>> Wendy: >>> DiscoverPeimsAndOrderWithApriori () has the logic to reset >> Private->AprioriCount as zero. >>> It will set the real AprioriCount for each FV when this FV first sc= ans, >> then dispatch the peims in the apriori list. >>> So, I don't think there is the issue here. Do you find the real >> functionality issue? >>> Thanks >>> Liming >>>> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- >>>> =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 Wendy >> Liao >>>> via groups.io >>>> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=8810=E6=97= =A5 14:23 >>>> =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io >>>> =E6=8A=84=E9=80=81: Leon Chen ; Tim Lewis >>>> >>>> =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH] MdeModulePkg/Core/Pei: set Ap= rioriCount=3D0 >>>> before walking through next FV >>>> >>>> >>>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4438 >>>> >>>> The main dispatch loop in PeiDispatcher() goes through each FV and >>>> calls DiscoverPeimsAndOrderWithApriori() to search Apriori file to >>>> reorder all PEIMs then do the PEIM dispatched. >>>> >>>> DiscoverPeimsAndOrderWithApriori() calculates Apriori file count for >>>> every FV once and set Private->AprioriCount, but Private->AprioriCount >>>> doesn't be set to 0 before dispatch loop walking through the next FV. >>>> >>>> It causes the peim which sort on less than Private->AprioriCount and >>>> depex is not satisfied would be dispatched when dispatch loop go throu= gh >>>> to a scaned FV, even the peim is not set in APRIORI file. >>>> >>>> Cc: Leon Chen >>>> Cc: Tim Lewis >>>> Reported-by: Esther Lee >>>> Signed-off-by: Wendy Liao >>>> >>>> --- >>>> MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c >>>> b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c >>>> index d8284f9f4f..5f32ebb560 100644 >>>> --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c >>>> +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c >>>> @@ -1630,6 +1630,7 @@ PeiDispatcher ( >>>> Private->CurrentFileHandle =3D NULL; >>>> Private->CurrentPeimCount =3D 0; >>>> Private->CurrentFvFileHandles =3D NULL; >>>> + Private->AprioriCount =3D 0; >>>> } >>>> >>>> // >>>> -- >>>> 2.29.2.windows.2 >>>> >>>> >>>> >>>> >>>> >>>> >>> >> >>=20 >> > >