Commit 788d542
committed
mcumgr: Prevent FW loader from self-destruction
The FW loader reports and manages exactly two slots:
- slot 0: this is the slot for the application code to update
- slot 1: this is the slot, in which the FW loader is placed
The slot 1 is reported, so tools can fetch metadata about the FW loader
installed on the device.
Unfortunately, currently SMP-based FW loader allows to issue slot erase
command for the slot 1, effectively erasing the FW loader code that is
being executed.
This change correctly identifies the slot 1 as an active one, marking
it as used and blocking erase operation on that slot.
Ref: NCSDK-36684
Signed-off-by: Tomasz Chyrowicz <[email protected]>1 parent 6756485 commit 788d542
File tree
2 files changed
+3
-6
lines changed- subsys/mgmt/mcumgr/grp/img_mgmt/src
2 files changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | 423 | | |
427 | 424 | | |
428 | 425 | | |
429 | 426 | | |
430 | 427 | | |
431 | | - | |
| 428 | + | |
| 429 | + | |
432 | 430 | | |
433 | 431 | | |
434 | 432 | | |
| |||
450 | 448 | | |
451 | 449 | | |
452 | 450 | | |
453 | | - | |
454 | 451 | | |
455 | 452 | | |
456 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments