2 Initialise the Applications Processor
3 Copyright (c) 2010 TJ <linux@tjworld.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License version 2 as published by
7 the Free Software Foundation.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 If not, see <http://www.gnu.org/licenses/>.
20 #include <boot/linkage.h>
21 #include <boot/version.h>
23 #include <boot/arm-missing-opcodes.h>
25 .section ".text", #alloc, #execinstr
27 .type _start,#function
44 .asciz IMG_NAME_ARCHITECTURE
52 mrc p15,0,r0,c1,c0 @ read control register configuration data
53 bic r0,r0,#0x0000B000 @ clear bit 10: Should Be Zero
54 bic r0,r0,#0x00000005 @ bit 2: data cache disabled. bit 0: MMU disable
55 orr r0,r0,#0x00000002 @ bit 1: strict alignment checks enabled
56 mcr p15,0,r0,c1,c0 @ write control register configuration
57 bl SET_SA @ sense amp settings
60 msr cpsr_c, #(SVC_MODE | PSR_F_BIT | PSR_I_BIT) @ ensure svc mode and IRQs disabled
62 mcr p15,0,r0,c1,c0,0 //; WCP15_SCTLR r2
63 ISB @ macro for "isb sy" because compiler may not support opcode