public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: zwei4 <david.wei@intel.com>
To: edk2-devel@lists.01.org
Cc: David Wei <david.wei@intel.com>, Mike Wu <mike.wu@intel.com>,
	Mang Guo <mang.guo@intel.com>
Subject: [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] C State Change.
Date: Thu, 23 Aug 2018 18:24:38 +0800	[thread overview]
Message-ID: <20180823102438.18832-1-david.wei@intel.com> (raw)

Monitored cached line may not wake up CPU from MWAIT on certain Goldmont based CPUs.
Disable MONITOR/MWAIT and use IO registers for C State instead.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: David Wei <david.wei@intel.com>
CC: Mike Wu  <mike.wu@intel.com>
CC: Mang Guo <mang.guo@intel.com>
---
 .../Common/Library/PeiFspPolicyInitLib/PeiFspCpuPolicyInitLib.c       | 1 +
 .../Common/PlatformSettings/PlatformSetupDxe/Cpu.vfi                  | 4 ++--
 .../Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c       | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspCpuPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspCpuPolicyInitLib.c
index 6c176d0685..c404116029 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspCpuPolicyInitLib.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspCpuPolicyInitLib.c
@@ -120,6 +120,7 @@ PeiFspCpuPolicyInit (
     FspsUpd->FspsConfig.PkgCStateDemotion     = SystemConfiguration->PkgCStateDemotion;
     FspsUpd->FspsConfig.PkgCStateUnDemotion   = SystemConfiguration->PkgCStateUnDemotion;
     FspsUpd->FspsConfig.TurboMode             = SystemConfiguration->TurboModeEnable;
+    FspsUpd->FspsConfig.MonitorMwaitEnable    = SystemConfiguration->MonitorMwaitEnable;
   }
 
   return EFI_SUCCESS;
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Cpu.vfi b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Cpu.vfi
index 23859e6a3a..9094794de2 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Cpu.vfi
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Cpu.vfi
@@ -122,9 +122,9 @@ form formid = CPU_CONFIGURATION_FORM_ID,
   oneof varid   = Setup.MonitorMwaitEnable,
     prompt      = STRING_TOKEN(STR_MONITOR_MWAIT_PROMPT),
     help        = STRING_TOKEN(STR_MONITOR_MWAIT_HELP),
-    option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;
+    option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED;
     option text = STRING_TOKEN(STR_ENABLE),  value = 1, flags = RESET_REQUIRED;
-    option text = STRING_TOKEN(STR_AUTO), value = 2, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED;
+    option text = STRING_TOKEN(STR_AUTO), value = 2, flags = RESET_REQUIRED;
   endoneof;  
 
   subtitle text = STRING_TOKEN(STR_NULL_STRING);
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c
index bbb31b10da..08d2fd418f 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c
@@ -123,7 +123,6 @@ LoadOsDefaultValues (
 #else
   Private->FakeNvData.TPM                        = 0;
 #endif
-  Private->FakeNvData.MonitorMwaitEnable         = 2;
   Private->FakeNvData.I2C0Speed                  = 1;
   Private->FakeNvData.I2C1Speed                  = 1;
   Private->FakeNvData.I2C2Speed                  = 1;
-- 
2.14.1.windows.1



                 reply	other threads:[~2018-08-23 10:25 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=20180823102438.18832-1-david.wei@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