source: anotherchoice/tags/jsp-1.4.4-full-UTF8/config/v850/cq_bb/sys_support.S@ 363

Last change on this file since 363 was 363, checked in by ykominami, 5 years ago

add tags/jsp-1.4.4-full-UTF8

  • Property svn:executable set to *
File size: 7.3 KB
RevLine 
[363]1/*
2 * TOPPERS/JSP Kernel
3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Just Standard Profile Kernel
5 *
6 * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
8 *
9 * 上記著作権者
10は,以下の (1)〜(4) の条件か,Free Software Foundation
11 * によってå…
12¬è¡¨ã•ã‚Œã¦ã„ã‚‹ GNU General Public License の Version 2 に記
13 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
14 * を改変したものを含む.以下同じ)を使用・複製・改変・再é…
15å¸ƒï¼ˆä»¥ä¸‹ï¼Œ
16 * 利用と呼ぶ)することを無償で許諾する.
17 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
18 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
19 * スコード中に含まれていること.
20 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
21 * 用できる形で再é…
22å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œå†é…
23å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨
24 * 者
25マニュアルなど)に,上記の著作権表示,この利用条件および下記
26 * の無保証規定を掲載すること.
27 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
28 * 用できない形で再é…
29å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œæ¬¡ã®ã„ずれかの条件を満たすこ
30 * と.
31 * (a) 再é…
32å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨è€…
33マニュアルなど)に,上記の著
34 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
35 * (b) 再é…
36å¸ƒã®å½¢æ…
37‹ã‚’,別に定める方法によって,TOPPERSプロジェクトに
38 * 報告すること.
39 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
40 * 害からも,上記著作権者
41およびTOPPERSプロジェクトをå…
42è²¬ã™ã‚‹ã“と.
43 *
44 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者
45お
46 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
47 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
48 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
49 *
50 */
51
52/*
53 * ターゲットシステム依存モジュール アセンブリ言語部(D70F3716GC用)
54 */
55
56#define _MACRO_ONLY
57#include "jsp_kernel.h"
58#include "v850asm.inc"
59
60#define Set(x,y,z) Lea x, r6; Lea y, r7; st.z r7, 0[r6]
61
62/*
63 * 低レベルのターゲットシステム依存の初期化
64 *
65 * スタートアップモジュールの中で,メモリの初期化の前に呼び出される.
66 */
67
68 .text
69 .globl hardware_init_hook
70hardware_init_hook:
71
72 /* システムウェイトコントロールレジスタ:20MHz時 */
73 movhi hi(VSWC), r0, r11
74 movea lo(VSWC), r11, r11
75 mov 0x01, r12
76 st.b r12, 0[r11]
77
78 /* 保護された特定レジスタへのアクセス
79 プロセッサ・クロック・コントロール・レジスタ:メインクロックのfxx出力(PCC=0) */
80 movhi hi(PRCMD), r0, r11
81 movea lo(PRCMD), r11, r11
82 movhi hi(PCC), r0, r13
83 movea lo(PCC), r13, r13
84 st.b r12, 0[r11]
85 st.b r0, 0[r13]
86 nop
87 nop
88 nop
89 nop
90 nop
91 movhi hi(PLLCTL), r0, r13
92 movea lo(PLLCTL), r13, r13
93 mov 0x03, r12
94 st.b r12, 0[r13] /* PLLコントロールレジスタ:PLL動作 */
95
96 movhi hi(PRCMD), r0, r11
97 movea lo(PRCMD), r11, r11
98 movhi hi(OCDM), r0, r13
99 movea lo(OCDM), r13, r13
100 st.b r12, 0[r11]
101 st.b r0, 0[r13]
102 nop
103 nop
104 nop
105 nop
106 nop
107 movhi hi(WDTM2), r0, r11
108 movea lo(WDTM2), r11, r11
109 mov 0x08, r12
110 st.b r12, 0[r11] /* WDTM2 stop */
111
112 jmp r31
113
114
115
116 /* 標準割込み処理とスぺーサー */
117 .macro StandardInterruptEntry name
118 .globl \name
119\name:
120 jr vector_handler
121 nop;nop;nop;nop;nop;nop
122 .endm
123
124 .macro ReservedInterruptEntry
125 nop;nop;nop;nop;nop;nop;nop;nop
126 .endm
127
128/*
129 * 割込みハンドラ部分の定義
130 * とりあえず一箇所に集める。
131 */
132
133 .section ".vectors","ax"
134 .align 4
135 .globl __reset
136__reset:
137 jr start
138 nop;nop;nop;nop;nop;nop
139
140 StandardInterruptEntry NMI
141 StandardInterruptEntry INTWDT1
142 StandardInterruptEntry INTWDT2
143 StandardInterruptEntry TRAP0
144 StandardInterruptEntry TRAP1
145#ifdef DEBUGGER
146DBG0:
147 .org 0x0060
148 .long 0xFFFFFFFF
149 .long 0xFFFFFFFF
150 .long 0xFFFFFFFF
151 .long 0xFFFFFFFF
152#else
153 StandardInterruptEntry DBG0
154#endif
155
156/*#-------------------------------------------------------------------
157 # SECURITY_ID
158 #-------------------------------------------------------------------*/
159/* .section "SECURITY_ID" */
160 .word 0xffffffff /* --0-3 byte code,Address is 0x70-0x73 */
161 .word 0xffffffff /* --4-7 byte code,Address is 0x74-0x77 */
162 .hword 0xffff /* --8-9 byte code,Address is 0x78-0x79 */
163/*#-------------------------------------------------------------------
164 # OPTION_BYTES
165 #-------------------------------------------------------------------*/
166/* .section "OPTION_BYTES" */
167 .hword 0x0000 /* --0-1 byte code,Address is 0x7a-0x7b */
168 .hword 0x0000 /* --2-3 byte code,Address is 0x7c-0x7d */
169 .hword 0x0000 /* --4-5 byte code,Address is 0x7e-0x7f */
170
171 StandardInterruptEntry INTLVI
172 StandardInterruptEntry INTP0
173 StandardInterruptEntry INTP1
174 StandardInterruptEntry INTP2
175 StandardInterruptEntry INTP3
176 StandardInterruptEntry INTP4
177 StandardInterruptEntry INTP5
178 StandardInterruptEntry INTP6
179 StandardInterruptEntry INTP7
180 StandardInterruptEntry INTTQ0OV
181 StandardInterruptEntry INTTQ0CC0
182 StandardInterruptEntry INTTQ0CC1
183 StandardInterruptEntry INTTQ0CC2
184 StandardInterruptEntry INTTQ0CC3
185 StandardInterruptEntry INTTP0OV
186 StandardInterruptEntry INTTP0CC0
187 StandardInterruptEntry INTTP0CC1
188 StandardInterruptEntry INTTP1OV
189 StandardInterruptEntry INTTP1CC0
190 StandardInterruptEntry INTTP1CC1
191 StandardInterruptEntry INTTP2OV
192 StandardInterruptEntry INTTP2CC0
193 StandardInterruptEntry INTTP2CC1
194 StandardInterruptEntry INTTP3OV
195 StandardInterruptEntry INTTP3CC0
196 StandardInterruptEntry INTTP3CC1
197 StandardInterruptEntry INTTP4OV
198 StandardInterruptEntry INTTP4CC0
199 StandardInterruptEntry INTTP4CC1
200 StandardInterruptEntry INTTP5OV
201 StandardInterruptEntry INTTP5CC0
202 StandardInterruptEntry INTTP5CC1
203 StandardInterruptEntry INTTM0EQ0
204 StandardInterruptEntry INTCB0R
205 StandardInterruptEntry INTCB0T
206 StandardInterruptEntry INTCB1R
207 StandardInterruptEntry INTCB1T
208 StandardInterruptEntry INTCB2R
209 StandardInterruptEntry INTCB2T
210 StandardInterruptEntry INTCB3R
211 StandardInterruptEntry INTCB3T
212#ifdef DEBUGGER
213INTUA0R:
214 .org 0x0310
215 .long 0xFFFFFFFF
216 .long 0xFFFFFFFF
217 .long 0xFFFFFFFF
218 .long 0xFFFFFFFF
219#else
220 StandardInterruptEntry INTUA0R
221#endif
222 StandardInterruptEntry INTUA1R
223 StandardInterruptEntry INTUA1T
224 StandardInterruptEntry INTUA2R
225 StandardInterruptEntry INTUA2T
226 StandardInterruptEntry INTAD
227 StandardInterruptEntry INTDMA0
228 StandardInterruptEntry INTDMA1
229 StandardInterruptEntry INTDMA2
230 StandardInterruptEntry INTDMA3
231 StandardInterruptEntry INTKR
232 StandardInterruptEntry INTWTI
233 StandardInterruptEntry INTWT
234
235/*
236 * 評価用高性能?タイマ
237 * dummy
238 */
239 .text
240 .align 4
241 .globl _vxget_tim
242_vxget_tim:
243 jmp r31
244
245
246#ifdef DEBUGGER
247 .section MonitorROM, "ax"
248__monitor:
249 .rept (512)
250 .long 0xFFFFFFFF
251 .endr
252#endif
253
Note: See TracBrowser for help on using the repository browser.