From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0ECA821FB7D35 for ; Mon, 2 Apr 2018 19:59:08 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Apr 2018 19:59:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,398,1517904000"; d="scan'208";a="217009531" Received: from zwei4-mobl1.ccr.corp.intel.com ([10.239.193.115]) by fmsmga006.fm.intel.com with ESMTP; 02 Apr 2018 19:59:07 -0700 From: zwei4 To: edk2-devel@lists.01.org Date: Tue, 3 Apr 2018 10:59:04 +0800 Message-Id: <20180403025904.12624-1-david.wei@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add Memory test code. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 02:59:09 -0000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 --- .../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 #include #include +#include #include #include #include @@ -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