kernel: do not copy data to on-chip memory on SH3

Avoids a crash at startup, but the application needs to be smart enough
to not use the data.
This commit is contained in:
Lephe 2020-09-28 14:06:29 +02:00
parent 744d243265
commit e66b9083b4
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -116,10 +116,16 @@ int start(int isappli, int optnum)
/* Load data sections and wipe the bss section. This has to be done
first for static and global variables to be initialized */
regcpy(&ldata, &sdata, &rdata);
regclr(&rbss, &sbss);
/* Do not load data to ILRAM, XRAM or YRAM on SH3 - the areas don't
exist. If you use them, you're responsible! */
if(!isSH3())
{
regcpy(&lilram, &silram, &rilram);
regcpy(&lxram, &sxram, &rxram);
regcpy(&lyram, &syram, &ryram);
regclr(&rbss, &sbss);
}
#ifdef FX9860G
/* Copy permanentely-mapped code to start of user RAM (on fx-CG 50 it