diff options
author | Liming Gao <liming.gao@intel.com> | 2016-11-23 12:51:29 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-11-29 11:31:51 +0800 |
commit | 75fe0a78aea7f450a46d958f7ad8219899574acc (patch) | |
tree | ee4393833e2aad9b384f417abfcf55be3b271f05 | |
parent | 8ae17140476861efa642d28849f627fd9940f1af (diff) | |
download | edk2-platforms-75fe0a78aea7f450a46d958f7ad8219899574acc.tar.xz |
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>
Reviewed-by: Star Zeng <star.zeng@intel.com>
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index fed34f3552..27484bafc5 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
|