summaryrefslogtreecommitdiff
path: root/lib/linux_string.c
diff options
context:
space:
mode:
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>2023-05-30 15:33:27 +0200
committerTom Rini <trini@konsulko.com>2023-06-21 16:54:25 -0400
commit1c64b98c1ec40d2c9eb68af2d190e989dded8919 (patch)
tree723604929d4149b1e926fd6ecebc85ac4a513caf /lib/linux_string.c
parenta1e225b814d969aac313d3543be75ae3e7275e1d (diff)
common/memsize.c: Fix get_ram_size() when cache is enabled
Ensure that every write is flushed to memory and afterward reads are from memory. Since the algorithm rely on the fact that accessing to not existent memory lead to write at addr / 2 without this modification accesses to aliased (not physically present) addresses are cached and wrong size is returned. This was discovered while working on a TI AM625 based board where cache is normally enabled, see commit c02712a74849 ("arm: mach-k3: Enable dcache in SPL"). Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'lib/linux_string.c')
0 files changed, 0 insertions, 0 deletions