audk/MdeModulePkg/Core/Dxe
Ard Biesheuvel 1cf4e9339d MdeModulePkg: DxeCore: fully initialize image context before passing it on
When the DXE core is loaded, it invokes the PeCoffExtraActionLib library
function 'PeCoffLoaderRelocateImageExtraAction' explicitly, which may be
in addition to the same function having been called by the DxeIpl PE/COFF
loader instance.

The ImageContext that DXE core presents to this function is only partially
initialized, which may result in the following output on AArch64 systems:

add-symbol-file ..MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0x5F226240
<some intermediate output>
add-symbol-file ..MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0x5F226000

This is caused by incorrect data in the ImageContext structure, which means
the start of the .text section is calculated incorrectly. In general, it is
the duty of the caller to present a valid ImageContext structure, so let's
add the missing values before invoking PeCoffLoaderRelocateImageExtraAction().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-03-01 10:15:59 +01:00
..
Dispatcher MdeModulePkg: Update DxeCore dispatcher to ignore PEI and SMM depex for FV. 2016-02-05 12:21:25 +08:00
DxeMain MdeModulePkg: DxeCore: fully initialize image context before passing it on 2016-03-01 10:15:59 +01:00
Event MdeModulePkg DxeCore: Avoid the closed event to be signaled wrongly 2016-01-27 10:15:15 +00:00
FwVol MdeModulePkg DxeCore: Fix potential FV overflow of 4GB boundary on a 32-bit systems. 2014-12-17 00:39:51 +00:00
FwVolBlock DxeCore is designed to trust input data, so add comments to reminder caller to do check to follow PI specification when necessary. 2014-01-17 03:42:09 +00:00
Gcd MdeModulePkg/Core/Dxe/Gcd: remove set but not used variables 2015-09-21 00:50:32 +00:00
Hand MdeModulePkg: Remove event from protocol database only if registered 2015-09-21 01:53:34 +00:00
Image MdeModulePkg: Update DxeCore to handle LoadFile DevicePath 2015-07-02 04:28:21 +00:00
Library Update the copyright notice format 2010-04-24 09:49:11 +00:00
Mem MdeModulePkg DxeCore: Minor comments update to AllocatePool() 2016-02-15 18:12:03 +08:00
Misc MdeModulePkg: Add ASSERT to make sure pointer 'MemoryMap' is not NULL. 2016-02-26 14:59:22 +08:00
SectionExtraction MdeModulePkg DxeCore: Don't cache memory mapped IO FV. 2014-08-27 08:31:44 +00:00
DxeCore.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DxeCoreExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DxeMain.h MdeModulePkg: Add CoreInitializeMemoryAttributesTable() to header file. 2016-02-17 07:29:06 +08:00
DxeMain.inf MdePkg: Update DxeCore INF for MemoryAttributesTable. 2016-02-17 07:32:22 +08:00