]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: sf: prevent overwriting the reserved memory
authorPrasad Kummari <prasad.kummari@amd.com>
Fri, 13 Sep 2024 07:32:52 +0000 (13:02 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 20 Sep 2024 23:38:16 +0000 (17:38 -0600)
commit33a4dfc703b43f0e8d4da76411ee3f5aee0c8033
tree32e79968e175f9b967e8c5d926aea196d861ce58
parent948616894c6d3316a5ac8f2a891783e3e7ff3516
cmd: sf: prevent overwriting the reserved memory

Added LMB API to prevent SF command from overwriting reserved
memory areas. The current SPI code does not use LMB APIs for
loading data into memory addresses. To resolve this, LMB APIs
were added to check the load address of an SF command and ensure it
does not overwrite reserved memory addresses. Similar checks are
used in TFTP, serial load, and boot code to prevent overwriting
reserved memory.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Suggested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
cmd/sf.c
include/lmb.h