kernel/eka/memmodel/epoc/flexible/mmu/mmanager.h
changeset 132 e4a7b1cbe40c
parent 90 947f0dc9f7a8
equal deleted inserted replaced
131:e880629062dd 132:e4a7b1cbe40c
   151 	@return KErrNone if successful,
   151 	@return KErrNone if successful,
   152 			KErrAlreadyExists if any part of the region was already allocated,
   152 			KErrAlreadyExists if any part of the region was already allocated,
   153 			KErrNotSupported if the manager doesn't support this function,
   153 			KErrNotSupported if the manager doesn't support this function,
   154 			otherwise one of the system wide error codes.
   154 			otherwise one of the system wide error codes.
   155 	*/
   155 	*/
   156 	virtual TInt AddPages(DMemoryObject* aMemory, TUint aIndex, TUint aCount, TPhysAddr* aPages);
   156 	virtual TInt AddPages(DMemoryObject* aMemory, TUint aIndex, TUint aCount, const TPhysAddr* aPages);
   157 
   157 
   158 	/**
   158 	/**
   159 	Add a contiguous range of physical memory pages to a region of a memory object.
   159 	Add a contiguous range of physical memory pages to a region of a memory object.
   160 
   160 
   161 	@param aMemory		A memory object associated with this manager.
   161 	@param aMemory		A memory object associated with this manager.
   357 					unpinned.
   357 					unpinned.
   358 	*/
   358 	*/
   359 	virtual void Unpin(DMemoryObject* aMemory, DMemoryMappingBase* aMapping, TPinArgs& aPinArgs) =0;
   359 	virtual void Unpin(DMemoryObject* aMemory, DMemoryMappingBase* aMapping, TPinArgs& aPinArgs) =0;
   360 
   360 
   361 	/**
   361 	/**
   362 	@todo
   362 	Attempt to move the page specified to a new physical location.  The new physical
       
   363 	location for the page to be moved to is allocated by this method.  However,
       
   364 	aBlockZoneId and aBlockRest can be used to control which RAM zone the new
       
   365 	location is in.
       
   366 
       
   367 	@param aMemory		The memory object that owns the page.
       
   368 	@param aOldPageInfo	The page info for the physical page to move.
       
   369 	@param aNewPage 	On success this will hold the physical address of the new 
       
   370 						location for the page.
       
   371 	@param aBlockZoneId The ID of a RAM zone not to allocate the new page into.
       
   372 	@param aBlockRest 	When set to ETrue the search for a new page will stop if it 
       
   373 						ever needs to look at aBlockZoneId.
       
   374 	@return KErrNone on success, KErrInUse if the page couldn't be moved, 
       
   375 			or KErrNoMemory if it wasn't possible to allocate a new page.
   363 	*/
   376 	*/
   364 	virtual TInt MovePage(DMemoryObject* aMemory, SPageInfo* aOldPageInfo, TPhysAddr& aNewPage, TUint aBlockZoneId, TBool aBlockRest);
   377 	virtual TInt MovePage(DMemoryObject* aMemory, SPageInfo* aOldPageInfo, TPhysAddr& aNewPage, TUint aBlockZoneId, TBool aBlockRest);
       
   378 
       
   379 	/**
       
   380 	Move the page specified to a new physical location and mark the page as 
       
   381 	allocated as type aPageType.
       
   382 	
       
   383 	@param aMemory		The memory object that owns the page.
       
   384 	@param aPageInfo	The page info for the physical page to move.
       
   385 	@param aPageType	The type of the page to allocate into the orignal physical 
       
   386 						location of the page to move.
       
   387 	@return KErrNone on success, KErrInUse if the page couldn't be moved, 
       
   388 			or KErrNoMemory if it wasn't possible to allocate a new page.
       
   389 	*/
       
   390 	virtual TInt MoveAndAllocPage(DMemoryObject* aMemory, SPageInfo* aPageInfo, TZonePageType aPageType);
   365 
   391 
   366 	/**
   392 	/**
   367 	Return the TZonePageType of the pages that the memory manager can allocate and free.
   393 	Return the TZonePageType of the pages that the memory manager can allocate and free.
   368 	*/
   394 	*/
   369 	virtual TZonePageType PageType();
   395 	virtual TZonePageType PageType();