IMEM tripwire 4B

This commit is contained in:
lumia-emu
2026-09-14 00:17:06 +00:00
parent 503c334b2e
commit 5362f0a6f8
3 changed files with 8 additions and 12 deletions
+4 -5
View File
@@ -474,12 +474,11 @@ def main():
"60474af20007c0f2730747f2797cc0f6000c6047"))
# stack zone fill (STUBV odd)
mu.mem_write(0x085F0000, struct.pack("<I", STUBV) * (0x10000 // 4))
# IMEM tripwire [0x8600000,0x8600010): drift-sink trap (UDF).
# IMEM tripwire [0x8600000,0x8600004): drift-sink trap (UDF).
# Fill-drift falls through here sequentially; faults LOUDLY at
# entry instead of sledding silently to IMEM-top. Rest of IMEM
# stays zeros (SBL IMEM-stack reads data there; full poison
# corrupts counters (0xFFFFFFFF vs fresh 0)!).
mu.mem_write(0x08600000, b"\xff\xff\xff\xff" * 4)
# entry. Must stay 4B: wider poison corrupts IMEM-stack reads
# (SBL frames live at 0x860000C+, counters underflow on 0xFF!).
mu.mem_write(0x08600000, b"\xff\xff\xff\xff")
# pop-site slots (sp values from traces)
for a, v in [(0x085FFF14, 0x802f65d), (0x085FFF1C, 0x802f665),
(0x085FFF44, 0x8013ba5), (0x085FFF5C, 0x802f681),