From 4e95ff3d42315ff6417d6903c5970c15c862eb42 Mon Sep 17 00:00:00 2001 From: SashegDev Date: Mon, 7 Sep 2026 09:20:28 +0000 Subject: [PATCH] saimaa: fake PBL stack+r0 for SBL entry --- qemu/saimaa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/saimaa.c b/qemu/saimaa.c index ed610db..1cbc790 100644 --- a/qemu/saimaa.c +++ b/qemu/saimaa.c @@ -174,6 +174,9 @@ static void saimaa_machine_init(MachineState *machine) exit(1); } cpu_set_pc(first_cpu, entry); + /* PBL normally sets up SBL stack + r0=pbl_shared; fake it */ + ARM_CPU(first_cpu)->env.regs[13] = 0x085FFF00; /* top of DDRLOW */ + ARM_CPU(first_cpu)->env.regs[0] = 0x00220000; /* fake pbl_shared */ printf("saimaa: SBL1 %s loaded (%zd bytes), entry 0x%lx\n", sms->sbl1, sz, (unsigned long)entry); }