From c74fc6d14a50da3db92ac599a1968a69f39d0434 Mon Sep 17 00:00:00 2001 From: Daniel Oliveira Date: Wed, 11 Jun 2025 11:01:55 +0100 Subject: [PATCH] feat(boot): add boot from flash Signed-off-by: Daniel Oliveira --- src/arch/armv8m/boot.S | 15 ++++++++++----- src/arch/armv8m/exceptions.S | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/arch/armv8m/boot.S b/src/arch/armv8m/boot.S index a704452e3..a46ce8e08 100644 --- a/src/arch/armv8m/boot.S +++ b/src/arch/armv8m/boot.S @@ -17,11 +17,14 @@ * PAGE_SIZE. */ .section ".boot", "ax" -.thumb -.thumb_func -.globl _reset_handler -_reset_handler: - b _start + +.global _rst_vector_table +_rst_vector_table: + .word 0x30000000 + .word _start + .rept 13 + .word _exception_handler + .endr .balign PAGE_SIZE .global _hypercall_start @@ -30,6 +33,8 @@ _hypercall_start: b _hypercall_handler .balign PAGE_SIZE +.thumb +.thumb_func .global _start _start: /** diff --git a/src/arch/armv8m/exceptions.S b/src/arch/armv8m/exceptions.S index bc922a048..447ed8366 100644 --- a/src/arch/armv8m/exceptions.S +++ b/src/arch/armv8m/exceptions.S @@ -139,7 +139,7 @@ _hyp_vector_table: * reset vector. The reset vector is the address of the reset handler. */ .word 0 //TODO:ARMV8M should this be initialized with the real MSP value? - .word _reset_handler + .word _start .rept 13 .word _exception_handler .endr