From: "Gao, Liming" <liming.gao@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] MdeModulePkg PeiCore: More debug messages for pre-memory allocations
Date: Fri, 29 Sep 2017 06:53:32 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E166833@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1506667415-19896-1-git-send-email-star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Star
>Zeng
>Sent: Friday, September 29, 2017 2:44 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>; Zeng, Star <star.zeng@intel.com>
>Subject: [edk2] [PATCH] MdeModulePkg PeiCore: More debug messages for
>pre-memory allocations
>
>The debug messages can help developer to know the pre-memory
>allocation usage.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Qing Huang <qing.huang@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Star Zeng <star.zeng@intel.com>
>---
> MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
>diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
>b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
>index 04ece9a627d5..38299c5d98c6 100644
>--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
>+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
>@@ -675,7 +675,8 @@ PeiCheckAndSwitchStack (
> // usage in temporary memory for debugging.
> //
> DEBUG_CODE_BEGIN ();
>- UINT32 *StackPointer;
>+ UINT32 *StackPointer;
>+ EFI_PEI_HOB_POINTERS Hob;
>
> for (StackPointer = (UINT32*)SecCoreData->StackBase;
> (StackPointer < (UINT32*)((UINTN)SecCoreData->StackBase +
>SecCoreData->StackSize)) \
>@@ -691,6 +692,17 @@ PeiCheckAndSwitchStack (
> DEBUG ((DEBUG_INFO, " temporary memory heap used for HobList: %d
>bytes.\n",
> (UINT32)((UINTN)Private->HobList.HandoffInformationTable-
>>EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw)
> ));
>+ DEBUG ((DEBUG_INFO, " temporary memory heap occupied by memory
>pages: %d bytes.\n",
>+ (UINT32)(UINTN)(Private->HobList.HandoffInformationTable-
>>EfiMemoryTop - Private->HobList.HandoffInformationTable-
>>EfiFreeMemoryTop)
>+ ));
>+ for (Hob.Raw = Private->HobList.Raw; !END_OF_HOB_LIST(Hob);
>Hob.Raw = GET_NEXT_HOB(Hob)) {
>+ if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) {
>+ DEBUG ((DEBUG_INFO, "Memory Allocation 0x%08x 0x%0lx - 0x%0lx\n",
>\
>+ Hob.MemoryAllocation->AllocDescriptor.MemoryType, \
>+ Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress, \
>+ Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress +
>Hob.MemoryAllocation->AllocDescriptor.MemoryLength - 1));
>+ }
>+ }
> DEBUG_CODE_END ();
>
> if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (Private-
>>HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {
>--
>2.7.0.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2017-09-29 6:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 6:43 [PATCH] MdeModulePkg PeiCore: More debug messages for pre-memory allocations Star Zeng
2017-09-29 6:53 ` Gao, Liming [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E166833@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox