From: "Guo, Mang" <mang.guo@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wei, David" <david.wei@intel.com>,
"Lu, ShifeiX A" <shifeix.a.lu@intel.com>
Subject: [Patch][edk2-platforms/devel-MinnowBoard3] Fix issue in PlatformSMM
Date: Fri, 14 Apr 2017 08:52:29 +0000 [thread overview]
Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D152501F13@SHSMSX103.ccr.corp.intel.com> (raw)
Change code to set R_SMI_EN earlier in S3 boot path to make sure all SMI were detected.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
---
Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c | 13 ++++++++++++-
Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c | 11 +----------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c
index 673df3a..e0c6c71 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c
@@ -1,7 +1,7 @@
/** @file
This is a generic template for a child of the IchSmm driver.
- Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 1999 - 2017, 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
@@ -142,6 +142,7 @@ InitializePlatformSmm (
EFI_SMM_SW_REGISTER_CONTEXT SwContext;
UINTN VarSize;
EFI_BOOT_MODE BootMode;
+ UINT32 Data32;
Handle = NULL;
//
@@ -315,6 +316,16 @@ InitializePlatformSmm (
ASSERT_EFI_ERROR (Status);
+
+ Data32 = IoRead32 (mAcpiBaseAddr + R_SMI_EN);
+ S3BootScriptSaveIoWrite (
+ S3BootScriptWidthUint32,
+ (mAcpiBaseAddr + R_SMI_EN),
+ 1,
+ &Data32
+ );
+
+
//
// Get the ICHn protocol
//
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c
index 4b3f34f..00b25f5 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c
@@ -1,7 +1,7 @@
/** @file
SMM S3 handler Driver implementation file.
- Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 1999 - 2017, 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
@@ -22,7 +22,6 @@ SaveRuntimeScriptTable (
IN EFI_SMM_SYSTEM_TABLE2 *Smst
)
{
- UINT32 Data32;
UINT16 Data16;
UINT8 Data8;
UINT32 DwordData;
@@ -58,14 +57,6 @@ SaveRuntimeScriptTable (
&Data8
);
- Data32 = IoRead32 (mAcpiBaseAddr + R_SMI_EN);
- S3BootScriptSaveIoWrite (
- S3BootScriptWidthUint32,
- (mAcpiBaseAddr + R_SMI_EN),
- 1,
- &Data32
- );
-
//
// Save B_ICH_TCO_CNT_LOCK so it will be done on S3 resume path.
//
--
2.10.1.windows.1
reply other threads:[~2017-04-14 8:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=22D2C85ED001C54AA20BFE3B0E4751D152501F13@SHSMSX103.ccr.corp.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