Rename br_image_addr to br_image_off.
The boot response returns a flash offset, not a flash address. This is
causing confusion and leading to crashes on some platforms which don't
have flash at address 0.
Rename the field to make it more clear what its purpose is; future
patches can start fixing up usages.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index 9791f26..c6f4376 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -45,7 +45,7 @@
* consecutively. Manually set the stack pointer and jump into the
* reset vector
*/
- vt = (struct arm_vector_table *)(rsp->br_image_addr +
+ vt = (struct arm_vector_table *)(rsp->br_image_off +
rsp->br_hdr->ih_hdr_size);
irq_lock();
sys_clock_disable();
@@ -61,7 +61,7 @@
{
void *start;
- start = (void *)(rsp->br_image_addr + rsp->br_hdr->ih_hdr_size);
+ start = (void *)(rsp->br_image_off + rsp->br_hdr->ih_hdr_size);
/* Lock interrupts and dive into the entry point */
irq_lock();
@@ -92,7 +92,8 @@
;
}
- BOOT_LOG_INF("Bootloader chainload address: 0x%x", rsp.br_image_addr);
+ BOOT_LOG_INF("Bootloader chainload address offset: 0x%x",
+ rsp.br_image_off);
BOOT_LOG_INF("Jumping to the first image slot");
do_boot(&rsp);