From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DA07081EA7 for ; Tue, 22 Nov 2016 23:18:56 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 22 Nov 2016 23:18:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,684,1473145200"; d="scan'208";a="194780571" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 22 Nov 2016 23:18:55 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Nov 2016 23:18:54 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Nov 2016 23:18:54 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Wed, 23 Nov 2016 15:18:51 +0800 From: "Zeng, Star" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Zeng, Star" Thread-Topic: [edk2] [Patch] MdeModulePkg PeiCore: Make SetPeiServicesTablePointer() early in EntryPoint Thread-Index: AQHSRUVWGKG1sQEj1UKqzxvb8wMW0aDmKQlA Date: Wed, 23 Nov 2016 07:18:50 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB048310395B9850@shsmsx102.ccr.corp.intel.com> References: <1479876689-14868-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1479876689-14868-1-git-send-email-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDI0OTY1OTEtZTZjZC00MTQ4LWJhNmMtNjg2MjMxYTI3OWE2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjRGb1RQRFA3ZW0wdVpuNXFcL3ZCSHN4YW95NVJuMU5LWEdwWldcL2pEd2hjMD0ifQ== x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg PeiCore: Make SetPeiServicesTablePointer() early in EntryPoint X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 07:18:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Limi= ng Gao Sent: Wednesday, November 23, 2016 12:51 PM To: edk2-devel@lists.01.org Cc: Kinney, Michael D ; Zeng, Star Subject: [edk2] [Patch] MdeModulePkg PeiCore: Make SetPeiServicesTablePoint= er() early in EntryPoint Make SetPeiServicesTablePointer() earlier than ProcessLibraryConstructorLis= t() so the constructor() function can get the correct pei service table poi= nter. https://bugzilla.tianocore.org/show_bug.cgi?id=3D238 Cc: Michael Kinney Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pe= i/PeiMain/PeiMain.c index fed34f3..27484ba 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -208,16 +208,16 @@ PeiCore ( } =20 // - // Initialize libraries that the PEI Core is linked against - // - ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&Old= CoreData->Ps); - =20 - // // Fixup for PeiService's address // SetPeiServicesTablePointer ((CONST EFI_PEI_SERVICES **)&OldCoreData-= >Ps); =20 // + // Initialize libraries that the PEI Core is linked against + // + ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES=20 + **)&OldCoreData->Ps); + + // // Update HandOffHob for new installed permanent memory // HandoffInformationTable =3D OldCoreData->HobList.HandoffInformationT= able; @@ -302,14 +302,14 @@ PeiCore ( PrivateData.Ps =3D &PrivateData.ServiceTableShadow; =20 // - // Initialize libraries that the PEI Core is linked against + // Save PeiServicePointer so that it can be retrieved anywhere. // - ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&Private= Data.Ps); + SetPeiServicesTablePointer ((CONST EFI_PEI_SERVICES=20 + **)&PrivateData.Ps); =20 // - // Save PeiServicePointer so that it can be retrieved anywhere. + // Initialize libraries that the PEI Core is linked against // - SetPeiServicesTablePointer ((CONST EFI_PEI_SERVICES **)&PrivateData.Ps); + ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES=20 + **)&PrivateData.Ps); =20 // // Initialize PEI Core Services -- 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel