aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/kernel/head.S')
-rw-r--r--arch/avr32/kernel/head.S45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/avr32/kernel/head.S b/arch/avr32/kernel/head.S
new file mode 100644
index 000000000000..773b7ad87be9
--- /dev/null
+++ b/arch/avr32/kernel/head.S
@@ -0,0 +1,45 @@
1/*
2 * Non-board-specific low-level startup code
3 *
4 * Copyright (C) 2004-2006 Atmel Corporation
5 *
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.
9 */
10#include <linux/linkage.h>
11
12#include <asm/page.h>
13#include <asm/thread_info.h>
14#include <asm/sysreg.h>
15
16 .section .init.text,"ax"
17 .global kernel_entry
18kernel_entry:
19 /* Initialize status register */
20 lddpc r0, init_sr
21 mtsr SYSREG_SR, r0
22
23 /* Set initial stack pointer */
24 lddpc sp, stack_addr
25 sub sp, -THREAD_SIZE
26
27#ifdef CONFIG_FRAME_POINTER
28 /* Mark last stack frame */
29 mov lr, 0
30 mov r7, 0
31#endif
32
33 /* Set up the PIO, SDRAM controller, early printk, etc. */
34 rcall board_early_init
35
36 /* Start the show */
37 lddpc pc, kernel_start_addr
38
39 .align 2
40init_sr:
41 .long 0x007f0000 /* Supervisor mode, everything masked */
42stack_addr:
43 .long init_thread_union
44kernel_start_addr:
45 .long start_kernel