[172] | 1 | /*
|
---|
| 2 | * TOPPERS ATK2
|
---|
| 3 | * Toyohashi Open Platform for Embedded Real-Time Systems
|
---|
| 4 | * Automotive Kernel Version 2
|
---|
| 5 | *
|
---|
| 6 | * Copyright (C) 2012-2014 by Center for Embedded Computing Systems
|
---|
| 7 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
| 8 | * Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
|
---|
| 9 | * Copyright (C) 2012-2013 by Spansion LLC, USA
|
---|
| 10 | * Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
|
---|
| 11 | * Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
|
---|
| 12 | * Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
|
---|
| 13 | * Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
|
---|
| 14 | * Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
|
---|
| 15 | * Copyright (C) 2012-2014 by Witz Corporation, JAPAN
|
---|
| 16 | *
|
---|
| 17 | * ä¸è¨èä½æ¨©è
|
---|
| 18 | ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
| 19 | * ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
| 20 | * å¤ã»åé
|
---|
| 21 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
| 22 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
| 23 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
| 24 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
| 25 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 26 | * ç¨ã§ããå½¢ã§åé
|
---|
| 27 | å¸ããå ´åã«ã¯ï¼åé
|
---|
| 28 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
| 29 | * è
|
---|
| 30 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
| 31 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 32 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 33 | * ç¨ã§ããªãå½¢ã§åé
|
---|
| 34 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
| 35 | * ã¨ï¼
|
---|
| 36 | * (a) åé
|
---|
| 37 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
| 38 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
| 39 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 40 | * (b) åé
|
---|
| 41 | å¸ã®å½¢æ
|
---|
| 42 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
| 43 | * å ±åãããã¨ï¼
|
---|
| 44 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
| 45 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 46 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
| 47 | 責ãããã¨ï¼
|
---|
| 48 | * ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
| 49 | * ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 50 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
| 51 | * å
|
---|
| 52 | 責ãããã¨ï¼
|
---|
| 53 | *
|
---|
| 54 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
|
---|
| 55 | * æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥ç財ç£æ¨©ã許諾ãããã®ã§
|
---|
| 56 | * ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
|
---|
| 57 | * ç¨ããè
|
---|
| 58 | ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
|
---|
| 59 | *
|
---|
| 60 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
| 61 | ã
|
---|
| 62 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
| 63 | * ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
| 64 | * ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
| 65 | * ã®è²¬ä»»ãè² ããªãï¼
|
---|
| 66 | *
|
---|
| 67 | * $Id: v850.h 187 2015-06-25 03:39:04Z t_ishikawa $
|
---|
| 68 | */
|
---|
| 69 |
|
---|
| 70 | /*
|
---|
| 71 | * V850ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©ï¼éçºç°å¢å
|
---|
| 72 | 񂋬
|
---|
| 73 | */
|
---|
| 74 |
|
---|
| 75 | #ifndef TOPPERS_V850_H
|
---|
| 76 | #define TOPPERS_V850_H
|
---|
| 77 |
|
---|
| 78 | #ifdef __v850e2v3__
|
---|
| 79 |
|
---|
| 80 | #ifdef _V850E2M_
|
---|
| 81 | #define TNUM_INTPRI 16
|
---|
| 82 | #elif defined(_V850E2S_)
|
---|
| 83 | #define TNUM_INTPRI 8
|
---|
| 84 | #else
|
---|
| 85 | #error please define ether _V850E2M_ or _V850E2S_
|
---|
| 86 | #endif /* _V850E2M_ */
|
---|
| 87 |
|
---|
| 88 | /*
|
---|
| 89 | * V850E2ç¨ã®å²è¾¼ã¿ã³ã³ããã¼ã©æä½ã«ã¼ãã³
|
---|
| 90 | */
|
---|
| 91 | #ifndef TOPPERS_MACRO_ONLY
|
---|
| 92 |
|
---|
| 93 | #include "prc_sil.h"
|
---|
| 94 |
|
---|
| 95 | LOCAL_INLINE void
|
---|
| 96 | set_pmr(uint16 pmr)
|
---|
| 97 | {
|
---|
| 98 | sil_wrh_mem((void *) PMR, pmr);
|
---|
| 99 | SYNCM;
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 | LOCAL_INLINE uint16
|
---|
| 103 | get_ispr(void)
|
---|
| 104 | {
|
---|
| 105 | return(sil_reh_mem((void *) ISPR_H));
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | LOCAL_INLINE void
|
---|
| 109 | clear_ispr(void)
|
---|
| 110 | {
|
---|
| 111 | sil_wrh_mem((void *) ISPC_H, 0xffff);
|
---|
| 112 | sil_wrh_mem((void *) ISPR_H, 0x0000);
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
| 116 |
|
---|
| 117 | #define FE_MIP 0x430U
|
---|
| 118 | #define FE_MDP 0x431U
|
---|
| 119 | #define FE_PPI 0x432U
|
---|
| 120 | #define FE_TSI 0x433U
|
---|
| 121 |
|
---|
| 122 | #elif defined(__v850e3v5__)
|
---|
| 123 |
|
---|
| 124 | #ifdef _RH850G3M_
|
---|
| 125 | #define TNUM_INTPRI 8
|
---|
| 126 | #elif defined(_RH850G3K_)
|
---|
| 127 | #define TNUM_INTPRI 8
|
---|
| 128 | #else
|
---|
| 129 | #error please define ether _RH850G3M_ or _RH850G3K_
|
---|
| 130 | #endif /* _RH850G3M_ */
|
---|
| 131 |
|
---|
| 132 | #define FE_MIP 0x90U
|
---|
| 133 | #define FE_MDP 0x91U
|
---|
| 134 |
|
---|
| 135 | #else /* __v850e3v5__ */
|
---|
| 136 | #error please define ether __v850e2v3__ or __v850e3v5__
|
---|
| 137 | #endif /* __v850e2v3__ */
|
---|
| 138 |
|
---|
| 139 | /*
|
---|
| 140 | * V850E2M ã·ã¹ãã ã¬ã¸ã¹ã¿
|
---|
| 141 | */
|
---|
| 142 |
|
---|
| 143 | #define FEIC 14
|
---|
| 144 | #define SCBP 12
|
---|
| 145 | #define SCCFG 11
|
---|
| 146 | #define VMTID 5
|
---|
| 147 | #define VMADR 6
|
---|
| 148 |
|
---|
| 149 | #define IPA0L 6
|
---|
| 150 | #define IPA0U 7
|
---|
| 151 | #define IPA1L 8
|
---|
| 152 | #define IPA1U 9
|
---|
| 153 | #define IPA2L 10
|
---|
| 154 | #define IPA2U 11
|
---|
| 155 | #define IPA3L 12
|
---|
| 156 | #define IPA3U 13
|
---|
| 157 | #define IPA4L 14
|
---|
| 158 | #define IPA4U 15
|
---|
| 159 |
|
---|
| 160 | #define DPA0L 16
|
---|
| 161 | #define DPA0U 17
|
---|
| 162 | #define DPA1L 18
|
---|
| 163 | #define DPA1U 19
|
---|
| 164 | #define DPA2L 20
|
---|
| 165 | #define DPA2U 21
|
---|
| 166 | #define DPA3L 22
|
---|
| 167 | #define DPA3U 23
|
---|
| 168 | #define DPA4L 24
|
---|
| 169 | #define DPA4U 25
|
---|
| 170 | #define DPA5L 26
|
---|
| 171 | #define DPA5U 27
|
---|
| 172 |
|
---|
| 173 | #define MCA 24
|
---|
| 174 | #define MCS 25
|
---|
| 175 | #define MCC 26
|
---|
| 176 | #define MCR 27
|
---|
| 177 |
|
---|
| 178 | #define MPM 0
|
---|
| 179 |
|
---|
| 180 | #define BSEL 31
|
---|
| 181 |
|
---|
| 182 | #ifdef __v850e2v3__
|
---|
| 183 | #define PSW_SV 16
|
---|
| 184 | #define FE_MP_MASK 0x43e
|
---|
| 185 | #define FE_MP_BIT 0x430
|
---|
| 186 |
|
---|
| 187 | #elif defined(__v850e3v5__)
|
---|
| 188 | #define PSW_SV 2
|
---|
| 189 | #define FE_MP_MASK 0x9e
|
---|
| 190 | #define FE_MP_BIT 0x90
|
---|
| 191 | #define MPAT_E 0x80 /* æå¹ */
|
---|
| 192 | #define MPAT_G 0x40 /* ASIDãç¡è¦ */
|
---|
| 193 | #define MPAT_UX 0x04 /* ã¦ã¼ã¶å®è¡ */
|
---|
| 194 | #define MPAT_UW 0x02 /* ã¦ã¼ã¶æ¸è¾¼ */
|
---|
| 195 | #define MPAT_UR 0x01 /* ã¦ã¼ã¶èªåº */
|
---|
| 196 |
|
---|
| 197 | #else /* __v850e3v5__ */
|
---|
| 198 | #error please define ether __v850e2v3__ or __v850e3v5__
|
---|
| 199 | #endif /* __v850e2v3__ */
|
---|
| 200 |
|
---|
| 201 | #endif /* TOPPERS_V850_H */
|
---|