OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [armnommu/] [kernel/] [head-armo.S] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1622 jcastillo
/*
2
 * linux/arch/arm/kernel/head.S
3
 *
4
 * Copyright (C) 1994, 1995, 1996, 1997 Russell King
5
 *
6
 * 26-bit kernel startup code
7
 */
8
                .text
9
                .align
10
                .global __stext
11
                .global __entry
12
/*
13
 * Entry point.
14
 */
15
__stext:
16
__entry:        cmp     pc, #0x02000000
17
                ldrlt   pc, LC1                 @ if 0x01800000, call at 0x02080000
18
                teq     r0, #0                  @ Check for old calling method
19
                blne    Loldparams              @ Move page if old
20
                adr     r5, LC0
21
                ldmia   r5, {r5, r6, sl, sp}    @ Setup stack
22
                mov     r4, #0
23
1:              cmp     r5, sl                  @ Clear BSS
24
                strcc   r4, [r5], #4
25
                bcc     1b
26
                mov     r0, #0xea000000         @ Point undef instr to continuation
27
                adr     r5, Lcontinue - 12
28
                orr     r5, r0, r5, lsr #2
29
                str     r5, [r4, #4]
30
                mov     r2, r4
31
                ldr     r5, Larm2_id
32
                swp     r0, r0, [r2]            @ check for swp (ARM2 can't)
33
                ldr     r5, Larm250_id
34
                mrc     15, 0, r0, c0, c0       @ check for CP#15 (ARM250 can't)
35
                mov     r5, r0                  @ Use processor ID if we do have CP#15
36
Lcontinue:      str     r5, [r6]
37
                mov     r5, #0xeb000000         @ Point undef instr vector to itself
38
                sub     r5, r5, #2
39
                str     r5, [r4, #4]
40
                mov     fp, #0
41
                b       _start_kernel
42
 
43
LC1:            .word   __stext
44
LC0:            .word   _edata
45
                .word   _arm_id
46
                .word   _end
47
                .word   _init_user_stack + 4096
48
Larm2_id:       .long   0x41560200
49
Larm250_id:     .long   0x41560250
50
                .align
51
 
52
Loldparams:     mov     r4, #0x02000000
53
                add     r3, r4, #0x00080000
54
                add     r4, r4, #0x0007c000
55
1:              ldmia   r0!, {r5 - r12}
56
                stmia   r4!, {r5 - r12}
57
                cmp     r4, r3
58
                blt     1b
59
                movs    pc, lr

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.