📄 sys_support.s
字号:
/* * TOPPERS/JSP Kernel * Toyohashi Open Platform for Embedded Real-Time Systems/ * Just Standard Profile Kernel * * Copyright (C) 2000-2002 by Embedded and Real-Time Systems Laboratory * Toyohashi Univ. of Technology, JAPAN * Copyright (C) 2005 by Freelines CO.,Ltd * * 惧淡螟侯涪荚は·笆布の (1)×(4) の掘凤か·Free Software Foundation * によって给山されている GNU General Public License の Version 2 に淡 * 揭されている掘凤を塔たす眷圭に嘎り·塑ソフトウェア∈塑ソフトウェア * を猖恃したものを崔むˉ笆布票じ∷を蝗脱ˇ剩澜ˇ猖恃ˇ浩芹邵∈笆布· * 网脱と钙ぶ∷することを痰浸で钓满するˉ * (1) 塑ソフトウェアをソ〖スコ〖ドの妨で网脱する眷圭には·惧淡の螟侯 * 涪山绩·この网脱掘凤および布淡の痰瘦沮惮年が·そのままの妨でソ〖 * スコ〖ド面に崔まれていることˉ * (2) 塑ソフトウェアを·ライブラリ妨及など·戮のソフトウェア倡券に蝗 * 脱できる妨で浩芹邵する眷圭には·浩芹邵に燃うドキュメント∈网脱 * 荚マニュアルなど∷に·惧淡の螟侯涪山绩·この网脱掘凤および布淡 * の痰瘦沮惮年を非很することˉ * (3) 塑ソフトウェアを·怠达に寥み哈むなど·戮のソフトウェア倡券に蝗 * 脱できない妨で浩芹邵する眷圭には·肌のいずれかの掘凤を塔たすこ * とˉ * (a) 浩芹邵に燃うドキュメント∈网脱荚マニュアルなど∷に·惧淡の螟 * 侯涪山绩·この网脱掘凤および布淡の痰瘦沮惮年を非很することˉ * (b) 浩芹邵の妨轮を·侍に年める数恕によって·TOPPERSプロジェクトに * 鼠桂することˉ * (4) 塑ソフトウェアの网脱により木儡弄または粗儡弄に栏じるいかなる禄 * 巢からも·惧淡螟侯涪荚およびTOPPERSプロジェクトを倘勒することˉ * * 塑ソフトウェアは·痰瘦沮で捏丁されているものであるˉ惧淡螟侯涪荚お * よびTOPPERSプロジェクトは·塑ソフトウェアに簇して·その努脱材墙拉も * 崔めて·いかなる瘦沮も乖わないˉまた·塑ソフトウェアの网脱により木 * 儡弄または粗儡弄に栏じたいかなる禄巢に簇しても·その勒扦を砷わないˉ * * @(#) $Id: sys_support.S,v 1.2 2007/01/05 02:10:17 honda Exp $ *//* * タ〖ゲットシステム巴赂モジュ〖ル アセンブリ咐胳婶∈TK-850ES/SG2脱∷ */#define _MACRO_ONLY#include "jsp_kernel.h"#include "v850asm.inc"#define Set(x,y,z) Lea x, r6; Lea y, r7; st.##z r7, 0[r6]/* * 你レベルのタ〖ゲットシステム巴赂の介袋步 * * スタ〖トアップモジュ〖ルの面で·メモリの介袋步の涟に钙び叫されるˉ */ .text .globl hardware_init_hookhardware_init_hook: /* システムウェイトコントロ〖ルレジスタ¨5MHz∵4=20MHz箕 */ Set(VSWC, 0x01, b) nop /* 瘦割された泼年レジスタへのアクセス プロセッサクロックコントロ〖ルレジスタ¨メインクロックのfxx叫蜗(PCC=0) */ lea PRCMD, r6 lea PCC, r7 st.b r0, 0[r6] st.b r0, 0[r7] nop nop nop nop nop Set(PLLCTL,0x03, b) /* PLLコントロ〖ルレジスタ¨PLL瓢侯 */ Set(WDTM2, 0x07, b) /* WDTM2 stop */ /* 嘲婶バスの肋年 */ Set(EXIMC, 0x01, b) /* 嘲婶バスインタ〖フェイスモ〖ドレジスタ¨セパレ〖トバス */ Set(PMC9, 0xFFFF, h) /* P9モ〖ドコントロ〖ルレジスタ¨A0-A15叫蜗 */ Set(PMCCM, 0x02, b) /* PCMモ〖ドコントロ〖ルレジスタ¨Clock Out叫蜗 */ Set(PMCCT, 0x11, b) /* PCTモ〖ドコントロ〖ルレジスタ¨RD/WR0叫蜗 */ Set(PMCDL, 0xFFFF, h) /* PDLモ〖ドコントロ〖ルレジスタ¨AD0-AD15叫蜗 */ Set(BSC, 0x5555, h) /* バスサイズレジスタ¨All 16bit */ Set(DWC0, 0x0000, h) /* デ〖タウェイト扩告レジスタ¨wait=0 */ Set(AWC, 0xFF00, h) /* アドレスウェイト扩告レジスタ¨wait=0 */ Set(BCC, 0xAA00, h) /* バスサイクル扩告レジスタ¨wait=0 */ /* NIC肋年 */ Set(PMC0, 0x10, b) /* P04=INTP1 */ Set(PMCT, 0xBF, b) /* ASTB=out(LAN CS) */ Set(PCT, 0x00, b) /* ASTB=Low out */ Set(PM5, 0xFD, b) /* LAN Reset out */ Set(P5 , 0x00, b) /* LAN Reset out */ jmp r31 /* 筛洁充哈み借妄とスぺ〖サ〖 */ .macro StandardInterruptEntry name .globl \name\name: jr vector_handler nop;nop;nop;nop;nop;nop .endm .macro ReservedInterruptEntry nop;nop;nop;nop;nop;nop;nop;nop .endm/* * 充哈みハンドラ婶尸の年盗 * とりあえず办舱疥に礁める。 */ .section ".vectors","ax" .align 4 .globl __reset__reset: jr start nop;nop;nop;nop;nop;nop StandardInterruptEntry NMI StandardInterruptEntry INTWDT2 ReservedInterruptEntry StandardInterruptEntry TRAP0 StandardInterruptEntry TRAP1 StandardInterruptEntry DBG/*#------------------------------------------------------------------- # SECURITY_ID #-------------------------------------------------------------------*//* .section "SECURITY_ID" */ .word 0xffffffff /* --0-3 byte code,Address is 0x70-0x73 */ .word 0xffffffff /* --4-7 byte code,Address is 0x74-0x77 */ .hword 0xffff /* --8-9 byte code,Address is 0x78-0x79 *//*#------------------------------------------------------------------- # OPTION_BYTES #-------------------------------------------------------------------*//* .section "OPTION_BYTES" */ .hword 0x0000 /* --0-1 byte code,Address is 0x7a-0x7b */ .hword 0x0000 /* --2-3 byte code,Address is 0x7c-0x7d */ .hword 0x0000 /* --4-5 byte code,Address is 0x7e-0x7f */ StandardInterruptEntry INTLVI StandardInterruptEntry INTP0 StandardInterruptEntry INTP1 StandardInterruptEntry INTP2 StandardInterruptEntry INTP3 StandardInterruptEntry INTP4 StandardInterruptEntry INTP5 StandardInterruptEntry INTP6 StandardInterruptEntry INTP7 StandardInterruptEntry INTTQ0OV StandardInterruptEntry INTTQ0CC0 StandardInterruptEntry INTTQ0CC1 StandardInterruptEntry INTTQ0CC2 StandardInterruptEntry INTTQ0CC3 StandardInterruptEntry INTTP0OV StandardInterruptEntry INTTP0CC0 StandardInterruptEntry INTTP0CC1 StandardInterruptEntry INTTP1OV StandardInterruptEntry INTTP1CC0 StandardInterruptEntry INTTP1CC1 StandardInterruptEntry INTTP2OV StandardInterruptEntry INTTP2CC0 StandardInterruptEntry INTTP2CC1 StandardInterruptEntry INTTP3OV StandardInterruptEntry INTTP3CC0 StandardInterruptEntry INTTP3CC1 StandardInterruptEntry INTTP4OV StandardInterruptEntry INTTP4CC0 StandardInterruptEntry INTTP4CC1 StandardInterruptEntry INTTP5OV StandardInterruptEntry INTTP5CC0 StandardInterruptEntry INTTP5CC1 StandardInterruptEntry INTTM0EQ0 StandardInterruptEntry INTCB0R StandardInterruptEntry INTCB0T StandardInterruptEntry INTCB1R StandardInterruptEntry INTCB1T StandardInterruptEntry INTCB2R StandardInterruptEntry INTCB2T StandardInterruptEntry INTCB3R StandardInterruptEntry INTCB3T StandardInterruptEntry INTUA0R StandardInterruptEntry INTUA0T StandardInterruptEntry INTUA1R StandardInterruptEntry INTUA1T StandardInterruptEntry INTUA2R StandardInterruptEntry INTUA2T StandardInterruptEntry INTAD StandardInterruptEntry INTDMA0 StandardInterruptEntry INTDMA1 StandardInterruptEntry INTDMA2 StandardInterruptEntry INTDMA3 StandardInterruptEntry INTKR StandardInterruptEntry INTWTI StandardInterruptEntry INTWT StandardInterruptEntry INTC0ERR StandardInterruptEntry INTC0WUP StandardInterruptEntry INTC0REC StandardInterruptEntry INTC0TRX/* * 删擦脱光拉墙?タイマ * (海搀は删擦脱フリ〖ランニングタイマを侯らずに木儡タイマカウンタをのぞく) */Function _vxget_tim Lea TP0CNT, r7 ld.h 0[r7], r8 st.w r8, 0[r6] mov r0, r10 jmp r31
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -