Ignore:
Timestamp:
Jun 26, 2017, 6:45:41 PM (7 years ago)
Author:
ertl-honda
Message:

3.0.0のリリース版に追従

Location:
asp3_wo_tecs/trunk/arch/arm_gcc
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/arm.h

    r302 r305  
    55 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    66 *                              Toyohashi Univ. of Technology, JAPAN
    7  *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
     7 *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
    88 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    99 *
     
    5252 *  の責任を負わない.
    5353 *
    54  *  $Id: arm.h 430 2015-08-08 11:38:46Z ertl-hiro $
     54 *  $Id: arm.h 523 2016-01-14 11:01:04Z ertl-hiro $
    5555 */
    5656
     
    282282
    283283/*
    284  *  High exception vectorを使うかの設定
    285  */
    286 Inline void
    287 arm_set_high_vector(bool_t enable)
     284 *  High exception vectorsを使うように設定
     285 */
     286Inline void
     287arm_set_high_vectors(void)
    288288{
    289289        uint32_t        reg;
    290290
    291291        CP15_READ_SCTLR(reg);
    292         if (enable) {
    293                 reg |= CP15_SCTLR_VECTOR;
    294         }
    295         else {
    296                 reg &= ~CP15_SCTLR_VECTOR;
    297         }
     292        reg |= CP15_SCTLR_VECTOR;
     293        CP15_WRITE_SCTLR(reg);
     294}
     295
     296/*
     297 *  Low exception vectorsを使うように設定
     298 */
     299Inline void
     300arm_set_low_vectors(void)
     301{
     302        uint32_t        reg;
     303
     304        CP15_READ_SCTLR(reg);
     305        reg &= ~CP15_SCTLR_VECTOR;
    298306        CP15_WRITE_SCTLR(reg);
    299307}
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/core_check.trb

    r304 r305  
    33#               ãƒ‘ス3の生成スクリプトのコア依存部(ARM用)
    44#
    5 #  $Id: core_check.trb 572 2016-02-01 14:40:09Z ertl-hiro $
     5#  $Id: core_check.trb 588 2016-02-05 12:54:58Z ertl-hiro $
    66#
    77
     
    1919#
    2020inhTable = SYMBOL("_kernel_inh_table")
    21 $cfgData[:DEF_INH].each do |id, params|
     21$cfgData[:DEF_INH].each do |key, params|
    2222  inthdr = PEEK(inhTable + params[:inhno] * $sizeof_FP, $sizeof_FP)
    2323
     
    3939#
    4040excTable = SYMBOL("_kernel_exc_table")
    41 $cfgData[:DEF_EXC].each do |id, params|
     41$cfgData[:DEF_EXC].each do |key, params|
    4242  exchdr = PEEK(excTable + params[:excno] * $sizeof_FP, $sizeof_FP)
    4343
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel_impl.c

    r302 r305  
    66 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    77 *                              Toyohashi Univ. of Technology, JAPAN
    8  *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
     8 *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
    99 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    1010 *
     
    5353 *  の責任を負わない.
    5454 *
    55  *  $Id: core_kernel_impl.c 430 2015-08-08 11:38:46Z ertl-hiro $
     55 *  $Id: core_kernel_impl.c 541 2016-01-16 03:09:21Z ertl-hiro $
    5656 */
    5757
     
    7676#ifdef USE_ARM_MMU
    7777
    78 #define D0_CLIENT       0x01U           /* 変換テーブルに従ってドメイン0にアクセス */
    79 #define USE_ASID        1                       /* 使用するASID */
     78#define CP15_DACR_D0_CLIENT     0x01U   /* 変換テーブルに従いドメイン0にアクセス */
     79#define DEFAULT_ASID            1               /* 使用するASID */
    8080
    8181/*
     
    155155         * ドメインアクセス制御の設定
    156156         */
    157         CP15_WRITE_DACR(D0_CLIENT);
     157        CP15_WRITE_DACR(CP15_DACR_D0_CLIENT);
    158158
    159159        /*
     
    161161         */
    162162#if __TARGET_ARCH_ARM >= 6
    163         CP15_WRITE_CONTEXTIDR(USE_ASID);
     163        CP15_WRITE_CONTEXTIDR(DEFAULT_ASID);
    164164#endif /* __TARGET_ARCH_ARM >= 6 */
    165165
     
    197197         */
    198198        excpt_nest_count = 1U;
     199
     200        /*
     201         *  MMUを有効に
     202         */
     203#ifdef USE_ARM_MMU
     204        arm_mmu_initialize();
     205#endif /* USE_ARM_MMU */
    199206
    200207        /*
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/core_test.h

    r302 r305  
    44 *      Advanced Standard Profile Kernel
    55 *
    6  *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
     6 *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
    77 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    88 *
     
    5151 *  の責任を負わない.
    5252 *
    53  *  $Id: core_test.h 460 2015-08-29 13:04:06Z ertl-hiro $
     53 *  $Id: core_test.h 524 2016-01-14 11:01:56Z ertl-hiro $
    5454 */
    5555
     
    146146
    147147#endif
    148 
    149 /*
    150  *  パフォーマンスモニタによる性能評価
    151  */
    152 #if defined(USE_ARM_PM_HIST) && __TARGET_ARCH_ARM == 7
    153 
    154 /*
    155  *  パフォーマンスモニタのカウンタのデータ型
    156  */
    157 typedef uint32_t        PMCNT;
    158 
    159 /*
    160  *  パフォーマンスモニタの初期化
    161  */
    162 Inline void
    163 arm_init_pmcnt(void)
    164 {
    165         uint32_t        reg;
    166 
    167         /*
    168          *  パフォーマンスモニタの有効化
    169          *
    170          *  TOPPERS_ARM_PMCNT_DIV64が定義されている場合は,64クロック毎にカ
    171          *  ウントアップする.
    172          */
    173         CP15_READ_PMCR(reg);
    174         reg |= CP15_PMCR_ALLCNTR_ENABLE;
    175 
    176 #ifdef TOPPERS_ARM_PMCNT_DIV64
    177         reg |= CP15_PMCR_PMCCNTR_DIVIDER;
    178 #else /* !TOPPERS_ARM_PMCNT_DIV64 */
    179         reg &= ~CP15_PMCR_PMCCNTR_DIVIDER;
    180 #endif /* TOPPERS_ARM_PMCNT_DIV64 */
    181 
    182         CP15_WRITE_PMCR(reg);
    183 
    184         /*
    185          *  パフォーマンスモニタのカウンタの有効化
    186          */
    187         CP15_READ_PMCNTENSET(reg);
    188         reg |= CP15_PMCNTENSET_CCNTR_ENABLE;
    189         CP15_WRITE_PMCNTENSET(reg);
    190 }
    191 
    192 /*
    193  *  パフォーマンスモニタのカウンタの読み込み
    194  */
    195 Inline void
    196 arm_get_pmcnt(PMCNT *p_count)
    197 {
    198         CP15_READ_PMCCNTR(*p_count);
    199 }
    200 
    201 /*
    202  *  カウンタ値の時間計測単位への変換
    203  *
    204  *  時間計測の単位は,現状はナノ秒になっている(マイクロ秒単位にする設
    205  *  定も欲しいと思われる).
    206  */
    207 Inline uint_t
    208 arm_conv_time(PMCNT count) {
    209 #ifdef TOPPERS_ARM_PMCNT_DIV64
    210         return(((uint_t) count) * (1000 * 64) / CORE_CLK_MHZ);
    211 #else /* !TOPPERS_ARM_PMCNT_DIV64 */
    212         return(((uint_t) count) * 1000 / CORE_CLK_MHZ);
    213 #endif /* TOPPERS_ARM_PMCNT_DIV64 */
    214 }
    215 
    216 #define HISTTIM                                 PMCNT
    217 #define HIST_GET_TIM(p_time)    (arm_get_pmcnt(p_time))
    218 #define HIST_CONV_TIM(time)             (arm_conv_tim(time))
    219 #define HIST_BM_HOOK()                  ((void) 0)
    220 
    221 #endif /* defined(USE_ARM_PM_HIST) && __TARGET_ARCH_ARM == 7 */
    222148#endif /* TOPPERS_CORE_TEST_H */
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.c

    r302 r305  
    44 *      Advanced Standard Profile Kernel
    55 *
    6  *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
     6 *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
    77 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    88 *
     
    5151 *  の責任を負わない.
    5252 *
    53  *  $Id: gic_kernel_impl.c 355 2015-07-25 10:26:02Z ertl-hiro $
     53 *  $Id: gic_kernel_impl.c 522 2016-01-14 06:56:53Z ertl-hiro $
    5454 */
    5555
     
    177177         */
    178178        for (i = GIC_INTNO_PPI0 / 16; i < GIC_TNUM_INTNO / 16; i++) {
    179 #ifdef GIC_ARM11MOCORE
     179#ifdef GIC_ARM11MPCORE
    180180                sil_wrw_mem(GICD_ICFGR(i), 0x55555555U);
    181 #else /* GIC_ARM11MOCORE */
     181#else /* GIC_ARM11MPCORE */
    182182                sil_wrw_mem(GICD_ICFGR(i), 0x00000000U);
    183 #endif /* GIC_ARM11MOCORE */
     183#endif /* GIC_ARM11MPCORE */
    184184        }
    185185
     
    229229
    230230        if ((intatr & TA_EDGE) != 0U) {
    231 #ifdef GIC_ARM11MOCORE
     231#ifdef GIC_ARM11MPCORE
    232232                gicd_config(intno, GICD_ICFGRn_EDGE|GICD_ICFGRn_1_N);
    233 #else /* GIC_ARM11MOCORE */
     233#else /* GIC_ARM11MPCORE */
    234234                gicd_config(intno, GICD_ICFGRn_EDGE);
    235 #endif /* GIC_ARM11MOCORE */
     235#endif /* GIC_ARM11MPCORE */
    236236                clear_int(intno);
    237237        }
    238238        else {
    239 #ifdef GIC_ARM11MOCORE
     239#ifdef GIC_ARM11MPCORE
    240240                gicd_config(intno, GICD_ICFGRn_LEVEL|GICD_ICFGRn_1_N);
    241 #else /* GIC_ARM11MOCORE */
     241#else /* GIC_ARM11MPCORE */
    242242                gicd_config(intno, GICD_ICFGRn_LEVEL);
    243 #endif /* GIC_ARM11MOCORE */
     243#endif /* GIC_ARM11MPCORE */
    244244        }
    245245
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.h

    r302 r305  
    44 *      Advanced Standard Profile Kernel
    55 *
    6  *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
     6 *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
    77 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    88 *
     
    5151 *  の責任を負わない.
    5252 *
    53  *  $Id: gic_kernel_impl.h 377 2015-07-31 00:48:14Z ertl-hiro $
     53 *  $Id: gic_kernel_impl.h 535 2016-01-16 00:42:29Z ertl-hiro $
    5454 */
    5555
     
    100100ˆåº¦ã®æ®µæ•°ãŒ256段階の時にあわせて表す.
    101101 */
     102#define GIC_PRI_LEVEL           (TMAX_INTPRI - TMIN_INTPRI + 2)
     103
    102104#if GIC_PRI_LEVEL == 16
    103105#define GIC_PRI_SHIFT           4
     
    128130                        (((uint_t)((ipm) + (GIC_PRI_LEVEL - 1))) << GIC_PRI_SHIFT)
    129131
    130 /* TMIN_INTPRI,TMAX_INTPRIとの整合性のチェック */
    131 #if TMAX_INTPRI - TMIN_INTPRI + 2 != GIC_PRI_LEVEL
    132 #error GIC_PRI_LEVEL does not match TMIN_INTPRI.
    133 #endif
    134 
    135132/*
    136133 *  GICレジスタのアドレスを定義するためのマクロ
     
    209206#define GICD_ICFGRn_LEVEL       UINT_C(0x00)
    210207#define GICD_ICFGRn_EDGE        UINT_C(0x02)
    211 #ifdef GIC_ARM11MOCORE
     208#ifdef GIC_ARM11MPCORE
    212209#define GICD_ICFGRn_N_N         UINT_C(0x00)
    213210#define GICD_ICFGRn_1_N         UINT_C(0x01)
    214 #endif /* GIC_ARM11MOCORE */
     211#endif /* GIC_ARM11MPCORE */
    215212
    216213#ifndef TOPPERS_MACRO_ONLY
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_support.S

    r302 r305  
    66 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    77 *                              Toyohashi Univ. of Technology, JAPAN
    8  *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
     8 *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
    99 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    1010 *
     
    5353 *  の責任を負わない.
    5454 *
    55  *  $Id: gic_support.S 454 2015-08-16 03:18:46Z ertl-hiro $
     55 *  $Id: gic_support.S 522 2016-01-14 06:56:53Z ertl-hiro $
    5656 */
    5757
     
    176176 *
    177177 *  irc_end_excで用いるæƒ
    178 å ±ï¼ˆå‰²è¾¼ã¿ç™ºç”Ÿå‰ã®å‰²è¾¼ã¿å„ªå
     178報(CPU例外発生前の割込み優å
    179179ˆåº¦ãƒžã‚¹ã‚¯ï¼‰ã‚’,スタッ
    180180 *      クに保存する.
     
    207207ƒã«æˆ»ã™ï¼Ž
    208208         */
    209         pop             {r2}                            /* irc_begin_intで保存したæƒ
     209        pop             {r2}                            /* irc_begin_excで保存したæƒ
    210210報を復帰 */
    211211        ldr             r1, =GICC_PMR           /* 割込み優å
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/sp804.h

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: sp804.h 440 2015-08-09 02:02:08Z ertl-hiro $
     52 *  $Id: sp804.h 530 2016-01-14 15:17:30Z ertl-hiro $
    5353 */
    5454
    5555/*
    56  *              ARM Dual-Timer Module(SP804)サポートモジュール
     56 *              ARM Dual-Timer Module(SP804)に関する定義
    5757 */
    5858
  • asp3_wo_tecs/trunk/arch/arm_gcc/common/start.S

    r302 r305  
    55 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    66 *                              Toyohashi Univ. of Technology, JAPAN
    7  *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
     7 *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
    88 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    99 *
     
    5252 *  の責任を負わない.
    5353 *
    54  *  $Id: start.S 349 2015-07-25 05:25:27Z ertl-hiro $
     54 *  $Id: start.S 540 2016-01-16 02:15:41Z ertl-hiro $
    5555 */
    5656
     
    106106         *  BSS_STARTからBSS_ENDまでをゼロクリアする.
    107107         */
    108         ldr             r1, =BSS_START
     108        ldr             r0, =BSS_START
    109109        ldr             r2, =BSS_END
    110         cmp             r1, r2
     110        cmp             r0, r2
    111111        bhs             start_3
    112         mov             r0, #0
     112        mov             r1, #0
     113#ifdef TOPPERS_USE_STDLIB
     114        sub             r2, r2, r0
     115        bl              memset
     116#else /* TOPPERS_USE_STDLIB */
    113117ALABEL(start_2)
    114         str             r0, [r1], #4
    115         cmp             r1, r2
     118        str             r1, [r0], #4
     119        cmp             r0, r2
    116120        blo             start_2
     121#endif /* TOPPERS_USE_STDLIB */
    117122ALABEL(start_3)
    118123#endif /* TOPPERS_OMIT_BSS_INIT */
     
    125130         *  IDATA_STARTからIDATA_ENDまでを,DATA_START以降にコピーする.
    126131         */
    127         ldr             r1, =DATA_START
    128         ldr             r3, =DATA_END
    129         cmp             r1, r3
     132        ldr             r0, =DATA_START
     133        ldr             r2, =DATA_END
     134        cmp             r0, r2
    130135        bhs             start_5
    131         ldr             r2, =IDATA_START
     136        ldr             r1, =IDATA_START
     137#ifdef TOPPERS_USE_STDLIB
     138        sub             r2, r2, r0
     139        bl              memcpy
     140#else /* TOPPERS_USE_STDLIB */
    132141ALABEL(start_4)
    133         ldr             r0, [r2], #4
    134         str             r0, [r1], #4
    135         cmp             r1, r3
     142        ldr             r3, [r1], #4
     143        str             r3, [r0], #4
     144        cmp             r0, r2
    136145        blo             start_4
     146#endif /* TOPPERS_USE_STDLIB */
    137147ALABEL(start_5)
    138148#endif /* TOPPERS_OMIT_DATA_INIT */
  • asp3_wo_tecs/trunk/arch/arm_gcc/mpcore/chip_kernel.h

    r302 r305  
    5151 *  の責任を負わない.
    5252 *
    53  *  $Id: chip_kernel.h 390 2015-08-01 02:03:34Z ertl-hiro $
     53 *  $Id: chip_kernel.h 531 2016-01-14 15:19:13Z ertl-hiro $
    5454 */
    5555
     
    6767/*
    6868 *  サポートできる機能の定義
     69 *
     70 *  GICでは,ena_int/dis_intをサポートすることができる.
    6971 */
    7072#define TOPPERS_TARGET_SUPPORT_ENA_INT          /* ena_int */
  • asp3_wo_tecs/trunk/arch/arm_gcc/mpcore/chip_kernel_impl.c

    r302 r305  
    5353 *  の責任を負わない.
    5454 *
    55  *  $Id: chip_kernel_impl.c 357 2015-07-25 12:05:26Z ertl-hiro $
     55 *  $Id: chip_kernel_impl.c 538 2016-01-16 01:27:50Z ertl-hiro $
    5656 */
    5757
     
    7171{
    7272        /*
    73          *  コア依存の初期化
    74          */
    75         core_initialize();
    76 
    77         /*
    7873         *  キャッシュをディスエーブル
    7974         */
     
    8176
    8277        /*
    83          *  MMUを有効に
     78         *  コア依存の初期化
    8479         */
    85         arm_mmu_initialize();
     80        core_initialize();
    8681
    8782        /*
  • asp3_wo_tecs/trunk/arch/arm_gcc/mpcore/chip_timer.h

    r302 r305  
    5353 *  の責任を負わない.
    5454 *
    55  *  $Id: chip_timer.h 358 2015-07-26 10:26:23Z ertl-hiro $
     55 *  $Id: chip_timer.h 537 2016-01-16 01:26:38Z ertl-hiro $
    5656 */
    5757
     
    6060蔵タイマ用)
    6161 *
    62  *  ARM11 MPCoreには,コア毎にタイマとウォッチドッグがある.ウォッチドッ
    63  *  グは,タイマとして使用することもできるため,この2つのタイマを使って
    64  *  高分解能タイマを実現する.å
    65 ·ä½“的には,ウォッチドッグをタイマモード
    66  *  に設定して現在時刻の管理のために用い,タイマを相対時間割込みの発生
    67  *  のために用いる.
     62 *  MPCoreには,コア毎にプライベートタイマとプライベートウォッチドッグ
     63 *  を持つ.ウォッチドッグは,タイマとして使用することもできるため,こ
     64 *  の2つのタイマを使って高分解能タイマを実現する.å
     65·ä½“的には,ウォッチ
     66 *  ドッグをタイマモードに設定して現在時刻の管理のために用い,タイマを
     67 *  相対時間割込みの発生のために用いる.
    6868 */
    6969
Note: See TracChangeset for help on using the changeset viewer.