-
Notifications
You must be signed in to change notification settings - Fork 712
nRF54h20 pm s2ram resume redirect (bootloader -> App) #3252
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
nRF54h20 pm s2ram resume redirect (bootloader -> App) #3252
Conversation
02dd577
to
215d162
Compare
215d162
to
123e125
Compare
3cae8ad
to
67af6a3
Compare
why can this upstream fix not be used zephyrproject-rtos/zephyr#95914 and why does this need noups? |
@nordicjm The upstream PR you mentioned is bugfix for another S2RAm related Issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved into sdk-nrf rather than being a noup, the original file can be marked as a header only file which means it will not be compiled - see https://github.com/nrfconnect/sdk-nrf/blob/main/tests/subsys/net/lib/nrf_cloud/cloud/CMakeLists.txt#L40 for an example of how to do that, you can then substitute in a modified file to be compiled in place of it
soc/nordic/nrf54h/Kconfig
Outdated
|
||
config SOC_NRF54H20_PM_S2RAM_OVERRIDE | ||
bool "Override `pm_s2ram` implementation" | ||
default n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default n |
…plementation Add Kconfig entries to allow compile own s2ram implementation. Signed-off-by: Karol Lasończyk <[email protected]> Signed-off-by: Andrzej Puzdrowski <[email protected]>
Added support for hardening decision on resume from S2RAM by MCUboot bootloader. Application sets additional variable to MCUBOOT_S2RAM_RESUME_MAGIC which allows the bootloader to doublecheck. Signed-off-by: Andrzej Puzdrowski <[email protected]>
67af6a3
to
d652dcd
Compare
in future when opening PRs to sdk-mcuboot/sdk-zephyr and you are creating your own manifest PR then put |
/ { | ||
soc { | ||
/* run-time common mcuboot S2RAM support section */ | ||
mcuboot_s2ram: cpuapp_s2ram@22007fdc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having a look at the sdk-mcuboot PR this is basically completely duplicating retention's boot mode feature, any reason that wasn't used given it already has checksum/header validity and is already supported by mcuboot/doesn't need duplicate maintenance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason are that it is not another boot. From application execution it is perceived as resume from very deep sleep. Operation must be quick and low level. It must use limited resources. This section is for anty-glitch magic value recommended by Architect group. It is used for double check decision.
Added infrastructure needed for redirect execution to the Application reset vector in case SoC gets woke-up from S2RAM and MCUboot is the first code entity. Thanks to that bootloader can implement its own routine for resume support (CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE) which overrides
zephyr/soc/nordic/nrf54h/pm_s2ram.c
implementation in case of MCUboot.Introduce additional source of true using additional check over independent source (variable with magic value).