summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2011-08-10 11:22:49 -0500
committerMATTHEW S. BARTH <msbarth@us.ibm.com>2011-08-10 17:30:34 -0500
commitb977bf9b78b1d7d57cefa3f8a2b7ebd0b7de4563 (patch)
treee15e50c0e9a80096c4a26db97d7c8686223a80d3 /src/include/kernel
parent2a7a99c1e088b8b87e4b019d24550c047fb86e0d (diff)
downloadblackbird-hostboot-b977bf9b78b1d7d57cefa3f8a2b7ebd0b7de4563.tar.gz
blackbird-hostboot-b977bf9b78b1d7d57cefa3f8a2b7ebd0b7de4563.zip
Allocate block system call stub
Change-Id: Ief3476b5306bc231c9d3044b2736fcd195e840b1 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/243 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/basesegment.H12
-rw-r--r--src/include/kernel/syscalls.H9
-rw-r--r--src/include/kernel/vmmmgr.H12
3 files changed, 29 insertions, 4 deletions
diff --git a/src/include/kernel/basesegment.H b/src/include/kernel/basesegment.H
index 7f1c78dfa..8086c08b5 100644
--- a/src/include/kernel/basesegment.H
+++ b/src/include/kernel/basesegment.H
@@ -6,6 +6,8 @@
#include <kernel/segment.H>
+// Forward declaration.
+class MessageQueue;
class Block;
/** @class BaseSegment
@@ -41,6 +43,16 @@ class BaseSegment : public Segment
*/
bool handlePageFault(task_t* i_task, uint64_t i_addr);
+ /**
+ * @brief Allocates a block of virtual memory of the given size
+ * @param i_mq[in] - Message queue to be associated with the block
+ * @param i_va[in] - Base virtual address of the block to be allocated
+ * @param i_size[in] - Requested virtual memory size of the block
+ * @return int - 0 for successful block allocation, non-zero otherwise
+ */
+ static int mmAllocBlock(MessageQueue* i_mq,void* i_va,
+ uint64_t i_size);
+
private:
/**
* @brief Internal implementation of init function.
diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H
index a76bb82a9..dad90056c 100644
--- a/src/include/kernel/syscalls.H
+++ b/src/include/kernel/syscalls.H
@@ -56,17 +56,18 @@ namespace Systemcalls
/** futex_wait() */
FUTEX_WAIT,
-
/** futex_wake() */
FUTEX_WAKE,
/** shutdown() */
MISC_SHUTDOWN,
-
/** cpu_core_type() */
- MISC_CPUCORETYPE,
+ MISC_CPUCORETYPE,
/** cpu_dd_level() */
- MISC_CPUDDLEVEL,
+ MISC_CPUDDLEVEL,
+
+ /** mm_alloc_block() */
+ MM_ALLOC_BLOCK,
SYSCALL_MAX
};
diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H
index feee7a731..7c8c63c22 100644
--- a/src/include/kernel/vmmmgr.H
+++ b/src/include/kernel/vmmmgr.H
@@ -6,6 +6,8 @@
#include <kernel/types.h>
#include <kernel/spinlock.H>
+class MessageQueue;
+
class VmmManager
{
public:
@@ -68,6 +70,16 @@ class VmmManager
*/
static int devUnmap(void* ea);
+ /**
+ * @brief Allocates a block of virtual memory of the given size
+ * @param i_mq[in] - Message queue to be associated with the block
+ * @param i_va[in] - Base virtual address of the block to be allocated
+ * @param i_size[in] - Requested virtual memory size of the block
+ * @return int - 0 for successful block allocation, non-zero otherwise
+ */
+ static int mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size);
+
+
protected:
VmmManager();
~VmmManager() {};
OpenPOWER on IntegriCloud