]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/SecCore: Correct print format for stack information
authorJeff Fan <jeff.fan@intel.com>
Tue, 15 Nov 2016 08:29:22 +0000 (16:29 +0800)
committerJeff Fan <jeff.fan@intel.com>
Fri, 18 Nov 2016 01:43:53 +0000 (09:43 +0800)
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 <lersek@redhat.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/SecCore/SecMain.c

index 2ebbc22d0abb81f793c8372303956c996be98b08..077d0db49f53ecdd7536617cc49abc4fe6ac6238 100644 (file)
@@ -239,10 +239,10 @@ SecStartupPhase2(
 \r
   DEBUG ((\r
     DEBUG_INFO,\r
-    "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",\r
+    "%a() Stack Base: 0x%p, Stack Size: 0x%x\n",\r
     __FUNCTION__,\r
     SecCoreData->StackBase,\r
-    SecCoreData->StackSize\r
+    (UINT32) SecCoreData->StackSize\r
     ));\r
 \r
   //\r