kernel/eka/include/kernel/kernel.h
changeset 13 46fffbe7b5a7
parent 11 329ab0095843
equal deleted inserted replaced
12:0bf4040442f9 13:46fffbe7b5a7
   888 
   888 
   889 class DPagingDevice;
   889 class DPagingDevice;
   890 class DLogicalDevice;
   890 class DLogicalDevice;
   891 class DPhysicalDevice;
   891 class DPhysicalDevice;
   892 class TShPoolCreateInfo;
   892 class TShPoolCreateInfo;
       
   893 class TKernelMapObject;
   893 
   894 
   894 class Kern
   895 class Kern
   895 /**
   896 /**
   896 Kernel utility functions
   897 Kernel utility functions
   897 
   898 
   909 		ETimeSet_SetHwRtc = 1,		/**< Set HW as well as SW RTC */
   910 		ETimeSet_SetHwRtc = 1,		/**< Set HW as well as SW RTC */
   910 		ETimeSet_LocalTime = 2,		/**< The Kern::SetSytemTime() parameter aTime is specified in local time rather than UTC */
   911 		ETimeSet_LocalTime = 2,		/**< The Kern::SetSytemTime() parameter aTime is specified in local time rather than UTC */
   911 		ETimeSet_SyncNotify = 4,	/**< Synchronously trigger change notifiers*/
   912 		ETimeSet_SyncNotify = 4,	/**< Synchronously trigger change notifiers*/
   912 		ETimeSet_AsyncNotify = 8,	/**< Asynchronously trigger change notifiers*/
   913 		ETimeSet_AsyncNotify = 8,	/**< Asynchronously trigger change notifiers*/
   913 		ETimeSet_Secure = 16		/**< Set the secure clock (implies ETimeSet_SetHwRtc)*/
   914 		ETimeSet_Secure = 16		/**< Set the secure clock (implies ETimeSet_SetHwRtc)*/
       
   915 		};
       
   916 	/**
       
   917 	Attributes that can be set on new kernel mapping objects created via Kern::CreateKernelMapObject().
       
   918 
       
   919 	@see Kern::CreateKernelMapObject()
       
   920 	*/
       
   921 	enum TKernelMapAttributes
       
   922 		{
       
   923 		/**
       
   924 		Set this flag to create a read only kernel mapping object.  When set DMA 
       
   925 		operations to memory mapped by the mapping object must not write to the 
       
   926 		memory mapped, i.e. the only DMA operations must be DMA copied into H/W.
       
   927 		Setting this flag may improve the performance if the memory the 
       
   928 		kernel mapping object maps is paged out.
       
   929 		*/
       
   930 		EKernelMap_ReadOnly = 1,
       
   931 		EKernelMap_ValidMask = EKernelMap_ReadOnly,	/**<@internalComponent*/
   914 		};
   932 		};
   915 public:
   933 public:
   916 	IMPORT_C static void Printf(const char* aFmt, ...);
   934 	IMPORT_C static void Printf(const char* aFmt, ...);
   917 	IMPORT_C static TInt AddHalEntry(TInt aId, THalFunc aFunc, TAny* aPtr);
   935 	IMPORT_C static TInt AddHalEntry(TInt aId, THalFunc aFunc, TAny* aPtr);
   918 	IMPORT_C static TInt AddHalEntry(TInt aId, THalFunc aFunc, TAny* aPtr, TInt aDeviceNumber);
   936 	IMPORT_C static TInt AddHalEntry(TInt aId, THalFunc aFunc, TAny* aPtr, TInt aDeviceNumber);
  1153 
  1171 
  1154 	IMPORT_C static TInt CreatePhysicalPinObject(TPhysicalPinObject*& aPinObject); // prototype
  1172 	IMPORT_C static TInt CreatePhysicalPinObject(TPhysicalPinObject*& aPinObject); // prototype
  1155 	IMPORT_C static TInt PinPhysicalMemory(TPhysicalPinObject* aPinObject, TLinAddr aStart, TUint aSize, TBool aReadOnly, TPhysAddr& aAddress, TPhysAddr* aPages, TUint32& aMapAttr, TUint& aColour, DThread* aThread=NULL);
  1173 	IMPORT_C static TInt PinPhysicalMemory(TPhysicalPinObject* aPinObject, TLinAddr aStart, TUint aSize, TBool aReadOnly, TPhysAddr& aAddress, TPhysAddr* aPages, TUint32& aMapAttr, TUint& aColour, DThread* aThread=NULL);
  1156 	IMPORT_C static TInt UnpinPhysicalMemory(TPhysicalPinObject* aPinObject); // prototype
  1174 	IMPORT_C static TInt UnpinPhysicalMemory(TPhysicalPinObject* aPinObject); // prototype
  1157 	IMPORT_C static TInt DestroyPhysicalPinObject(TPhysicalPinObject*& aPinObject); // prototype
  1175 	IMPORT_C static TInt DestroyPhysicalPinObject(TPhysicalPinObject*& aPinObject); // prototype
  1158 	
  1176 
       
  1177 	IMPORT_C static TInt CreateKernelMapObject(TKernelMapObject*& aMapObject, TUint aMaxReserveSize=0);
       
  1178 	IMPORT_C static TInt MapAndPinMemory(TKernelMapObject* aMapObject, DThread* aThread, TLinAddr aStart, TUint aSize, TUint aMapAttributes, TLinAddr& aKernelAddr, TPhysAddr* aPages=NULL);
       
  1179 	IMPORT_C static void UnmapAndUnpinMemory(TKernelMapObject* aMapObject);
       
  1180 	IMPORT_C static void DestroyKernelMapObject(TKernelMapObject*& aMapObject);
  1159 
  1181 
  1160 	IMPORT_C static TInt ShPoolCreate(TShPool*& aPool, TShPoolCreateInfo& aInfo, TBool aMap, TUint aFlags);
  1182 	IMPORT_C static TInt ShPoolCreate(TShPool*& aPool, TShPoolCreateInfo& aInfo, TBool aMap, TUint aFlags);
  1161 	IMPORT_C static TInt ShPoolOpen(TShPool*& aPool, DThread* aThread, TInt aHandle, TBool aMap, TUint aFlags);
  1183 	IMPORT_C static TInt ShPoolOpen(TShPool*& aPool, DThread* aThread, TInt aHandle, TBool aMap, TUint aFlags);
  1162 	IMPORT_C static TInt ShPoolClose(TShPool* aPool);
  1184 	IMPORT_C static TInt ShPoolClose(TShPool* aPool);
  1163 	IMPORT_C static TInt ShPoolMakeHandleAndOpen(TShPool* aPool, DThread* aThread, TUint aAttr);
  1185 	IMPORT_C static TInt ShPoolMakeHandleAndOpen(TShPool* aPool, DThread* aThread, TUint aAttr);