aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/head.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sh/kernel/head.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/sh/kernel/head.S')
-rw-r--r--arch/sh/kernel/head.S76
1 files changed, 76 insertions, 0 deletions
diff --git a/arch/sh/kernel/head.S b/arch/sh/kernel/head.S
new file mode 100644
index 000000000000..9b9e6ef626ce
--- /dev/null
+++ b/arch/sh/kernel/head.S
@@ -0,0 +1,76 @@
1/* $Id: head.S,v 1.7 2003/09/01 17:58:19 lethal Exp $
2 *
3 * arch/sh/kernel/head.S
4 *
5 * Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 *
11 * Head.S contains the SH exception handlers and startup code.
12 */
13#include <linux/linkage.h>
14
15 .section .empty_zero_page, "aw"
16ENTRY(empty_zero_page)
17 .long 1 /* MOUNT_ROOT_RDONLY */
18 .long 0 /* RAMDISK_FLAGS */
19 .long 0x0200 /* ORIG_ROOT_DEV */
20 .long 1 /* LOADER_TYPE */
21 .long 0x00360000 /* INITRD_START */
22 .long 0x000a0000 /* INITRD_SIZE */
23 .long 0
24 .balign 4096,0,4096
25
26 .text
27/*
28 * Condition at the entry of _stext:
29 *
30 * BSC has already been initialized.
31 * INTC may or may not be initialized.
32 * VBR may or may not be initialized.
33 * MMU may or may not be initialized.
34 * Cache may or may not be initialized.
35 * Hardware (including on-chip modules) may or may not be initialized.
36 *
37 */
38ENTRY(_stext)
39 ! Initialize Status Register
40 mov.l 1f, r0 ! MD=1, RB=0, BL=0, IMASK=0xF
41 ldc r0, sr
42 ! Initialize global interrupt mask
43 mov #0, r0
44 ldc r0, r6_bank
45 !
46 mov.l 2f, r0
47 mov r0, r15 ! Set initial r15 (stack pointer)
48 mov #0x20, r1 !
49 shll8 r1 ! r1 = 8192
50 sub r1, r0 !
51 ldc r0, r7_bank ! ... and initial thread_info
52 !
53 ! Additional CPU initialization
54 mov.l 6f, r0
55 jsr @r0
56 nop
57 ! Clear BSS area
58 mov.l 3f, r1
59 add #4, r1
60 mov.l 4f, r2
61 mov #0, r0
629: cmp/hs r2, r1
63 bf/s 9b ! while (r1 < r2)
64 mov.l r0,@-r2
65 ! Start kernel
66 mov.l 5f, r0
67 jmp @r0
68 nop
69
70 .balign 4
711: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF
722: .long stack
733: .long __bss_start
744: .long _end
755: .long start_kernel
766: .long sh_cpu_init