From: Tom Rini Date: Sat, 19 Sep 2020 08:34:39 -0400 Subject: [PATCH v5] cmd: mem: fix range of bitflip test In-Reply-To: <20200909161000.10840-1-ralph.siemsen@linaro.org> References: <20200909161000.10840-1-ralph.siemsen@linaro.org> Message-ID: <20200919123439.GI14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 09, 2020 at 12:10:00PM -0400, Ralph Siemsen wrote: > The bitflip test uses two equal sized memory buffers. This is achieved > by splitting the range of memory into two pieces. The address of the > second buffer, as well as the length of each buffer, were not correctly > calculated. This caused bitflip test to access beyond the end of range. > This patch fixes the pointer arithmetic problem. > > A second problem arises because u-boot "mtest" command expects the > ending address to be inclusive. When computing (end - start) this > results in missing 1 byte of the requested length. The bitflip test > expects a count rather than an "ending" address. Thus it fails to test > the last word of the requested range. Fixed by using (end - start + 1). > > Added Kconfig option to optionally disable the bitflip test, since it > does add significantly to the time taken for "mtest". > > Fixes: 8e434cb705d463bc8cff935160e4fb4c77cb99ab ("cmd: mem: Add bitflip > memory test to alternate mtest") > > Signed-off-by: Ralph Siemsen > Reviewed-by: Stefan Roese Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: