public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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>
Subject: [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] MinnowBoard3 Module UART
Date: Wed, 22 Aug 2018 02:57:06 +0000	[thread overview]
Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D1526D22B9@SHSMSX103.ccr.corp.intel.com> (raw)

1. Change MinnowBoard3 Module UART number from 0 to 2.
2. Add zero checking before SetVariable to avoid seting variable each time boot.

Cc: David Wei <david.wei@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 .../Board/UP2/BoardInitDxe/BoardInitDxe.c            | 20 +++++++++++---------
 .../PlatformDsc/PcdsFixedAtBuild.dsc                 |  2 +-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
index 662d8f1..e0e2d93 100644
--- a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
+++ b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
@@ -63,15 +63,17 @@ UpdateSetupVariable (
   ASSERT_EFI_ERROR (Status);
 
   if (Status == EFI_SUCCESS) {
-    mSystemConfiguration.PcieRootPortEn[3]= (UINT8) 0;
-    Status = gRT->SetVariable (
-                    L"Setup",
-                    &gEfiSetupVariableGuid,
-                    VariableAttributes,
-                    VarSize,
-                    &mSystemConfiguration
-                    );
-    ASSERT_EFI_ERROR (Status);
+    if (mSystemConfiguration.PcieRootPortEn[3] != 0) {
+      mSystemConfiguration.PcieRootPortEn[3]= (UINT8) 0;
+      Status = gRT->SetVariable (
+                      L"Setup",
+                      &gEfiSetupVariableGuid,
+                      VariableAttributes,
+                      VarSize,
+                      &mSystemConfiguration
+                      );
+      ASSERT_EFI_ERROR (Status);
+    }
   }
   
   return Status;
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
index db9b2e6..db7cba5 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
@@ -86,7 +86,7 @@
   
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x3000
   
-  !if $(UP2_BOARD) == TRUE || $(MINNOW3_MODULE_BOARD) == TRUE
+  !if $(UP2_BOARD) == TRUE
     gPlatformModuleTokenSpaceGuid.PcdSerialIoUartNumber|0
   !else 
     gPlatformModuleTokenSpaceGuid.PcdSerialIoUartNumber|2
-- 
2.10.1.windows.1



                 reply	other threads:[~2018-08-22  2:57 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=22D2C85ED001C54AA20BFE3B0E4751D1526D22B9@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