Remove ASSERT() to make AllocatePool() service match PI spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9815 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d27bd9e95b
commit
2e76dc7e79
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
EFI PEI Core memory services
|
EFI PEI Core memory services
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2010, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -240,7 +240,10 @@ PeiAllocatePool (
|
|||||||
// Generally, the size of heap in temporary memory does not exceed to 64K,
|
// Generally, the size of heap in temporary memory does not exceed to 64K,
|
||||||
// so the maxmium size of pool is 0x10000 - sizeof (EFI_HOB_MEMORY_POOL)
|
// so the maxmium size of pool is 0x10000 - sizeof (EFI_HOB_MEMORY_POOL)
|
||||||
//
|
//
|
||||||
ASSERT (Size < 0x10000 - sizeof (EFI_HOB_MEMORY_POOL));
|
if (Size >= (0x10000 - sizeof (EFI_HOB_MEMORY_POOL))) {
|
||||||
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
}
|
||||||
|
|
||||||
Status = PeiServicesCreateHob (
|
Status = PeiServicesCreateHob (
|
||||||
EFI_HOB_TYPE_MEMORY_POOL,
|
EFI_HOB_TYPE_MEMORY_POOL,
|
||||||
(UINT16)(sizeof (EFI_HOB_MEMORY_POOL) + Size),
|
(UINT16)(sizeof (EFI_HOB_MEMORY_POOL) + Size),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user