diff options
author | Tom Rini <trini@konsulko.com> | 2020-09-19 08:31:52 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-19 08:31:52 -0400 |
commit | 667ab37d586e702bc745934afff3dae2f67a2257 (patch) | |
tree | dbd488a96e815e5604339d6c6fa1d34ca4179d72 /cmd | |
parent | 98f3ee09d096c6c1bc49e08d805f6354dffb0e59 (diff) | |
parent | 9989fb18bd5b6e2afe5f296b4c414f8d1c73d527 (diff) |
Merge branch '2020-09-18-assorted-bugfixes'
- SquashFS Coverity fixes
- bitflip fix in the alternate memtest command
- Disable networking on bcmstb boards where we didn't have any network
drivers enabled.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Kconfig | 12 | ||||
-rw-r--r-- | cmd/mem.c | 21 |
2 files changed, 28 insertions, 5 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 0761dbb746..0c984d735d 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -777,6 +777,18 @@ config SYS_ALT_MEMTEST help Use a more complete alternative memory test. +if SYS_ALT_MEMTEST + +config SYS_ALT_MEMTEST_BITFLIP + bool "Bitflip test" + default y + help + The alternative memory test includes bitflip test since 2020.07. + The bitflip test significantly increases the overall test time. + Bitflip test can optionally be disabled here. + +endif + config SYS_MEMTEST_START hex "default start address for mtest" default 0 @@ -985,6 +985,18 @@ static ulong test_bitflip_comparison(volatile unsigned long *bufa, return errs; } +static ulong mem_test_bitflip(vu_long *buf, ulong start, ulong end) +{ + /* + * Split the specified range into two halves. + * Note that mtest range is inclusive of start,end. + * Bitflip test instead uses a count (of 32-bit words). + */ + ulong half_size = (end - start + 1) / 2 / sizeof(unsigned long); + + return test_bitflip_comparison(buf, buf + half_size, half_size); +} + static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr, vu_long pattern, int iteration) { @@ -1104,11 +1116,10 @@ static int do_mem_mtest(struct cmd_tbl *cmdtp, int flag, int argc, errs = mem_test_alt(buf, start, end, dummy); if (errs == -1UL) break; - count += errs; - errs = test_bitflip_comparison(buf, - buf + (end - start) / 2, - (end - start) / - sizeof(unsigned long)); + if (IS_ENABLED(CONFIG_SYS_ALT_MEMTEST_BITFLIP)) { + count += errs; + errs = mem_test_bitflip(buf, start, end); + } } else { errs = mem_test_quick(buf, start, end, pattern, iteration); |