34 BOOLEAN RequireSoftECCInit;
36 UINT64 TestedMemorySize;
37 UINT64 TotalMemorySize;
50 RequireSoftECCInit =
FALSE;
52 Status =
gBS->LocateProtocol (
53 &gEfiGenericMemTestProtocolGuid,
55 (VOID **)&GenMemoryTest
57 if (EFI_ERROR (Status)) {
61 InitStatus = GenMemoryTest->MemoryTestInit (
66 if (InitStatus == EFI_NO_MEDIA) {
77 DEBUG ((DEBUG_INFO,
"Enter memory test.\n"));
79 Status = GenMemoryTest->PerformMemoryTest (
86 if (ErrorOut && (Status == EFI_DEVICE_ERROR)) {
91 DEBUG ((DEBUG_INFO,
"Perform memory test (ESC to skip).\n"));
95 if (!EFI_ERROR (KeyStatus) && (Key.ScanCode == SCAN_ESC)) {
96 if (!RequireSoftECCInit) {
97 Status = GenMemoryTest->Finished (GenMemoryTest);
104 }
while (Status != EFI_NOT_FOUND);
106 Status = GenMemoryTest->Finished (GenMemoryTest);
109 DEBUG ((DEBUG_INFO,
"%d bytes of system memory tested OK\r\n", TotalMemorySize));
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define DEBUG(Expression)
#define PcdGetBool(TokenName)
UINTN EFIAPI PrintXY(IN UINTN PointX, IN UINTN PointY, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, IN CONST CHAR16 *Format,...)
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * ConIn