summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/Dxe/Mem/Pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Mem/Pool.c')
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/Pool.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c
index ac717fb65f..e5fee1abfc 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Pool.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c
@@ -154,10 +154,11 @@ LookupPoolHead (
}
//
- // MemoryType values in the range 0x80000000..0xFFFFFFFF are reserved for use by UEFI
- // OS loaders that are provided by operating system vendors
+ // MemoryType values in the range 0x80000000..0xFFFFFFFF are reserved for use by UEFI
+ // OS loaders that are provided by operating system vendors.
+ // MemoryType values in the range 0x70000000..0x7FFFFFFF are reserved for OEM use.
//
- if ((INT32)MemoryType < 0) {
+ if ((UINT32) MemoryType >= MEMORY_TYPE_OEM_RESERVED_MIN) {
for (Link = mPoolHeadList.ForwardLink; Link != &mPoolHeadList; Link = Link->ForwardLink) {
Pool = CR(Link, POOL, Link, POOL_SIGNATURE);
@@ -215,7 +216,7 @@ CoreInternalAllocatePool (
//
// If it's not a valid type, fail it
//
- if ((PoolType >= EfiMaxMemoryType && PoolType <= 0x7fffffff) ||
+ if ((PoolType >= EfiMaxMemoryType && PoolType < MEMORY_TYPE_OEM_RESERVED_MIN) ||
(PoolType == EfiConventionalMemory) || (PoolType == EfiPersistentMemory)) {
return EFI_INVALID_PARAMETER;
}