summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bootloader/main.c b/bootloader/main.c
index 0a18bed9ec..11e0f71801 100644
--- a/bootloader/main.c
+++ b/bootloader/main.c
@@ -45,7 +45,9 @@ int usb_screen(void)
void start_iriver_fw(void)
{
asm(" move.w #0x2700,%sr");
+ /* Reset the cookie for the crt0 crash check */
asm(" move.l #0,%d0");
+ asm(" move.l %d0,0x10017ffc");
asm(" movec.l %d0,%vbr");
asm(" move.l 0,%sp");
asm(" lea.l 8,%a0");
@@ -110,6 +112,9 @@ int load_firmware(void)
void start_firmware(void)
{
asm(" move.w #0x2700,%sr");
+ /* Reset the cookie for the crt0 crash check */
+ asm(" move.l #0,%d0");
+ asm(" move.l %d0,0x10017ffc");
asm(" move.l #0x30000000,%d0");
asm(" movec.l %d0,%vbr");
asm(" move.l 0x30000000,%sp");