diff options
Diffstat (limited to 'common/system.c')
-rw-r--r-- | common/system.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/system.c b/common/system.c index de15f62aa3..856f3d981f 100644 --- a/common/system.c +++ b/common/system.c @@ -520,10 +520,17 @@ int system_run_image_copy(enum system_image_copy_t copy) /* Get reset vector */ init_addr = system_get_fw_reset_vector(base); #else - /* Make sure the reset vector is inside the destination image */ +#if defined(CONFIG_RO_HEAD_ROOM) + /* Skip any head room in the RO image */ + if (copy == SYSTEM_IMAGE_RO) + /* Don't change base, though! */ + init_addr = *(uintptr_t *)(base + CONFIG_RO_HEAD_ROOM + 4); + else +#endif init_addr = *(uintptr_t *)(base + 4); #endif #ifndef EMU_BUILD + /* Make sure the reset vector is inside the destination image */ if (init_addr < base || init_addr >= base + get_size(copy)) return EC_ERROR_UNKNOWN; #endif |