audk/MdeModulePkg/Universal/EbcDxe/X64
Ard Biesheuvel 16dc5b68fc MdeModulePkg/EbcDxe: use EfiBootServicesCode memory for thunks
The EBC driver emits thunks for native to EBC calls, which are short
instructions sequences that bridge the gap between the native execution
environment and the EBC virtual machine.

Since these thunks are allocated using MemoryAllocationLib::AllocatePool(),
they are emitted into EfiBootServicesData regions, which does not reflect
the nature of these thunks accurately, and interferes with strict memory
protection policies that map data regions non-executable.

So instead, create a new helper EbcAllocatePoolForThunk() that invokes the
AllocatePool() boot service directly to allocate EfiBootServicesCode pool
memory explicitly, and wire up this helper for the various architecture
specific thunk generation routines.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2017-02-28 14:59:50 +00:00
..
EbcLowLevel.S Fix X64 native function call prolog. Prepare space for at least 4 arguments, 2014-09-22 05:54:41 +00:00
EbcLowLevel.asm Fix X64 native function call prolog. Prepare space for at least 4 arguments, 2014-09-22 05:54:41 +00:00
EbcLowLevel.nasm MdeModulePkg EbcDxe: Convert X64/EbcLowLevel.asm to NASM 2016-06-28 09:51:58 +08:00
EbcSupport.c MdeModulePkg/EbcDxe: use EfiBootServicesCode memory for thunks 2017-02-28 14:59:50 +00:00