diff options
Diffstat (limited to 'EdkModulePkg')
-rw-r--r-- | EdkModulePkg/Core/Pei/Memory/MemoryServices.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/EdkModulePkg/Core/Pei/Memory/MemoryServices.c b/EdkModulePkg/Core/Pei/Memory/MemoryServices.c index 48b2b3818c..eb99a8040d 100644 --- a/EdkModulePkg/Core/Pei/Memory/MemoryServices.c +++ b/EdkModulePkg/Core/Pei/Memory/MemoryServices.c @@ -301,8 +301,12 @@ Returns: EFI_STATUS Status;
EFI_HOB_MEMORY_POOL *Hob;
-
- Status = PeiCoreCreateHob (
+ //
+ // If some ¡°post-memory¡± PEIM wishes to allocate larger pool,
+ // it should use AllocatePages service instead.
+ //
+ ASSERT (Size < 0x10000 - sizeof (EFI_HOB_MEMORY_POOL));
+ Status = PeiCoreCreateHob (
EFI_HOB_TYPE_PEI_MEMORY_POOL,
(UINT16)(sizeof (EFI_HOB_MEMORY_POOL) + Size),
(VOID **)&Hob
|