b29: S18 poll-epilogue router

This commit is contained in:
SashegDev
2026-09-13 12:23:15 +00:00
parent 0863405819
commit b7de1d80e0
5 changed files with 122 additions and 1 deletions
+15
View File
@@ -692,6 +692,21 @@ static void saimaa_machine_init(MachineState *machine)
cpu_physical_memory_write(0x08006C88 + k, &word, 4);
}
}
/* S18 stublet at 0x08006D22 (10B, b29): poll-epilogue router.
* movw/movt ip + bx ip to sbl_main 0x802f6a9. */
{
static const uint8_t s18[] = {
0x4f, 0xf2, 0xa9, 0x6c, 0xc0, 0xf6, 0x02, 0x0c,
0x60, 0x47,
};
size_t k;
for (k = 0; k < sizeof(s18); k += 4) {
uint32_t word = 0;
size_t n = sizeof(s18) - k < 4 ? sizeof(s18) - k : 4;
__builtin_memcpy(&word, &s18[k], n);
cpu_physical_memory_write(0x08006D22 + k, &word, 4);
}
}
/* S17 safe-logger (50B @0x08006CF0, b26): print r1-string
* via UARTDM-TF iff r1 in rodata [0x804B800,0x8058000);
* pop-return (no leak). Replaces S8 silence with logs. */