Commit | Line | Data |
---|---|---|
df2078b8 YS |
1 | |
2 | #include <linux/sys.h> | |
3 | #include <linux/init.h> | |
4 | #include <asm/unistd.h> | |
5 | #include <asm/setup.h> | |
6 | #include <asm/segment.h> | |
7 | #include <asm/linkage.h> | |
8 | #include <asm/asm-offsets.h> | |
9 | #include <asm/thread_info.h> | |
10 | #include <asm/errno.h> | |
11 | ||
12 | #if defined(CONFIG_CPU_H8300H) | |
13 | .h8300h | |
14 | #define SYSCR 0xfee012 | |
15 | #define IRAMTOP 0xffff20 | |
16 | #endif | |
17 | #if defined(CONFIG_CPU_H8S) | |
18 | .h8300s | |
19 | #define INTCR 0xffff31 | |
20 | #define IRAMTOP 0xffc000 | |
21 | #endif | |
22 | ||
23 | __HEAD | |
24 | .global _start | |
25 | _start: | |
26 | mov.l #IRAMTOP,sp | |
27 | /* .bss clear */ | |
28 | mov.l #_sbss,er5 | |
29 | mov.l #_ebss,er4 | |
30 | sub.l er5,er4 | |
31 | shlr er4 | |
32 | shlr er4 | |
33 | sub.l er2,er2 | |
34 | 1: | |
35 | mov.l er2,@er5 | |
36 | adds #4,er5 | |
37 | dec.l #1,er4 | |
38 | bne 1b | |
39 | jsr @h8300_fdt_init | |
40 | ||
41 | /* linux kernel start */ | |
42 | #if defined(CONFIG_CPU_H8300H) | |
43 | ldc #0xd0,ccr /* running kernel */ | |
44 | mov.l #SYSCR,er0 | |
45 | bclr #3,@er0 | |
46 | #endif | |
47 | #if defined(CONFIG_CPU_H8S) | |
48 | ldc #0x07,exr | |
49 | bclr #4,@INTCR:8 | |
50 | bset #5,@INTCR:8 /* Interrupt mode 2 */ | |
51 | ldc #0x90,ccr /* running kernel */ | |
52 | #endif | |
53 | mov.l #init_thread_union,sp | |
54 | add.l #0x2000,sp | |
55 | jsr @start_kernel | |
56 | ||
57 | 1: | |
58 | bra 1b | |
59 | ||
60 | .end |