2 * linux/arch/arm26/kernel/head.S
4 * Copyright (C) 1994-2000 Russell King
5 * Copyright (C) 2003 Ian Molton
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * 26-bit kernel startup code
13 #include <linux/config.h>
14 #include <linux/linkage.h>
15 #include <asm/mach-types.h>
18 .equ swapper_pg_dir, 0x0207d000
23 .section ".init.text",#alloc,#execinstr
28 ldrlt pc, LC0 @ if 0x01800000, call at 0x02080000
29 teq r0, #0 @ Check for old calling method
30 blne oldparams @ Move page if old
33 ldmib r0, {r2-r5, sp} @ Setup stack (and fetch other values)
35 mov r0, #0 @ Clear BSS
45 #ifdef CONFIG_XIP_KERNEL
46 ldr r3, ETEXT @ data section copy
59 .word __bss_start @ r2
61 .word processor_id @ r4
62 .word __machine_arch_type @ r5
63 .word init_thread_union+8192 @ sp
64 #ifdef CONFIG_XIP_KERNEL
67 EDATA: .word __bss_start
70 arm2_id: .long 0x41560200 @ ARM2 and 250 dont have a CPUID
71 arm250_id: .long 0x41560250 @ So we create some after probing for them
74 oldparams: mov r4, #0x02000000
75 add r3, r4, #0x00080000
76 add r4, r4, #0x0007c000
77 1: ldmia r0!, {r5 - r12}
84 * We need some way to automatically detect the difference between
85 * these two machines. Unfortunately, it is not possible to detect
86 * the presence of the SuperIO chip, because that will hang the old
87 * Archimedes machines solid.
89 /* DAG: Outdated, these have been combined !!!!!!! */
91 #if defined(CONFIG_ARCH_ARC)
92 mov r0, #MACH_TYPE_ARCHIMEDES
93 #elif defined(CONFIG_ARCH_A5K)
94 mov r0, #MACH_TYPE_A5K
100 mov r2, #0xea000000 @ Point undef instr to continuation
101 adr r0, continue - 12
102 orr r0, r2, r0, lsr #2
106 swp r2, r2, [r1] @ check for swp (ARM2 cant)
108 mrc 15, 0, r3, c0, c0 @ check for CP#15 (ARM250 cant)
110 continue: mov r2, #0xeb000000 @ Make undef vector loop