From: Jeff Fan Date: Tue, 15 Nov 2016 08:29:22 +0000 (+0800) Subject: UefiCpuPkg/SecCore: Correct print format for stack information X-Git-Tag: edk2-stable201903~5146 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=inline;h=ec16deeac90e4b8014394be58a229f6aa8c493af;p=mirror_edk2.git UefiCpuPkg/SecCore: Correct print format for stack information v2: Per Laszlo and Andrew's comments at https://lists.01.org/pipermail/edk2-devel/2016-November/004759.html SecCoreData->StackBase is VOID * type. We should use %p to dump VOID * type. SecCoreData->StackSize is UINTN type, but %x only could print unsinged-int type. We will cast it to UINT32 firstly and then use %x to print it. Cc: Laszlo Ersek Cc: Andrew Fish Cc: Feng Tian Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Laszlo Ersek --- diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c index 2ebbc22d0a..077d0db49f 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -239,10 +239,10 @@ SecStartupPhase2( DEBUG (( DEBUG_INFO, - "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n", + "%a() Stack Base: 0x%p, Stack Size: 0x%x\n", __FUNCTION__, SecCoreData->StackBase, - SecCoreData->StackSize + (UINT32) SecCoreData->StackSize )); //