Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load_fw: The firmware loading loop terminates prematurely #555

Closed
wants to merge 1 commit into from

Conversation

UmairKhanUET
Copy link
Contributor

The remoteproc_load_noblock() is a non-blocking API designed to load the remote firmware in streaming mode. The application has to continue supplying the firmware data blocks until the complete firmware is loaded. The load_fw example does this and checks the nlen variable (returned by the remoteproc_load_noblock() API) for zero to determine if the firmware loading is complete. However, nlen (contains the filesize of the next program header) alone can't be taken as the sufficient condition to mark the completion of firmware loading as 0 is a valid value for filesize for sections that don't require loading to the target memory such as the .bss section. This patch proposes checking filesize as well as memsize as a better metric to mark completion of the firmware loading loop.

The remoteproc_load_noblock() is a non-blocking API designed to load
the remote firmware in streaming mode. The application has to continue
supplying the firmware data blocks until the complete firmware is
loaded. The load_fw example does this and checks the `nlen` variable
(returned by the remoteproc_load_noblock() API) for zero to determine
if the firmware loading is complete. However, `nlen` (contains the
filesize of the next program header) alone can't be taken as the
sufficient condition to mark the completion of firmware loading as
0 is a valid value for filesize for sections that don't require
loading to the target memory such as the .bss section. This patch
proposes checking filesize as well as memsize as a better metric to
mark completion of the firmware loading loop.

Signed-off-by: Umair Khan <[email protected]>
@UmairKhanUET UmairKhanUET deleted the openamp-554 branch February 20, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant