mirror of https://github.com/acidanthera/audk.git
MdeModulePkg DxeCore: Move ProcessLibraryConstructorList()
to right after CoreInitializeGcdServices(). Why? Some platforms maybe report both below 4G and above 4G memory resource hob as tested, then CoreInitializeMemoryServices() will find and add the tested above 4G memory resource hob to memory descriptor for early memory allocation services, then if ProcessLibraryConstructorList() that has library constructor tries to allocate below 4G memory and will fail. In fact, the following CoreInitializeGcdServices() will add all the memory resource hob to GCD map, and add the tested below 4G memory resource hob to memory descriptor, but it has been too late for ProcessLibraryConstructorList(). Also move below two lines as they are needed to be after the constructor of DxeCorePerfomanceLib. PERF_END (NULL,"PEI", NULL, 0) ; PERF_START (NULL,"DXE", NULL, 0) ; Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18146 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a3bc432af6
commit
c5d5379937
|
@ -289,13 +289,6 @@ DxeMain (
|
|||
Status = CoreInitializeImageServices (HobStart);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Call constructor for all libraries
|
||||
//
|
||||
ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST);
|
||||
PERF_END (NULL,"PEI", NULL, 0) ;
|
||||
PERF_START (NULL,"DXE", NULL, 0) ;
|
||||
|
||||
//
|
||||
// Report DXE Core image information to the PE/COFF Extra Action Library
|
||||
//
|
||||
|
@ -310,6 +303,13 @@ DxeMain (
|
|||
Status = CoreInitializeGcdServices (&HobStart, MemoryBaseAddress, MemoryLength);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Call constructor for all libraries
|
||||
//
|
||||
ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST);
|
||||
PERF_END (NULL,"PEI", NULL, 0) ;
|
||||
PERF_START (NULL,"DXE", NULL, 0) ;
|
||||
|
||||
//
|
||||
// Install the DXE Services Table into the EFI System Tables's Configuration Table
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue