From f5cf60f25b8c77e0c90094e3326c5bc0e37cb383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 18 Mar 2019 15:26:48 +0200 Subject: Move calls to quick_ram_check() before CBMEM init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After raminit completes, do a read-modify-write test just below CBMEM top address. If test fails, die(). Change-Id: I33d4153a5ce0908b8889517394afb46f1ca28f92 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/31978 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Werner Zeh --- src/include/lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/include/lib.h') diff --git a/src/include/lib.h b/src/include/lib.h index 3edc37245e..098d62df52 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -24,10 +24,11 @@ size_t ulzman(const void *src, size_t srcn, void *dst, size_t dstn); /* 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 quick_ram_check(void); +void quick_ram_check_or_die(uintptr_t dst); /* Defined in primitive_memtest.c */ int primitive_memtest(uintptr_t base, uintptr_t size); -- cgit v1.2.3