From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 443DE81D38 for ; Tue, 6 Dec 2016 17:59:47 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 06 Dec 2016 17:59:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,310,1477983600"; d="scan'208";a="1068900027" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 06 Dec 2016 17:59:46 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Dec 2016 17:59:46 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Dec 2016 17:59:46 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.239]) with mapi id 14.03.0248.002; Wed, 7 Dec 2016 09:59:44 +0800 From: "Fan, Jeff" To: "Yao, Jiewen" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , Laszlo Ersek Thread-Topic: [PATCH] MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType. Thread-Index: AQHSS6w8A4P5eZXDi0mAPRQyRgt7taD7wkfQ Date: Wed, 7 Dec 2016 01:59:44 +0000 Message-ID: <542CF652F8836A4AB8DBFAAD40ED192A4A2F57EB@shsmsx102.ccr.corp.intel.com> References: <1480580607-19928-1-git-send-email-jiewen.yao@intel.com> In-Reply-To: <1480580607-19928-1-git-send-email-jiewen.yao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmExMmI2N2MtMzBlZC00NTAyLWJjNjAtYWU3NDVhNjg0YzI2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjZ2ZGVTWmRhK3NGYnREdjA2ZkJkeFJUMmZGU1JnSEwrTnhvZG04Njd5RTQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2016 01:59:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable /** + Convert a UEFI memory type to SMM pool type. + + @param[in] PoolType Type of pool to allocate. [Jeff] Typo. *PoolType* should be *MemoryType*. Reviewed-by: Jeff Fan with this typo fix. -----Original Message----- From: Yao, Jiewen=20 Sent: Thursday, December 01, 2016 4:23 PM To: edk2-devel@lists.01.org Cc: Fan, Jeff; Kinney, Michael D; Laszlo Ersek Subject: [PATCH] MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType= . PiSmmCore supports page level protection based upon the Memory Type (EfiRuntimeServicesCode/EfiRuntimeServicesData) and PE image. However, the Memory Type information is ignored in AllocatePool(). If a caller calls AllocatePool with EfiRuntimeServicesCode, the final memor= y is still allocated as EfiRuntimeServicesData. This patch supports AllocatePool with EfiRuntimeServicesCode. Cc: Jeff Fan Cc: Michael D Kinney Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 13 ++- MdeModulePkg/Core/PiSmmCore/Pool.c | 66 +++++++++--- MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c | 114 +++++++++++--------= - 3 files changed, 124 insertions(+), 69 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h b/MdeModulePkg/Core/Pi= SmmCore/PiSmmCore.h index e2fee54..8df1e50 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h @@ -1109,8 +1109,9 @@ extern LIST_ENTRY mSmmMemoryMap; #define MAX_POOL_I= NDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1) =20 typedef struct { - UINTN Size; - BOOLEAN Available; + UINTN Size; + BOOLEAN Available; + EFI_MEMORY_TYPE Type; } POOL_HEADER; =20 typedef struct { @@ -1118,6 +1119,12 @@ typedef struct { LIST_ENTRY Link; } FREE_POOL_HEADER; =20 -extern LIST_ENTRY mSmmPoolLists[MAX_POOL_INDEX]; +typedef enum { + SmmPoolTypeCode, + SmmPoolTypeData, + SmmPoolTypeMax, +} SMM_POOL_TYPE; + +extern LIST_ENTRY mSmmPoolLists[SmmPoolTypeMax][MAX_POOL_INDEX]; =20 #endif diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCo= re/Pool.c index dcfd13e..6fb426c 100644 --- a/MdeModulePkg/Core/PiSmmCore/Pool.c +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c @@ -14,7 +14,7 @@ =20 #include "PiSmmCore.h" =20 -LIST_ENTRY mSmmPoolLists[MAX_POOL_INDEX]; +LIST_ENTRY mSmmPoolLists[SmmPoolTypeMax][MAX_POOL_INDEX]; // // To cache the SMRAM base since when Loading modules At fixed address fea= ture is enabled, // all module is assigned an offset relative the SMRAM ba= se in build time. @@ -22,6 +22,30 @@ LIST_ENTRY mSmmPoolLists[MAX_POOL_INDEX]; GLOBAL_REMOVE_IF_UNREFERENCED EFI_PHYSICAL_ADDRESS gLoadModuleAtFix= AddressSmramBase =3D 0; =20 /** + Convert a UEFI memory type to SMM pool type. + + @param[in] PoolType Type of pool to allocate. + + @return SMM pool type +**/ +SMM_POOL_TYPE +UefiMemoryTypeToSmmPoolType ( + IN EFI_MEMORY_TYPE MemoryType + ) +{ + ASSERT ((MemoryType =3D=3D EfiRuntimeServicesCode) || (MemoryType =3D=3D= =20 +EfiRuntimeServicesData)); + switch (MemoryType) { + case EfiRuntimeServicesCode: + return SmmPoolTypeCode; + case EfiRuntimeServicesData: + return SmmPoolTypeData; + default: + return SmmPoolTypeMax; + } +} + + +/** Called to initialize the memory service. =20 @param SmramRangeCount Number of SMRAM Regions @@ -35,15 +59,18 @@ SmmInitializeMemoryServices ( ) { UINTN Index; - UINT64 SmmCodeSize; - UINTN CurrentSmramRangesIndex; - UINT64 MaxSize; + UINT64 SmmCodeSize; + UINTN CurrentSmramRangesIndex; + UINT64 MaxSize; + UINTN SmmPoolTypeIndex; =20 // // Initialize Pool list // - for (Index =3D ARRAY_SIZE (mSmmPoolLists); Index > 0;) { - InitializeListHead (&mSmmPoolLists[--Index]); + for (SmmPoolTypeIndex =3D 0; SmmPoolTypeIndex < SmmPoolTypeMax; SmmPoolT= ypeIndex++) { + for (Index =3D 0; Index < ARRAY_SIZE (mSmmPoolLists[SmmPoolTypeIndex])= ; Index++) { + InitializeListHead (&mSmmPoolLists[SmmPoolTypeIndex][Index]); + } } CurrentSmramRangesIndex =3D 0; // @@ -117,6 +144,7 @@ SmmInitializeMemoryServices ( /** Internal Function. Allocate a pool by specified PoolIndex. =20 + @param PoolType Type of pool to allocate. @param PoolIndex Index which indicate the Pool size. @param FreePoolHdr The returned Free pool. =20 @@ -126,6 +154,7 @@ SmmInitializeMemoryServices ( **/ EFI_STATUS Interna= lAllocPoolByIndex ( + IN EFI_MEMORY_TYPE PoolType, IN UINTN PoolIndex, OUT FREE_POOL_HEADER **FreePoolHdr ) @@ -133,25 +162,29 @@ InternalAllocPoolByIndex ( EFI_STATUS Status; FREE_POOL_HEADER *Hdr; EFI_PHYSICAL_ADDRESS Address; + SMM_POOL_TYPE SmmPoolType; + + SmmPoolType =3D UefiMemoryTypeToSmmPoolType(PoolType); =20 ASSERT (PoolIndex <=3D MAX_POOL_INDEX); Status =3D EFI_SUCCESS; Hdr =3D NULL; if (PoolIndex =3D=3D MAX_POOL_INDEX) { - Status =3D SmmInternalAllocatePages (AllocateAnyPages, EfiRuntimeServi= cesData, EFI_SIZE_TO_PAGES (MAX_POOL_SIZE << 1), &Address); + Status =3D SmmInternalAllocatePages (AllocateAnyPages, PoolType,=20 + EFI_SIZE_TO_PAGES (MAX_POOL_SIZE << 1), &Address); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; } Hdr =3D (FREE_POOL_HEADER *) (UINTN) Address; - } else if (!IsListEmpty (&mSmmPoolLists[PoolIndex])) { - Hdr =3D BASE_CR (GetFirstNode (&mSmmPoolLists[PoolIndex]), FREE_POOL_H= EADER, Link); + } else if (!IsListEmpty (&mSmmPoolLists[SmmPoolType][PoolIndex])) { + Hdr =3D BASE_CR (GetFirstNode=20 + (&mSmmPoolLists[SmmPoolType][PoolIndex]), FREE_POOL_HEADER, Link); RemoveEntryList (&Hdr->Link); } else { - Status =3D InternalAllocPoolByIndex (PoolIndex + 1, &Hdr); + Status =3D InternalAllocPoolByIndex (PoolType, PoolIndex + 1, &Hdr); if (!EFI_ERROR (Status)) { Hdr->Header.Size >>=3D 1; Hdr->Header.Available =3D TRUE; - InsertHeadList (&mSmmPoolLists[PoolIndex], &Hdr->Link); + Hdr->Header.Type =3D PoolType; + InsertHeadList (&mSmmPoolLists[SmmPoolType][PoolIndex],=20 + &Hdr->Link); Hdr =3D (FREE_POOL_HEADER*)((UINT8*)Hdr + Hdr->Header.Size); } } @@ -159,6 +192,7 @@ InternalAllocPoolByIndex ( if (!EFI_ERROR (Status)) { Hdr->Header.Size =3D MIN_POOL_SIZE << PoolIndex; Hdr->Header.Available =3D FALSE; + Hdr->Header.Type =3D PoolType; } =20 *FreePoolHdr =3D Hdr; @@ -178,16 +212,19 @@ InternalFreePoolByIndex ( IN FREE_POOL_HEADER *FreePoolHdr ) { - UINTN PoolIndex; + UINTN PoolIndex; + SMM_POOL_TYPE SmmPoolType; =20 ASSERT ((FreePoolHdr->Header.Size & (FreePoolHdr->Header.Size - 1)) =3D= =3D 0); ASSERT (((UINTN)FreePoolHdr & (FreePoolHdr->Header.Size - 1)) =3D=3D 0); ASSERT (FreePoolHdr->Header.Size >=3D MIN_POOL_SIZE); =20 + SmmPoolType =3D UefiMemoryTypeToSmmPoolType(FreePoolHdr->Header.Type); + PoolIndex =3D (UINTN) (HighBitSet32 ((UINT32)FreePoolHdr->Header.Size) -= MIN_POOL_SHIFT); FreePoolHdr->Header.Available =3D TRUE; ASSERT (PoolIndex < MAX_POOL_INDEX); - InsertHeadList (&mSmmPoolLists[PoolIndex], &FreePoolHdr->Link); + InsertHeadList (&mSmmPoolLists[SmmPoolType][PoolIndex],=20 + &FreePoolHdr->Link); return EFI_SUCCESS; } =20 @@ -234,6 +271,7 @@ SmmInternalAllocatePool ( PoolHdr =3D (POOL_HEADER*)(UINTN)Address; PoolHdr->Size =3D EFI_PAGES_TO_SIZE (Size); PoolHdr->Available =3D FALSE; + PoolHdr->Type =3D PoolType; *Buffer =3D PoolHdr + 1; return Status; } @@ -244,7 +282,7 @@ SmmInternalAllocatePool ( PoolIndex++; } =20 - Status =3D InternalAllocPoolByIndex (PoolIndex, &FreePoolHdr); + Status =3D InternalAllocPoolByIndex (PoolType, PoolIndex,=20 + &FreePoolHdr); if (!EFI_ERROR(Status)) { *Buffer =3D &FreePoolHdr->Header + 1; } diff --git a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c b/MdeModulePk= g/Core/PiSmmCore/SmramProfileRecord.c index d983cef..dda9f12 100644 --- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c +++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c @@ -1596,6 +1596,7 @@ SmramProfileGetDataSize ( FREE_POOL_HEADER *Pool; UINTN PoolListIndex; UINTN Index; + UINTN SmmPoolTypeIndex; =20 ContextData =3D GetSmramProfileContext (); if (ContextData =3D=3D NULL) { @@ -1638,19 +1639,20 @@ SmramProfileGetDataSize ( Node =3D Node->BackLink) { Index++; } - for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListIndex+= +) { - FreePoolList =3D &mSmmPoolLists[PoolListIndex]; - for (Node =3D FreePoolList->BackLink; - Node !=3D FreePoolList; - Node =3D Node->BackLink) { - Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); - if (Pool->Header.Available) { - Index++; + for (SmmPoolTypeIndex =3D 0; SmmPoolTypeIndex < SmmPoolTypeMax; SmmPoolT= ypeIndex++) { + for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListInde= x++) { + FreePoolList =3D &mSmmPoolLists[SmmPoolTypeIndex][PoolListIndex]; + for (Node =3D FreePoolList->BackLink; + Node !=3D FreePoolList; + Node =3D Node->BackLink) { + Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); + if (Pool->Header.Available) { + Index++; + } } } } =20 - TotalSize +=3D (sizeof (MEMORY_PROFILE_FREE_MEMORY) + Index * sizeof (ME= MORY_PROFILE_DESCRIPTOR)); TotalSize +=3D (sizeof (MEMORY_PROFILE_MEMORY_RANGE) + mFullSmramRangeCo= unt * sizeof (MEMORY_PROFILE_DESCRIPTOR)); =20 @@ -1698,6 +1700,7 @@ SmramProfileCopyData ( UINT64 RemainingSize; UINTN PdbSize; UINTN ActionStringSize; + UINTN SmmPoolTypeIndex; =20 ContextData =3D GetSmramProfileContext (); if (ContextData =3D=3D NULL) { @@ -1785,14 +1788,16 @@ SmramProfileCopyData ( Node =3D Node->BackLink) { Index++; } - for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListIn= dex++) { - FreePoolList =3D &mSmmPoolLists[MAX_POOL_INDEX - PoolListIndex - 1= ]; - for (Node =3D FreePoolList->BackLink; - Node !=3D FreePoolList; - Node =3D Node->BackLink) { - Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); - if (Pool->Header.Available) { - Index++; + for (SmmPoolTypeIndex =3D 0; SmmPoolTypeIndex < SmmPoolTypeMax; SmmP= oolTypeIndex++) { + for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolList= Index++) { + FreePoolList =3D &mSmmPoolLists[SmmPoolTypeIndex][MAX_POOL_INDEX= - PoolListIndex - 1]; + for (Node =3D FreePoolList->BackLink; + Node !=3D FreePoolList; + Node =3D Node->BackLink) { + Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); + if (Pool->Header.Available) { + Index++; + } } } } @@ -1827,29 +1832,31 @@ SmramProfileCopyData ( } Offset +=3D sizeof (MEMORY_PROFILE_DESCRIPTOR); } - for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListIndex+= +) { - FreePoolList =3D &mSmmPoolLists[MAX_POOL_INDEX - PoolListIndex - 1]; - for (Node =3D FreePoolList->BackLink; - Node !=3D FreePoolList; - Node =3D Node->BackLink) { - Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); - if (Pool->Header.Available) { - if (*ProfileOffset < (Offset + sizeof (MEMORY_PROFILE_DESCRIPTOR))= ) { - if (RemainingSize >=3D sizeof (MEMORY_PROFILE_DESCRIPTOR)) { - MemoryProfileDescriptor =3D ProfileBuffer; - MemoryProfileDescriptor->Header.Signature =3D MEMORY_PROFILE_D= ESCRIPTOR_SIGNATURE; - MemoryProfileDescriptor->Header.Length =3D sizeof (MEMORY_PROF= ILE_DESCRIPTOR); - MemoryProfileDescriptor->Header.Revision =3D MEMORY_PROFILE_DE= SCRIPTOR_REVISION; - MemoryProfileDescriptor->Address =3D (PHYSICAL_ADDRESS) (UINTN= ) Pool; - MemoryProfileDescriptor->Size =3D Pool->Header.Size; - - RemainingSize -=3D sizeof (MEMORY_PROFILE_DESCRIPTOR); - ProfileBuffer =3D (UINT8 *) ProfileBuffer + sizeof (MEMORY_PRO= FILE_DESCRIPTOR); - } else { - goto Done; + for (SmmPoolTypeIndex =3D 0; SmmPoolTypeIndex < SmmPoolTypeMax; SmmPoolT= ypeIndex++) { + for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListInde= x++) { + FreePoolList =3D &mSmmPoolLists[SmmPoolTypeIndex][MAX_POOL_INDEX - P= oolListIndex - 1]; + for (Node =3D FreePoolList->BackLink; + Node !=3D FreePoolList; + Node =3D Node->BackLink) { + Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); + if (Pool->Header.Available) { + if (*ProfileOffset < (Offset + sizeof (MEMORY_PROFILE_DESCRIPTOR= ))) { + if (RemainingSize >=3D sizeof (MEMORY_PROFILE_DESCRIPTOR)) { + MemoryProfileDescriptor =3D ProfileBuffer; + MemoryProfileDescriptor->Header.Signature =3D MEMORY_PROFILE= _DESCRIPTOR_SIGNATURE; + MemoryProfileDescriptor->Header.Length =3D sizeof (MEMORY_PR= OFILE_DESCRIPTOR); + MemoryProfileDescriptor->Header.Revision =3D MEMORY_PROFILE_= DESCRIPTOR_REVISION; + MemoryProfileDescriptor->Address =3D (PHYSICAL_ADDRESS) (UIN= TN) Pool; + MemoryProfileDescriptor->Size =3D Pool->Header.Size; + + RemainingSize -=3D sizeof (MEMORY_PROFILE_DESCRIPTOR); + ProfileBuffer =3D (UINT8 *) ProfileBuffer + sizeof (MEMORY_P= ROFILE_DESCRIPTOR); + } else { + goto Done; + } } + Offset +=3D sizeof (MEMORY_PROFILE_DESCRIPTOR); } - Offset +=3D sizeof (MEMORY_PROFILE_DESCRIPTOR); } } } @@ -2577,6 +2584,7 @@ DumpFreePoolList ( UINTN PoolListIndex; MEMORY_PROFILE_CONTEXT_DATA *ContextData; BOOLEAN SmramProfileGettingStatus; + UINTN SmmPoolTypeIndex; =20 ContextData =3D GetSmramProfileContext (); if (ContextData =3D=3D NULL) { @@ -2586,23 +2594,25 @@ DumpFreePoolList ( SmramProfileGettingStatus =3D mSmramProfileGettingStatus; mSmramProfileGettingStatus =3D TRUE; =20 - DEBUG ((EFI_D_INFO, "=3D=3D=3D=3D=3D=3D=3D SmramProfile begin =3D=3D=3D= =3D=3D=3D=3D\n")); - - for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListIndex+= +) { - DEBUG ((EFI_D_INFO, "FreePoolList (%d):\n", PoolListIndex)); - FreePoolList =3D &mSmmPoolLists[PoolListIndex]; - for (Node =3D FreePoolList->BackLink, Index =3D 0; - Node !=3D FreePoolList; - Node =3D Node->BackLink, Index++) { - Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); - DEBUG ((EFI_D_INFO, " Index - 0x%x\n", Index)); - DEBUG ((EFI_D_INFO, " PhysicalStart - 0x%016lx\n", (PHYSICAL_ADDR= ESS) (UINTN) Pool)); - DEBUG ((EFI_D_INFO, " Size - 0x%08x\n", Pool->Header.Siz= e)); - DEBUG ((EFI_D_INFO, " Available - 0x%02x\n", Pool->Header.Ava= ilable)); + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D=3D=3D=3D SmramProfile begin =3D=3D=3D= =3D=3D=3D=3D\n")); + + for (SmmPoolTypeIndex =3D 0; SmmPoolTypeIndex < SmmPoolTypeMax; SmmPoolT= ypeIndex++) { + for (PoolListIndex =3D 0; PoolListIndex < MAX_POOL_INDEX; PoolListInde= x++) { + DEBUG ((DEBUG_INFO, "FreePoolList(%d)(%d):\n", SmmPoolTypeIndex, Poo= lListIndex)); + FreePoolList =3D &mSmmPoolLists[SmmPoolTypeIndex][PoolListIndex]; + for (Node =3D FreePoolList->BackLink, Index =3D 0; + Node !=3D FreePoolList; + Node =3D Node->BackLink, Index++) { + Pool =3D BASE_CR (Node, FREE_POOL_HEADER, Link); + DEBUG ((DEBUG_INFO, " Index - 0x%x\n", Index)); + DEBUG ((DEBUG_INFO, " PhysicalStart - 0x%016lx\n", (PHYSICAL_AD= DRESS) (UINTN) Pool)); + DEBUG ((DEBUG_INFO, " Size - 0x%08x\n", Pool->Header.S= ize)); + DEBUG ((DEBUG_INFO, " Available - 0x%02x\n", Pool->Header.A= vailable)); + } } } =20 - DEBUG ((EFI_D_INFO, "=3D=3D=3D=3D=3D=3D=3D SmramProfile end =3D=3D=3D=3D= =3D=3D=3D\n")); + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D=3D=3D=3D SmramProfile end =3D=3D=3D=3D= =3D=3D=3D\n")); =20 mSmramProfileGettingStatus =3D SmramProfileGettingStatus; } -- 2.7.4.windows.1