Skip to content

Commit 3be724f

Browse files
nvlsianpurlubos
authored andcommitted
[nrf noup] boot/zephyr: fix fw_info search
By the upstream patch the vt get now the pointer to the copy of the arm_vector instead of original. This patch fixes address of the firmware which is to be taken by the fw_info_find. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent 7b018cb commit 3be724f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

boot/zephyr/main.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,14 @@ static void do_boot(struct boot_rsp *rsp)
206206
#endif
207207

208208
#if defined(CONFIG_FW_INFO) && !defined(CONFIG_EXT_API_PROVIDE_EXT_API_UNUSED)
209-
const struct fw_info *firmware_info = fw_info_find((uint32_t) vt);
209+
uintptr_t fw_start_addr;
210+
211+
rc = flash_device_base(rsp->br_flash_dev_id, &fw_start_addr);
212+
assert(rc == 0);
213+
214+
fw_start_addr += rsp->br_image_off + rsp->br_hdr->ih_hdr_size;
215+
216+
const struct fw_info *firmware_info = fw_info_find(fw_start_addr);
210217
bool provided = fw_info_ext_api_provide(firmware_info, true);
211218

212219
#ifdef PM_S0_ADDRESS

0 commit comments

Comments
 (0)