summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot/Makefile2
-rw-r--r--boot/boot.c44
-rw-r--r--boot/mig-mutate.h4
3 files changed, 48 insertions, 2 deletions
diff --git a/boot/Makefile b/boot/Makefile
index 85b098b8..f02f87cd 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -23,7 +23,7 @@ SRCS = mach-crt0.c boot.c ux.c sigvec.S syscall.S \
COMMON-OBJS = notifyServer.o deviceServer.o \
ioServer.o io_replyUser.o device_replyUser.o \
termServer.o bootstrapServer.o boot_script.o userland-boot.o
-MIGSTUBS = machServer.o
+MIGSTUBS = machServer.o mach_hostServer.o gnumachServer.o
OBJS = boot.o $(COMMON-OBJS) $(MIGSTUBS)
UX-OBJS = mach-crt0.o uxboot.o sigvec.o syscall.o ux.o $(COMMON-OBJS)
target = boot
diff --git a/boot/boot.c b/boot/boot.c
index ec1ab6c1..0238a9fe 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -50,6 +50,8 @@
#include "bootstrap_S.h"
/* #include "tioctl_S.h" */
#include "mach_S.h"
+#include "mach_host_S.h"
+#include "gnumach_S.h"
#include "boot_script.h"
@@ -121,6 +123,7 @@ mach_port_t privileged_host_port, master_device_port;
mach_port_t pseudo_privileged_host_port, pseudo_master_device_port;
mach_port_t receive_set;
mach_port_t pseudo_console, pseudo_root, pseudo_time;
+mach_port_t pseudo_pset;
auth_t authserver;
struct store *root_store;
@@ -219,7 +222,9 @@ boot_demuxer (mach_msg_header_t *inp,
(routine = device_server_routine (inp)) ||
(routine = notify_server_routine (inp)) ||
(routine = term_server_routine (inp)) ||
- (routine = mach_server_routine (inp))
+ (routine = mach_server_routine (inp)) ||
+ (routine = mach_host_server_routine (inp)) ||
+ (routine = gnumach_server_routine (inp))
/* (routine = tioctl_server_routine (inp)) */)
{
(*routine) (inp, outp);
@@ -605,6 +610,11 @@ main (int argc, char **argv, char **envp)
if (foo != MACH_PORT_NULL)
mach_port_deallocate (mach_task_self (), foo);
+ mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE,
+ &pseudo_pset);
+ mach_port_move_member (mach_task_self (), pseudo_pset,
+ receive_set);
+
if (kernel_command_line == 0)
asprintf (&kernel_command_line, "%s %s root=%s",
argv[0], bootstrap_args, bootdevice);
@@ -1933,3 +1943,35 @@ S_vm_set_default_memory_manager (mach_port_t host_priv,
return KERN_SUCCESS;
}
+kern_return_t
+S_host_processor_set_priv (mach_port_t host_priv,
+ mach_port_t set_name,
+ mach_port_t *set)
+{
+ if (host_priv != pseudo_privileged_host_port)
+ return KERN_INVALID_HOST;
+
+ mach_port_insert_right (mach_task_self (),
+ pseudo_pset,
+ pseudo_pset,
+ MACH_MSG_TYPE_MAKE_SEND);
+ *set = pseudo_pset;
+ return KERN_SUCCESS;
+}
+
+kern_return_t
+S_register_new_task_notification (mach_port_t host_priv,
+ mach_port_t notification)
+{
+ return KERN_SUCCESS;
+}
+
+kern_return_t
+S_processor_set_tasks(mach_port_t processor_set,
+ task_array_t *task_list,
+ mach_msg_type_number_t *task_listCnt)
+{
+ *task_list = NULL;
+ *task_listCnt = 0;
+ return KERN_SUCCESS;
+}
diff --git a/boot/mig-mutate.h b/boot/mig-mutate.h
index e09dba6e..ef90b734 100644
--- a/boot/mig-mutate.h
+++ b/boot/mig-mutate.h
@@ -19,3 +19,7 @@
#define MACH_IMPORTS \
import "mig-decls.h";
+#define MACH_HOST_IMPORTS \
+ import "mig-decls.h";
+#define GNUMACH_IMPORTS \
+ import "mig-decls.h";