summaryrefslogtreecommitdiffstats
path: root/src/include/sys
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-05-20 14:34:56 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-06-10 10:04:07 -0500
commit857112a56dc57b18b1feacf948b87875dc4aea45 (patch)
treef0ee915b3e37f9134a9268ea0c2a7e32c56a17ee /src/include/sys
parente3d115c541291493888f533b215e28b890776e50 (diff)
downloadtalos-hostboot-857112a56dc57b18b1feacf948b87875dc4aea45.tar.gz
talos-hostboot-857112a56dc57b18b1feacf948b87875dc4aea45.zip
New mm_block_map syscall.
RTC: 71081 Change-Id: Ic5531fbba92cfc7aad7d303f043d6a350483d63d Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4607 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/sys')
-rw-r--r--src/include/sys/mm.h17
-rw-r--r--src/include/sys/mmio.h2
2 files changed, 18 insertions, 1 deletions
diff --git a/src/include/sys/mm.h b/src/include/sys/mm.h
index d71d5a1b3..959c2fa57 100644
--- a/src/include/sys/mm.h
+++ b/src/include/sys/mm.h
@@ -122,6 +122,23 @@ int mm_extend(MM_EXTEND_SIZE i_size = MM_EXTEND_REAL_MEMORY);
*/
int mm_linear_map(void *i_paddr, uint64_t i_size);
+/** @fn mm_block_map()
+ * @brief Allocate an arbitrary physical address into the VMM.
+ * @param[in] i_paddr - Physical address of the memory to map.
+ * @param[in] i_size - Size of memory to map (in bytes).
+ *
+ * @return Virtual address or NULL.
+ */
+void* mm_block_map(void* i_paddr, uint64_t i_size);
+
+/** @fn mm_block_unmap()
+ * @brief Unallocate a block previously allocated with mm_block_map.
+ * @param[in] i_vaddr - Virtual address of the mapped block.
+ *
+ * @return int - 0 for successful unmap, non-zero otherwise.
+ */
+int mm_block_unmap(void* i_vaddr);
+
/** @fs mm_icache_invalidate()
* @brief Invalidate the ICACHE for the given memory
*
diff --git a/src/include/sys/mmio.h b/src/include/sys/mmio.h
index 273965a88..9fd609cf9 100644
--- a/src/include/sys/mmio.h
+++ b/src/include/sys/mmio.h
@@ -48,7 +48,7 @@ enum SEG_DATA_SIZES
* @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);
+void* mmio_dev_map(void *ra, uint64_t i_devDataSize);
/**
* @brief System call to unmap a device from the device segment(2TB)
* @param ea[in] - Void pointer to effective address
OpenPOWER on IntegriCloud