kerneltest/e32test/mmu/d_memorytest.h
changeset 47 46fffbe7b5a7
parent 43 96e5fb8b040d
child 87 2f92ad2dc5db
equal deleted inserted replaced
46:0bf4040442f9 47:46fffbe7b5a7
    23 #include <e32std.h>
    23 #include <e32std.h>
    24 #endif
    24 #endif
    25 
    25 
    26 _LIT(KMemoryTestLddName,"d_memorytest");
    26 _LIT(KMemoryTestLddName,"d_memorytest");
    27 
    27 
    28 const TInt UCPageCount = 2;//Page count of user chunk used in physical pinning tests.
    28 const TInt KUCPageCount = 4;//Page count of user chunk used in physical pinning tests.
    29 
    29 
    30 class RMemoryTestLdd : public RBusLogicalChannel
    30 class RMemoryTestLdd : public RBusLogicalChannel
    31 	{
    31 	{
    32 public:
    32 public:
    33 	enum TControl
    33 	enum TControl
    52 		EInvalidatePinnedPhysicalMemory,
    52 		EInvalidatePinnedPhysicalMemory,
    53 		EUnpinPhysicalMemory,
    53 		EUnpinPhysicalMemory,
    54 		EDestroyPhysicalPinObject,
    54 		EDestroyPhysicalPinObject,
    55 		EPinKernelPhysicalMemory,
    55 		EPinKernelPhysicalMemory,
    56 		ESetPanicTrace,
    56 		ESetPanicTrace,
    57 		EIsMemoryPresent
    57 		EIsMemoryPresent,
       
    58 		ECreateKernelMapObject,
       
    59 		EDestroyKernelMapObject,
       
    60 		EKernelMapMemory,
       
    61 		EKernelMapMemoryRO,
       
    62 		EKernelMapMemoryInvalid,
       
    63 		EKernelMapCheckPageList,
       
    64 		EKernelMapSyncMemory,
       
    65 		EKernelMapInvalidateMemory,
       
    66 		EKernelMapMoveMemory,
       
    67 		EKernelMapReadModifyMemory,
       
    68 		EKernelUnmapMemory,
    58 		};
    69 		};
    59 
    70 
    60 #ifndef __KERNEL_MODE__
    71 #ifndef __KERNEL_MODE__
    61 public:
    72 public:
    62 	inline TInt Open()
    73 	inline TInt Open()
   110 		{ return DoControl(EPinKernelPhysicalMemory); }
   121 		{ return DoControl(EPinKernelPhysicalMemory); }
   111 	inline TBool SetPanicTrace(TBool aEnable)
   122 	inline TBool SetPanicTrace(TBool aEnable)
   112 		{ return DoControl(ESetPanicTrace,(TAny*)aEnable); }
   123 		{ return DoControl(ESetPanicTrace,(TAny*)aEnable); }
   113 	inline TInt IsMemoryPresent(const TAny* aPtr)
   124 	inline TInt IsMemoryPresent(const TAny* aPtr)
   114 		{ return DoControl(EIsMemoryPresent,(TAny*)aPtr); }
   125 		{ return DoControl(EIsMemoryPresent,(TAny*)aPtr); }
       
   126 	inline TInt CreateKernelMapObject(TUint aReserveBytes)
       
   127 		{ return DoControl(ECreateKernelMapObject, (TAny*)aReserveBytes); }
       
   128 	inline TInt DestroyKernelMapObject()
       
   129 		{ return DoControl(EDestroyKernelMapObject); }
       
   130 	inline TInt KernelMapMemory(TLinAddr aStart, TUint aSize)
       
   131 		{ return DoControl(EKernelMapMemory,(TAny*)aStart, (TAny*)aSize); }
       
   132 	inline TInt KernelMapMemoryRO(TLinAddr aStart, TUint aSize)
       
   133 		{ return DoControl(EKernelMapMemoryRO,(TAny*)aStart, (TAny*)aSize); }
       
   134 	inline TInt KernelMapMemoryInvalid(TLinAddr aStart, TUint aSize)
       
   135 		{ return DoControl(EKernelMapMemoryInvalid,(TAny*)aStart, (TAny*)aSize); }
       
   136 	inline TInt KernelMapCheckPageList(TUint8* aStart)
       
   137 		{ return DoControl(EKernelMapCheckPageList, (TAny*)aStart); }
       
   138 	inline TInt KernelMapSyncMemory()
       
   139 		{ return DoControl(EKernelMapSyncMemory); }
       
   140 	inline TInt KernelMapInvalidateMemory()
       
   141 		{ return DoControl(EKernelMapInvalidateMemory); }
       
   142 	inline TInt KernelMapMoveMemory(TUint aIndex)
       
   143 		{ return DoControl(EKernelMapMoveMemory, (TAny*)aIndex); }
       
   144 	inline TInt KernelMapReadAndModifyMemory()
       
   145 		{ return DoControl(EKernelMapReadModifyMemory); }
       
   146 	inline TInt KernelUnmapMemory()
       
   147 		{ return DoControl(EKernelUnmapMemory); }
   115 #endif
   148 #endif
   116 	};
   149 	};
   117 
   150 
   118 
   151 
   119 #endif
   152 #endif