From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 C74E981ECB for ; Tue, 15 Nov 2016 23:55:05 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP; 15 Nov 2016 23:55:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,647,1473145200"; d="scan'208";a="31892339" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by fmsmga005.fm.intel.com with ESMTP; 15 Nov 2016 23:55:09 -0800 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Laszlo Ersek , Andrew Fish , Feng Tian , Michael D Kinney Date: Wed, 16 Nov 2016 15:55:06 +0800 Message-Id: <20161116075506.9008-1-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 Subject: [PATCH v2] UefiCpuPkg/SecCore: Correct print format for stack information 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, 16 Nov 2016 07:55:05 -0000 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 --- 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 2ebbc22..077d0db 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.9.3.windows.2