[PATCH] cmd: sf: prevent overwriting the reserved memory

Michal Simek michal.simek at amd.com
Thu Aug 8 07:35:28 CEST 2024



On 8/7/24 23:12, Tom Rini wrote:
> On Tue, Aug 06, 2024 at 05:37:00PM +0530, Prasad Kummari wrote:
> 
>> 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 at amd.com>
> 
> This is a much more generic issue that should be looked in to with the
> LMB rewrite that Sughosh is working on.

yes. And is it going to be the part of his series?
I expect that if he accepts this will be done on the top of it and there is 
likely no reason to wait.
We find the issue out on system which has more dynamic behavior that spi pytest 
read the whole memory and rewrite TF-A.

And currently we are in situation where some commands are checking reserved 
location and some of them not.

Thanks,
Michal


More information about the U-Boot mailing list