stubs to code zeros 0x8006820 (ring mailbox, fixed b.w)

This commit is contained in:
SashegDev
2026-09-11 08:44:18 +00:00
parent 124e9f5e72
commit 6875e8bada
3 changed files with 35 additions and 28 deletions
+14 -8
View File
@@ -1,16 +1,22 @@
.syntax unified
.cpu cortex-a7
.thumb
@ maze entry logger: ring-buffer of (lr,sp) at 0x08006964 (8 slots),
@ return 0. Guard: bad lr spins with IRQs off.
@ maze entry logger: ring buffer of 8 (lr,sp) at MAILBOX, return 0.
@ Preserves all regs except r0 (return value) and r12 (IP, clobber-ok).
.text
.global maze_stub
maze_stub:
movw r12, #:lower16:0x08006964
movt r12, #:upper16:0x08006964
ldr r12, [r12, #28] @ idx
add r12, #1
and r12, #7
str r12, [r12, #-28] @ hmm placeholder, replaced below
push {r0-r3}
movw r12, #:lower16:0x08006888
movt r12, #:upper16:0x08006888
ldr r0, [r12, #32]
add r0, #1
and r0, #7
str r0, [r12, #32]
lsl r0, #3
add r0, r12
str lr, [r0]
str sp, [r0, #4]
pop {r0-r3}
movs r0, #0
bx lr