diff options
| author | Doug Gilbert <dgilbert@us.ibm.com> | 2011-08-22 17:14:23 -0500 |
|---|---|---|
| committer | Douglas R. Gilbert <dgilbert@us.ibm.com> | 2011-08-25 13:52:09 -0500 |
| commit | bf46e7954689c41cccc897b8b00bcc5db5245374 (patch) | |
| tree | c7807ff84dd5f8519fb0b065e03ba4939255d485 /src/include/kernel/segment.H | |
| parent | 968add63523933786a85ab271b277d79dc5851e6 (diff) | |
| download | blackbird-hostboot-bf46e7954689c41cccc897b8b00bcc5db5245374.tar.gz blackbird-hostboot-bf46e7954689c41cccc897b8b00bcc5db5245374.zip | |
map virtual address to physical address in kernel
Change-Id: Id18e604facd517598a18968af3dff927026ad894
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/272
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/kernel/segment.H')
| -rw-r--r-- | src/include/kernel/segment.H | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/kernel/segment.H b/src/include/kernel/segment.H index a3df88602..05c5c0fdc 100644 --- a/src/include/kernel/segment.H +++ b/src/include/kernel/segment.H @@ -27,6 +27,7 @@ #define __KERNEL_SEGMENT_H #include <kernel/task.H> +#include <errno.h> /** @class Segment * @brief Virtual segment class to handle virtual memory management within @@ -66,6 +67,14 @@ class Segment */ uint64_t getBaseAddress() const { return iv_baseAddress; }; + /** + * @brief Locate the physical address of the given virtual address + * @param[in] i_vaddr virtual address + * @return the physical address bound to the virtual address, + * or -EFAULT if i_vaddr not found. @see errno.h + */ + virtual uint64_t findPhysicalAddress(uint64_t i_vaddr) const { return -EFAULT; }; + protected: /** The base address of the segment. */ const uint64_t iv_baseAddress; |

