23 lines
563 B
ArmAsm
23 lines
563 B
ArmAsm
.syntax unified
|
|
.cpu cortex-a7
|
|
.thumb
|
|
@ maze entry logger: record lr/sp to mailbox 0x08006964, return 0.
|
|
@ Guard: if lr is outside known-good SBL/stub ranges, spin with
|
|
@ interrupts disabled instead of jumping into the void (post-mortem
|
|
@ via vec trap regs).
|
|
.text
|
|
.global maze_stub
|
|
maze_stub:
|
|
movw r12, #:lower16:0x08006964
|
|
movt r12, #:upper16:0x08006964
|
|
str lr, [r12]
|
|
str sp, [r12, #4]
|
|
movs r0, #0
|
|
lsr r12, lr, #24
|
|
cmp r12, #0x08
|
|
bne maze_hang
|
|
bx lr
|
|
maze_hang:
|
|
cpsid i
|
|
b maze_hang
|