From 0ebac914541254c4b9ee2a271f26cd67fc2b94a0 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Mon, 22 Aug 2011 16:20:11 -0500 Subject: Dynamic stack support. - Create stack segment. - Allocate stack blocks on stack create. Change-Id: Ida90055afb68f208c479b5fdc19d3d931d026105 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/271 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III --- src/include/kernel/block.H | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/include/kernel/block.H') 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,10 +169,21 @@ 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 * @@ -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; -- cgit v1.2.3