From bf46e7954689c41cccc897b8b00bcc5db5245374 Mon Sep 17 00:00:00 2001 From: Doug Gilbert Date: Mon, 22 Aug 2011 17:14:23 -0500 Subject: 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 Reviewed-by: Daniel M. Crowell --- src/include/kernel/segment.H | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/include/kernel/segment.H') 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 +#include /** @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; -- cgit v1.2.3