saimaa: fake PBL stack+r0 for SBL entry

This commit is contained in:
SashegDev
2026-09-07 09:20:28 +00:00
parent 9b8ace415d
commit 4e95ff3d42
+3
View File
@@ -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);
}