[172] | 1 | /*
|
---|
| 2 | * TOPPERS ATK2
|
---|
| 3 | * Toyohashi Open Platform for Embedded Real-Time Systems
|
---|
| 4 | * Automotive Kernel Version 2
|
---|
| 5 | *
|
---|
| 6 | * Copyright (C) 2012-2015 by Center for Embedded Computing Systems
|
---|
| 7 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
| 8 | * Copyright (C) 2012-2015 by FUJI SOFT INCORPORATED, JAPAN
|
---|
| 9 | * Copyright (C) 2012-2013 by Spansion LLC, USA
|
---|
| 10 | * Copyright (C) 2012-2015 by NEC Communication Systems, Ltd., JAPAN
|
---|
| 11 | * Copyright (C) 2012-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
|
---|
| 12 | * Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
|
---|
| 13 | * Copyright (C) 2012-2015 by Sunny Giken Inc., JAPAN
|
---|
| 14 | * Copyright (C) 2012-2015 by TOSHIBA CORPORATION, JAPAN
|
---|
| 15 | * Copyright (C) 2012-2015 by Witz Corporation
|
---|
| 16 | * Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
|
---|
| 17 | * Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
|
---|
| 18 | * Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
|
---|
| 19 | * Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
|
---|
| 20 | *
|
---|
| 21 | * ä¸è¨èä½æ¨©è
|
---|
| 22 | ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
| 23 | * ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
| 24 | * å¤ã»åé
|
---|
| 25 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
| 26 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
| 27 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
| 28 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
| 29 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 30 | * ç¨ã§ããå½¢ã§åé
|
---|
| 31 | å¸ããå ´åã«ã¯ï¼åé
|
---|
| 32 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
| 33 | * è
|
---|
| 34 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
| 35 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 36 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 37 | * ç¨ã§ããªãå½¢ã§åé
|
---|
| 38 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
| 39 | * ã¨ï¼
|
---|
| 40 | * (a) åé
|
---|
| 41 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
| 42 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
| 43 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 44 | * (b) åé
|
---|
| 45 | å¸ã®å½¢æ
|
---|
| 46 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
| 47 | * å ±åãããã¨ï¼
|
---|
| 48 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
| 49 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 50 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
| 51 | 責ãããã¨ï¼
|
---|
| 52 | * ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
| 53 | * ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 54 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
| 55 | * å
|
---|
| 56 | 責ãããã¨ï¼
|
---|
| 57 | *
|
---|
| 58 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
|
---|
| 59 | * æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥ç財ç£æ¨©ã許諾ãããã®ã§
|
---|
| 60 | * ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
|
---|
| 61 | * ç¨ããè
|
---|
| 62 | ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
|
---|
| 63 | *
|
---|
| 64 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
| 65 | ã
|
---|
| 66 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
| 67 | * ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
| 68 | * ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
| 69 | * ã®è²¬ä»»ãè² ããªãï¼
|
---|
| 70 | *
|
---|
| 71 | * $Id: ioc_impl.h 425 2015-12-07 08:06:19Z witz-itoyo $
|
---|
| 72 | */
|
---|
| 73 |
|
---|
| 74 | /*
|
---|
| 75 | * IOCæ©è½
|
---|
| 76 | */
|
---|
| 77 |
|
---|
| 78 | #ifndef TOPPERS_IOC_IMPL_H
|
---|
| 79 | #define TOPPERS_IOC_IMPL_H
|
---|
| 80 |
|
---|
| 81 | #include "kernel_impl.h"
|
---|
| 82 | #include "osap.h"
|
---|
| 83 |
|
---|
| 84 | /*
|
---|
| 85 | * Wrapper IDããIOCWRPINIBãåãåºãããã®ãã¯ã
|
---|
| 86 | */
|
---|
| 87 | #define get_iocwrpinib(WrapperId) (&iocwrpinib_table[(WrapperId)])
|
---|
| 88 |
|
---|
| 89 | /*
|
---|
| 90 | * IOC IDããIOCCB,IOCINIBãåãåºãããã®ãã¯ã
|
---|
| 91 | */
|
---|
| 92 | #define get_ioccb(iocid) (&ioccb_table[(iocid)])
|
---|
| 93 | #define get_iocinib(iocid) (&iocinib_table[(iocid)])
|
---|
| 94 |
|
---|
| 95 | /*
|
---|
| 96 | * IOCWRPINIBããIOC IDãåãåºãããã®ãã¯ã
|
---|
| 97 | */
|
---|
| 98 | #define IOCID(p_iocwrpinib) ((IocType) (((p_iocwrpinib)->p_iocinib) - iocinib_table))
|
---|
| 99 |
|
---|
| 100 |
|
---|
| 101 |
|
---|
| 102 | /*
|
---|
| 103 | * IOCåæåãããã¯
|
---|
| 104 | */
|
---|
| 105 | typedef struct ioc_initialization_block {
|
---|
| 106 | uint32 maxque; /* ãã¥ã¼æ° */
|
---|
| 107 | uint32 datasz; /* ãã¼ã¿ãµã¤ãº */
|
---|
| 108 | uint32 alignsz; /* ã¢ã©ã¤ã³ãµã¤ãº */
|
---|
| 109 | #ifdef CFG_USE_ERRORHOOK
|
---|
| 110 | boolean groupflg; /* ã°ã«ã¼ãéä¿¡ãã©ã° */
|
---|
| 111 | #endif /* CFG_USE_ERRORHOOK */
|
---|
| 112 | OSAPCB *p_rcvosapcb; /* Receiverãæå±ããOSAPã®åæåãããã¯ã¸ã®ãã¤ã³ã¿ */
|
---|
| 113 | void *p_iocmb;
|
---|
| 114 | } IOCINIB;
|
---|
| 115 |
|
---|
| 116 | /*
|
---|
| 117 | * IOC管çãããã¯ï¼Os_Lcfg.cï¼
|
---|
| 118 | */
|
---|
| 119 | typedef struct ioc_control_block {
|
---|
| 120 | uint32 quecnt; /* ç¾å¨ã®ãã¥ã¼æ° */
|
---|
| 121 | uint32 head; /* ãã¥ã¼ã®å
|
---|
| 122 | é */
|
---|
| 123 | uint32 tail; /* ãã¥ã¼ã®æå¾ */
|
---|
| 124 | boolean lostflg; /* ãã¥ã¼ãã«ã¨ã©ã¼(E_LOST_DATA)ç¨ãã©ã° */
|
---|
| 125 | } IOCCB;
|
---|
| 126 |
|
---|
| 127 | /*
|
---|
| 128 | * IOC Wrapperåæåãããã¯
|
---|
| 129 | */
|
---|
| 130 | typedef struct ioc_wrapper_initialization_block {
|
---|
| 131 | const IOCINIB *p_iocinib; /* IOCåæåãããã¯ã¸ã®ãã¤ã³ã¿ */
|
---|
| 132 | OSAPCB *p_sndosapcb; /* Senderãæå±ããOSAPã®åæåãããã¯ã¸ã®ãã¤ã³ã¿ */
|
---|
| 133 | SenderIdType senderid; /* SenderID */
|
---|
| 134 | } IOCWRPINIB;
|
---|
| 135 |
|
---|
| 136 |
|
---|
| 137 | extern const IocType tnum_ioc; /* IOCã®æ° */
|
---|
| 138 | extern const IocType tnum_queueioc; /* ãã¥ã¼ããIOCã®æ° */
|
---|
| 139 |
|
---|
| 140 | /*
|
---|
| 141 | * IOC Wrapperåæåãããã¯ï¼Os_Lcfg.cï¼
|
---|
| 142 | */
|
---|
| 143 | extern const IOCWRPINIB iocwrpinib_table[];
|
---|
| 144 |
|
---|
| 145 | /*
|
---|
| 146 | * IOCåæåãããã¯ï¼Os_Lcfg.cï¼
|
---|
| 147 | */
|
---|
| 148 | extern const IOCINIB iocinib_table[];
|
---|
| 149 |
|
---|
| 150 | /*
|
---|
| 151 | * IOC管çãããã¯ï¼Os_Lcfg.cï¼
|
---|
| 152 | */
|
---|
| 153 | extern IOCCB ioccb_table[];
|
---|
| 154 |
|
---|
| 155 | /*
|
---|
| 156 | * IOC WRAPPERåæåãããã¯ï¼Os_Lcfg.cï¼
|
---|
| 157 | */
|
---|
| 158 | extern const IOCWRPINIB iocwrpinib_table[];
|
---|
| 159 |
|
---|
| 160 | /*
|
---|
| 161 | * IOCåæåå¤ãã¼ãã«
|
---|
| 162 | */
|
---|
| 163 | extern void *ioc_inival_table[];
|
---|
| 164 |
|
---|
| 165 | /*
|
---|
| 166 | * IOC管çã¢ã¸ã¥ã¼ã«ã®åæå
|
---|
| 167 | */
|
---|
| 168 | extern void ioc_initialize(void);
|
---|
| 169 |
|
---|
| 170 | #endif /* TOPPERS_IOC_IMPL_H */
|
---|