1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Michael Sevakis
12 * RoLo restart code for IMX31
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
26 /****************************************************************************
27 * void rolo_restart(const unsigned char* source, unsigned char* dest,
28 * int length) __attribute__((noreturn));
30 .section .text, "ax", %progbits
34 adr r4, restart_copy_start
35 adr r5, restart_copy_end
36 ldr r6, =IRAM_BASE_ADDR
50 @ Trivial copy of firmware to final location
58 @ Clean and invalidate all caches
60 mcr p15, 0, r0, c7, c14, 0
61 mcr p15, 0, r0, c7, c5, 0
62 mcr p15, 0, r0, c7, c10, 4
63 mcr p15, 0, r0, c7, c5, 4
65 @ Branch to destination (should be address 0x00000000)
68 .size rolo_restart,.-rolo_restart