phunix/include/minix/config.h
Cristiano Giuffrida d1fd04e72a Initialization protocol for system services.
SYSLIB CHANGES:
- SEF framework now supports a new SEF Init request type from RS. 3 different
callbacks are available (init_fresh, init_lu, init_restart) to specify
initialization code when a service starts fresh, starts after a live update,
or restarts.

SYSTEM SERVICE CHANGES:
- Initialization code for system services is now enclosed in a callback SEF will
automatically call at init time. The return code of the callback will
tell RS whether the initialization completed successfully.
- Each init callback can access information passed by RS to initialize. As of
now, each system service has access to the public entries of RS's system process
table to gather all the information required to initialize. This design
eliminates many existing or potential races at boot time and provides a uniform
initialization interface to system services. The same interface will be reused
for the upcoming publish/subscribe model to handle dynamic 
registration / deregistration of system services.

VM CHANGES:
- Uniform privilege management for all system services. Every service uses the
same call mask format. For boot services, VM copies the call mask from init
data. For dynamic services, VM still receives the call mask via rs_set_priv
call that will be soon replaced by the upcoming publish/subscribe model.

RS CHANGES:
- The system process table has been reorganized and split into private entries
and public entries. Only the latter ones are exposed to system services.
- VM call masks are now entirely configured in rs/table.c
- RS has now its own slot in the system process table. Only kernel tasks and
user processes not included in the boot image are now left out from the system
process table.
- RS implements the initialization protocol for system services.
- For services in the boot image, RS blocks till initialization is complete and
panics when failure is reported back. Services are initialized in their order of
appearance in the boot image priv table and RS blocks to implements synchronous
initialization for every system service having the flag SF_SYNCH_BOOT set.
- For services started dynamically, the initialization protocol is implemented
as though it were the first ping for the service. In this case, if the
system service fails to report back (or reports failure), RS brings the service
down rather than trying to restart it.
2010-01-08 01:20:42 +00:00

104 lines
4.0 KiB
C

#ifndef _CONFIG_H
#define _CONFIG_H
/* Minix release and version numbers. */
#define OS_RELEASE "3"
#define OS_VERSION "1.5"
/* This file sets configuration parameters for the MINIX kernel, FS, and PM.
* It is divided up into two main sections. The first section contains
* user-settable parameters. In the second section, various internal system
* parameters are set based on the user-settable parameters.
*
* Parts of config.h have been moved to sys_config.h, which can be included
* by other include files that wish to get at the configuration data, but
* don't want to pollute the users namespace. Some editable values have
* gone there.
*
*/
/* The MACHINE (called _MINIX_MACHINE) setting can be done
* in <minix/machine.h>.
*/
#include <minix/sys_config.h>
#define MACHINE _MINIX_MACHINE
#define IBM_PC _MACHINE_IBM_PC
#define SUN_4 _MACHINE_SUN_4
#define SUN_4_60 _MACHINE_SUN_4_60
#define ATARI _MACHINE_ATARI
#define MACINTOSH _MACHINE_MACINTOSH
/* Number of slots in the process table for non-kernel processes. The number
* of system processes defines how many processes with special privileges
* there can be. User processes share the same properties and count for one.
*
* These can be changed in sys_config.h.
*/
#define NR_PROCS _NR_PROCS
#define NR_SYS_PROCS _NR_SYS_PROCS
#define NR_SYS_CHUNKS BITMAP_CHUNKS(NR_SYS_PROCS)
/* Number of controller tasks (/dev/cN device classes). */
#define NR_CTRLRS 2
/* DMA_SECTORS may be increased to speed up DMA based drivers. */
#define DMA_SECTORS 1 /* DMA buffer size (must be >= 1) */
/* Which processes should receive diagnostics from the kernel and system?
* Directly sending it to TTY only displays the output. Sending it to the
* log driver will cause the diagnostics to be buffered and displayed.
* Messages are sent by src/lib/sysutil/kputc.c to these processes, in
* the order of this array, which must be terminated by NONE. This is used
* by drivers and servers that printf().
* The kernel does this for its own kprintf() in kernel/utility.c, also using
* this array, but a slightly different mechanism.
*/
#define OUTPUT_PROCS_ARRAY { TTY_PROC_NR, LOG_PROC_NR, NONE }
/* NR_CONS, NR_RS_LINES, and NR_PTYS determine the number of terminals the
* system can handle.
*/
#define NR_CONS 4 /* # system consoles (1 to 8) */
#define NR_RS_LINES 4 /* # rs232 terminals (0 to 4) */
#define NR_PTYS 32 /* # pseudo terminals (0 to 64) */
/* This feature enable the counting of system calls in PM and FS */
#define ENABLE_SYSCALL_STATS 0
/*===========================================================================*
* There are no user-settable parameters after this line *
*===========================================================================*/
/* Set the CHIP type based on the machine selected. The symbol CHIP is actually
* indicative of more than just the CPU. For example, machines for which
* CHIP == INTEL are expected to have 8259A interrrupt controllers and the
* other properties of IBM PC/XT/AT/386 types machines in general. */
#define INTEL _CHIP_INTEL /* CHIP type for PC, XT, AT, 386 and clones */
#define M68000 _CHIP_M68000 /* CHIP type for Atari, Amiga, Macintosh */
#define SPARC _CHIP_SPARC /* CHIP type for SUN-4 (e.g. SPARCstation) */
/* Set the FP_FORMAT type based on the machine selected, either hw or sw */
#define FP_NONE _FP_NONE /* no floating point support */
#define FP_IEEE _FP_IEEE /* conform IEEE floating point standard */
/* _MINIX_CHIP is defined in sys_config.h. */
#define CHIP _MINIX_CHIP
/* _MINIX_FP_FORMAT is defined in sys_config.h. */
#define FP_FORMAT _MINIX_FP_FORMAT
/* _ASKDEV and _FASTLOAD are defined in sys_config.h. */
#define ASKDEV _ASKDEV
#define FASTLOAD _FASTLOAD
/* Enable or disable system profiling. */
#define SPROFILE 1 /* statistical profiling */
#define CPROFILE 0 /* call profiling */
/* PCI configuration parameters */
#define NR_PCIBUS 40
#define NR_PCIDEV 50
#endif /* _CONFIG_H */