public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: zwei4 <david.wei@intel.com>
To: edk2-devel@lists.01.org
Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add Memory test code.
Date: Tue,  3 Apr 2018 10:59:04 +0800	[thread overview]
Message-ID: <20180403025904.12624-1-david.wei@intel.com> (raw)

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: zwei4 <david.wei@intel.com>
---
 .../PlatformBootManagerLib/PlatformBootManager.c   | 23 +++++++++++++++++++++-
 .../PlatformBootManagerLib.inf                     |  1 +
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManager.c b/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManager.c
index 7c7a98e2b9..6715d9073b 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -23,6 +23,7 @@
 #include <Protocol/ExitPmAuth.h>
 #include <Protocol/UsbIo.h>
 #include <Protocol/VariableLock.h>
+#include <Protocol/GenericMemoryTest.h>
 #include <Library/IoLib.h>
 #include <Library/PciLib.h>
 #include <Library/TcgPhysicalPresenceLib.h>
@@ -1000,10 +1001,30 @@ PlatformBootManagerAfterConsole (
   VOID
   )
 {
-  EFI_BOOT_MODE                 LocalBootMode;
+  EFI_STATUS                        Status;
+  EFI_BOOT_MODE                     LocalBootMode;
+  BOOLEAN                           RequireSoftECCInit;
+  EFI_GENERIC_MEMORY_TEST_PROTOCOL  *GenMemoryTest;
   
   DEBUG ((EFI_D_INFO, "PlatformBootManagerAfterConsole\n"));
 
+  //
+  // Run memory test code at this point.
+  //
+  Status = gBS->LocateProtocol (
+                  &gEfiGenericMemTestProtocolGuid,
+                  NULL,
+                  (VOID **) &GenMemoryTest
+                  );
+
+  if (!EFI_ERROR (Status)) {
+    Status = GenMemoryTest->MemoryTestInit (
+                              GenMemoryTest,
+                              IGNORE,
+                              &RequireSoftECCInit
+                              );
+  } 
+
   //
   // Get current Boot Mode.
   //
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 8e429fbf9f..9f476a14d0 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -92,6 +92,7 @@
   gEfiFormBrowser2ProtocolGuid
   gExitPmAuthProtocolGuid
   gEfiGraphicsOutputProtocolGuid
+  gEfiGenericMemTestProtocolGuid
   
 [Guids]
   gEfiGlobalVariableGuid
-- 
2.14.1.windows.1



                 reply	other threads:[~2018-04-03  2:59 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=20180403025904.12624-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