summaryrefslogtreecommitdiffstats
path: root/src/include/sys/mmio.h
diff options
context:
space:
mode:
authorMonte Copeland <copelanm@us.ibm.com>2011-07-11 16:24:13 -0500
committerMonte K. Copeland <copelanm@us.ibm.com>2011-07-14 14:43:22 -0500
commitaccc0f438eca45dcd1058a195d192d51a6f1c4aa (patch)
tree7f98f3f58252536eeace7cb25257d7b8bb502fad /src/include/sys/mmio.h
parentb9558dcb65612b60a20719ea489dadda4776e1e4 (diff)
downloadblackbird-hostboot-accc0f438eca45dcd1058a195d192d51a6f1c4aa.tar.gz
blackbird-hostboot-accc0f438eca45dcd1058a195d192d51a6f1c4aa.zip
syscall cleanup/scrub
- 2nd pass - 3rd pass Change-Id: I5eb314c0c635aa42bc4d841065d9a9a786f8be4b Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/198 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Diffstat (limited to 'src/include/sys/mmio.h')
-rw-r--r--src/include/sys/mmio.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/include/sys/mmio.h b/src/include/sys/mmio.h
index 3536071c8..35392f22e 100644
--- a/src/include/sys/mmio.h
+++ b/src/include/sys/mmio.h
@@ -9,22 +9,44 @@ 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.
+ */
void* mmio_map(void* ra, size_t pages);
+
+
+/** @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
+ */
int mmio_unmap(void* ea, size_t pages);
+
/** @fn mmio_hmer_read()
- * @brief Reads the protected HMER register.
+ * @brief Reads and returns protected HMER register.
+ * @return HMER register value
*/
uint64_t mmio_hmer_read();
+
/** @fn mmio_hmer_write()
* @brief Writes the protected HMER register.
*
* @param[in] value - The value to write into the HMER.
- *
- * @returns 0.
*/
-int mmio_hmer_write(uint64_t value);
+void mmio_hmer_write(uint64_t value);
+
/** @fn mmio_xscom_mutex()
* @brief Returns the per-CPU mutex for the XSCOM hardware logic.
@@ -36,7 +58,7 @@ int mmio_hmer_write(uint64_t value);
*
* @note The task should only interact with the mutex while protected by an
* affinity pin. If the pin is moved the mutex is no longer
- * guarenteed for the CPU the task is executing on.
+ * guaranteed for the CPU the task is executing on.
*/
mutex_t * mmio_xscom_mutex();
OpenPOWER on IntegriCloud