summaryrefslogtreecommitdiffstats
path: root/src/include/sys
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/sys
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/sys')
-rw-r--r--src/include/sys/mmio.h44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/include/sys/mmio.h b/src/include/sys/mmio.h
index 35392f22e..37c0a029d 100644
--- a/src/include/sys/mmio.h
+++ b/src/include/sys/mmio.h
@@ -9,29 +9,37 @@ extern "C"
{
#endif
-/** @fn mmio_map()
- * @brief Map a region into virtual address space.
- *
- * @param[in] ra - address of page
- * @param[in] pages - count of pages to map
- *
- * @returns The virtual address where mapped.
+/**
+ * Sizes used to determine segment block size during map/unmap functions
+ * within the kernel or user space
*/
-void* mmio_map(void* ra, size_t pages);
-
+enum SEG_DATA_SIZES
+{
+ THIRTYTWO_GB = 0x800000000,
+};
-/** @fn mmio_unmap()
- * @brief Unmap a region previously mapped into virtual address space.
- *
- * Appears not to be implemented. See _mmioUnmap in src/kernel/vmmmgr.C
- *
- * @param[in] ea - virtual address as returned from mmio_map()
- * @param[in] pages - count of pages to unmap
- *
- * @returns -1 from _mmioUnmap in src/kernel/vmmmgr.C
+/**
+ * @brief DEPRECATED
+ */
+void* mmio_map(void* ra, size_t pages);
+/**
+ * @brief DEPRECATED
*/
int mmio_unmap(void* ea, size_t pages);
+/**
+ * @brief System call to 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
+ */
+void* mmio_dev_map(void *ra, SEG_DATA_SIZES i_devDataSize);
+/**
+ * @brief System call to 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
+ */
+int mmio_dev_unmap(void *ea);
/** @fn mmio_hmer_read()
* @brief Reads and returns protected HMER register.
OpenPOWER on IntegriCloud