kernel/eka/nkernsmp/arm/ncthrd.cpp
changeset 201 43365a9b78a3
parent 90 947f0dc9f7a8
equal deleted inserted replaced
200:73ea206103e6 201:43365a9b78a3
   130 		}
   130 		}
   131 	else
   131 	else
   132 		{
   132 		{
   133 		NKern::EnableAllInterrupts();
   133 		NKern::EnableAllInterrupts();
   134 
   134 
       
   135 #if defined(__CPU_ARM_HAS_GLOBAL_TIMER_BLOCK) && defined(__NKERN_TIMESTAMP_USE_SCU_GLOBAL_TIMER__)
       
   136 
       
   137 		if (cpu == 0) 
       
   138 			{
       
   139 			// start global timer if necessary
       
   140 			ArmGlobalTimer& GT = GLOBAL_TIMER;
       
   141 			if (!(GT.iTimerCtrl & E_ArmGTmrCtrl_TmrEnb))
       
   142 				{
       
   143 				// timer not currently enabled
       
   144 				GT.iTimerCtrl = 0;
       
   145 				__e32_io_completion_barrier();
       
   146 				GT.iTimerStatus = E_ArmGTmrStatus_Event;
       
   147 				__e32_io_completion_barrier();
       
   148 				GT.iTimerCountLow = 0;
       
   149 				GT.iTimerCountHigh = 0;
       
   150 				__e32_io_completion_barrier();
       
   151 				GT.iTimerCtrl = E_ArmGTmrCtrl_TmrEnb;	// enable timer with prescale factor of 1
       
   152 				__e32_io_completion_barrier();
       
   153 				}
       
   154 			}
       
   155 		
       
   156 #endif
       
   157 
   135 		// start local timer
   158 		// start local timer
   136 		ArmLocalTimer& T = LOCAL_TIMER;
   159 		ArmLocalTimer& T = LOCAL_TIMER;
   137 		T.iTimerCtrl = E_ArmTmrCtrl_IntEn | E_ArmTmrCtrl_Reload | E_ArmTmrCtrl_Enable;
   160 		T.iTimerCtrl = E_ArmTmrCtrl_IntEn | E_ArmTmrCtrl_Reload | E_ArmTmrCtrl_Enable;
   138 
       
   139 		// Initialise timestamp
   161 		// Initialise timestamp
   140 		InitTimestamp(ss, aInfo);
   162 		InitTimestamp(ss, aInfo);
   141 		}
   163 		}
   142 	AddToEnumerateList();
   164 	AddToEnumerateList();
   143 	InitLbInfo();
   165 	InitLbInfo();