From ec16deeac90e4b8014394be58a229f6aa8c493af Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Tue, 15 Nov 2016 16:29:22 +0800 Subject: [PATCH] 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 --- UefiCpuPkg/SecCore/SecMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 )); // -- 2.39.2