diff options
author | marcus <marcus> | 2004-10-26 03:12:56 +0000 |
---|---|---|
committer | marcus <marcus> | 2004-10-26 03:12:56 +0000 |
commit | 282b4402a57531809e6ae4acac1ac2da085d8669 (patch) | |
tree | 9502fc4d61ed7ab3b283e7a94a4705967263d716 /task/ia32-cmain.c | |
parent | 17c63a18de3494a4d3bbf45ffc415a5c7945524d (diff) |
hurd/
2004-10-26 Marcus Brinkmann <marcus@gnu.org>
* startup.h: New file.
* headers.m4: Add hurd/startup.h.
wortel/
2004-10-26 Marcus Brinkmann <marcus@gnu.org>
* startup.c: Rewritten to match new startup data format.
* wortel.c: Include <hurd/startup.h>.
(start_task): Large chunks rewritten to match new
startup data format.
task/
2004-10-26 Marcus Brinkmann <marcus@gnu.org>
* ia32-crt0.S (__hurd_startup_data): New symbol.
(_start): Save the first argument on the stack in
__hurd_startup_data.
* ia32-cmain.c: Include <hurd/startup.h>.
(__hurd_startup_data): New prototype.
(wortel_thread_id, wortel_cap_id): Do not initialize statically.
(cmain): Initialize wortel_thread_id and wortel_cap_id.
Diffstat (limited to 'task/ia32-cmain.c')
-rw-r--r-- | task/ia32-cmain.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/task/ia32-cmain.c b/task/ia32-cmain.c index 8721db3..1263229 100644 --- a/task/ia32-cmain.c +++ b/task/ia32-cmain.c @@ -1,5 +1,5 @@ /* ia32-cmain.c - Startup code for the ia32. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. Written by Marcus Brinkmann. This file is part of the GNU Hurd. @@ -33,11 +33,16 @@ #include "task.h" #include <hurd/wortel.h> +#include <hurd/startup.h> -/* Initialized in cmain. FIXME. */ -l4_thread_id_t wortel_thread_id = 0xc8001; -wortel_cap_id_t wortel_cap_id = 1; +/* Initialized by the machine-specific startup-code. */ +extern struct hurd_startup_data *__hurd_startup_data; + + +/* Initialized in cmain. */ +l4_thread_id_t wortel_thread_id; +wortel_cap_id_t wortel_cap_id; /* Initialize libl4, setup the argument vector, and pass control over @@ -51,6 +56,9 @@ cmain (void) l4_init (); l4_init_stubs (); + wortel_thread_id = __hurd_startup_data->wortel.server; + wortel_cap_id = __hurd_startup_data->wortel.cap_id; + argc = 1; argv = alloca (sizeof (char *) * 2); argv[0] = program_name; |