/** @file
Perform the platform memory test
Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "Bds.h"
#include "String.h"
//
// BDS Platform Functions
//
/**
Show progress bar with title above it. It only works in Graphics mode.
@param TitleForeground Foreground color for Title.
@param TitleBackground Background color for Title.
@param Title Title above progress bar.
@param ProgressColor Progress bar color.
@param Progress Progress (0-100)
@param PreviousValue The previous value of the progress.
@retval EFI_STATUS Success update the progress bar
**/
)
{
if (Progress > 100) {
return EFI_INVALID_PARAMETER;
}
(VOID **) &GraphicsOutput
);
);
}
return EFI_UNSUPPORTED;
}
SizeOfX = 0;
SizeOfY = 0;
if (GraphicsOutput != NULL) {
&SizeOfX,
&SizeOfY,
);
return EFI_UNSUPPORTED;
}
} else {
return EFI_UNSUPPORTED;
}
PosX = 0;
if (BlockNum == 0) {
//
// Clear progress area
//
if (GraphicsOutput != NULL) {
&Color,
0,
0,
0,
SizeOfX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
);
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
(EFI_UGA_PIXEL *) &Color,
0,
0,
0,
SizeOfX * sizeof (EFI_UGA_PIXEL)
);
} else {
return EFI_UNSUPPORTED;
}
}
//
// Show progress by drawing blocks
//
if (GraphicsOutput != NULL) {
0,
0,
PosX,
PosY,
BlockWidth - 1,
(BlockWidth) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
);
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
(EFI_UGA_PIXEL *) &ProgressColor,
0,
0,
PosX,
PosY,
BlockWidth - 1,
(BlockWidth) * sizeof (EFI_UGA_PIXEL)
);
} else {
return EFI_UNSUPPORTED;
}
}
PrintXY (
);
return EFI_SUCCESS;
}
/**
Perform the memory test base on the memory test intensive level,
and update the memory resource.
@param Level The memory test intensive level.
@retval EFI_STATUS Success test all the system memory and update
the memory resource
**/
)
{
return ReturnStatus;
}
TestedMemorySize = 0;
TotalMemorySize = 0;
PreviousValue = 0;
NULL,
(VOID **) &GenMemoryTest
);
return EFI_SUCCESS;
}
);
if (InitStatus == EFI_NO_MEDIA) {
//
// The PEI codes also have the relevant memory test code to check the memory,
// it can select to test some range of the memory or all of them. If PEI code
// checks all the memory, this BDS memory test will has no not-test memory to
// do the test, and then the status of EFI_NO_MEDIA will be returned by
// "MemoryTestInit". So it does not need to test memory again, just return.
//
return EFI_SUCCESS;
}
if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {
}
} else {
}
do {
&ErrorOut,
);
}
ASSERT (0);
}
if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {
);
if (TestPercent != PreviousValue) {
//
// TmpStr size is 64, StrPercent is reserved to 16.
//
}
);
}
}
} else {
}
if (!RequireSoftECCInit) {
if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {
100,
);
}
}
goto Done;
}
}
} while (Status != EFI_NOT_FOUND);
Done:
if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {
if (StrTotalMemory[0] == L',') {
}
}
100,
);
} else {
}
//
// Use a DynamicHii type pcd to save the boot status, which is used to
// control configuration mode, such as FULL/MINIMAL/NO_CHANGES configuration.
//
if (IsFirstBoot) {
}
return ReturnStatus;
}