From f1530d8a8267f6ff6686623f12da3c3cf33b9888 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 4 Feb 2005 18:24:58 +0000 Subject: Boot loader safety measures git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5791 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bootloader/main.c') 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"); -- cgit v1.2.3