aviralgarg05 commented on PR #18373:
URL: https://github.com/apache/nuttx/pull/18373#issuecomment-3889555929

   > @jerpelea @acassis please do not merge this yet. I don't think it is going 
to work.
   > 
   > The problem is that the routine that is going to start the new image is in 
IRAM and might have been overwritten by the copy to IRAM part of the new image. 
The copying to IRAM (and DRAM) of the new image should be postponed to the last 
action in the routine that is going to start the new image. The start address 
of the new image should also be stored in a register to avoid it being 
overwritten when it is in DRAM.
   > 
   > It is required that this routine is at least evaluated using a bootloader 
or a NuttX image that is created to execute the `board_boot_image()`. 
@aviralgarg05 can you confirm that such a test has been executed?
   
   
   
   Thanks for the feedback, your concern is valid, in the current flow, 
IRAM/DRAM loading happens before the final handoff path, so the loader 
stub/data can be overwritten.
   
   I will rework this so the last-stage loader runs safely from IRAM, postpones 
RAM section copy to the final step, and keeps the entry address in a 
register-based handoff path.
   
   I have not completed the dedicated runtime validation yet. I will run the 
boot test flow that exercises `board_boot_image()` and post the exact test 
steps/logs before requesting merge.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to