x1000: Fix stupid bug in the SPL

This overwrote the first 2 instructions of crt0 in the bootloader!
I'm really not sure how this *didn't* cause a fatal exception.

This address isn't special as far as I know, so just move it to the
TCSM by making it a static variable.

Change-Id: I58e1486804aeb2b68325e8de2aa1874c97abef19
This commit is contained in:
Aidan MacDonald 2021-04-26 22:31:05 +01:00
parent 63b6281505
commit ed8c977e2f

View file

@ -262,6 +262,9 @@ static int nandwrite(uint32_t addr, uint32_t size, void* buffer)
return rc;
}
/* Kernel command line arguments */
static char* argv[2];
void main(void)
{
if(!(SPL_ARGUMENTS->flags & SPL_FLAG_SKIP_INIT))
@ -289,7 +292,6 @@ void main(void)
* saves an unnecessary branch.
*/
entry_fn entry = (entry_fn)opt->exec_addr;
char** argv = (char**)0x80004000;
argv[0] = 0;
argv[1] = (char*)opt->cmdline;