Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48561 )
Change subject: lib/ramtest: Fix ram_check() declarations ......................................................................
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 --- M src/include/lib.h M src/lib/ramtest.c M src/northbridge/intel/ironlake/raminit.c 3 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/48561/1
diff --git a/src/include/lib.h b/src/include/lib.h index 5c6eef2..359626c 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -12,9 +12,9 @@
/* Defined in src/lib/ramtest.c */ /* Assumption is 32-bit addressable UC memory. */ -void ram_check(unsigned long start, unsigned long stop); -int ram_check_nodie(unsigned long start, unsigned long stop); -int ram_check_noprint_nodie(unsigned long start, unsigned long stop); +void ram_check(uintptr_t start); +int ram_check_nodie(uintptr_t start); +int ram_check_noprint_nodie(uintptr_t start); void quick_ram_check_or_die(uintptr_t dst);
/* Defined in primitive_memtest.c */ diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c index c6cd7a4..224393f 100644 --- a/src/lib/ramtest.c +++ b/src/lib/ramtest.c @@ -67,7 +67,7 @@ * * @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 short int idx; @@ -117,7 +117,7 @@ }
-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?" @@ -131,7 +131,7 @@ }
-int ram_check_nodie(unsigned long start, unsigned long stop) +int ram_check_nodie(uintptr_t start) { int ret; /* @@ -146,7 +146,7 @@ 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 short int idx; diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c index 05323f1..d261377 100644 --- a/src/northbridge/intel/ironlake/raminit.c +++ b/src/northbridge/intel/ironlake/raminit.c @@ -4701,7 +4701,7 @@ if (s3resume && cbmem_wasnot_inited) { u32 reg32; printk(BIOS_ERR, "Failed S3 resume.\n"); - ram_check(0x100000, 0x200000); + ram_check_nodie(1 * MiB);
/* Clear SLP_TYPE. */ reg32 = inl(DEFAULT_PMBASE + 0x04);
Attention is currently required from: Kyösti Mälkki. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48561 )
Change subject: lib/ramtest: Fix ram_check() declarations ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48561 )
Change subject: lib/ramtest: Fix ram_check() declarations ......................................................................
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 --- M src/include/lib.h M src/lib/ramtest.c M src/northbridge/intel/ironlake/raminit.c 3 files changed, 8 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/include/lib.h b/src/include/lib.h index 5c6eef2..359626c 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -12,9 +12,9 @@
/* Defined in src/lib/ramtest.c */ /* Assumption is 32-bit addressable UC memory. */ -void ram_check(unsigned long start, unsigned long stop); -int ram_check_nodie(unsigned long start, unsigned long stop); -int ram_check_noprint_nodie(unsigned long start, unsigned long stop); +void ram_check(uintptr_t start); +int ram_check_nodie(uintptr_t start); +int ram_check_noprint_nodie(uintptr_t start); void quick_ram_check_or_die(uintptr_t dst);
/* Defined in primitive_memtest.c */ diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c index c6cd7a4..224393f 100644 --- a/src/lib/ramtest.c +++ b/src/lib/ramtest.c @@ -67,7 +67,7 @@ * * @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 short int idx; @@ -117,7 +117,7 @@ }
-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?" @@ -131,7 +131,7 @@ }
-int ram_check_nodie(unsigned long start, unsigned long stop) +int ram_check_nodie(uintptr_t start) { int ret; /* @@ -146,7 +146,7 @@ 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 short int idx; diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c index beb2244..a49bd08 100644 --- a/src/northbridge/intel/ironlake/raminit.c +++ b/src/northbridge/intel/ironlake/raminit.c @@ -4708,7 +4708,7 @@ if (s3resume && cbmem_wasnot_inited) { u32 reg32; printk(BIOS_ERR, "Failed S3 resume.\n"); - ram_check(0x100000, 0x200000); + ram_check_nodie(1 * MiB);
/* Clear SLP_TYPE. */ reg32 = inl(DEFAULT_PMBASE + 0x04);