kernel/eka/include/nkernsmp/arm/ncern.h
changeset 90 947f0dc9f7a8
parent 0 a41df078684a
child 177 a232af6b0b1f
equal deleted inserted replaced
52:2d65c2f76d7b 90:947f0dc9f7a8
    73 	TLinAddr	iInitR13Irq;		// initial value for R13_irq
    73 	TLinAddr	iInitR13Irq;		// initial value for R13_irq
    74 	TLinAddr	iInitR13Abt;		// initial value for R13_abt
    74 	TLinAddr	iInitR13Abt;		// initial value for R13_abt
    75 	TLinAddr	iInitR13Und;		// initial value for R13_und
    75 	TLinAddr	iInitR13Und;		// initial value for R13_und
    76 	};
    76 	};
    77 
    77 
       
    78 typedef void (*TDetachComplete)(void);
       
    79 
       
    80 struct SPerCpuUncached
       
    81 	{
       
    82 	volatile TUint32	iDetachCount;		// Number of times core has detached from SMP cluster
       
    83 	volatile TUint32	iAttachCount;		// Number of times core has reattached to SMP cluster
       
    84 	volatile TBool		iPowerOffReq;		// TRUE if core needs to be powered off
       
    85 	volatile TBool		iPowerOnReq;		// TRUE if core needs to be powered on
       
    86 	TDetachComplete		iDetachCompleteFn;	// idle handler jumps to this to request power down if necessary
       
    87 											// after cleaning and disabling caches, detaching from SMP cluster
       
    88 											// and saving state required to bring the core back up again
       
    89 	volatile TUint32	iDetachCompleteCpus;
       
    90 	};
       
    91 
       
    92 union UPerCpuUncached
       
    93 	{
       
    94 	SPerCpuUncached		iU;
       
    95 	volatile TUint64	i__Dummy[8];
       
    96 	};
       
    97 
       
    98 __ASSERT_COMPILE(sizeof(SPerCpuUncached) <= 8*sizeof(TUint64));
    78 
    99 
    79 /** Timer frequency specification
   100 /** Timer frequency specification
    80 
   101 
    81 Stores a frequency as a fraction of a (separately stored) maximum.
   102 Stores a frequency as a fraction of a (separately stored) maximum.
    82 The frequency must be at least 1/256 of the maximum.
   103 The frequency must be at least 1/256 of the maximum.
    88 	{
   109 	{
    89 	TUint32		iFreq;						// frequency as a fraction of maximum possible, multiplied by 2^32
   110 	TUint32		iFreq;						// frequency as a fraction of maximum possible, multiplied by 2^32
    90 	TUint32		iInverse;					// 2^24/(iFreq/2^32) = 2^56/iFreq
   111 	TUint32		iInverse;					// 2^24/(iFreq/2^32) = 2^56/iFreq
    91 	};
   112 	};
    92 
   113 
       
   114 /** Function to power up a CPU
       
   115 @publishedPartner
       
   116 @prototype
       
   117 */
       
   118 typedef void (*TCpuPowerUpFn)(TInt aCpu, SPerCpuUncached* aU);
       
   119 
       
   120 /** Function to power down a CPU
       
   121 @publishedPartner
       
   122 @prototype
       
   123 */
       
   124 typedef void (*TCpuPowerDownFn)(TInt aCpu, SPerCpuUncached* aU);
       
   125 
    93 /** Variant interface block
   126 /** Variant interface block
    94 @internalTechnology
   127 @internalTechnology
    95 @prototype
   128 @prototype
    96 */
   129 */
    97 struct SVariantInterfaceBlock : public SInterfaceBlockBase
   130 struct SVariantInterfaceBlock : public SInterfaceBlockBase
   102 	TUint32		iMaxTimerClock;				// maximum possible local timer clock frequency
   135 	TUint32		iMaxTimerClock;				// maximum possible local timer clock frequency
   103 	TLinAddr	iScuAddr;					// address of SCU
   136 	TLinAddr	iScuAddr;					// address of SCU
   104 	TLinAddr	iGicDistAddr;				// address of GIC Distributor
   137 	TLinAddr	iGicDistAddr;				// address of GIC Distributor
   105 	TLinAddr	iGicCpuIfcAddr;				// address of GIC CPU interface (must be same for all CPUs)
   138 	TLinAddr	iGicCpuIfcAddr;				// address of GIC CPU interface (must be same for all CPUs)
   106 	TLinAddr	iLocalTimerAddr;			// address of per-CPU timer (must be same for all CPUs)
   139 	TLinAddr	iLocalTimerAddr;			// address of per-CPU timer (must be same for all CPUs)
   107 	volatile STimerMult* iTimerMult[KMaxCpus];	// timer[i] frequency / iMaxTimerClock * 2^32
   140 	TLinAddr	iGlobalTimerAddr;			// address of global timer if it exists
   108 	volatile TUint32* iCpuMult[KMaxCpus];	// CPU[i] frequency / iMaxCpuClock * 2^32
   141 	volatile STimerMult*	iTimerMult[KMaxCpus];	// timer[i] frequency / iMaxTimerClock * 2^32
       
   142 	volatile TUint32*		iCpuMult[KMaxCpus];		// CPU[i] frequency / iMaxCpuClock * 2^32
       
   143 	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)
       
   145 	TCpuPowerDownFn			iCpuPowerDownFn;		// function used to power down a CPU (NULL if power down done within idle handler itself)
   109 	};
   146 	};
   110 
   147 
   111 // End of file
   148 // End of file
   112 #endif
   149 #endif