From a3613c5250b516d56a517a948f5d7936487ec36f Mon Sep 17 00:00:00 2001 From: zwei4 Date: Tue, 3 Apr 2018 10:57:15 +0800 Subject: Add Memory test code. 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 -- cgit v1.2.3