X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FMem%2FPool.c;h=bc785a8b9c85cd624b51152acf768f10e303ead8;hp=e0f0869e53df5ea1b552fce780290c11ff3894e2;hb=bb683bf4656730be2210fe3964e20d8c36d19eb5;hpb=127884c52aa132f194cbf5bf30dfab96262c035d diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c index e0f0869e53..bc785a8b9c 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c @@ -1,7 +1,7 @@ /** @file UEFI Memory pool management functions. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
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 @@ typedef struct { #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 @@ typedef struct { #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 @@ CoreInitializePool ( 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 @@ Done: // 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);