2005-04-21 16:53:53 +02:00
|
|
|
#ifndef _CONFIG_H
|
|
|
|
#define _CONFIG_H
|
|
|
|
|
|
|
|
/* Minix release and version numbers. */
|
2005-05-03 17:39:41 +02:00
|
|
|
#define OS_RELEASE "3"
|
2010-06-07 17:57:14 +02:00
|
|
|
#define OS_VERSION "1.8"
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-05-03 17:39:41 +02:00
|
|
|
/* This file sets configuration parameters for the MINIX kernel, FS, and PM.
|
2005-04-21 16:53:53 +02:00
|
|
|
* 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.
|
2005-08-29 15:52:08 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2005-04-21 16:53:53 +02:00
|
|
|
*/
|
|
|
|
|
2005-08-29 15:52:08 +02:00
|
|
|
/* 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
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-07-14 17:14:44 +02:00
|
|
|
/* 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.
|
2005-08-29 15:52:08 +02:00
|
|
|
*
|
|
|
|
* These can be changed in sys_config.h.
|
2005-07-14 17:14:44 +02:00
|
|
|
*/
|
2005-08-29 15:52:08 +02:00
|
|
|
#define NR_PROCS _NR_PROCS
|
|
|
|
#define NR_SYS_PROCS _NR_SYS_PROCS
|
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 02:20:42 +01:00
|
|
|
#define NR_SYS_CHUNKS BITMAP_CHUNKS(NR_SYS_PROCS)
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* 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) */
|
|
|
|
|
2005-10-18 12:34:54 +02:00
|
|
|
/* Which processes should receive diagnostics from the kernel and system?
|
2005-07-21 20:32:49 +02:00
|
|
|
* Directly sending it to TTY only displays the output. Sending it to the
|
|
|
|
* log driver will cause the diagnostics to be buffered and displayed.
|
2005-10-18 12:34:54 +02:00
|
|
|
* 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.
|
2005-07-21 20:32:49 +02:00
|
|
|
*/
|
2005-10-18 12:34:54 +02:00
|
|
|
#define OUTPUT_PROCS_ARRAY { TTY_PROC_NR, LOG_PROC_NR, NONE }
|
2005-07-08 19:24:49 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/* 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) */
|
2005-07-29 17:22:58 +02:00
|
|
|
#define NR_RS_LINES 4 /* # rs232 terminals (0 to 4) */
|
2005-05-09 16:35:26 +02:00
|
|
|
#define NR_PTYS 32 /* # pseudo terminals (0 to 64) */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-07-10 14:13:29 +02:00
|
|
|
/* This feature enable the counting of system calls in PM and FS */
|
|
|
|
#define ENABLE_SYSCALL_STATS 0
|
|
|
|
|
2010-07-13 17:30:17 +02:00
|
|
|
/* Max. number of I/O ranges that can be assigned to a process */
|
|
|
|
#define NR_IO_RANGE 64
|
|
|
|
|
|
|
|
/* Max. number of device memory ranges that can be assigned to a process */
|
|
|
|
#define NR_MEM_RANGE 20
|
|
|
|
|
|
|
|
/* Max. number of IRQs that can be assigned to a process */
|
|
|
|
#define NR_IRQ 8
|
|
|
|
|
|
|
|
/* Scheduling priorities. Values must start at zero (highest
|
|
|
|
* priority) and increment.
|
|
|
|
*/
|
|
|
|
#define NR_SCHED_QUEUES 16 /* MUST equal minimum priority + 1 */
|
|
|
|
#define TASK_Q 0 /* highest, used for kernel tasks */
|
|
|
|
#define MAX_USER_Q 0 /* highest priority for user processes */
|
|
|
|
#define USER_Q ((MIN_USER_Q - MAX_USER_Q) / 2 + MAX_USER_Q) /* default
|
|
|
|
(should correspond to nice 0) */
|
|
|
|
#define MIN_USER_Q (NR_SCHED_QUEUES - 1) /* minimum priority for user
|
|
|
|
processes */
|
|
|
|
/* default scheduling quanta */
|
|
|
|
#define USER_QUANTUM 200
|
|
|
|
|
2010-07-20 09:27:45 +02:00
|
|
|
/* defualt user process cpu */
|
|
|
|
#define USER_DEFAULT_CPU -1 /* use the default cpu or do not change the
|
|
|
|
current one */
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/*===========================================================================*
|
|
|
|
* 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. */
|
2005-08-29 15:52:08 +02:00
|
|
|
#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) */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* Set the FP_FORMAT type based on the machine selected, either hw or sw */
|
2005-08-29 15:52:08 +02:00
|
|
|
#define FP_NONE _FP_NONE /* no floating point support */
|
|
|
|
#define FP_IEEE _FP_IEEE /* conform IEEE floating point standard */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-08-29 15:52:08 +02:00
|
|
|
/* _MINIX_CHIP is defined in sys_config.h. */
|
|
|
|
#define CHIP _MINIX_CHIP
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-08-29 15:52:08 +02:00
|
|
|
/* _MINIX_FP_FORMAT is defined in sys_config.h. */
|
|
|
|
#define FP_FORMAT _MINIX_FP_FORMAT
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-08-29 15:52:08 +02:00
|
|
|
/* _ASKDEV and _FASTLOAD are defined in sys_config.h. */
|
|
|
|
#define ASKDEV _ASKDEV
|
|
|
|
#define FASTLOAD _FASTLOAD
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-10-30 16:53:38 +01:00
|
|
|
/* Enable or disable system profiling. */
|
Split of architecture-dependent and -independent functions for i386,
mainly in the kernel and headers. This split based on work by
Ingmar Alting <iaalting@cs.vu.nl> done for his Minix PowerPC architecture
port.
. kernel does not program the interrupt controller directly, do any
other architecture-dependent operations, or contain assembly any more,
but uses architecture-dependent functions in arch/$(ARCH)/.
. architecture-dependent constants and types defined in arch/$(ARCH)/include.
. <ibm/portio.h> moved to <minix/portio.h>, as they have become, for now,
architecture-independent functions.
. int86, sdevio, readbios, and iopenable are now i386-specific kernel calls
and live in arch/i386/do_* now.
. i386 arch now supports even less 86 code; e.g. mpx86.s and klib86.s have
gone, and 'machine.protected' is gone (and always taken to be 1 in i386).
If 86 support is to return, it should be a new architecture.
. prototypes for the architecture-dependent functions defined in
kernel/arch/$(ARCH)/*.c but used in kernel/ are in kernel/proto.h
. /etc/make.conf included in makefiles and shell scripts that need to
know the building architecture; it defines ARCH=<arch>, currently only
i386.
. some basic per-architecture build support outside of the kernel (lib)
. in clock.c, only dequeue a process if it was ready
. fixes for new include files
files deleted:
. mpx/klib.s - only for choosing between mpx/klib86 and -386
. klib86.s - only for 86
i386-specific files files moved (or arch-dependent stuff moved) to arch/i386/:
. mpx386.s (entry point)
. klib386.s
. sconst.h
. exception.c
. protect.c
. protect.h
. i8269.c
2006-12-22 16:22:27 +01:00
|
|
|
#define SPROFILE 1 /* statistical profiling */
|
2006-10-30 16:53:38 +01:00
|
|
|
#define CPROFILE 0 /* call profiling */
|
|
|
|
|
2009-10-09 12:48:46 +02:00
|
|
|
/* PCI configuration parameters */
|
|
|
|
#define NR_PCIBUS 40
|
|
|
|
#define NR_PCIDEV 50
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
#endif /* _CONFIG_H */
|