public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jeff Fan <jeff.fan@intel.com>
To: edk2-devel@lists.01.org
Cc: Feng Tian <feng.tian@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Michael Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 2/3] UefiCpuPkg: Display new stack base and size
Date: Fri,  4 Nov 2016 10:19:01 +0800	[thread overview]
Message-ID: <20161104021902.17364-3-jeff.fan@intel.com> (raw)
In-Reply-To: <20161104021902.17364-1-jeff.fan@intel.com>

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>
---
 UefiCpuPkg/SecCore/SecMain.c                      | 10 +++++++++-
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c |  7 +++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

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



  parent reply	other threads:[~2016-11-04  2:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  2:18 [PATCH 0/3] Display new stack base and size Jeff Fan
2016-11-04  2:19 ` [PATCH 1/3] MdeModulePkg: " Jeff Fan
2016-11-04  2:19 ` Jeff Fan [this message]
2016-11-04  2:19 ` [PATCH 3/3] MdeModulePkg/DxeIplPeim: UINTN used wrongly for EFI_PHYSICAL_ADDRESS Jeff Fan
2016-11-04  3:28   ` Gao, Liming
2016-11-04  4:49   ` Gao, Liming
2016-11-09  7:21 ` [PATCH 0/3] Display new stack base and size Tian, Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161104021902.17364-3-jeff.fan@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox