Skip to content

Commit f4640d0

Browse files
Revert "[nrf noup] soc/nordic/nrf54h/pm_s2ram: S2RAM resume hardening"
This reverts commit a41a631. Signed-off-by: Adam Kondraciuk <[email protected]>
1 parent d47f109 commit f4640d0

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,26 +345,19 @@ zephyr_udc0: &usbhs {
345345

346346
/* Trim this RAM block for making room on all run-time common S2RAM cpu context. */
347347
&cpuapp_ram0 {
348-
reg = <0x22000000 (DT_SIZE_K(32) - 52)>;
349-
ranges = <0x0 0x22000000 (0x8000 - 0x34)>;
348+
reg = <0x22000000 (DT_SIZE_K(32) - 48)>;
349+
ranges = <0x0 0x22000000 (0x8000 - 0x30)>;
350350
};
351351

352352
/ {
353353
soc {
354354
/* temporary stack for S2RAM resume logic */
355-
pm_s2ram_stack: cpuapp_s2ram_stack@22007fcc {
355+
pm_s2ram_stack: cpuapp_s2ram_stack@22007fd0 {
356356
compatible = "zephyr,memory-region", "mmio-sram";
357-
reg = <0x22007fcc 16>;
357+
reg = <0x22007fd0 16>;
358358
zephyr,memory-region = "pm_s2ram_stack";
359359
};
360360

361-
/* run-time common mcuboot S2RAM support section */
362-
mcuboot_s2ram: cpuapp_s2ram@22007fdc {
363-
compatible = "zephyr,memory-region", "mmio-sram";
364-
reg = <0x22007fdc 4>;
365-
zephyr,memory-region = "mcuboot_s2ram_context";
366-
};
367-
368361
/* run-time common S2RAM cpu context RAM */
369362
pm_s2ram: cpuapp_s2ram@22007fe0 {
370363
compatible = "zephyr,memory-region", "mmio-sram";

soc/nordic/nrf54h/pm_s2ram.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,24 +219,10 @@ static void fpu_restore(_fpu_context_t *backup)
219219
#endif /* !defined(CONFIG_FPU_SHARING) */
220220
#endif /* defined(CONFIG_FPU) */
221221

222-
#if DT_NODE_EXISTS(DT_NODELABEL(mcuboot_s2ram)) &&\
223-
DT_NODE_HAS_COMPAT(DT_NODELABEL(mcuboot_s2ram), zephyr_memory_region)
224-
/* Linker section name is given by `zephyr,memory-region` property of
225-
* `zephyr,memory-region` compatible DT node with nodelabel `mcuboot_s2ram`.
226-
*/
227-
__attribute__((section(DT_PROP(DT_NODELABEL(mcuboot_s2ram), zephyr_memory_region))))
228-
volatile struct mcuboot_resume_s _mcuboot_resume;
229-
230-
#define SET_MCUBOOT_RESUME_MAGIC() _mcuboot_resume.magic = MCUBOOT_S2RAM_RESUME_MAGIC
231-
#else
232-
#define SET_MCUBOOT_RESUME_MAGIC()
233-
#endif
234-
235222
int soc_s2ram_suspend(pm_s2ram_system_off_fn_t system_off)
236223
{
237224
int ret;
238225

239-
SET_MCUBOOT_RESUME_MAGIC();
240226
scb_save(&backup_data.scb_context);
241227
#if defined(CONFIG_FPU)
242228
#if !defined(CONFIG_FPU_SHARING)

soc/nordic/nrf54h/pm_s2ram.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
#ifndef _ZEPHYR_SOC_ARM_NORDIC_NRF_PM_S2RAM_H_
1111
#define _ZEPHYR_SOC_ARM_NORDIC_NRF_PM_S2RAM_H_
1212

13-
#define MCUBOOT_S2RAM_RESUME_MAGIC 0x75832419
14-
15-
struct mcuboot_resume_s {
16-
uint32_t magic; /* magic value to identify valid structure */
17-
};
18-
1913
/**
2014
* @brief Save CPU state on suspend
2115
*

0 commit comments

Comments
 (0)