MdeModulePkg/PiSmmCore: Fix an assert issue in pool free
Following check-in caused this issue:
2930ef9809
This issue is caused by assigning incorrect value to PoolHdr.Size
if the requested size is more than MAX_POOL_SIZE, because the SMM
core will actually allocate page memory instead of pool memory in
this situation.
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Wu Hao <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Wu Hao <hao.a.wu@intel.com>
Tested-by: Wu Hao <hao.a.wu@intel.com>
This commit is contained in:
@@ -287,7 +287,7 @@ SmmInternalAllocatePool (
|
||||
|
||||
PoolHdr = (POOL_HEADER*)(UINTN)Address;
|
||||
PoolHdr->Signature = POOL_HEAD_SIGNATURE;
|
||||
PoolHdr->Size = Size;
|
||||
PoolHdr->Size = EFI_PAGES_TO_SIZE (NoPages);
|
||||
PoolHdr->Available = FALSE;
|
||||
PoolHdr->Type = PoolType;
|
||||
|
||||
|
Reference in New Issue
Block a user