summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/block.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/kernel/block.H')
-rw-r--r--src/include/kernel/block.H17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/kernel/block.H b/src/include/kernel/block.H
index 3745b065e..94daf0b3a 100644
--- a/src/include/kernel/block.H
+++ b/src/include/kernel/block.H
@@ -169,11 +169,22 @@ class Block
* @param[in] i_vAddr - The virtual address of the page.
* @param[in] i_pAddr - The physical address of the page.
* @param[in] i_access - The permissions of the page.
+ *
+ * @note If (i_pAddr == 0), then the virtual page is left with
+ * the current present / page-number state but the access
+ * mode is still set.
*/
void setPhysicalPage(uint64_t i_vAddr, uint64_t i_pAddr,
VmmManager::ACCESS_TYPES i_access);
/**
+ * @brief Set up a virtual address to be "allocate-from-zero".
+ *
+ * @param[in] i_vAddr - The virtual address of the page.
+ */
+ void setPageAllocateFromZero(uint64_t i_vAddr);
+
+ /**
* @brief Adds up the total size of all blocks within the segment
*
* @param[in/out] io_totalSize - total size allocated within segment
@@ -185,6 +196,12 @@ class Block
else iv_nextBlock->totalBlocksAlloc(io_totalSize);
}
+ /**
+ * @brief Release all allocated pages back to memory pool and remove
+ * from page table.
+ */
+ void releaseAllPages();
+
private:
/** Base address of the block */
const uint64_t iv_baseAddr;
OpenPOWER on IntegriCloud