2 * linux/arch/arm/kernel/head-armo.S
4 * Copyright (C) 1994-2000 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * 26-bit kernel startup code
12 #include <linux/config.h>
13 #include <linux/linkage.h>
14 #include <asm/mach-types.h>
16 .globl SYMBOL_NAME(swapper_pg_dir)
17 .equ SYMBOL_NAME(swapper_pg_dir), 0x0207d000
22 .section ".text.init",#alloc,#execinstr
24 __entry: cmp pc, #0x02000000
25 ldrlt pc, LC0 @ if 0x01800000, call at 0x02080000
26 teq r0, #0 @ Check for old calling method
27 blne oldparams @ Move page if old
29 ldmib r0, {r2-r5, sp} @ Setup stack
31 1: cmp r2, r3 @ Clear BSS
41 b SYMBOL_NAME(start_kernel)
43 LC0: .word SYMBOL_NAME(_stext)
44 .word SYMBOL_NAME(__bss_start) @ r2
45 .word SYMBOL_NAME(_end) @ r3
46 .word SYMBOL_NAME(processor_id) @ r4
47 .word SYMBOL_NAME(__machine_arch_type) @ r5
48 .word SYMBOL_NAME(init_task_union)+8192 @ sp
49 arm2_id: .long 0x41560200
50 arm250_id: .long 0x41560250
53 oldparams: mov r4, #0x02000000
54 add r3, r4, #0x00080000
55 add r4, r4, #0x0007c000
56 1: ldmia r0!, {r5 - r12}
63 * We need some way to automatically detect the difference between
64 * these two machines. Unfortunately, it is not possible to detect
65 * the presence of the SuperIO chip, because that will hang the old
66 * Archimedes machines solid.
68 /* DAG: Outdated, these have been combined !!!!!!! */
70 #if defined(CONFIG_ARCH_ARC)
71 mov r0, #MACH_TYPE_ARCHIMEDES
72 #elif defined(CONFIG_ARCH_A5K)
73 mov r0, #MACH_TYPE_A5K
79 mov r2, #0xea000000 @ Point undef instr to continuation
81 orr r0, r2, r0, lsr #2
85 swp r2, r2, [r1] @ check for swp (ARM2 cant)
87 mrc 15, 0, r3, c0, c0 @ check for CP#15 (ARM250 cant)
89 continue: mov r2, #0xeb000000 @ Make undef vector loop