diff options
author | Justus Winter <justus@gnupg.org> | 2017-03-12 17:16:40 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-03-12 17:41:04 +0100 |
commit | 4089f37cdd776e046d51604041c3fe62a2bc1435 (patch) | |
tree | 22a6f3203934672fd2d02b934023c8afd241fbf5 /boot | |
parent | ef729f8642cc96ddfd3f5b5db4d6aac057b1d397 (diff) | |
download | hurd-4089f37cdd776e046d51604041c3fe62a2bc1435.tar.gz hurd-4089f37cdd776e046d51604041c3fe62a2bc1435.tar.bz2 hurd-4089f37cdd776e046d51604041c3fe62a2bc1435.zip |
Pass the kernel's task port to proc.
Previously, the early server bootstrap relied upon a specific task
layout to determine the kernels task port. Explicitly pass it from
the kernel instead.
* boot/boot.c (default_boot_script): Add '--kernel-task' parameter to
ext2fs.
(main): New bootscript variable 'kernel-task'.
* libdiskfs/boot-start.c (diskfs_kernel_task): Declaration variable.
(diskfs_start_bootstrap): If '--kernel-task' was given to us, pass it
along to startup.
* libdiskfs/opts-std-startup.c (diskfs_kernel_task): New variable.
(startup_options): Add '--kernel-task' option.
(parse_startup_opt): Handle option.
* proc/main.c (kernel_task): New variable.
(OPT_KERNEL_TASK): New macro.
(options): New variable.
(parse_opt): New function.
(main): Parse options. Use 'kernel_task' if provided.
* release/servers.boot: Add '--kernel-task' parameter to ext2fs.
* startup/startup.c (OPT_KERNEL_TASK): New macro.
(options): Add '--kernel-task' option.
(kernel_task): New variable.
(insert_ports_fnc_t): New declaration.
(run): Add argument for a function that inserts rights into the newly
created task and adds arguments to the argument vector.
(argz_task_insert_right): New function.
(proc_insert_ports): Likewise.
(parse_opt): New function.
(main): Pass the kernel's task port to proc.
(frob_kernel_process): Use the kernel's task port.
Diffstat (limited to 'boot')
-rw-r--r-- | boot/boot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/boot/boot.c b/boot/boot.c index 13a19d28..978f56e6 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -520,6 +520,7 @@ const char *default_boot_script = " --multiboot-command-line=${kernel-command-line}" " --host-priv-port=${host-port}" " --device-master-port=${device-port}" + " --kernel-task=${kernel-task}" " --exec-server-task=${exec-task}" " -T device ${root-device} $(task-create) $(task-resume)" "\n" @@ -649,6 +650,8 @@ main (int argc, char **argv, char **envp) : (int) pseudo_privileged_host_port) || boot_script_set_variable ("device-port", VAL_PORT, (integer_t) pseudo_master_device_port) + || boot_script_set_variable ("kernel-task", VAL_PORT, + (integer_t) pseudo_kernel) || boot_script_set_variable ("kernel-command-line", VAL_STR, (integer_t) kernel_command_line) || boot_script_set_variable ("root-device", |