Branch: refs/heads/main Home: https://github.com/OpenAMP/open-amp Commit: 79b795e954e15d0d7c37d49fd32ac9cc0315bc3c https://github.com/OpenAMP/open-amp/commit/79b795e954e15d0d7c37d49fd32ac9cc0... Author: Umair Khan umair_khan@mentor.com Date: 2024-02-29 (Thu, 29 Feb 2024)
Changed paths: M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: Fix management of non loadable program segments
The elf loader assumes that the last ELF program segment will always be a LOAD type segment. I deduce this from the fact that the elf_load() function, when loading the remote ELF sections during the RPROC_LOADER_READY_TO_LOAD stage, compares the last load segment num to the total ELF sections to determine if the loading is complete and it can move to the next stage RPROC_LOADER_POST_DATA_LOAD. If the last program segment in the ELF is not of type LOAD, the last loaded LOAD segment never equals total ELF sections. This creates an error condition and the firmware loading fails. This patch fixes this issue by comparing the last loaded LOAD segment number with the max LOAD segment number in the ELF.
Signed-off-by: Umair Khan umair_khan@mentor.com
To unsubscribe from these emails, change your notification settings at https://github.com/OpenAMP/open-amp/settings/notifications