summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-05-25 17:11:33 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-06-02 15:13:56 -0500
commitf0e44bc60ca80d5bf875f0836a119e361d84dd44 (patch)
treed1b7d267a6e292e8c6d10363e7c1df6f7067cb9c /src/include/kernel
parent83e18669b6c2322c8eb5f8632ac823877d765e0d (diff)
downloadtalos-hostboot-f0e44bc60ca80d5bf875f0836a119e361d84dd44.tar.gz
talos-hostboot-f0e44bc60ca80d5bf875f0836a119e361d84dd44.zip
Add HMER access syscalls (as fastpath).
Change-Id: Icc7494986d19950a18cc9ee53fd5125c86096a72 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/105 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/ppcconsts.S1
-rw-r--r--src/include/kernel/syscalls.H53
2 files changed, 50 insertions, 4 deletions
diff --git a/src/include/kernel/ppcconsts.S b/src/include/kernel/ppcconsts.S
index ae972f269..38fd5e6e5 100644
--- a/src/include/kernel/ppcconsts.S
+++ b/src/include/kernel/ppcconsts.S
@@ -102,6 +102,7 @@
.set HDEC,310
.set HSRR0,314
.set HSRR1,315
+ .set HMER,336
.set HID0,1008
.set PIR, 1023
diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H
index 330db6922..1b87c5019 100644
--- a/src/include/kernel/syscalls.H
+++ b/src/include/kernel/syscalls.H
@@ -1,36 +1,81 @@
+/** @file syscalls.H
+ * @brief Defines all the system call IDs to be shared between the kernel and
+ * the system libc.
+ */
+
#ifndef __KERNEL_SYSCALLS_H
#define __KERNEL_SYSCALLS_H
namespace Systemcalls
{
+ /** @enum SysCalls
+ * @brief List of normal system calls and their IDs.
+ *
+ * These are passed by userspace code via r3 when the sc instruction is
+ * executed. The kernel performs a case statement to switch to the
+ * appropriate system call handler.
+ */
enum SysCalls
{
+ /** task_yield() */
TASK_YIELD = 0,
+ /** task_create() */
TASK_START,
+ /** task_end() */
TASK_END,
- TASK_GETTID,
-
+
+ /** mutex_create() */
MUTEX_CREATE,
+ /** mutex_destroy() */
MUTEX_DESTROY,
+ /** mutex_lock() */
MUTEX_LOCK_CONTESTED,
+ /** mutex_unlock() */
MUTEX_UNLOCK_CONTESTED,
-
+
+ /** msgq_create() */
MSGQ_CREATE,
+ /** msgq_destroy() */
MSGQ_DESTROY,
+ /** VFS internal */
MSGQ_REGISTER_ROOT,
+ /** VFS internal */
MSGQ_RESOLVE_ROOT,
-
+
+ /** msg_send() */
MSG_SEND,
+ /** msg_sendrecv() */
MSG_SENDRECV,
+ /** msg_respond() */
MSG_RESPOND,
+ /** msg_wait() */
MSG_WAIT,
+ /** mmio_map() */
MMIO_MAP,
+ /** mmio_unmap() */
MMIO_UNMAP,
+ /** nanosleep() */
TIME_NANOSLEEP,
SYSCALL_MAX
};
+
+ /** @enum SysCalls_FastPath
+ * @brief List of fast-path system calls and their IDs.
+ *
+ * @note If any of these change, their handling in start.S must also be
+ * updated. The ASM code relies on these values.
+ */
+ enum SysCalls_FastPath
+ {
+ /** mmio_hmer_read() */
+ MMIO_HMER_READ = 0x0800,
+ /** mmio_hmer_write() */
+ MMIO_HMER_WRITE = 0x0801,
+
+ SYSCALL_FASTPATH_MAX
+ };
};
#endif
OpenPOWER on IntegriCloud