From 43cc2ff9bb7f3cd537217944a95521771602cd85 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 11 Mar 2022 15:28:34 +0100 Subject: [PATCH] software/libbase/memtest: Skip memtest_addr when size < 16KB. --- litex/soc/software/libbase/memtest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litex/soc/software/libbase/memtest.c b/litex/soc/software/libbase/memtest.c index 953dde544..b41a5d727 100644 --- a/litex/soc/software/libbase/memtest.c +++ b/litex/soc/software/libbase/memtest.c @@ -131,6 +131,10 @@ int memtest_addr(unsigned int *addr, unsigned long size, int random) unsigned short seed_16; unsigned short rdata; + /* Skip when size < 16KB */ + if (size < 0x10000) + return 0; + errors = 0; seed_16 = 1;