summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/vmmmgr.H
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2011-07-22 09:38:14 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2011-08-08 14:21:57 -0500
commit6a8d93daac2c006c06aa1d0d9e963e651b9c64b2 (patch)
treefb7eeb89d0b7b80e64334896973649aab90a2d83 /src/include/kernel/vmmmgr.H
parent0709fbac11be8a30710a34dad5af5f37449d7255 (diff)
downloadtalos-hostboot-6a8d93daac2c006c06aa1d0d9e963e651b9c64b2.tar.gz
talos-hostboot-6a8d93daac2c006c06aa1d0d9e963e651b9c64b2.zip
Device segment MMIO map & unmap system calls
Change-Id: I233c2677909c0c16536133c189ebbd21e4415e22 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/208 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/kernel/vmmmgr.H')
-rw-r--r--src/include/kernel/vmmmgr.H18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H
index f57f01677..fe1c2cc73 100644
--- a/src/include/kernel/vmmmgr.H
+++ b/src/include/kernel/vmmmgr.H
@@ -2,12 +2,16 @@
#define __KERNEL_VMMMGR_H
#include <limits.h>
+#include <sys/mmio.h>
#include <kernel/types.h>
#include <kernel/spinlock.H>
class VmmManager
{
public:
+ /**
+ * Constants used throughout the virtual memory management classes
+ */
enum VMM_CONSTS
{
ONE_MEG = 1 * 1024 * 1024,
@@ -49,6 +53,20 @@ class VmmManager
static void* mmioMap(void*, size_t);
static int mmioUnmap(void*, size_t);
+ /**
+ * @brief Map a device into the device segment(2TB)
+ * @param ra[in] - Void pointer to real address to be mapped in
+ * @param i_devDataSize[in] - Size of device segment block
+ * @return void* - Pointer to beginning virtual address, NULL otherwise
+ */
+ static void* devMap(void* ra, SEG_DATA_SIZES i_devDataSize);
+
+ /**
+ * @brief Unmap a device from the device segment(2TB)
+ * @param ea[in] - Void pointer to effective address
+ * @return int - 0 for successful unmap, non-zero otherwise
+ */
+ static int devUnmap(void* ea);
protected:
VmmManager();
OpenPOWER on IntegriCloud