lib/ramtest: Fix ram_check() declarations

For a long time, second parameter 'stop' has been
ignored. The tested range is within 1 MiB above 'start'.

Change-Id: Icbf94cd6a651fbf0cd9aab97eb11f9b03f0c3c31
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48561
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2019-03-23 10:00:31 +02:00 committed by Patrick Georgi
parent 4c4f916172
commit e1aa9833c1
3 changed files with 8 additions and 8 deletions

View File

@ -12,9 +12,9 @@ size_t ulzman(const void *src, size_t srcn, void *dst, size_t dstn);
/* Defined in src/lib/ramtest.c */ /* Defined in src/lib/ramtest.c */
/* Assumption is 32-bit addressable UC memory. */ /* Assumption is 32-bit addressable UC memory. */
void ram_check(unsigned long start, unsigned long stop); void ram_check(uintptr_t start);
int ram_check_nodie(unsigned long start, unsigned long stop); int ram_check_nodie(uintptr_t start);
int ram_check_noprint_nodie(unsigned long start, unsigned long stop); int ram_check_noprint_nodie(uintptr_t start);
void quick_ram_check_or_die(uintptr_t dst); void quick_ram_check_or_die(uintptr_t dst);
/* Defined in primitive_memtest.c */ /* Defined in primitive_memtest.c */

View File

@ -67,7 +67,7 @@ static inline void test_pattern(unsigned short int idx,
* *
* @param start System memory offset, aligned to 128bytes * @param start System memory offset, aligned to 128bytes
*/ */
static int ram_bitset_nodie(unsigned long start) static int ram_bitset_nodie(uintptr_t start)
{ {
unsigned long addr, value, value2; unsigned long addr, value, value2;
unsigned short int idx; unsigned short int idx;
@ -117,7 +117,7 @@ static int ram_bitset_nodie(unsigned long start)
} }
void ram_check(unsigned long start, unsigned long stop) void ram_check(uintptr_t start)
{ {
/* /*
* This is much more of a "Is my DRAM properly configured?" * This is much more of a "Is my DRAM properly configured?"
@ -131,7 +131,7 @@ void ram_check(unsigned long start, unsigned long stop)
} }
int ram_check_nodie(unsigned long start, unsigned long stop) int ram_check_nodie(uintptr_t start)
{ {
int ret; int ret;
/* /*
@ -146,7 +146,7 @@ int ram_check_nodie(unsigned long start, unsigned long stop)
return ret; return ret;
} }
int ram_check_noprint_nodie(unsigned long start, unsigned long stop) int ram_check_noprint_nodie(uintptr_t start)
{ {
unsigned long addr, value, value2; unsigned long addr, value, value2;
unsigned short int idx; unsigned short int idx;

View File

@ -4708,7 +4708,7 @@ void raminit(const int s3resume, const u8 *spd_addrmap)
if (s3resume && cbmem_wasnot_inited) { if (s3resume && cbmem_wasnot_inited) {
u32 reg32; u32 reg32;
printk(BIOS_ERR, "Failed S3 resume.\n"); printk(BIOS_ERR, "Failed S3 resume.\n");
ram_check(0x100000, 0x200000); ram_check_nodie(1 * MiB);
/* Clear SLP_TYPE. */ /* Clear SLP_TYPE. */
reg32 = inl(DEFAULT_PMBASE + 0x04); reg32 = inl(DEFAULT_PMBASE + 0x04);