From: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
target/hexagon/cpu.h | 1 +
target/hexagon/cpu.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
index 92b32f434b..39d6983263 100644
--- a/target/hexagon/cpu.h
+++ b/target/hexagon/cpu.h
@@ -196,6 +196,7 @@ struct ArchCPU {
#ifndef CONFIG_USER_ONLY
uint32_t num_tlbs;
uint32_t l2vic_base_addr;
+ uint32_t boot_addr;
#endif
};
diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
index 2af0b4089e..8afa7e55e6 100644
--- a/target/hexagon/cpu.c
+++ b/target/hexagon/cpu.c
@@ -69,6 +69,7 @@ static const Property hexagon_cpu_properties[] = {
DEFINE_PROP_UINT32("jtlb-entries", HexagonCPU, num_tlbs, MAX_TLB_ENTRIES),
DEFINE_PROP_UINT32("l2vic-base-addr", HexagonCPU, l2vic_base_addr,
0xffffffffULL),
+ DEFINE_PROP_UINT32("exec-start-addr", HexagonCPU, boot_addr, 0xffffffffULL),
#endif
DEFINE_PROP_BOOL("lldb-compat", HexagonCPU, lldb_compat, false),
DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, lldb_stack_adjust, 0,
@@ -409,6 +410,7 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetType type)
env->next_PC = 0;
env->wait_next_pc = 0;
env->cause_code = HEX_EVENT_NONE;
+ arch_set_thread_reg(env, HEX_REG_PC, cpu->boot_addr);
#endif
env->cause_code = HEX_EVENT_NONE;
}
--
2.34.1