1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Marcoen Hirschberg
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
24 .section .init.text,"ax",%progbits
28 /* Exception vectors */
31 * reset vector *MUST* use relative-addressing only
32 * the MMU might not be enabled yet, and the PC might point to
33 * a memory region not present in the linked binary
38 b software_int_handler
39 b prefetch_abort_handler
50 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
52 #if CONFIG_CPU == AS3525 || CONFIG_CPU == AS3525v2
67 /* must be done before bss is zeroed */
79 /* copy init data to codec buffer */
80 /* must be done before bss is zeroed */
91 mcr p15, 0, r2, c7, c5, 0 @ Invalidate ICache
94 /* Initialise bss section to zero */
103 /* Set up stack for IRQ mode */
108 #if CONFIG_CPU == AS3525 || CONFIG_CPU == AS3525v2
109 /* Let abort and undefined modes use irq stack */
110 /* svc stack is for interrupt processing */
113 /* Let svc, abort and undefined modes use irq stack */
116 /* Set up stack for FIQ mode */
125 /* Switch to sys mode */
128 /* Set up some stack and munge it with 0xdeadbeef */
137 ldr ip, =main @ make sure we are using the virtual address
140 /* Cache-align interrupt stacks */
143 /* 256 words of IRQ stack */
147 /* 256 words of FIQ/SVC stack */