Commit d5c7046
committed
[nrf fromlist] 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.
Upstream PR #: 100689
Signed-off-by: Tomasz Chyrowicz <[email protected]>1 parent 62755cb commit d5c7046
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | 364 | | |
368 | 365 | | |
369 | 366 | | |
370 | 367 | | |
371 | 368 | | |
372 | | - | |
| 369 | + | |
| 370 | + | |
373 | 371 | | |
374 | 372 | | |
375 | 373 | | |
| |||
391 | 389 | | |
392 | 390 | | |
393 | 391 | | |
394 | | - | |
395 | 392 | | |
396 | 393 | | |
397 | 394 | | |
| |||
0 commit comments