kernel/eka/include/nkernsmp/arm/ncern.h
changeset 201 43365a9b78a3
parent 90 947f0dc9f7a8
equal deleted inserted replaced
200:73ea206103e6 201:43365a9b78a3
    95 	volatile TUint64	i__Dummy[8];
    95 	volatile TUint64	i__Dummy[8];
    96 	};
    96 	};
    97 
    97 
    98 __ASSERT_COMPILE(sizeof(SPerCpuUncached) <= 8*sizeof(TUint64));
    98 __ASSERT_COMPILE(sizeof(SPerCpuUncached) <= 8*sizeof(TUint64));
    99 
    99 
   100 /** Timer frequency specification
       
   101 
       
   102 Stores a frequency as a fraction of a (separately stored) maximum.
       
   103 The frequency must be at least 1/256 of the maximum.
       
   104 
       
   105 @internalTechnology
       
   106 @prototype
       
   107 */
       
   108 struct STimerMult
       
   109 	{
       
   110 	TUint32		iFreq;						// frequency as a fraction of maximum possible, multiplied by 2^32
       
   111 	TUint32		iInverse;					// 2^24/(iFreq/2^32) = 2^56/iFreq
       
   112 	};
       
   113 
       
   114 /** Function to power up a CPU
   100 /** Function to power up a CPU
   115 @publishedPartner
   101 @publishedPartner
   116 @prototype
   102 @prototype
   117 */
   103 */
   118 typedef void (*TCpuPowerUpFn)(TInt aCpu, SPerCpuUncached* aU);
   104 typedef void (*TCpuPowerUpFn)(TInt aCpu, SPerCpuUncached* aU);
   120 /** Function to power down a CPU
   106 /** Function to power down a CPU
   121 @publishedPartner
   107 @publishedPartner
   122 @prototype
   108 @prototype
   123 */
   109 */
   124 typedef void (*TCpuPowerDownFn)(TInt aCpu, SPerCpuUncached* aU);
   110 typedef void (*TCpuPowerDownFn)(TInt aCpu, SPerCpuUncached* aU);
       
   111 
       
   112 /** Function to notify changes to system clock frequencies
       
   113 @publishedPartner
       
   114 @prototype
       
   115 */
       
   116 typedef TInt (*TFrequencyChangeFn)();
   125 
   117 
   126 /** Variant interface block
   118 /** Variant interface block
   127 @internalTechnology
   119 @internalTechnology
   128 @prototype
   120 @prototype
   129 */
   121 */
   136 	TLinAddr	iScuAddr;					// address of SCU
   128 	TLinAddr	iScuAddr;					// address of SCU
   137 	TLinAddr	iGicDistAddr;				// address of GIC Distributor
   129 	TLinAddr	iGicDistAddr;				// address of GIC Distributor
   138 	TLinAddr	iGicCpuIfcAddr;				// address of GIC CPU interface (must be same for all CPUs)
   130 	TLinAddr	iGicCpuIfcAddr;				// address of GIC CPU interface (must be same for all CPUs)
   139 	TLinAddr	iLocalTimerAddr;			// address of per-CPU timer (must be same for all CPUs)
   131 	TLinAddr	iLocalTimerAddr;			// address of per-CPU timer (must be same for all CPUs)
   140 	TLinAddr	iGlobalTimerAddr;			// address of global timer if it exists
   132 	TLinAddr	iGlobalTimerAddr;			// address of global timer if it exists
   141 	volatile STimerMult*	iTimerMult[KMaxCpus];	// timer[i] frequency / iMaxTimerClock * 2^32
   133 	SRatio*		iTimerFreqR[KMaxCpus];		// timer[i] frequency as a fraction of iMaxTimerClock
   142 	volatile TUint32*		iCpuMult[KMaxCpus];		// CPU[i] frequency / iMaxCpuClock * 2^32
   134 	SRatio*		iCpuFreqR[KMaxCpus];		// CPU[i] frequency as a fraction of iMaxCpuClock
   143 	UPerCpuUncached*		iUncached[KMaxCpus];	// Pointer to uncached memory for each CPU
   135 	UPerCpuUncached*		iUncached[KMaxCpus];	// Pointer to uncached memory for each CPU
   144 	TCpuPowerUpFn			iCpuPowerUpFn;			// function used to power up a retired CPU (NULL if core control not supported)
   136 	TCpuPowerUpFn			iCpuPowerUpFn;			// function used to power up a retired CPU (NULL if core control not supported)
   145 	TCpuPowerDownFn			iCpuPowerDownFn;		// function used to power down a CPU (NULL if power down done within idle handler itself)
   137 	TCpuPowerDownFn			iCpuPowerDownFn;		// function used to power down a CPU (NULL if power down done within idle handler itself)
       
   138 	SRatio*		iGTimerFreqR;				// global timer frequency as a fraction of iMaxTimerClock
       
   139 	TFrequencyChangeFn		iFrqChgFn;		// function to notify frequency changes
   146 	};
   140 	};
   147 
   141 
   148 // End of file
   142 // End of file
   149 #endif
   143 #endif