audk/MdeModulePkg/Core/Dxe/Mem
Jian J Wang dd12683e1f MdeModulePkg/Core: fix mem alloc issues in heap guard
There're two ASSERT issues which will be triggered by boot loader of
Windows 10.

The first is caused by allocating memory in heap guard during another
memory allocation, which is not allowed in DXE core. Avoiding reentry
of memory allocation has been considered in heap guard feature. But
there's a hole in the code of function FindGuardedMemoryMap(). The fix
is adding AllocMapUnit parameter in the condition of while(), which
will prevent memory allocation from happenning during Guard page
check operation.

The second is caused by the core trying to allocate page 0 with Guard
page, which will cause the start address rolling back to the end of
supported system address. According to the requirement of heap guard,
the fix is just simply skipping the free memory at page 0 and let
the core continue searching free memory after it.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2018-03-14 16:15:27 +08:00
..
HeapGuard.c MdeModulePkg/Core: fix mem alloc issues in heap guard 2018-03-14 16:15:27 +08:00
HeapGuard.h MdeModulePkg/Core: fix feature conflict between NX and heap guard 2018-02-02 09:50:16 +08:00
Imem.h MdeModulePkg: Fix unix style of EOL 2017-11-21 20:24:37 +08:00
MemData.c
MemoryProfileRecord.c MdeModulePkg DxeCore: Remove unreferenced symbol for memory profile 2017-03-15 16:47:20 +08:00
Page.c MdeModulePkg/Core: fix a logic hole in page free 2018-01-19 14:16:11 +08:00
Pool.c MdeModulePkg/Core: fix guard page missing issue 2018-02-02 09:50:15 +08:00