summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_memory.c
diff options
context:
space:
mode:
authorRalph Siemsen <ralph.siemsen@linaro.org>2020-09-09 12:10:00 -0400
committerTom Rini <trini@konsulko.com>2020-09-18 16:19:58 -0400
commit9989fb18bd5b6e2afe5f296b4c414f8d1c73d527 (patch)
treedbd488a96e815e5604339d6c6fa1d34ca4179d72 /lib/efi_loader/efi_memory.c
parente03dd8a05f5f0fc3d99289e84debe0ae99e805bb (diff)
cmd: mem: fix range of bitflip test
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 <ralph.siemsen@linaro.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
0 files changed, 0 insertions, 0 deletions