source: anotherchoice/tags/jsp-1.4.4-full-UTF8/config/v850/tk850_kj1/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.7 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-2002 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
8 * Copyright (C) 2005 by Freelines CO.,Ltd
9 *
10 * 上記著作権者
11は,以下の (1)〜(4) の条件か,Free Software Foundation
12 * によってå…
13¬è¡¨ã•ã‚Œã¦ã„ã‚‹ GNU General Public License の Version 2 に記
14 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
15 * を改変したものを含む.以下同じ)を使用・複製・改変・再é…
16å¸ƒï¼ˆä»¥ä¸‹ï¼Œ
17 * 利用と呼ぶ)することを無償で許諾する.
18 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
19 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
20 * スコード中に含まれていること.
21 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
22 * 用できる形で再é…
23å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œå†é…
24å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨
25 * 者
26マニュアルなど)に,上記の著作権表示,この利用条件および下記
27 * の無保証規定を掲載すること.
28 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
29 * 用できない形で再é…
30å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œæ¬¡ã®ã„ずれかの条件を満たすこ
31 * と.
32 * (a) 再é…
33å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨è€…
34マニュアルなど)に,上記の著
35 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
36 * (b) 再é…
37å¸ƒã®å½¢æ…
38‹ã‚’,別に定める方法によって,TOPPERSプロジェクトに
39 * 報告すること.
40 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
41 * 害からも,上記著作権者
42およびTOPPERSプロジェクトをå…
43è²¬ã™ã‚‹ã“と.
44 *
45 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者
46お
47 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
48 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
49 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
50 *
51 * @(#) $Id: sys_support.S,v 1.4 2007/01/05 02:10:17 honda Exp $
52 */
53
54/*
55 * ターゲットシステム依存モジュール アセンブリ言語部(TK-850ES/KJ1+用)
56 */
57
58#define _MACRO_ONLY
59#include "jsp_kernel.h"
60#include "v850asm.inc"
61
62#define Set(x,y,z) Lea x, r6; Lea y, r7; st.##z r7, 0[r6]
63
64/*
65 * 低レベルのターゲットシステム依存の初期化
66 *
67 * スタートアップモジュールの中で,メモリの初期化の前に呼び出される.
68 */
69
70 .text
71 .globl hardware_init_hook
72hardware_init_hook:
73
74 /* システムウェイトコントロールレジスタ:5MHz×4=20MHz時 */
75 Set(VSWC, 0x01, b)
76 /* 保護された特定レジスタへのアクセス
77 プロセッサクロックコントロールレジスタ:メインクロックのfxx出力(PCC=0) */
78 lea PRCMD, r6
79 lea PCC, r7
80 st.b r0, 0[r6]
81 st.b r0, 0[r7]
82 nop
83 nop
84 nop
85 nop
86 nop
87 Set(PLLCTL,0x03, h) /* PLLコントロールレジスタ:PLL動作 */
88 Set(WDTM2, 0x07, b) /* WDTM2 stop */
89#if 0
90 /* 外部バスの設定:
91 CS0に外部SRAMを増設した場合の参考。ここではバスはセパレートバスで、
92 12ns品のSRAMで0waitで動作することを仮定した設定。
93 */
94 Set(EXIMC, 0x01, b) /* 外部バスインターフェイスモードレジスタ:セパレートバス */
95 Set(PMC9, 0xFFFF, h) /* P9モードコントロールレジスタ:A0-A15出力 */
96 Set(PMCCS, 0x01, b) /* PCSモードコントロールレジスタ:C0出力 */
97 Set(PMCCT, 0x53, b) /* PCTモードコントロールレジスタ:RD/WR/ASTB出力 */
98 Set(PMCDH, 0xFF, b) /* PDHモードコントロールレジスタ:A16-A23出力 */
99 Set(PMCDL, 0xFFFF, h) /* PDLモードコントロールレジスタ:AD0-AD15出力 */
100 Set(DWC0, 0x7770, h) /* データウェイト制御レジスタ:CS0wait=0 */
101 Set(AWC, 0xFFFC, h) /* アドレスウェイト制御レジスタ:CS0wait=0 */
102 Set(BCC, 0xAAA8, h) /* バスサイクル制御レジスタ:CS0wait=0 */
103#endif
104
105 jmp r31
106
107
108
109 /* 標準割込み処理とスぺーサー */
110 .macro StandardInterruptEntry name
111 .globl \name
112\name:
113 jr vector_handler
114 nop;nop;nop;nop;nop;nop
115 .endm
116
117 .macro ReservedInterruptEntry
118 nop;nop;nop;nop;nop;nop;nop;nop
119 .endm
120
121/*
122 * 割込みハンドラ部分の定義
123 * とりあえず一箇所に集める。
124 */
125
126 .section ".vectors","ax"
127 .align 4
128 .globl __reset
129__reset:
130 jr start
131 nop;nop;nop;nop;nop;nop
132
133 StandardInterruptEntry NMI
134 StandardInterruptEntry INTWDT1
135 StandardInterruptEntry INTWDT2
136 StandardInterruptEntry TRAP0
137 StandardInterruptEntry TRAP1
138 StandardInterruptEntry DBG
139/*#-------------------------------------------------------------------
140 # SECURITY_ID
141 #-------------------------------------------------------------------*/
142/* .section "SECURITY_ID" */
143 .word 0xffffffff /* --0-3 byte code,Address is 0x70-0x73 */
144 .word 0xffffffff /* --4-7 byte code,Address is 0x74-0x77 */
145 .hword 0xffff /* --8-9 byte code,Address is 0x78-0x79 */
146/*#-------------------------------------------------------------------
147 # OPTION_BYTES
148 #-------------------------------------------------------------------*/
149/* .section "OPTION_BYTES" */
150 .hword 0x0000 /* --0-1 byte code,Address is 0x7a-0x7b */
151 .hword 0x0000 /* --2-3 byte code,Address is 0x7c-0x7d */
152 .hword 0x0000 /* --4-5 byte code,Address is 0x7e-0x7f */
153
154 StandardInterruptEntry INTWDTM1
155 StandardInterruptEntry INTP0
156 StandardInterruptEntry INTP1
157 StandardInterruptEntry INTP2
158 StandardInterruptEntry INTP3
159 StandardInterruptEntry INTP4
160 StandardInterruptEntry INTP5
161 StandardInterruptEntry INTP6
162 StandardInterruptEntry INTTM000
163 StandardInterruptEntry INTTM001
164 StandardInterruptEntry INTTM010
165 StandardInterruptEntry INTTM011
166 StandardInterruptEntry INTTM50
167 StandardInterruptEntry INTTM51
168 StandardInterruptEntry INTCSI00
169 StandardInterruptEntry INTCSI01
170 StandardInterruptEntry INTSRE0
171 StandardInterruptEntry INTSR0
172 StandardInterruptEntry INTST0
173 StandardInterruptEntry INTSRE1
174 StandardInterruptEntry INTSR1
175 StandardInterruptEntry INTST1
176 StandardInterruptEntry INTTMH0
177 StandardInterruptEntry INTTMH1
178 StandardInterruptEntry INTCSIA0
179 StandardInterruptEntry INTIIC0
180 StandardInterruptEntry INTAD
181 StandardInterruptEntry INTKR
182 StandardInterruptEntry INTWTI
183 StandardInterruptEntry INTWT
184 StandardInterruptEntry INTBRG
185 StandardInterruptEntry INTTM020
186 StandardInterruptEntry INTTM021
187 StandardInterruptEntry INTTM030
188 StandardInterruptEntry INTTM031
189 StandardInterruptEntry INTCSIA1
190 StandardInterruptEntry INTTM040
191 StandardInterruptEntry INTTM041
192 StandardInterruptEntry INTTM050
193 StandardInterruptEntry INTTM051
194 StandardInterruptEntry INTCSI02
195 StandardInterruptEntry INTSRE2
196 StandardInterruptEntry INTSR2
197 StandardInterruptEntry INTST2
198 StandardInterruptEntry INTIIC1
199 ReservedInterruptEntry
200 ReservedInterruptEntry
201 ReservedInterruptEntry
202 ReservedInterruptEntry
203 ReservedInterruptEntry
204 StandardInterruptEntry INTTP0OV
205 StandardInterruptEntry INTTP0CC0
206 StandardInterruptEntry INTTP0CC1
207
208/*
209 * 評価用高性能?タイマ
210 * (今回は評価用フリーランニングタイマを作らずに直接タイマカウンタをのぞく)
211 */
212Function _vxget_tim
213 Lea TM00, r7
214 ld.h 0[r7], r8
215 st.w r8, 0[r6]
216 mov r0, r10
217 jmp r31
Note: See TracBrowser for help on using the repository browser.