diff options
| author | Missy Connell <missyc@us.ibm.com> | 2011-10-25 11:12:55 -0500 |
|---|---|---|
| committer | Melissa J. Connell <missyc@us.ibm.com> | 2011-10-27 15:56:31 -0500 |
| commit | 9e86b070a4429e7db34a5438611a67098ab92dfb (patch) | |
| tree | 52e04b08288a7496359c41eff98e8463e73ae5dc /src/include/kernel/block.H | |
| parent | 71564141e3a6c7f023a9484549baf319f0e1807e (diff) | |
| download | blackbird-hostboot-9e86b070a4429e7db34a5438611a67098ab92dfb.tar.gz blackbird-hostboot-9e86b070a4429e7db34a5438611a67098ab92dfb.zip | |
Full permissions with no_access as default
MERGED changes.. only need Patrick and Mark to review extintsvctasks.H
Change-Id: Iba5814e1b5913c6181a2be96df9682555fa2ab58
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/458
Tested-by: Jenkins Server
Reviewed-by: Melissa J. Connell <missyc@us.ibm.com>
Diffstat (limited to 'src/include/kernel/block.H')
| -rw-r--r-- | src/include/kernel/block.H | 72 |
1 files changed, 46 insertions, 26 deletions
diff --git a/src/include/kernel/block.H b/src/include/kernel/block.H index 60aeadaf0..b5ab709cc 100644 --- a/src/include/kernel/block.H +++ b/src/include/kernel/block.H @@ -140,23 +140,6 @@ class Block void updateRefCount( uint64_t i_vaddr, PageTableManager::UsageStats_t i_stats ); - /** - * @brief Cast out older phyiscal memory pages - * @param[in] i_type - Castout contraint @see VmmManager::castOutPages() - */ - void castOutPages(uint64_t i_type); - - /** - * @brief Removes a range of pages within a block of virtual memory - * @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 - Task requesting page removal. - * @return int - 0 for successful page removal, non-zero otherwise - */ - int removePages(VmmManager::PAGE_REMOVAL_OPS i_op, void* i_vaddr, - uint64_t i_size, task_t* i_task); - friend class Segment; friend class BaseSegment; friend class StackSegment; @@ -194,14 +177,7 @@ class Block * 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); + uint64_t i_access); /** * @brief Adds up the total size of all blocks within the segment @@ -231,7 +207,7 @@ class Block * individual page. * @param i_access_type[in] - type of permission to set using * PAGE_PERMISSION enum values OR'd together - * @return int - 0 for successful block allocation, + * @return int - 0 for successful permission update, * non-zero otherwise */ int mmSetPermission(uint64_t i_va, uint64_t i_size, uint64_t i_access_type); @@ -260,6 +236,50 @@ class Block */ void releasePTE(ShadowPTE* i_pte); + /** + * @brief Cast out older phyiscal memory pages + * @param[in] i_type - Castout contraint @see VmmManager::castOutPages() + */ + void castOutPages(uint64_t i_type); + + /** + * @brief Evict a memory page + * @param[in] i_pte shadow page table entry + * @return true of page was evicted + */ + bool evictPage(ShadowPTE* i_pte); + + /** + * @brief Sets the page permissions for a given SPTE + * @param i_spte[in] - i_pte shadow page table entry + * @param i_access_type[in] - type of permission to set using + * PAGE_PERMISSION enum values OR'd together + * @return int - 0 for successful update + * non-zero otherwise + */ + int setPermSPTE( ShadowPTE* i_spte, uint64_t i_access_type); + + /** + * @brief Gets the page permissions for a given SPTE + * @param i_spte[in] - i_pte shadow page table entry + * @return uint64_t - type of permission for that SPTE using + * PAGE_PERMISSION enum values OR'd together + */ + uint64_t getPermission( ShadowPTE* i_spte); + + /** + * @brief Removes a range of pages within a block of virtual memory + * @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 - Task requesting page removal. + * @return int - 0 for successful page removal, non-zero otherwise + */ + int removePages(VmmManager::PAGE_REMOVAL_OPS i_op, void* i_vaddr, + uint64_t i_size, task_t* i_task); + + + private: /** Base address of the block */ const uint64_t iv_baseAddr; |

