1#include <linux/init.h>
2#include <asm/thread_info.h>
3
4
5 .h8300h
6#define SYSCR 0xfee012
7#define IRAMTOP 0xffff20
8#define NR_INT 64
9#endif
10
11 .h8300s
12#define INTCR 0xffff31
13#define IRAMTOP 0xffc000
14#define NR_INT 128
15#endif
16
17 __HEAD
18 .global _start
19_start:
20 mov.l
21
22 !defined(CONFIG_H8S_SIM)
23 jsr @lowlevel_init
24
25
26 mov.l
27 mov.l
28 mov.l
29 sub.l er6,er4
30 shlr.l er4
31 shlr.l er4
321:
33 mov.l @er5+,er0
34 mov.l er0,@er6
35 adds
36 dec.l
37 bne 1b
38
39 mov.l
40 mov.l
41 sub.l er5,er4
42 shlr er4
43 shlr er4
44 sub.l er0,er0
451:
46 mov.l er0,@er5
47 adds
48 dec.l
49 bne 1b
50#else
51
52 jsr @0xcc
53 ;; er0 - argc
54 ;; er1 - argv
55 mov.l
56 adds
57 dec.l
58 beq 4f
591:
60 mov.l @er1+,er2
612:
62 mov.b @er2+,r4l
63 beq 3f
64 mov.b r4l,@er3
65 adds
66 bra 2b
673:
68 mov.b
69 mov.b r4l,@er3
70 adds
71 dec.l
72 bne 1b
73 subs
74 mov.b
75 mov.b r4l,@er3
764:
77#endif
78 sub.l er0,er0
79 jsr @h8300_fdt_init
80
81
82 ldc
83 mov.l
84 bclr
85#endif
86
87 ldc
88 bclr
89 bset
90 ldc
91#endif
92 mov.l
93 add.l
94 jsr @start_kernel
95
961:
97 bra 1b
98
99
100
101 .section .vectors,"ax"
102 .long _start
103 .long _start
104vector = 2
105 .rept NR_INT - 2
106 .long _interrupt_redirect_table+vector*4
107vector = vector + 1
108 .endr
109#endif
110 .end
111