MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / arch / arm / mach-s3c3410 / head.S
blob16dc42e45916dc1c31536879b22f4a0500b2ec1b
1 /*
2  *  linux/arch/arm/mach-s3c3410/head.S
3  *
4  *  Copyright (C) 2003 Hyok S. Choi
5  *  <hyok.choi@samsung.com>
6  *
7  *  uClinux kernel startup code for s3c3410
8  *  which has no proper bootloader for linux startup
9  */
10 #include <linux/linkage.h>
11 #include <linux/init.h>
13 #include <asm/assembler.h>
14 #include <asm/mach-types.h>
15 #include <asm/procinfo.h>
16 #include <asm/ptrace.h>
17 #include <asm/mach/arch.h>
19 #define MACHINFO_TYPE           0
20 #define MACHINFO_PHYSRAM        4
21 #define MACHINFO_PHYSIO         8
22 #define MACHINFO_PGOFFIO        12
23 #define MACHINFO_NAME           16
26  * Kernel startup entry point.
27  */
28         __INIT
29         .type   stext, #function
30 ENTRY(stext)
31         mov     r12, r0
32         mov     r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE   @ make sure svc mode
33         msr     cpsr_c, r0                      @ and all irqs disabled
35         adr     r5, LC0
36         ldmia   r5, {r5, r6, r8, r9, sp}                        @ Setup stack
38         /*  Copy data sections to their new home.  */
41         /*  Clear BSS */
42         mov     r4, #0
43 1:      cmp     r5, r8                                  
44         strcc   r4, [r5],#4
45         bcc     1b
47         /*  Pretend we know what our processor code is (for arm_id)   */
49         ldr     r2, S3C3410_PROCESSOR_TYPE
51         str     r2, [r6]
52         ldr     r2, S3C3410_MACH_TYPE
53         str     r2, [r9]
55         mov fp, #0
56         b       start_kernel
57         
58 LC0:    .long   __bss_start
59         .long   processor_id
60         .long   _end
61         .long   __machine_arch_type
62         .long   init_thread_union+8192
63         
64 S3C3410_PROCESSOR_TYPE:
65         .long   0x34107700
66 S3C3410_MACH_TYPE:
67         .long   MACH_TYPE_S3C3410
69 #include "../kernel/head-common.S"