Why position-independent + direct-xip load mode are not supported? #1201
Replies: 2 comments 1 reply
-
There is probably a little confusion with the term "direct-xip". Hopefully I can clarify:
As far as I know, nobody has implemented position-independent code for any of the platforms supported by MCUboot. Generally, it will take some extra work at the OS level to make this possible, as at a low level, most kernels make assumptions about knowing the address the code is located at. For example, Zephyr points directly to the vector table, which is in flash, and has direct addresses of the code to jump to. I don't believe there is anything within MCUboot stopping PIC from being implemented, it just hasn't been done. |
Beta Was this translation helpful? Give feedback.
-
Other than issues about possibly needing to pass the offset into the image, I don't think significant changes will need to happen to MCUboot for this. It already supports having XIP images in both slots, and isn't really aware of whether that is done by linking them twice, or using PIC. |
Beta Was this translation helpful? Give feedback.
-
Currently in MCUboot docs I read that there is a limitation that image should be "Built to run from a fixed location (i.e., not position-independent).", but also there is a "direct-xip" option. I do not fully understand what are the limitation that image with "position-independent" code + "direct-xip" load mode should not work?
Beta Was this translation helpful? Give feedback.
All reactions