⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.h

📁 一个简单的操作系统minix的核心代码
💻 H
字号:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				include/minix/config.h	 	 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

02600	#ifndef _CONFIG_H
02601	#define _CONFIG_H
02602	
02603	/* Minix release and version numbers. */
02604	#define OS_RELEASE "2.0"
02605	#define OS_VERSION "0"
02606	
02607	/* This file sets configuration parameters for the MINIX kernel, FS, and MM.
02608	 * It is divided up into two main sections.  The first section contains
02609	 * user-settable parameters.  In the second section, various internal system
02610	 * parameters are set based on the user-settable parameters.
02611	 */
02612	
02613	/*===========================================================================*
02614	 *              This section contains user-settable parameters               *
02615	 *===========================================================================*/
02616	#define MACHINE       IBM_PC    /* Must be one of the names listed below */
02617	
02618	#define IBM_PC             1    /* any  8088 or 80x86-based system */
02619	#define SUN_4             40    /* any Sun SPARC-based system */
02620	#define SUN_4_60          40    /* Sun-4/60 (aka SparcStation 1 or Campus) */
02621	#define ATARI             60    /* ATARI ST/STe/TT (68000/68030) */
02622	#define AMIGA             61    /* Commodore Amiga (68000) */
02623	#define MACINTOSH         62    /* Apple Macintosh (68000) */
02624	
02625	/* Word size in bytes (a constant equal to sizeof(int)). */
02626	#if __ACK__
02627	#define _WORD_SIZE      _EM_WSIZE
02628	#endif
02629	
02630	
02631	/* If ROBUST is set to 1, writes of i-node, directory, and indirect blocks
02632	 * from the cache happen as soon as the blocks are modified.  This gives a more
02633	 * robust, but slower, file system.  If it is set to 0, these blocks are not
02634	 * given any special treatment, which may cause problems if the system crashes.
02635	 */
02636	#define ROBUST             0    /* 0 for speed, 1 for robustness */
02637	
02638	/* Number of slots in the process table for user processes. */
02639	#define NR_PROCS          32
02640	
02641	/* The buffer cache should be made as large as you can afford. */
02642	#if (MACHINE == IBM_PC && _WORD_SIZE == 2)
02643	#define NR_BUFS           40    /* # blocks in the buffer cache */
02644	#define NR_BUF_HASH       64    /* size of buf hash table; MUST BE POWER OF 2*/
02645	#endif
02646	
02647	#if (MACHINE == IBM_PC && _WORD_SIZE == 4)
02648	#define NR_BUFS          512    /* # blocks in the buffer cache */
02649	#define NR_BUF_HASH     1024    /* size of buf hash table; MUST BE POWER OF 2*/
02650	#endif
02651	
02652	#if (MACHINE == SUN_4_60)
02653	#define NR_BUFS          512    /* # blocks in the buffer cache (<=1536) */
02654	#define NR_BUF_HASH      512    /* size of buf hash table; MUST BE POWER OF 2*/
02655	#endif
02656	
02657	#if (MACHINE == ATARI)
02658	#define NR_BUFS         1536    /* # blocks in the buffer cache (<=1536) */
02659	#define NR_BUF_HASH     2048    /* size of buf hash table; MUST BE POWER OF 2*/
02660	#endif
02661	
02662	/* Defines for kernel configuration. */
02663	#define AUTO_BIOS          0    /* xt_wini.c - use Western's autoconfig BIOS */
02664	#define LINEWRAP           1    /* console.c - wrap lines at column 80 */
02665	#define ALLOW_GAP_MESSAGES 1    /* proc.c - allow messages in the gap between
02666	                                 * the end of bss and lowest stack address */
02667	
02668	/* Enable or disable the second level file system cache on the RAM disk. */
02669	#define ENABLE_CACHE2      0
02670	
02671	/* Include or exclude device drivers.  Set to 1 to include, 0 to exclude. */
02672	#define ENABLE_NETWORKING  0    /* enable TCP/IP code */
02673	#define ENABLE_AT_WINI     1    /* enable AT winchester driver */
02674	#define ENABLE_BIOS_WINI   0    /* enable BIOS winchester driver */
02675	#define ENABLE_ESDI_WINI   0    /* enable ESDI winchester driver */
02676	#define ENABLE_XT_WINI     0    /* enable XT winchester driver */
02677	#define ENABLE_ADAPTEC_SCSI 0   /* enable ADAPTEC SCSI driver */
02678	#define ENABLE_MITSUMI_CDROM 0  /* enable Mitsumi CD-ROM driver */
02679	#define ENABLE_SB_AUDIO    0    /* enable Soundblaster audio driver */
02680	
02681	/* DMA_SECTORS may be increased to speed up DMA based drivers. */
02682	#define DMA_SECTORS        1    /* DMA buffer size (must be >= 1) */
02683	
02684	/* Include or exclude backwards compatibility code. */
02685	#define ENABLE_BINCOMPAT   0    /* for binaries using obsolete calls */
02686	#define ENABLE_SRCCOMPAT   0    /* for sources using obsolete calls */
02687	
02688	/* Determine which device to use for pipes. */
02689	#define PIPE_DEV    ROOT_DEV    /* put pipes on root device */
02690	
02691	/* NR_CONS, NR_RS_LINES, and NR_PTYS determine the number of terminals the
02692	 * system can handle.
02693	 */
02694	#define NR_CONS            2    /* # system consoles (1 to 8) */
02695	#define NR_RS_LINES        0    /* # rs232 terminals (0, 1, or 2) */
02696	#define NR_PTYS            0    /* # pseudo terminals (0 to 64) */
02697	
02698	#if (MACHINE == ATARI)
02699	/* The next define says if you have an ATARI ST or TT */
02700	#define ATARI_TYPE        TT
02701	#define ST                 1    /* all ST's and Mega ST's */
02702	#define STE                2    /* all STe and Mega STe's */
02703	#define TT                 3
02704	
02705	/* if SCREEN is set to 1 graphical screen operations are possible */
02706	#define SCREEN             1    
02707	
02708	/* This define says whether the keyboard generates VT100 or IBM_PC escapes. */
02709	#define KEYBOARD       VT100    /* either VT100 or IBM_PC */
02710	#define VT100            100
02711	
02712	/* The next define determines the kind of partitioning. */
02713	#define PARTITIONING   SUPRA    /* one of the following or ATARI */
02714	#define SUPRA              1    /*ICD, SUPRA and BMS are all the same */
02715	#define BMS                1
02716	#define ICD                1
02717	#define CBHD               2
02718	#define EICKMANN           3
02719	
02720	/* Define the number of hard disk drives on your system. */
02721	#define NR_ACSI_DRIVES     3    /* typically 0 or 1 */
02722	#define NR_SCSI_DRIVES     1    /* typically 0 (ST, STe) or 1 (TT) */
02723	
02724	/* Some systems need to have a little delay after each winchester
02725	 * commands. These systems need FAST_DISK set to 0. Other disks do not
02726	 * need this delay, and thus can have FAST_DISK set to 1 to avoid this delay.
02727	 */
02728	#define FAST_DISK          1    /* 0 or 1 */
02729	
02730	/* Note: if you want to make your kernel smaller, you can set NR_FD_DRIVES
02731	 * to 0. You will still be able to boot minix.img from floppy. However, you
02732	 * MUST fetch both the root and usr filesystem from a hard disk
02733	 */
02734	
02735	/* Define the number of floppy disk drives on your system. */
02736	#define NR_FD_DRIVES       1    /* 0, 1, 2 */
02737	
02738	/* This configuration define controls parallel printer code. */
02739	#define PAR_PRINTER        1    /* disable (0) / enable (1) parallel printer */
02740	
02741	/* This configuration define controls disk controller clock code. */
02742	#define HD_CLOCK           1    /* disable (0) / enable (1) hard disk clock */
02743	
02744	#endif
02745	
02746	
02747	/*===========================================================================*
02748	 *      There are no user-settable parameters after this line                *
02749	 *===========================================================================*/
02750	/* Set the CHIP type based on the machine selected. The symbol CHIP is actually
02751	 * indicative of more than just the CPU.  For example, machines for which
02752	 * CHIP == INTEL are expected to have 8259A interrrupt controllers and the
02753	 * other properties of IBM PC/XT/AT/386 types machines in general. */
02754	#define INTEL             1     /* CHIP type for PC, XT, AT, 386 and clones */
02755	#define M68000            2     /* CHIP type for Atari, Amiga, Macintosh    */
02756	#define SPARC             3     /* CHIP type for SUN-4 (e.g. SPARCstation)  */
02757	
02758	/* Set the FP_FORMAT type based on the machine selected, either hw or sw    */
02759	#define FP_NONE           0     /* no floating point support                */
02760	#define FP_IEEE           1     /* conform IEEE floating point standard     */
02761	
02762	#if (MACHINE == IBM_PC)
02763	#define CHIP          INTEL
02764	#define SHADOWING         0
02765	#define ENABLE_WINI     (ENABLE_AT_WINI || ENABLE_BIOS_WINI || \
02766	                        ENABLE_ESDI_WINI || ENABLE_XT_WINI)
02767	#define ENABLE_SCSI     (ENABLE_ADAPTEC_SCSI)
02768	#define ENABLE_CDROM    (ENABLE_MITSUMI_CDROM)
02769	#define ENABLE_AUDIO    (ENABLE_SB_AUDIO)
02770	#endif
02771	
02772	#if (MACHINE == ATARI) || (MACHINE == AMIGA) || (MACHINE == MACINTOSH)
02773	#define CHIP         M68000
02774	#define SHADOWING         1
02775	#endif
02776	
02777	#if (MACHINE == SUN_4) || (MACHINE == SUN_4_60)
02778	#define CHIP          SPARC
02779	#define FP_FORMAT   FP_IEEE
02780	#define SHADOWING         0
02781	#endif
02782	
02783	#if (MACHINE == ATARI) || (MACHINE == SUN_4)
02784	#define ASKDEV            1     /* ask for boot device */
02785	#define FASTLOAD          1     /* use multiple block transfers to init ram */
02786	#endif
02787	
02788	#if (ATARI_TYPE == TT) /* and all other 68030's */
02789	#define FPP
02790	#undef SHADOWING
02791	#define SHADOWING 0
02792	#endif
02793	
02794	#ifndef FP_FORMAT
02795	#define FP_FORMAT   FP_NONE
02796	#endif
02797	
02798	/* The file buf.h uses MAYBE_WRITE_IMMED. */
02799	#if ROBUST
02800	#define MAYBE_WRITE_IMMED  WRITE_IMMED  /* slower but perhaps safer */
02801	#else
02802	#define MAYBE_WRITE_IMMED 0             /* faster */
02803	#endif
02804	
02805	#ifndef MACHINE
02806	error "In <minix/config.h> please define MACHINE"
02807	#endif
02808	
02809	#ifndef CHIP
02810	error "In <minix/config.h> please define MACHINE to have a legal value"
02811	#endif
02812	
02813	#if (MACHINE == 0)
02814	error "MACHINE has incorrect value (0)"
02815	#endif
02816	
02817	#endif /* _CONFIG_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -