public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zeng, Star" <star.zeng@intel.com>
To: "Gao, Liming" <liming.gao@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [Patch] MdeModulePkg PeiCore: Make SetPeiServicesTablePointer() early in EntryPoint
Date: Wed, 23 Nov 2016 07:18:50 +0000	[thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB048310395B9850@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1479876689-14868-1-git-send-email-liming.gao@intel.com>

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
Sent: Wednesday, November 23, 2016 12:51 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2] [Patch] MdeModulePkg PeiCore: Make SetPeiServicesTablePointer() early in EntryPoint

Make SetPeiServicesTablePointer() earlier than ProcessLibraryConstructorList() so the constructor() function can get the correct pei service table pointer.

https://bugzilla.tianocore.org/show_bug.cgi?id=238

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 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/Pei/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 (
       }
 
       //
-      // Initialize libraries that the PEI Core is linked against
-      //
-      ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&OldCoreData->Ps);
-      
-      //
       // Fixup for PeiService's address
       //
       SetPeiServicesTablePointer ((CONST EFI_PEI_SERVICES **)&OldCoreData->Ps);
 
       //
+      // Initialize libraries that the PEI Core is linked against
+      //
+      ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES 
+ **)&OldCoreData->Ps);
+
+      //
       // Update HandOffHob for new installed permanent memory
       //
       HandoffInformationTable = OldCoreData->HobList.HandoffInformationTable;
@@ -302,14 +302,14 @@ PeiCore (
   PrivateData.Ps = &PrivateData.ServiceTableShadow;
 
   //
-  // Initialize libraries that the PEI Core is linked against
+  // Save PeiServicePointer so that it can be retrieved anywhere.
   //
-  ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&PrivateData.Ps);
+  SetPeiServicesTablePointer ((CONST EFI_PEI_SERVICES 
+ **)&PrivateData.Ps);
 
   //
-  // 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 
+ **)&PrivateData.Ps);
 
   //
   // 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


      reply	other threads:[~2016-11-23  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  4:51 [Patch] MdeModulePkg PeiCore: Make SetPeiServicesTablePointer() early in EntryPoint Liming Gao
2016-11-23  7:18 ` Zeng, Star [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0C09AFA07DD0434D9E2A0C6AEB048310395B9850@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox