summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-02-04 18:24:58 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-02-04 18:24:58 +0000
commitf1530d8a8267f6ff6686623f12da3c3cf33b9888 (patch)
treed3c32fa680354a2fc0bc87ca6a10e41ab8ab7142 /bootloader
parentb143652572219241950a2e9f953e3bc7be31e42c (diff)
downloadrockbox-f1530d8a8267f6ff6686623f12da3c3cf33b9888.tar.gz
rockbox-f1530d8a8267f6ff6686623f12da3c3cf33b9888.tar.bz2
rockbox-f1530d8a8267f6ff6686623f12da3c3cf33b9888.zip
Boot loader safety measures
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5791 a1c6a512-1295-4272-9138-f99709370657
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");