Revision: 14820
http://sourceforge.net/p/edk2/code/14820
Author: lzeng14
Date: 2013-10-30 04:54:53 +0000 (Wed, 30 Oct 2013)
Log Message:
-----------
MdeModulePkg Pool: Update the type of Size to UINTN for the potential more than
4GB buffer allocation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c
Modified: trunk/edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c 2013-10-30 03:49:24 UTC (rev
14819)
+++ trunk/edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c 2013-10-30 04:54:53 UTC (rev
14820)
@@ -1,7 +1,7 @@
/** @file
UEFI Memory pool management functions.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
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
@@ -26,9 +26,9 @@
#define POOL_HEAD_SIGNATURE SIGNATURE_32('p','h','d','0')
typedef struct {
UINT32 Signature;
- UINT32 Size;
+ UINT32 Reserved;
EFI_MEMORY_TYPE Type;
- UINTN Reserved;
+ UINTN Size;
CHAR8 Data[1];
} POOL_HEAD;
@@ -37,7 +37,8 @@
#define POOL_TAIL_SIGNATURE SIGNATURE_32('p','t','a','l')
typedef struct {
UINT32 Signature;
- UINT32 Size;
+ UINT32 Reserved;
+ UINTN Size;
} POOL_TAIL;
@@ -97,7 +98,7 @@
mPoolHead[Type].Used = 0;
mPoolHead[Type].MemoryType = (EFI_MEMORY_TYPE) Type;
for (Index=0; Index < MAX_POOL_LIST; Index++) {
- InitializeListHead (&mPoolHead[Type].FreeList[Index]);
+ InitializeListHead (&mPoolHead[Type].FreeList[Index]);
}
}
}
@@ -331,11 +332,11 @@
// If we have a pool buffer, fill in the header & tail info
//
Head->Signature = POOL_HEAD_SIGNATURE;
- Head->Size = (UINT32) Size;
+ Head->Size = Size;
Head->Type = (EFI_MEMORY_TYPE) PoolType;
Tail = HEAD_TO_TAIL (Head);
Tail->Signature = POOL_TAIL_SIGNATURE;
- Tail->Size = (UINT32) Size;
+ Tail->Size = Size;
Buffer = Head->Data;
DEBUG_CLEAR_MEMORY (Buffer, Size - POOL_OVERHEAD);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits