2009-02-25 03:09:31 +01:00
|
|
|
/** @file
|
|
|
|
Null instance of Memory Test Library.
|
|
|
|
|
|
|
|
Copyright (c) 2009, Intel Corporation.<BR>
|
|
|
|
All rights reserved. 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
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
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 <Base.h>
|
2009-03-13 08:33:05 +01:00
|
|
|
#include <Library/MemoryTestLib.h>
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
/**
|
2009-03-06 04:34:25 +01:00
|
|
|
Perform a quick system memory range test.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
2009-03-06 04:34:25 +01:00
|
|
|
This function performs a quick system memory range test. It leads to quick performance
|
|
|
|
but least reliability.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
@param StartAddress Start address of the memory range to test.
|
|
|
|
@param Length Length of the memory range to test.
|
|
|
|
@param ErrorAddress Address of the memory where error is encountered.
|
|
|
|
|
|
|
|
@retval RETURN_SUCCESS The memory range passes test.
|
2009-03-06 04:34:25 +01:00
|
|
|
@retval RETURN_DEVICE_ERROR The memory range does not pass test.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
RETURN_STATUS
|
|
|
|
EFIAPI
|
2009-03-06 04:34:25 +01:00
|
|
|
QuickMemoryTest (
|
2009-02-25 03:09:31 +01:00
|
|
|
IN VOID *StartAddress,
|
|
|
|
IN UINT64 Length,
|
|
|
|
OUT VOID **ErrorAddress
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return RETURN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-03-06 04:34:25 +01:00
|
|
|
Test a system memory range with sparsely sampled memory units.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
This function tests a system memory range, whose memory units
|
2009-03-06 04:34:25 +01:00
|
|
|
are sampled sparsely. It leads to relatively good performance
|
|
|
|
and partial reliability.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
@param StartAddress Start address of the memory range to test.
|
|
|
|
@param Length Length of the memory range to test.
|
|
|
|
@param ErrorAddress Address of the memory where error is encountered.
|
|
|
|
|
|
|
|
@retval RETURN_SUCCESS The memory range passes test.
|
2009-03-06 04:34:25 +01:00
|
|
|
@retval RETURN_DEVICE_ERROR The memory range does not pass test.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
RETURN_STATUS
|
|
|
|
EFIAPI
|
2009-03-06 04:34:25 +01:00
|
|
|
SparseMemoryTest (
|
2009-02-25 03:09:31 +01:00
|
|
|
IN VOID *StartAddress,
|
|
|
|
IN UINT64 Length,
|
|
|
|
OUT VOID **ErrorAddress
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return RETURN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-03-06 04:34:25 +01:00
|
|
|
Test a system memory range with extensively sampled memory units.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
This function tests a system memory range, whose memory units
|
2009-03-06 04:34:25 +01:00
|
|
|
are sampled extensively. Compared with SparseMemoryTest, it achieves
|
|
|
|
more reliability and less performance.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
@param StartAddress Start address of the memory range to test.
|
|
|
|
@param Length Length of the memory range to test.
|
|
|
|
@param ErrorAddress Address of the memory where error is encountered.
|
|
|
|
|
|
|
|
@retval RETURN_SUCCESS The memory range passes test.
|
2009-03-06 04:34:25 +01:00
|
|
|
@retval RETURN_DEVICE_ERROR The memory range does not pass test.
|
2009-02-25 03:09:31 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
RETURN_STATUS
|
|
|
|
EFIAPI
|
2009-03-06 04:34:25 +01:00
|
|
|
ExtensiveMemoryTest (
|
2009-02-25 03:09:31 +01:00
|
|
|
IN VOID *StartAddress,
|
|
|
|
IN UINT64 Length,
|
|
|
|
OUT VOID **ErrorAddress
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return RETURN_SUCCESS;
|
|
|
|
}
|
2009-03-06 04:34:25 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
Check if soft ECC initialzation is needed for system
|
|
|
|
|
|
|
|
@retval TRUE Soft ECC initialzation is needed.
|
|
|
|
@retval FALSE Soft ECC initialzation is not needed.
|
|
|
|
|
|
|
|
**/
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
IsSoftEccInitRequired (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|