summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/vmmmgr.H
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2011-09-29 15:42:30 -0500
committerMATTHEW S. BARTH <msbarth@us.ibm.com>2011-10-10 15:51:19 -0500
commit8c062af8b6bd50a59823c7ec430ec5fc019052d2 (patch)
treedbe0625a3024a3737ddfa5d32634ce8225fda991 /src/include/kernel/vmmmgr.H
parent4de170997eee6244b2091bb8bf065ae2da1396d7 (diff)
downloadtalos-hostboot-8c062af8b6bd50a59823c7ec430ec5fc019052d2.tar.gz
talos-hostboot-8c062af8b6bd50a59823c7ec430ec5fc019052d2.zip
Flush/Release/Evict pages functionality
Change-Id: Ic0bb4122164e11f6d13e6850abf8ae9bd32caea2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/393 Tested-by: Jenkins Server Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
Diffstat (limited to 'src/include/kernel/vmmmgr.H')
-rw-r--r--src/include/kernel/vmmmgr.H36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H
index ce7aedafb..864eed0fd 100644
--- a/src/include/kernel/vmmmgr.H
+++ b/src/include/kernel/vmmmgr.H
@@ -61,6 +61,23 @@ class VmmManager
CRITICAL,
};
+ /**
+ * Kernel mapped page removal operations
+ *
+ * RELEASE : Writes dirty&write-tracked pages out to a storage device
+ * and removes other pages
+ * FLUSH : Only writes dirty&write-tracked pages out to a storage
+ * device
+ * EVICT : (Kernel) Writes dirty&write-tracked pages out to a storage
+ * device and removes other pages
+ */
+ enum PAGE_REMOVAL_OPS
+ {
+ RELEASE = 0,
+ FLUSH = 1,
+ EVICT = 2,
+ };
+
static void init();
static void init_slb();
@@ -98,7 +115,8 @@ class VmmManager
/**
* @brief Allocates a block of virtual memory of the given size
* @param i_mq[in] - Message queue to be associated with the block
- * @param i_va[in] - Base virtual address of the block to be allocated
+ * @param i_va[in] - Page aligned base virtual address of the block
+ * to be allocated
* @param i_size[in] - Requested virtual memory size of the block
* @return int - 0 for successful block allocation, non-zero otherwise
*/
@@ -127,14 +145,19 @@ class VmmManager
* @param[in] i_op - Page removal operation to perform
* @param[in] i_vaddr - Virtual address associated to page(s)
* @param[in] i_size - Size of memory to perform page removal on
+ * @param[in] i_task - OPTIONAL:Task requesting page removal.
* @return int - 0 for successful page removal, non-zero otherwise
*
* The given virtual address will be 'rounded' down to the nearest page
* boundary, along with the given size will be 'rounded' up to the
* nearest divisible page size.
+ *
+ * When a task is given, it will be deferred until all pages requested
+ * for removal have completed.
*/
- static int mmRemovePages(PAGE_REMOVAL_OPS i_op, void* i_vaddr,
- uint64_t i_size);
+ static int mmRemovePages(VmmManager::PAGE_REMOVAL_OPS i_op,
+ void* i_vaddr, uint64_t i_size,
+ task_t* i_task = NULL);
/**
* @brief Sets the permissions for a given page or range of pages
* @param i_va[in] - Virtual address of the page to update permission
@@ -180,6 +203,13 @@ class VmmManager
/** See flushPageTable */
void _flushPageTable( void );
+ /** See mmAllocBlock */
+ int _mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size);
+
+ /** See mmRemovePages */
+ int _mmRemovePages(VmmManager::PAGE_REMOVAL_OPS i_op,void* i_vaddr,
+ uint64_t i_size,task_t* i_task);
+
public:
friend class Block;
OpenPOWER on IntegriCloud