[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wortel patch: Load task server

From: Niels Möller
Subject: wortel patch: Load task server
Date: 19 Jan 2004 16:38:37 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Below is one more patch, to make wortel load the task server module
properly. (Might have to be applied by hand, as I hade to truncate it
to get rid of other changes).

Is it possible to make wortel load and start all modules in the same
way, or are there some modules that need special treatment? If wortel
doesn't know in advance what each module does, the module when started
have to send a bootstrap message to wortel saying "Hi, I'm
implementing the FOO protocol".

The below code is an example of shameless copy, paste, replace.

With these changes to wortel, loading and starting a dummy task-server
seems to work fine. (Hmm, I also made changes to start_components to
have it start the task-server. That change is not included here. I'm
not sure what's the best way to submit these patches are, as they
won't work anyway without the task server dummy, which I for now keep
in my ptrivate cvs repository, for lack of a better place).


--- wortel/wortel.c     2 Oct 2003 10:39:36 -0000       1.19
+++ wortel/wortel.c     19 Jan 2004 15:24:45 -0000
@@ -251,74 +251,43 @@ load_components (void)
                   &mods[MOD_PHYSMEM].start, &mods[MOD_PHYSMEM].end,
   loader_remove_region ("physmem-mod");

+  /* Do the same for the task server */
+  loader_elf_dest ("task-server", mods[MOD_TASK].start,
+                  mods[MOD_TASK].end, &addr, &end_addr);
+  nr_fpages = make_fpages (addr, end_addr, fpages);
+  while (nr_fpages--)
+    sigma0_get_fpage (fpages[nr_fpages]);
+  /* Now load the task server to its destination address.  */
+  addr = mods[MOD_TASK].start;
+  end_addr = mods[MOD_TASK].end;
+  if (!addr)
+    panic ("No task server found");
+  loader_elf_load ("task-server", addr, end_addr,
+                  &mods[MOD_TASK].start, &mods[MOD_TASK].end,
+                  &mods[MOD_TASK].ip);
+  loader_remove_region ("task-mod");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]