diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-04-26 22:31:05 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-04-28 20:04:10 +0100 |
commit | ed8c977e2fb3c525868411a270a5d57fe0105611 (patch) | |
tree | 950e3f03ab56bd471c445d8ec78d5418cf9af15b /firmware/target/mips/ingenic_x1000 | |
parent | 63b62815050acbfd96f913c4fd936040aac871d7 (diff) | |
download | rockbox-ed8c977e2fb3c525868411a270a5d57fe0105611.tar.gz rockbox-ed8c977e2fb3c525868411a270a5d57fe0105611.zip |
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
Diffstat (limited to 'firmware/target/mips/ingenic_x1000')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/spl-x1000.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_x1000/spl-x1000.c b/firmware/target/mips/ingenic_x1000/spl-x1000.c index e6d87066b5..36ef25f60d 100644 --- a/firmware/target/mips/ingenic_x1000/spl-x1000.c +++ b/firmware/target/mips/ingenic_x1000/spl-x1000.c | |||
@@ -262,6 +262,9 @@ static int nandwrite(uint32_t addr, uint32_t size, void* buffer) | |||
262 | return rc; | 262 | return rc; |
263 | } | 263 | } |
264 | 264 | ||
265 | /* Kernel command line arguments */ | ||
266 | static char* argv[2]; | ||
267 | |||
265 | void main(void) | 268 | void main(void) |
266 | { | 269 | { |
267 | if(!(SPL_ARGUMENTS->flags & SPL_FLAG_SKIP_INIT)) | 270 | if(!(SPL_ARGUMENTS->flags & SPL_FLAG_SKIP_INIT)) |
@@ -289,7 +292,6 @@ void main(void) | |||
289 | * saves an unnecessary branch. | 292 | * saves an unnecessary branch. |
290 | */ | 293 | */ |
291 | entry_fn entry = (entry_fn)opt->exec_addr; | 294 | entry_fn entry = (entry_fn)opt->exec_addr; |
292 | char** argv = (char**)0x80004000; | ||
293 | argv[0] = 0; | 295 | argv[0] = 0; |
294 | argv[1] = (char*)opt->cmdline; | 296 | argv[1] = (char*)opt->cmdline; |
295 | 297 | ||