2005-04-21 16:53:53 +02:00
|
|
|
/* The object file of "table.c" contains most kernel data. Variables that
|
|
|
|
* are declared in the *.h files appear with EXTERN in front of them, as in
|
|
|
|
*
|
|
|
|
* EXTERN int x;
|
|
|
|
*
|
|
|
|
* Normally EXTERN is defined as extern, so when they are included in another
|
|
|
|
* file, no storage is allocated. If EXTERN were not present, but just say,
|
|
|
|
*
|
|
|
|
* int x;
|
|
|
|
*
|
|
|
|
* then including this file in several source files would cause 'x' to be
|
|
|
|
* declared several times. While some linkers accept this, others do not,
|
|
|
|
* so they are declared extern when included normally. However, it must be
|
|
|
|
* declared for real somewhere. That is done here, by redefining EXTERN as
|
|
|
|
* the null string, so that inclusion of all *.h files in table.c actually
|
|
|
|
* generates storage for them.
|
|
|
|
*
|
|
|
|
* Various variables could not be declared EXTERN, but are declared PUBLIC
|
|
|
|
* or PRIVATE. The reason for this is that extern variables cannot have a
|
|
|
|
* default initialization. If such variables are shared, they must also be
|
|
|
|
* declared in one of the *.h files without the initialization. Examples
|
2005-07-29 17:26:23 +02:00
|
|
|
* include 'boot_image' (this file) and 'idt' and 'gdt' (protect.c).
|
2005-04-21 16:53:53 +02:00
|
|
|
*
|
|
|
|
* Changes:
|
2009-12-11 01:08:19 +01:00
|
|
|
* Nov 22, 2009 rewrite of privilege management (Cristiano Giuffrida)
|
2005-08-04 21:23:03 +02:00
|
|
|
* Aug 02, 2005 set privileges and minimal boot image (Jorrit N. Herder)
|
2005-04-21 16:53:53 +02:00
|
|
|
* Oct 17, 2004 updated above and tasktab comments (Jorrit N. Herder)
|
2005-07-21 20:36:40 +02:00
|
|
|
* May 01, 2004 changed struct for system image (Jorrit N. Herder)
|
2005-04-21 16:53:53 +02:00
|
|
|
*/
|
|
|
|
#define _TABLE
|
|
|
|
|
|
|
|
#include "kernel.h"
|
|
|
|
#include "proc.h"
|
2005-05-31 11:50:51 +02:00
|
|
|
#include "ipc.h"
|
2005-04-21 16:53:53 +02:00
|
|
|
#include <minix/com.h>
|
|
|
|
|
2009-12-11 01:08:19 +01:00
|
|
|
/* Define boot process flags. */
|
2010-06-28 23:53:37 +02:00
|
|
|
#define BVM_F (PROC_FULLVM) /* boot processes with VM */
|
|
|
|
#define OVM_F (PERF_SYS_CORE_FULLVM ? PROC_FULLVM : 0) /* critical boot
|
|
|
|
* processes with
|
|
|
|
* optional VM.
|
|
|
|
*/
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* The system image table lists all programs that are part of the boot image.
|
|
|
|
* The order of the entries here MUST agree with the order of the programs
|
2009-12-11 01:08:19 +01:00
|
|
|
* in the boot image and all kernel tasks must come first.
|
2010-03-23 00:44:55 +01:00
|
|
|
* The order of the entries here matches the priority NOTIFY messages are
|
|
|
|
* delivered to a given process. NOTIFY messages are always delivered with
|
|
|
|
* the highest priority. DS must be the first system process in the list to
|
|
|
|
* allow reliable asynchronous publishing of system events. RS comes right after
|
|
|
|
* to prioritize ping messages periodically delivered to system processes.
|
2006-03-10 17:10:05 +01:00
|
|
|
*
|
2011-01-27 13:18:33 +01:00
|
|
|
* Each entry provides the process number, flags, and a name for the process
|
|
|
|
* table.
|
2005-04-21 16:53:53 +02:00
|
|
|
*/
|
2006-06-20 11:56:06 +02:00
|
|
|
|
2005-07-29 17:26:23 +02:00
|
|
|
PUBLIC struct boot_image image[] = {
|
2011-01-27 13:18:33 +01:00
|
|
|
/* process nr, flags, name */
|
2011-04-08 17:14:48 +02:00
|
|
|
{ASYNCM, 0, "asyncm"},
|
2011-01-27 13:18:33 +01:00
|
|
|
{IDLE, 0, "idle" },
|
|
|
|
{CLOCK, 0, "clock" },
|
|
|
|
{SYSTEM, 0, "system"},
|
|
|
|
{HARDWARE, 0, "kernel"},
|
2010-07-13 17:30:17 +02:00
|
|
|
|
2011-01-27 13:18:33 +01:00
|
|
|
{DS_PROC_NR, BVM_F, "ds" },
|
|
|
|
{RS_PROC_NR, 0, "rs" },
|
2010-07-13 17:30:17 +02:00
|
|
|
|
2011-01-27 13:18:33 +01:00
|
|
|
{PM_PROC_NR, OVM_F, "pm" },
|
|
|
|
{SCHED_PROC_NR,OVM_F, "sched" },
|
2011-04-08 17:14:48 +02:00
|
|
|
{VFS_PROC_NR, BVM_F, "vfs" },
|
2011-01-27 13:18:33 +01:00
|
|
|
{MEM_PROC_NR, BVM_F, "memory"},
|
|
|
|
{LOG_PROC_NR, BVM_F, "log" },
|
|
|
|
{TTY_PROC_NR, BVM_F, "tty" },
|
|
|
|
{MFS_PROC_NR, BVM_F, "mfs" },
|
|
|
|
{VM_PROC_NR, 0, "vm" },
|
|
|
|
{PFS_PROC_NR, BVM_F, "pfs" },
|
|
|
|
{INIT_PROC_NR, BVM_F, "init" },
|
2005-04-21 16:53:53 +02:00
|
|
|
};
|
|
|
|
|
2010-12-21 11:44:45 +01:00
|
|
|
/* Verify the size of the system image table at compile time.
|
2005-08-04 21:23:03 +02:00
|
|
|
* If a problem is detected, the size of the 'dummy' array will be negative,
|
|
|
|
* causing a compile time error. Note that no space is actually allocated
|
|
|
|
* because 'dummy' is declared extern.
|
|
|
|
*/
|
2005-08-29 18:47:18 +02:00
|
|
|
extern int dummy[(NR_BOOT_PROCS==sizeof(image)/
|
|
|
|
sizeof(struct boot_image))?1:-1];
|