]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Display new stack base and size
authorJeff Fan <jeff.fan@intel.com>
Thu, 3 Nov 2016 07:48:11 +0000 (15:48 +0800)
committerJeff Fan <jeff.fan@intel.com>
Wed, 9 Nov 2016 08:00:15 +0000 (16:00 +0800)
Dump new stack base and size information could help developer to narrow down
stack crash issue.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
UefiCpuPkg/SecCore/SecMain.c
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c

index af1e661a307a9e871bdb6f56116ee6feeb11dbbc..2ebbc22d0abb81f793c8372303956c996be98b08 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   C functions in SEC\r
 \r
-  Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -237,6 +237,14 @@ SecStartupPhase2(
     PpiList = &mPeiSecPlatformInformationPpi[0];\r
   }\r
 \r
+  DEBUG ((\r
+    DEBUG_INFO,\r
+    "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",\r
+    __FUNCTION__,\r
+    SecCoreData->StackBase,\r
+    SecCoreData->StackSize\r
+    ));\r
+\r
   //\r
   // Report Status Code to indicate transferring to PEI core\r
   //\r
index f907b301fda93b9c4df6286d175743b4d34795f7..d306fba56101d740be7b2250c95b13c9f4ae4e83 100644 (file)
@@ -515,6 +515,13 @@ S3ResumeBootOs (
     // Switch to native waking vector\r
     //\r
     TempStackTop = (UINTN)&TempStack + sizeof(TempStack);\r
+    DEBUG ((\r
+      DEBUG_INFO,\r
+      "%a() Stack Base: 0x%x, Stack Size: 0x%x\n",\r
+      __FUNCTION__,\r
+      TempStackTop,\r
+      sizeof (TempStack)\r
+      ));\r
     if ((Facs->Version == EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION) &&\r
         ((Facs->Flags & EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F) != 0) &&\r
         ((Facs->Flags & EFI_ACPI_4_0_OSPM_64BIT_WAKE__F) != 0)) {\r