diff options
| author | Missy Connell <missyc@us.ibm.com> | 2011-09-07 14:34:48 -0500 |
|---|---|---|
| committer | Melissa J. Connell <missyc@us.ibm.com> | 2011-09-15 23:19:29 -0500 |
| commit | a740789978e866ce8e9c278ecb05b0060751f090 (patch) | |
| tree | b3e6babc2767801f22ace9745dc56457e8eff218 /src/include/kernel/basesegment.H | |
| parent | a5f6b8ec8b637628dd843ec8f187e01acb678b67 (diff) | |
| download | blackbird-hostboot-a740789978e866ce8e9c278ecb05b0060751f090.tar.gz blackbird-hostboot-a740789978e866ce8e9c278ecb05b0060751f090.zip | |
Adding new interface to update page permissions.. Interface only.
Added changes from review comments
Updated new enum for system call
Change-Id: I8a55b5e2f67427e59263eae31913e438ca782006
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/331
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Melissa J. Connell <missyc@us.ibm.com>
Diffstat (limited to 'src/include/kernel/basesegment.H')
| -rw-r--r-- | src/include/kernel/basesegment.H | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/kernel/basesegment.H b/src/include/kernel/basesegment.H index 72869d535..da262c2a0 100644 --- a/src/include/kernel/basesegment.H +++ b/src/include/kernel/basesegment.H @@ -27,6 +27,7 @@ #define __KERNEL_BASESEGMENT_H #include <kernel/segment.H> +//#include <kernel/vmmmgr.H> // Forward declaration. class MessageQueue; @@ -93,6 +94,19 @@ class BaseSegment : public Segment */ virtual uint64_t findPhysicalAddress(uint64_t i_vaddr) const; + /** + * @brief Sets the page permissions for a given virtual address and size. + * @param i_va[in] - virtual address of the page(s) to set permissions + * @param i_size[in] - range of memory that needs permissions updated... + * if i_size equals 0 then we only need to update an + * individual page. + * @param i_access_type[in] - type of permission to set + * @return int - 0 for successful block allocation, non-zero otherwise + */ + static int mmSetPermission(void* i_va, + uint64_t i_size, + PAGE_PERMISSIONS i_access_type); + private: /** * @brief Internal implementation of init function. @@ -114,6 +128,20 @@ class BaseSegment : public Segment */ int _mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size); + /** + * @brief Sets the page permissions for a given virtual address and size. + * @param i_va[in] - virtual address of the page(s) to set permissions + * @param i_size[in] - range of memory that needs permissions updated... + * if i_size equals 0 then we only need to update an individual + * page. + * @param i_access_type[in] - type of permission to set + * @return int - 0 for successful block allocation, non-zero otherwise + */ + int _mmSetPermission(void* i_va, + uint64_t i_size, + PAGE_PERMISSIONS i_access_type); + + }; #endif |

